Widgets module

Widgets are custom GUI elements that reflect the backend.

Classes

struct _AudioEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUDIO region is selected.
struct _AutomationEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUTOMATION region is selected.
struct _BarSliderWidget
Draggable slider to adjust an amount (such as a percentage).
struct _ChordEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a CHORD region is selected.
struct _ChordObjectWidget
Widget for chords inside the ChordObjectTrack.
struct _ChordSelectorWindowWidget
A GtkPopover to create a ChordDescriptor for use in the ChordTrack's ChordObject's.
struct _ClipEditorInnerWidget
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.
struct _FileBrowserWidget
The file browser for samples, MIDI files, etc.
struct _InstrumentTrackWidget
Top is the track part and bot is the automation part.
struct _MainWindowWidget
The main window of Zrythm.
struct _MarkerWidget
Widget for markers inside the MarkerTrack.
struct _MarkerDialogWidget
A dialog to edit a Marker's name.
struct _MidiEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.
struct _PinnedTracklistWidget
The PinnedTracklistWidget contains special tracks (chord, marker, etc.) as thin boxes above the normal tracklist.
struct _PluginBrowserWidget
The plugin browser allows to browse and filter available Plugin's on the system.
struct _PortSelectorPopoverWidget
A GtkPopover to select Port's.
struct _ProjectAssistantWidget
A widget that allows selecting a project to load or create.
struct _ScaleObjectWidget
Widget for scales inside the ScaleObjectTrack.
struct _ScaleSelectorWindowWidget
A GtkPopover to create a ScaleDescriptor for use in the ScaleTrack's ScaleObject's.
struct TrackWidgetPrivate
The TrackWidget is split into 3 parts inside a DzlMultiPaned.
struct _TrackTopGridWidget
Top is the track part and bot is the automation part.
struct _TracklistWidget
The TracklistWidget is a DzlMultiPaned holding all the Track's in the Project.

Enums

enum MidiActivityBarAnimation { MAB_ANIMATION_BAR, MAB_ANIMATION_FLASH }
enum UiCursorState { UI_CURSOR_STATE_DEFAULT, UI_CURSOR_STATE_RESIZE_L, UI_CURSOR_STATE_REPEAT_L, UI_CURSOR_STATE_RESIZE_R, UI_CURSOR_STATE_REPEAT_R, UI_CURSOR_STATE_RESIZE_UP }
Various cursor states to be shared.
enum UiOverlayAction { UI_OVERLAY_ACTION_NONE, UI_OVERLAY_ACTION_CREATING_RESIZING_R, UI_OVERLAY_ACTION_CREATING_MOVING, UI_OVERLAY_ACTION_RESIZING_L, UI_OVERLAY_ACTION_RESIZING_R, UI_OVERLAY_ACTION_RESIZING_UP, UI_OVERLAY_ACTION_STRETCHING_L, UI_OVERLAY_ACTION_STRETCHING_R, UI_OVERLAY_ACTION_AUDITIONING, UI_OVERLAY_ACTION_AUTOFILLING, UI_OVERLAY_ACTION_ERASING, UI_OVERLAY_ACTION_STARTING_MOVING, UI_OVERLAY_ACTION_STARTING_MOVING_COPY, UI_OVERLAY_ACTION_STARTING_MOVING_LINK, UI_OVERLAY_ACTION_MOVING, UI_OVERLAY_ACTION_MOVING_COPY, UI_OVERLAY_ACTION_MOVING_LINK, UI_OVERLAY_ACTION_STARTING_CHANGING_CURVE, UI_OVERLAY_ACTION_CHANGING_CURVE, UI_OVERLAY_ACTION_STARTING_SELECTION, UI_OVERLAY_ACTION_SELECTING, UI_OVERLAY_ACTION_STARTING_DELETE_SELECTION, UI_OVERLAY_ACTION_DELETE_SELECTING, UI_OVERLAY_ACTION_STARTING_RAMP, UI_OVERLAY_ACTION_RAMPING, UI_OVERLAY_ACTION_CUTTING }
Various overlay actions to be shared.

Typedefs

using AudioEditorSpaceWidget = struct _AudioEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUDIO region is selected.
using AutomationEditorSpaceWidget = struct _AutomationEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUTOMATION region is selected.
using BarSliderWidget = struct _BarSliderWidget
Draggable slider to adjust an amount (such as a percentage).
using ChordEditorSpaceWidget = struct _ChordEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a CHORD region is selected.
using ChordObjectWidget = struct _ChordObjectWidget
Widget for chords inside the ChordObjectTrack.
using ChordSelectorWindowWidget = struct _ChordSelectorWindowWidget
A GtkPopover to create a ChordDescriptor for use in the ChordTrack's ChordObject's.
using ClipEditorInnerWidget = struct _ClipEditorInnerWidget
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.
using FileBrowserWidget = struct _FileBrowserWidget
The file browser for samples, MIDI files, etc.
using InstrumentTrackWidget = struct _InstrumentTrackWidget
Top is the track part and bot is the automation part.
using MainWindowWidget = struct _MainWindowWidget
The main window of Zrythm.
using MarkerWidget = struct _MarkerWidget
Widget for markers inside the MarkerTrack.
using MarkerDialogWidget = struct _MarkerDialogWidget
A dialog to edit a Marker's name.
using MidiEditorSpaceWidget = struct _MidiEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.
using PinnedTracklistWidget = struct _PinnedTracklistWidget
The PinnedTracklistWidget contains special tracks (chord, marker, etc.) as thin boxes above the normal tracklist.
using PluginBrowserWidget = struct _PluginBrowserWidget
The plugin browser allows to browse and filter available Plugin's on the system.
using PortSelectorPopoverWidget = struct _PortSelectorPopoverWidget
A GtkPopover to select Port's.
using ProjectAssistantWidget = struct _ProjectAssistantWidget
A widget that allows selecting a project to load or create.
using ScaleObjectWidget = struct _ScaleObjectWidget
Widget for scales inside the ScaleObjectTrack.
using ScaleSelectorWindowWidget = struct _ScaleSelectorWindowWidget
A GtkPopover to create a ScaleDescriptor for use in the ScaleTrack's ScaleObject's.
using TrackTopGridWidget = struct _TrackTopGridWidget
Top is the track part and bot is the automation part.
using TracklistWidget = struct _TracklistWidget
The TracklistWidget is a DzlMultiPaned holding all the Track's in the Project.
using UiCursorState = enum UiCursorState
Various cursor states to be shared.
using UiOverlayAction = enum UiOverlayAction
Various overlay actions to be shared.
using KnobWithNameWidget = struct _KnobWithNameWidget
A vertical box with a knob at the top and a name at the bottom.

Functions

static void on_motion(GtkWidget* widget, GdkEventMotion* event, RulerMarkerWidget* self)
Sets the appropriate cursor.
void ruler_marker_widget_update_tooltip(RulerMarkerWidget* self, int show)
Updates the tooltips.
void audio_editor_space_widget_update_size_group(AudioEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
void automation_arranger_widget_create_ap(AutomationArrangerWidget* self, const Position* pos, const double start_y, Region* region)
Create an AutomationPointat the given Position in the given Track's AutomationTrack.
auto automation_arranger_bg_widget_new(RulerWidget* ruler, ArrangerWidget* arranger) -> AutomationArrangerBgWidget*
Creates a AutomationArrangerBgWidget for the given arranger and ruler.
void automation_editor_space_widget_update_size_group(AutomationEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
auto automation_point_widget_new(AutomationPoint* automation_point) -> AutomationPointWidget*
Creates a automation_point.
void automation_point_widget_update_tooltip(AutomationPointWidget* self, int show)
Updates the tooltips.
auto _bar_slider_widget_new(float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, float min, float max, int w, int h, float zero, int decimals, BarSliderUpdateMode mode, const char* suffix) -> BarSliderWidget*
Creates a bar slider widget for floats.
G_DECLARE_FINAL_TYPE(BotBarWidget, bot_bar_widget, Z, BOT_BAR_WIDGET, GtkBox) typedef struct _BotBarWidget
void bot_bar_change_status(const char* message)
Changes the message shown in the status bar.
auto bot_bar_status_contains(const char* substr) -> int
Returns if the bot bar contains the given substring.
auto chord_arranger_bg_widget_new(RulerWidget* ruler, ArrangerWidget* arranger) -> ChordArrangerBgWidget*
Creates a ChordArrangerBgWidget for the given arranger and ruler.
void chord_editor_space_widget_update_size_group(ChordEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
auto chord_object_widget_new(ChordObject* chord) -> ChordObjectWidget*
Creates a chord widget.
auto chord_selector_window_widget_new(ChordDescriptor* descr) -> ChordSelectorWindowWidget*
Creates the popover.
void control_room_widget_setup(ControlRoomWidget* self, ControlRoom* control_room)
Sets up the ControlRoomWidget.
G_DECLARE_FINAL_TYPE(CpuWidget, cpu_widget, Z, CPU_WIDGET, GtkDrawingArea) typedef struct _CpuWidget
void cpu_widget_setup(CpuWidget* self)
Starts drawing the CPU usage.
auto digital_meter_widget_new(DigitalMeterType type, NoteLength* note_length, NoteType* note_type, const char* caption) -> DigitalMeterWidget*
Creates a digital meter with the given type ( bpm or position).
auto _digital_meter_widget_new_for_position(void* obj, void(*)(void*) drag_begin, void(*)(void*, Position*) get_val, void(*)(void*, Position*) set_val, void(*)(void*) drag_end, const char* caption) -> DigitalMeterWidget*
Creates a digital meter for an arbitrary position.
void editor_ruler_widget_set_ruler_marker_position(EditorRulerWidget* self, RulerMarkerWidget* rm, GtkAllocation* allocation)
Called when allocating the children of the RulerWidget to allocate the RulerMarkerWidget.
auto export_dialog_widget_new() -> ExportDialogWidget*
Creates an export dialog widget and displays it.
G_DECLARE_FINAL_TYPE(FaderWidget, fader_widget, Z, FADER_WIDGET, GtkDrawingArea) typedef struct _FaderWidget
A FaderWidget reflects a Fader object's state.
void fader_widget_setup(FaderWidget* self, Fader* fader, int width)
Creates a new Fader widget and binds it to the given Fader.
auto file_browser_widget_new() -> FileBrowserWidget*
Creates a new FileBrowserWidget.
auto inspector_widget_new() -> InspectorWidget*
Creates the inspector widget.
void inspector_widget_refresh(InspectorWidget* self)
Refreshes the inspector widget (shows current selections.
auto instrument_track_widget_new(Track* track) -> InstrumentTrackWidget*
Creates a new track widget from the given track.
void instrument_track_widget_on_plugin_delete_event(GtkWidget* window, GdkEventKey* e, gpointer data)
Updates ui_active state if instrument window is closed.
void instrument_track_widget_refresh(InstrumentTrackWidget* self)
Updates changes in the backend to the ui.
void live_waveform_widget_setup_engine(LiveWaveformWidget* self)
Creates a LiveWaveformWidget for the AudioEngine.
auto main_window_widget_new(ZrythmApp* app) -> MainWindowWidget*
Creates a main_window widget using the given main_window data.
void main_window_widget_open(MainWindowWidget* win, GFile* file)
TODO.
auto marker_widget_new(Marker* marker) -> MarkerWidget*
Creates a marker widget.
auto marker_dialog_widget_new(MarkerWidget* owner) -> MarkerDialogWidget*
Creates the dialog.
void midi_activity_bar_widget_setup_track(MidiActivityBarWidget* self, Track* track)
Creates a MidiActivityBarWidget for use inside TrackWidget implementations.
void midi_activity_bar_widget_set_animation(MidiActivityBarWidget* self, MidiActivityBarAnimation animation)
Sets the animation.
void midi_activity_bar_widget_setup_engine(MidiActivityBarWidget* self)
Creates a MidiActivityBarWidget for the AudioEngine.
void midi_editor_space_widget_update_size_group(MidiEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
void midi_editor_space_widget_refresh_labels(MidiEditorSpaceWidget* self, int hard_refresh)
Refresh the labels only (for highlighting).
auto midi_note_widget_new(MidiNote* midi_note) -> MidiNoteWidget*
Creates a midi_note.
void midi_note_widget_destroy(MidiNoteWidget* self)
Destroys the widget completely.
auto midi_note_widget_is_resize_l(MidiNoteWidget* self, int x) -> int
Returns if the current position is for resizing L.
auto midi_note_widget_is_resize_r(MidiNoteWidget* self, int x) -> int
Returns if the current position is for resizing L.
auto pinned_tracklist_widget_get_hit_track(PinnedTracklistWidget* self, double x, double y) -> TrackWidget*
Gets TrackWidget hit at the given coordinates.
void pinned_tracklist_widget_hard_refresh(PinnedTracklistWidget* self)
Removes and readds the tracks.
void pinned_tracklist_widget_setup(PinnedTracklistWidget* self, Tracklist* tracklist)
Sets up the PinnedTracklistWidget.
auto plugin_browser_widget_new() -> PluginBrowserWidget*
Instantiates a new PluginBrowserWidget.
auto port_selector_popover_widget_new(PortConnectionsPopoverWidget* owner, Port* port) -> PortSelectorPopoverWidget*
Creates the popover.
auto project_assistant_widget_new(GtkWindow* parent, int show_create_new_project) -> ProjectAssistantWidget*
Creates a ProjectAssistantWidget.
void quantize_box_widget_setup(QuantizeBoxWidget* self, QuantizeOptions* q_opts)
Sets up the QuantizeBoxWidget.
auto quantize_dialog_widget_new(QuantizeOptions* opts) -> QuantizeDialogWidget*
Creates an quantize dialog widget and displays it.
void region_widget_setup(RegionWidget* self, Region* region)
Sets up the RegionWidget.
auto region_widget_is_resize_l(RegionWidget* self, int x) -> int
Returns if the current position is for resizing L.
auto region_widget_is_resize_r(RegionWidget* self, int x) -> int
Returns if the current position is for resizing R.
void region_widget_draw_name(RegionWidget* self, cairo_t* cr)
Draws the name of the Region.
void region_widget_delete(RegionWidget* self)
Destroys the widget completely.
auto region_widget_get_private(RegionWidget* self) -> RegionWidgetPrivate*
Returns the private struct.
void right_dock_edge_widget_setup(RightDockEdgeWidget* self)
Sets up the widget.
auto scale_object_widget_new(ScaleObject* scale) -> ScaleObjectWidget*
Creates a scale widget.
void scale_object_widget_select(ScaleObjectWidget* self, int select)
Sets the "selected" GTK state flag and adds the note to TimelineSelections.
auto scale_selector_window_widget_new(ScaleObjectWidget* owner) -> ScaleSelectorWindowWidget*
Creates the popover.
auto _slider_bar_widget_new(float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, float min, float max, int width, int height, float zero, const char* text) -> SliderBarWidget*
Creates a new SliderBarWidget.
void snap_box_widget_refresh(SnapBoxWidget* self, SnapGrid* sg)
Sets the snap_box toggled states after deactivating the callbacks.
auto timeline_arranger_widget_get_track_lane_at_y(TimelineArrangerWidget* self, double y) -> TrackLane*
Gets hit TrackLane at y.
auto timeline_arranger_widget_get_track_at_y(TimelineArrangerWidget* self, double y) -> Track*
Gets the Track at y.
auto timeline_arranger_widget_get_automation_track_at_y(TimelineArrangerWidget* self, double y) -> AutomationTrack*
Returns the hit AutomationTrack at y.
void timeline_arranger_widget_set_select_type(TimelineArrangerWidget* self, double y)
Determines the selection time (objects/range) and sets it.
void timeline_arranger_widget_create_region(TimelineArrangerWidget* self, const RegionType type, Track* track, TrackLane* lane, AutomationTrack* at, const Position* pos)
Create a Region at the given Position in the given Track's given TrackLane.
void timeline_arranger_widget_create_chord_or_scale(TimelineArrangerWidget* self, Track* track, double y, const Position* pos)
Wrapper for timeline_arranger_widget_create_chord() or timeline_arranger_widget_create_scale().
void timeline_arranger_widget_create_scale(TimelineArrangerWidget* self, Track* track, const Position* pos)
Create a ScaleObject at the given Position in the given Track.
void timeline_arranger_widget_create_marker(TimelineArrangerWidget* self, Track* track, const Position* pos)
Create a Marker at the given Position in the given Track.
auto timeline_arranger_widget_snap_regions_l(TimelineArrangerWidget* self, Position* pos, int dry_run) -> int
Snaps both the transients (to show in the GUI) and the actual regions.
auto timeline_arranger_widget_snap_regions_r(TimelineArrangerWidget* self, Position* pos, int dry_run) -> int
Snaps both the transients (to show in the GUI) and the actual regions.
void timeline_arranger_widget_scroll_to(TimelineArrangerWidget* self, Position* pos)
Scroll to the given position.
auto timeline_bg_widget_new(RulerWidget* ruler, ArrangerWidget* arranger) -> TimelineBgWidget*
Creates a TimelineBgWidget for the given arranger and ruler.
void toolbox_widget_refresh(ToolboxWidget* self)
Sets the toolbox toggled states after deactivating the callbacks.
auto track_widget_new(Track* track) -> TrackWidget*
Sets up the track widget.
void track_widget_select(TrackWidget* self, int select)
1 = select, 0 = unselect
void track_widget_on_mute_toggled(GtkToggleButton* btn, void* data)
General handler for tracks that have mute buttons.
void track_widget_block_all_signal_handlers(TrackWidget* self)
Blocks all signal handlers.
void track_widget_unblock_all_signal_handlers(TrackWidget* self)
Unblocks all signal handlers.
void track_widget_refresh(TrackWidget* self)
Wrapper.
void track_widget_refresh_buttons(TrackWidget* self)
Wrapper to refresh mute button only.
void track_widget_on_show_automation_toggled(GtkWidget* widget, TrackWidget* self)
Callback when automation button is toggled.
void track_widget_on_show_lanes_toggled(GtkWidget* widget, TrackWidget* self)
Callback when automation button is toggled.
void track_widget_on_record_toggled(GtkWidget* widget, void* data)
Callback when record button is toggled.
auto track_widget_is_cursor_in_top_half(TrackWidget* self, double y) -> int
Returns if cursor is in top half of the track.
void tracklist_widget_setup(TracklistWidget* self, Tracklist* tracklist)
Sets up the TracklistWidget.
void tracklist_widget_select_track(TracklistWidget* self, Track* track, int select, int append)
Selects the track, with the option to either add the track to the current selection or to select it exclusively.
void tracklist_widget_select_all_tracks(TracklistWidget* self, int select)
Selects or deselects all tracks.
void tracklist_widget_soft_refresh(TracklistWidget* self)
Makes sure all the tracks for channels marked as visible are visible.
auto tracklist_widget_get_hit_track(TracklistWidget* self, double x, double y) -> TrackWidget*
Gets hit TrackWidget and the given coordinates.
void tracklist_widget_hard_refresh(TracklistWidget* self)
Deletes all tracks and re-adds them.
void ui_set_cursor_from_icon_name(GtkWidget* widget, const char* name, int offset_x, int offset_y)
Sets cursor from icon name.
void ui_set_cursor_from_name(GtkWidget* widget, char* name)
Sets cursor from standard cursor name.
void ui_show_error_message_full(GtkWindow* parent_window, const char* message)
Shows error popup.
static auto ui_is_child_hit(GtkContainer* parent, GtkWidget* child, const int check_x, const int check_y, const double x, const double y, const double x_padding, const double y_padding) -> int
Returns if the child is hit or not by the coordinates in parent.
auto ui_get_hit_child(GtkContainer* parent, double x, double y, GType type) -> GtkWidget*
Returns the matching hit child, or NULL.
void ui_px_to_pos_timeline(double px, Position* pos, int has_padding)
Converts from pixels to position.
auto ui_px_to_frames_timeline(double px, int has_padding) -> long
Converts from pixels to frames.
auto ui_px_to_frames_editor(double px, int has_padding) -> long
Converts from pixels to frames.
auto ui_pos_to_px_timeline(Position* pos, int use_padding) -> int
Converts position to px, optionally adding the ruler padding.
auto ui_pos_to_px_editor(Position* pos, int use_padding) -> int
Converts position to px, optionally adding the ruler padding.
void ui_px_to_pos_editor(double px, Position* pos, int has_padding)
Converts from pixels to position.
void ui_show_notification(const char* msg)
Shows a notification in the revealer.
auto ui_show_notification_idle_func(char* msg) -> int
Show notification from non-GTK threads.
void ui_get_modifier_type_from_gesture(GtkGestureSingle* gesture, GdkModifierType* state_mask)
Returns the modifier type (state mask) from the given gesture.
void ui_setup_language_combo_box(GtkComboBox* language)
Sets up a combo box to have a selection of languages.
void ui_setup_audio_backends_combo_box(GtkComboBox* cb)
Sets up an audio backends combo box.
void ui_setup_midi_backends_combo_box(GtkComboBox* cb)
Sets up a MIDI backends combo box.
void ui_setup_pan_algo_combo_box(GtkComboBox* cb)
Sets up a pan algorithm combo box.
void ui_setup_pan_law_combo_box(GtkComboBox* cb)
Sets up a pan law combo box.
void ui_get_contrast_text_color(GdkRGBA* src, GdkRGBA* dest)
Returns the contrasting color (variation of black or white) based on if the given color is dark enough or not.

Variables

BarSliderUpdateMode
Defines how drag_update will work.
GtkToolbar* left_of_main_knob_toolbar
Toolbar on the left.
GtkBox* main_knob_placeholder
Output knob.
GtkToggleToolButton* dim_output
For temporarily dimming the output.
GtkBox* listen_dim_slider_placeholder
Listen dim slider.
GtkBox* main_meter_placeholder
Meter of output.
ControlRoom* control_room
Pointer to backend.
ProjectInfo
Project file information.

Defines

#define bar_slider_widget_new(getter, setter, obj, min, max, w, h, zero, dec, mode, suffix)
Helper to create a bar slider widget.
#define CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP(wname)
Adds or removes widgets from the left_of_ruler_size_group depending on if the current editor space is visible or not.
#define RESIZE_CURSOR_SPACE
Space on the edges to show resize cursors.
#define TARGET_ENTRY_PLUGIN_DESCR
Drag n Drop related.
#define TARGET_ENTRY_TRACK
Track target entry.
#define ui_show_notification_idle(msg)
Shows the notification when idle.
#define ui_show_error_message(win, msg)
Wrapper to show error message so that no casting of the window is needed on the caller side.
#define UI_GET_STATE_MASK(gesture)
Used in handlers to get the state mask.

Enum documentation

enum MidiActivityBarAnimation

Enumerators
MAB_ANIMATION_BAR

Shows a bars that decreases over time.

MAB_ANIMATION_FLASH

Shows a flash that fades out over time.

enum UiOverlayAction

Various overlay actions to be shared.

Enumerators
UI_OVERLAY_ACTION_NONE
UI_OVERLAY_ACTION_CREATING_RESIZING_R
UI_OVERLAY_ACTION_CREATING_MOVING
UI_OVERLAY_ACTION_RESIZING_L
UI_OVERLAY_ACTION_RESIZING_R
UI_OVERLAY_ACTION_RESIZING_UP
UI_OVERLAY_ACTION_STRETCHING_L
UI_OVERLAY_ACTION_STRETCHING_R
UI_OVERLAY_ACTION_AUDITIONING
UI_OVERLAY_ACTION_AUTOFILLING

Auto-filling in edit mode.

UI_OVERLAY_ACTION_ERASING

Erasing.

UI_OVERLAY_ACTION_STARTING_MOVING

To be set in drag_start.

UI_OVERLAY_ACTION_STARTING_MOVING_COPY
UI_OVERLAY_ACTION_STARTING_MOVING_LINK
UI_OVERLAY_ACTION_MOVING
UI_OVERLAY_ACTION_MOVING_COPY
UI_OVERLAY_ACTION_MOVING_LINK
UI_OVERLAY_ACTION_STARTING_CHANGING_CURVE
UI_OVERLAY_ACTION_CHANGING_CURVE
UI_OVERLAY_ACTION_STARTING_SELECTION

To be set in drag_start.

Useful to check if nothing was clicked.

UI_OVERLAY_ACTION_SELECTING
UI_OVERLAY_ACTION_STARTING_DELETE_SELECTION

Like selecting but it auto deletes whatever touches the selection.

UI_OVERLAY_ACTION_DELETE_SELECTING
UI_OVERLAY_ACTION_STARTING_RAMP
UI_OVERLAY_ACTION_RAMPING
UI_OVERLAY_ACTION_CUTTING

Typedef documentation

typedef struct _BarSliderWidget BarSliderWidget

Draggable slider to adjust an amount (such as a percentage).

It displays the value in the background as a progress bar.

typedef struct _MainWindowWidget MainWindowWidget

The main window of Zrythm.

Inherits from GtkApplicationWindow, meaning that it is the parent of all other sub-windows of Zrythm.

typedef struct _PinnedTracklistWidget PinnedTracklistWidget

The PinnedTracklistWidget contains special tracks (chord, marker, etc.) as thin boxes above the normal tracklist.

The contents of each track will be shown in the PinnedTracklistArrangerWidget.

typedef struct _PluginBrowserWidget PluginBrowserWidget

The plugin browser allows to browse and filter available Plugin's on the system.

It contains references to PluginDescriptor's, which it uses to initialize Plugin's on row activation or drag-n-drop.

Function documentation

void automation_arranger_widget_create_ap(AutomationArrangerWidget* self, const Position* pos, const double start_y, Region* region)

Create an AutomationPointat the given Position in the given Track's AutomationTrack.

Parameters
self
pos The pre-snapped position.
start_y
region

G_DECLARE_FINAL_TYPE(BotBarWidget, bot_bar_widget, Z, BOT_BAR_WIDGET, GtkBox) typedef struct _BotBarWidget

Status bar context id.

G_DECLARE_FINAL_TYPE(CpuWidget, cpu_widget, Z, CPU_WIDGET, GtkDrawingArea) typedef struct _CpuWidget

CPU load (0-100).

DSP load (0-100).

void cpu_widget_setup(CpuWidget* self)

Starts drawing the CPU usage.

Starts drawing the CPU usage.

DigitalMeterWidget* digital_meter_widget_new(DigitalMeterType type, NoteLength* note_length, NoteType* note_type, const char* caption)

Creates a digital meter with the given type ( bpm or position).

Creates a digital meter with the given type ( bpm or position).

DigitalMeterWidget* _digital_meter_widget_new_for_position(void* obj, void(*)(void*) drag_begin, void(*)(void*, Position*) get_val, void(*)(void*, Position*) set_val, void(*)(void*) drag_end, const char* caption)

Creates a digital meter for an arbitrary position.

Parameters
obj The object to call the get/setters with.
drag_begin Function to call when starting the action. drag_end Function to call when ending the action.
get_val The getter func to get the position, passing the obj and the position to save to.
set_val The setter function to set the position.
drag_end
caption

E.g. Region. E.g. Region.

ExportDialogWidget* export_dialog_widget_new()

Creates an export dialog widget and displays it.

Creates an export dialog widget and displays it.

InspectorWidget* inspector_widget_new()

Creates the inspector widget.

Only once per project.

void inspector_widget_refresh(InspectorWidget* self)

Refreshes the inspector widget (shows current selections.

Uses Project->last_selection to decide which stack to show.

InstrumentTrackWidget* instrument_track_widget_new(Track* track)

Creates a new track widget from the given track.

Creates a new track widget from the given track.

1 track has 1 track widget. The track widget must always have at least 1 automation track in the automation paned.

MarkerDialogWidget* marker_dialog_widget_new(MarkerWidget* owner)

Creates the dialog.

Creates the dialog.

void midi_editor_space_widget_refresh_labels(MidiEditorSpaceWidget* self, int hard_refresh)

Refresh the labels only (for highlighting).

Parameters
self
hard_refresh Removes and radds the labels, otherwise just calls refresh on them.

QuantizeDialogWidget* quantize_dialog_widget_new(QuantizeOptions* opts)

Creates an quantize dialog widget and displays it.

Creates an quantize dialog widget and displays it.

int region_widget_is_resize_r(RegionWidget* self, int x)

Returns if the current position is for resizing R.

Returns if the current position is for resizing R.

void region_widget_draw_name(RegionWidget* self, cairo_t* cr)

Draws the name of the Region.

To be called during a cairo draw callback.

SliderBarWidget* _slider_bar_widget_new(float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, float min, float max, int width, int height, float zero, const char* text)

Creates a new SliderBarWidget.

Parameters
get_val
set_val
object
min
max
width -1 if not fixed.
height -1 if not fixed.
zero
text

void timeline_arranger_widget_create_region(TimelineArrangerWidget* self, const RegionType type, Track* track, TrackLane* lane, AutomationTrack* at, const Position* pos)

Create a Region at the given Position in the given Track's given TrackLane.

Parameters
self
type The type of region to create.
track Track, if non-automation.
lane TrackLane, if midi/audio region.
at AutomationTrack, if automation Region.
pos The pre-snapped position.

void timeline_arranger_widget_create_chord_or_scale(TimelineArrangerWidget* self, Track* track, double y, const Position* pos)

Wrapper for timeline_arranger_widget_create_chord() or timeline_arranger_widget_create_scale().

Parameters
self
track
y the y relative to the TimelineArrangerWidget.
pos

void timeline_arranger_widget_create_scale(TimelineArrangerWidget* self, Track* track, const Position* pos)

Create a ScaleObject at the given Position in the given Track.

Parameters
self
track
pos The pre-snapped position.

void timeline_arranger_widget_create_marker(TimelineArrangerWidget* self, Track* track, const Position* pos)

Create a Marker at the given Position in the given Track.

Parameters
self
track
pos The pre-snapped position.

int timeline_arranger_widget_snap_regions_l(TimelineArrangerWidget* self, Position* pos, int dry_run)

Snaps both the transients (to show in the GUI) and the actual regions.

Parameters
self
pos Absolute position in the timeline. dry_run Don't resize notes; just check if the resize is allowed (check if invalid resizes will happen)
dry_run
Returns 0 if the operation was successful, nonzero otherwise.

int timeline_arranger_widget_snap_regions_r(TimelineArrangerWidget* self, Position* pos, int dry_run)

Snaps both the transients (to show in the GUI) and the actual regions.

Parameters
self
pos Absolute position in the timeline. dry_run Don't resize notes; just check if the resize is allowed (check if invalid resizes will happen)
dry_run
Returns 0 if the operation was successful, nonzero otherwise.

void timeline_arranger_widget_scroll_to(TimelineArrangerWidget* self, Position* pos)

Scroll to the given position.

FIXME move to parent?

TrackWidget* track_widget_new(Track* track)

Sets up the track widget.

Sets color, draw callback, etc.

Sets up the track widget.

Sets color, draw callback, etc.

void track_widget_refresh_buttons(TrackWidget* self)

Wrapper to refresh mute button only.

Wrapper to refresh mute button only.

void track_widget_on_show_lanes_toggled(GtkWidget* widget, TrackWidget* self)

Callback when automation button is toggled.

Callback when automation button is toggled.

int track_widget_is_cursor_in_top_half(TrackWidget* self, double y)

Returns if cursor is in top half of the track.

Used by timeline to determine if it will select objects or range.

static int ui_is_child_hit(GtkContainer* parent, GtkWidget* child, const int check_x, const int check_y, const double x, const double y, const double x_padding, const double y_padding)

Returns if the child is hit or not by the coordinates in parent.

Parameters
parent
child
check_x Check x-axis for match.
check_y Check y-axis for match.
x x in parent space.
y y in parent space.
x_padding Padding to add to the x of the object when checking if hit. The bigger the padding the more space the child will have to get hit.
y_padding Padding to add to the y of the object when checking if hit. The bigger the padding the more space the child will have to get hit.

GtkWidget* ui_get_hit_child(GtkContainer* parent, double x, double y, GType type)

Returns the matching hit child, or NULL.

type to look for

void ui_px_to_pos_timeline(double px, Position* pos, int has_padding)

Converts from pixels to position.

Parameters
px
pos
has_padding Whether the given px contain padding.

Only works with positive numbers. Negatives will be clamped at 0. If a negative is needed, pass the abs to this function and then change the sign.

long ui_px_to_frames_timeline(double px, int has_padding)

Converts from pixels to frames.

Parameters
px
has_padding Whether then given px contains padding.

Returns the frames.

long ui_px_to_frames_editor(double px, int has_padding)

Converts from pixels to frames.

Parameters
px
has_padding Whether then given px contains padding.

Returns the frames.

int ui_pos_to_px_timeline(Position* pos, int use_padding)

Converts position to px, optionally adding the ruler padding.

Converts position to px, optionally adding the ruler padding.

int ui_pos_to_px_editor(Position* pos, int use_padding)

Converts position to px, optionally adding the ruler padding.

Converts position to px, optionally adding the ruler padding.

void ui_px_to_pos_editor(double px, Position* pos, int has_padding)

Converts from pixels to position.

whether the given px contain padding

Only works with positive numbers. Negatives will be clamped at 0. If a negative is needed, pass the abs to this function and then change the sign.

int ui_show_notification_idle_func(char* msg)

Show notification from non-GTK threads.

This should be used internally. Use the ui_show_notification_idle macro instead.

void ui_get_modifier_type_from_gesture(GtkGestureSingle* gesture, GdkModifierType* state_mask)

Returns the modifier type (state mask) from the given gesture.

return value

void ui_get_contrast_text_color(GdkRGBA* src, GdkRGBA* dest)

Returns the contrasting color (variation of black or white) based on if the given color is dark enough or not.

Parameters
src The source color.
dest The desination color to write to.

Variable documentation

BarSliderUpdateMode

Defines how drag_update will work.

Update the value relative from where the drag was started.

Update the value to wherever the cursor is.

Define documentation

#define CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP(wname)

Adds or removes widgets from the left_of_ruler_size_group depending on if the current editor space is visible or not.

Parameters
wname The name of the widget.

To be used by each editor space.

#define TARGET_ENTRY_TRACK

Track target entry.

This is just the identifier. The TracklistSelections will be used.

#define ui_show_notification_idle(msg)

Shows the notification when idle.

This should be called from threads other than GTK main thread.