Zrythm
a highly automated and intuitive digital audio workstation
|
Data Structures | |
struct | ZEvent |
A Zrythm event. More... | |
struct | EventManager |
Event manager for the UI. More... | |
Macros | |
#define | EVENT_MANAGER (gZrythm->event_manager) |
#define | EVENT_QUEUE (EVENT_MANAGER->mqueue) |
The event queue. | |
#define | EVENT_MANAGER_MAX_EVENTS 4000 |
#define | event_queue_push_back_event(q, x) mpmc_queue_push_back (q, (void *) x) |
#define | event_queue_dequeue_event(q, x) mpmc_queue_dequeue (q, (void **) x) |
#define | EVENTS_PUSH(et, _arg) |
Push events. | |
#define | EVENTS_PUSH_NOW(et, _arg) |
Enumerations | |
enum class | 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 , EventType::ET_ARRANGER_SELECTIONS_CHANGED_REDRAW_EVERYTHING , EventType::ET_ARRANGER_SELECTIONS_ACTION_FINISHED , EventType::ET_TRACK_STATE_CHANGED , EventType::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_TRANSPORT_TOTAL_BARS_CHANGED , ET_TRACK_AUTOMATION_VISIBILITY_CHANGED , ET_AUTOMATION_TRACK_CHANGED , EventType::ET_CLIP_EDITOR_REGION_CHANGED , EventType::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 , EventType::ET_TOOL_CHANGED , EventType::ET_RULER_VIEWPORT_CHANGED , ET_PLUGIN_ADDED , ET_PLUGINS_ADDED , ET_PLUGINS_REMOVED , ET_PLUGIN_DELETED , ET_PLUGIN_CRASHED , ET_PLAYHEAD_POS_CHANGED , ET_PLAYHEAD_POS_CHANGED_MANUALLY , ET_AUTOMATION_VALUE_CHANGED , ET_TRACKLIST_SELECTIONS_CHANGED , EventType::ET_PLUGIN_VISIBILITY_CHANGED , EventType::ET_PLUGIN_WINDOW_VISIBILITY_CHANGED , EventType::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_MODULATOR_ADDED , ET_RT_SELECTIONS_CHANGED , ET_PINNED_TRACKLIST_SIZE_CHANGED , EventType::ET_DRUM_MODE_CHANGED , EventType::ET_TRACK_LANES_VISIBILITY_CHANGED , EventType::ET_TRACK_LANE_ADDED , EventType::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_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_CHORD_KEY_CHANGED , EventType::ET_CHORD_PRESET_ADDED , EventType::ET_CHORD_PRESET_EDITED , EventType::ET_CHORD_PRESET_REMOVED , EventType::ET_CHORD_PRESET_PACK_ADDED , EventType::ET_CHORD_PRESET_PACK_EDITED , EventType::ET_CHORD_PRESET_PACK_REMOVED , EventType::ET_CHORDS_UPDATED , EventType::ET_PIANO_ROLL_KEY_ZOOM_CHANGED , EventType::ET_PIANO_ROLL_KEY_HEIGHT_CHANGED , EventType::ET_MAIN_WINDOW_LOADED , EventType::ET_PROJECT_LOADED , EventType::ET_PROJECT_SAVED , EventType::ET_PLUGIN_LATENCY_CHANGED , EventType::ET_ARRANGER_HIGHLIGHT_CHANGED , ET_ENGINE_ACTIVATE_CHANGED , ET_ENGINE_BUFFER_SIZE_CHANGED , ET_ENGINE_SAMPLE_RATE_CHANGED , ET_MIDI_BINDINGS_CHANGED , ET_PORT_CONNECTION_CHANGED , ET_EDITOR_FUNCTION_APPLIED , ET_SPLASH_CLOSED , ET_AUTOMATION_VALUE_VISIBILITY_CHANGED , ET_PROJECT_SELECTION_TYPE_CHANGED , EventType::ET_AUDIO_SELECTIONS_RANGE_CHANGED , ET_PLUGIN_COLLECTIONS_CHANGED , ET_SNAP_GRID_OPTIONS_CHANGED , ET_TRANSPORT_RECORDING_ON_OFF_CHANGED , EventType::ET_TRANSPORT_ROLL_REQUIRED , EventType::ET_TRANSPORT_PAUSE_REQUIRED , EventType::ET_TRANSPORT_MOVE_BACKWARD_REQUIRED , EventType::ET_TRANSPORT_MOVE_FORWARD_REQUIRED , EventType::ET_TRANSPORT_TOGGLE_LOOP_REQUIRED , EventType::ET_TRANSPORT_TOGGLE_RECORDING_REQUIRED , EventType::ET_TRACK_FREEZE_CHANGED , EventType::ET_LOG_WARNING_STATE_CHANGED , EventType::ET_PLAYHEAD_SCROLL_MODE_CHANGED , EventType::ET_TRACK_FADER_BUTTON_CHANGED , EventType::ET_PLUGIN_PRESET_SAVED , EventType::ET_PLUGIN_PRESET_LOADED , EventType::ET_TRACK_FOLD_CHANGED , EventType::ET_MIXER_CHANNEL_MIDI_FX_EXPANDED_CHANGED , EventType::ET_MIXER_CHANNEL_INSERTS_EXPANDED_CHANGED , EventType::ET_MIXER_CHANNEL_SENDS_EXPANDED_CHANGED , EventType::ET_REGION_ACTIVATED , EventType::ET_PIANO_ROLL_KEY_ON_OFF , EventType::ET_VELOCITIES_RAMPED , EventType::ET_AUDIO_REGION_FADE_IN_CHANGED , ET_AUDIO_REGION_FADE_OUT_CHANGED , EventType::ET_AUDIO_REGION_GAIN_CHANGED , EventType::ET_FILE_BROWSER_BOOKMARK_ADDED , EventType::ET_FILE_BROWSER_BOOKMARK_DELETED , EventType::ET_ARRANGER_SCROLLED , EventType::ET_FILE_BROWSER_INSTRUMENT_CHANGED } |
Functions | |
ZEvent * | event_new (void) |
void | event_free (ZEvent *self) |
EventManager * | event_manager_new (void) |
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_event (EventManager *self, ZEvent *ev) |
Processes the given event. | |
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. | |
void | event_manager_free (EventManager *self) |
UI event handling.
#define EVENT_MANAGER (gZrythm->event_manager) |
Definition at line 67 of file event_manager.h.
#define EVENT_MANAGER_MAX_EVENTS 4000 |
Definition at line 72 of file event_manager.h.
#define EVENT_QUEUE (EVENT_MANAGER->mqueue) |
The event queue.
Definition at line 70 of file event_manager.h.
#define event_queue_dequeue_event | ( | q, | |
x ) mpmc_queue_dequeue (q, (void **) x) |
Definition at line 76 of file event_manager.h.
#define event_queue_push_back_event | ( | q, | |
x ) mpmc_queue_push_back (q, (void *) x) |
Definition at line 74 of file event_manager.h.
#define EVENTS_PUSH | ( | et, | |
_arg ) |
Push events.
Definition at line 81 of file event_manager.h.
#define EVENTS_PUSH_NOW | ( | et, | |
_arg ) |
Definition at line 110 of file event_manager.h.
|
strong |
Enumerator | |
---|---|
ET_ARRANGER_SELECTIONS_CHANGED_REDRAW_EVERYTHING | Redraws all arrangers. |
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_CLIP_EDITOR_REGION_CHANGED | Region (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_TOOL_CHANGED | Selected tool (mode) changed. |
ET_RULER_VIEWPORT_CHANGED | Zoom level or view area changed. Arg: RulerWidget pointer. |
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 | Plugin's control port values changed. |
ET_DRUM_MODE_CHANGED | Drum mode changed. Arg: Track pointer. |
ET_TRACK_LANES_VISIBILITY_CHANGED | Track lanes visibility changed. Arg: (null). |
ET_TRACK_LANE_ADDED | Track lane added. Arg: (null). |
ET_TRACK_LANE_REMOVED | Track lane removed. Arg: (null). |
ET_CHORD_PRESET_ADDED | Chord preset added. Arg: None. |
ET_CHORD_PRESET_EDITED | Chord preset edited. Arg: None. |
ET_CHORD_PRESET_REMOVED | Chord preset removed. Arg: None. |
ET_CHORD_PRESET_PACK_ADDED | Chord preset pack added. Arg: None. |
ET_CHORD_PRESET_PACK_EDITED | Chord preset pack edited. Arg: None. |
ET_CHORD_PRESET_PACK_REMOVED | Chord preset pack removed. Arg: None. |
ET_CHORDS_UPDATED | Chords updated in chord editor. Arg: None. |
ET_PIANO_ROLL_KEY_ZOOM_CHANGED | Piano roll key zoom level changed. Arg: None. |
ET_PIANO_ROLL_KEY_HEIGHT_CHANGED | Piano roll key height level changed. This is sent after the new height is calculated to set the widget's size request. Arg: None. |
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_AUDIO_SELECTIONS_RANGE_CHANGED | Range selection changed in audio editor. |
ET_TRANSPORT_ROLL_REQUIRED | Transport roll is required on the GTK thread. Param: None. |
ET_TRANSPORT_PAUSE_REQUIRED | Transport pause is required on the GTK thread. Param: None. |
ET_TRANSPORT_MOVE_BACKWARD_REQUIRED | Transport move backward is required on the GTK thread. Param: None. |
ET_TRANSPORT_MOVE_FORWARD_REQUIRED | Transport move forward is required on the GTK thread. Param: None. |
ET_TRANSPORT_TOGGLE_LOOP_REQUIRED | Transport toggle loop is required on the GTK thread. Param: None. |
ET_TRANSPORT_TOGGLE_RECORDING_REQUIRED | Transport toggle recording is required on the GTK thread. Param: None. |
ET_TRACK_FREEZE_CHANGED | Track freeze status changed. Param: Track. |
ET_LOG_WARNING_STATE_CHANGED | Log has new unseen warnings or warnings have been seen. |
ET_PLAYHEAD_SCROLL_MODE_CHANGED | Follow playhead/scroll edges state changed. |
ET_TRACK_FADER_BUTTON_CHANGED | Fader button (mute/solo/etc) changed. Param: pointer to Track. |
ET_PLUGIN_PRESET_SAVED | Plugin preset saved. Arg: Plugin. |
ET_PLUGIN_PRESET_LOADED | Plugin preset loaded. Arg: Plugin. |
ET_TRACK_FOLD_CHANGED | Track folded status changed. Arg: track. |
ET_MIXER_CHANNEL_MIDI_FX_EXPANDED_CHANGED | Channel MIDI FX revealed status changed in the mixer. Arg: Pointer to Channel. |
ET_MIXER_CHANNEL_INSERTS_EXPANDED_CHANGED | Channel inserts revealed status changed in the mixer. Arg: Pointer to Channel. |
ET_MIXER_CHANNEL_SENDS_EXPANDED_CHANGED | Channel sends revealed status changed in the mixer. Arg: Pointer to Channel. |
ET_REGION_ACTIVATED | Double click (or similar action) on region. Arg: None. |
ET_PIANO_ROLL_KEY_ON_OFF | Piano roll key pressed or unpressed. Arg: None. |
ET_VELOCITIES_RAMPED | Velocities have been ramped. Arg: None. |
ET_AUDIO_REGION_FADE_IN_CHANGED | Audio region fade in/out changed. Arg: Region pointer. |
ET_AUDIO_REGION_GAIN_CHANGED | Audio region gain changed. Arg: Region pointer. |
ET_FILE_BROWSER_BOOKMARK_ADDED | File browser bookmark added. Arg: None. |
ET_FILE_BROWSER_BOOKMARK_DELETED | File browser bookmark deleted. Arg: None. |
ET_ARRANGER_SCROLLED | An arranger was scrolled. Arg: ArrangerWidget pointer |
ET_FILE_BROWSER_INSTRUMENT_CHANGED | Auditioning instrument changed in file/chord pack browser. Arg: None. |
EventManager * event_manager_new | ( | void | ) |
Creates the event queue and starts the event loop.
Must be called from a GTK thread.
void event_manager_process_event | ( | EventManager * | self, |
ZEvent * | ev ) |
Processes the given event.
The caller is responsible for putting the event back in the object pool if needed.
void event_manager_process_now | ( | EventManager * | self | ) |
Processes the events now.
Must only be called from the GTK thread.