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 _CenterDockWidget
Center dock.
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 _ExportProgressDialogWidget
The export dialog.
struct _FileBrowserWindowWidget
The file browser window.
struct _FoldableNotebookWidget
A GtkNotebook that shows or hides itself when the same page tab is clicked.
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 _MidiTrackWidget
Top is the track part and bot is the automation part.
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 _PortsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
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 _TimelineToolbarWidget
The Timeline toolbar in the top.
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.
struct UiColors
Commonly used UI colors.
struct UiCaches
Caches.

Enums

enum BarSliderType { BAR_SLIDER_TYPE_NORMAL, BAR_SLIDER_TYPE_PORT_MULTIPLIER }
Type of slider.
enum BarSliderUpdateMode { BAR_SLIDER_UPDATE_MODE_RELATIVE, BAR_SLIDER_UPDATE_MODE_CURSOR }
Defines how drag_update will work.
enum MidiActivityBarAnimation { MAB_ANIMATION_BAR, MAB_ANIMATION_FLASH }
enum PortsExpanderTrackPortType { PE_TRACK_PORT_TYPE_SENDS, PE_TRACK_PORT_TYPE_STEREO_IN, PE_TRACK_PORT_TYPE_MIDI_IN, PE_TRACK_PORT_TYPE_MIDI_OUT }
Used for Track's.
enum TimelineMinimapAction { TIMELINE_MINIMAP_ACTION_NONE, TIMELINE_MINIMAP_ACTION_RESIZING_L, TIMELINE_MINIMAP_ACTION_RESIZING_R, TIMELINE_MINIMAP_ACTION_STARTING_MOVING, TIMELINE_MINIMAP_ACTION_MOVING }
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_L_LOOP, UI_OVERLAY_ACTION_RESIZING_R, UI_OVERLAY_ACTION_RESIZING_R_LOOP, 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 BarSliderType = enum BarSliderType
Type of slider.
using BarSliderUpdateMode = enum BarSliderUpdateMode
Defines how drag_update will work.
using BarSliderWidget = struct _BarSliderWidget
Draggable slider to adjust an amount (such as a percentage).
using CenterDockWidget = struct _CenterDockWidget
Center dock.
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 ExportProgressDialogWidget = struct _ExportProgressDialogWidget
The export dialog.
using FileBrowserWindowWidget = struct _FileBrowserWindowWidget
The file browser window.
using FoldableNotebookWidget = struct _FoldableNotebookWidget
A GtkNotebook that shows or hides itself when the same page tab is clicked.
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 MidiTrackWidget = struct _MidiTrackWidget
Top is the track part and bot is the automation part.
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 PortsExpanderTrackPortType = enum PortsExpanderTrackPortType
Used for Track's.
using PortsExpanderWidget = struct _PortsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
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 TimelineToolbarWidget = struct _TimelineToolbarWidget
The Timeline toolbar in the top.
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 UiColors = struct UiColors
Commonly used UI colors.
using UiCaches = struct UiCaches
Caches.
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.
auto about_dialog_widget_new(GtkWindow* parent) -> GtkAboutDialog*
Creates and displays the about dialog.
auto arranger_bg_widget_get_private(ArrangerBgWidget* self) -> ArrangerBgWidgetPrivate*
Gets the ArrangerBgWidgetPrivate.
void arranger_bg_widget_refresh(ArrangerBgWidget* self)
Refreshes the widget.
void arranger_bg_widget_draw_selections(ArrangerWidget* self, cairo_t* cr, GdkRectangle* rect)
Draws the selection in its background.
void audio_editor_space_widget_update_size_group(AudioEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
void automatable_selector_button_set_automatable(AutomatableSelectorButtonWidget* self, Automatable* a)
Sets the Automatable for this automation track lane.
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(BarSliderType type, float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, Port* dest, float min, float max, int w, int h, float zero, int convert_to_percentage, int decimals, BarSliderUpdateMode mode, const char* prefix, 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_widget_update_status(BotBarWidget* self)
Updates the content of the status bar.
void bot_bar_widget_setup(BotBarWidget* self)
Sets up the bot bar.
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.
auto control_room_widget_new(ControlRoom* control_room) -> ControlRoomWidget*
Creates a 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.
void event_viewer_widget_refresh(EventViewerWidget* self)
Called to update the models.
void event_viewer_widget_refresh_for_arranger(ArrangerWidget* arranger)
Convenience function.
void event_viewer_widget_setup(EventViewerWidget* self, EventViewerType type)
Sets up the event viewer.
auto export_dialog_widget_new(void) -> ExportDialogWidget*
Creates an export dialog widget and displays it.
auto export_progress_dialog_widget_new(ExportSettings* info) -> ExportProgressDialogWidget*
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(void) -> FileBrowserWidget*
Creates a new FileBrowserWidget.
auto file_browser_window_widget_new(void) -> FileBrowserWindowWidget*
Creates a new FileBrowserWindowWidget.
auto foldable_notebook_widget_new(void) -> FoldableNotebookWidget*
Creates a FoldableNotebookWidget.
void foldable_notebook_widget_set_visibility(FoldableNotebookWidget* self, int new_visibility)
Sets the folded space visible or not.
void foldable_notebook_widget_setup(FoldableNotebookWidget* self, GtkPaned* paned, DzlDockRevealer* dock_revealer, GtkPositionType pos_in_paned)
Sets up an existing FoldableNotebookWidget.
auto inspector_widget_new(void) -> InspectorWidget*
Creates the inspector widget.
void inspector_widget_setup(InspectorWidget* self)
Sets up the inspector widget.
void inspector_widget_refresh(InspectorWidget* self)
Refreshes the inspector widget (shows current selections.
void inspector_track_widget_setup(InspectorTrackWidget* self, TracklistSelections* tls)
Sets up the inspector track widget for the first time.
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.
auto _knob_widget_new(float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, KnobType type, Port* dest, float min, float max, int size, float zero) -> KnobWidget*
Creates a knob widget with the given options and binds it to the given value.
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 app data.
void main_window_widget_refresh(MainWindowWidget* self)
Refreshes the state of the main window.
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.
auto midi_arranger_bg_widget_new(RulerWidget* ruler, ArrangerWidget* arranger) -> MidiArrangerBgWidget*
Creates a timeline widget using the given timeline data.
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_editor_space_widget_get_key_for_label(MidiEditorSpaceWidget* self, PianoRollKeyLabelWidget* label) -> PianoRollKeyWidget*
Gets the PianoRollKeyWidget corresponding to the given PianoRollKeyLabelWidget.
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 midi_track_widget_new(Track* track) -> MidiTrackWidget*
Creates a new track widget from the given track.
void midi_track_widget_refresh(MidiTrackWidget* self)
Updates changes in the backend to the ui.
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(void) -> PluginBrowserWidget*
Instantiates a new PluginBrowserWidget.
auto port_selector_popover_widget_new(PortConnectionsPopoverWidget* owner, Port* port) -> PortSelectorPopoverWidget*
Creates the popover.
void ports_expander_widget_refresh(PortsExpanderWidget* self)
Refreshes each field.
void ports_expander_widget_setup_plugin(PortsExpanderWidget* self, PortFlow flow, PortType type, Plugin* pl)
Sets up the PortsExpanderWidget for a Plugin.
void ports_expander_widget_setup_track(PortsExpanderWidget* self, Track* tr, PortsExpanderTrackPortType type)
Sets up the PortsExpanderWidget for Track ports.
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.
auto region_widget_is_resize_loop(RegionWidget* self, int y) -> int
Returns if the current position is for resizing loop.
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.
void region_widget_draw_cut_line(RegionWidget* self, cairo_t* cr)
Draws the cut line if in cut mode.
auto region_widget_should_show_cut_lines(int alt_pressed) -> int
Returns if region widgets should show cut lines.
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.
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.
void timeline_arranger_widget_set_cut_lines_visible(TimelineArrangerWidget* self)
Hides the cut dashed line from hovered regions and redraws them.
auto timeline_bg_widget_new(RulerWidget* ruler, ArrangerWidget* arranger) -> TimelineBgWidget*
Creates a TimelineBgWidget for the given arranger and ruler.
void timeline_bg_widget_draw(TimelineBgWidget* self, cairo_t* cr, GdkRectangle* rect)
To be called by the arranger bg during drawing.
void timeline_minimap_widget_px_to_pos(TimelineMinimapWidget* self, Position* pos, int px)
Taken from arranger.c.
void timeline_minimap_widget_refresh(TimelineMinimapWidget* self)
Causes reallocation.
void timeline_ruler_on_drag_begin_no_marker_hit(GtkGestureDrag* gesture, gdouble start_x, gdouble start_y, TimelineRulerWidget* self, int height)
Called from ruler drag begin.
void timeline_ruler_on_drag_end(TimelineRulerWidget* self)
Called from ruler drag end.
void timeline_ruler_on_drag_update(GtkGestureDrag* gesture, gdouble offset_x, gdouble offset_y, TimelineRulerWidget* self)
Called from ruler drag update.
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_set_name(TrackWidget* self, const char* name)
Sets the Track name on the TrackWidget.
void track_widget_on_mute_toggled(GtkToggleButton* btn, TrackWidget* 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 track_widget_do_highlight(TrackWidget* self, gint x, gint y, const int highlight)
Highlights/unhighlights the Tracks appropriately.
void track_properties_expander_widget_refresh(TrackPropertiesExpanderWidget* self, Track* track)
Refreshes each field.
void track_properties_expander_widget_setup(TrackPropertiesExpanderWidget* self, Track* track)
Sets up the TrackPropertiesExpanderWidget.
void track_visibility_tree_widget_refresh(TrackVisibilityTreeWidget* self)
Refreshes the tree model.
auto track_visibility_tree_widget_new(void) -> TrackVisibilityTreeWidget*
Instantiates a new TrackVisibilityTreeWidget.
void tracklist_widget_setup(TracklistWidget* self, Tracklist* tracklist)
Sets up the TracklistWidget.
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.
auto visibility_widget_new(void) -> VisibilityWidget*
Creates the visibility widget.
void visibility_widget_refresh(VisibilityWidget* self)
Refreshes the visibility widget (shows current selections.
auto ui_get_state_mask(GtkGesture* gesture) -> GdkModifierType
Used in handlers to get the state mask.
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, const char* name)
Sets cursor from standard cursor name.
void ui_show_message_full(GtkWindow* parent_window, GtkMessageType type, const char* message)
Shows a popup message of the given type with the given message.
auto ui_is_child_hit(GtkWidget* 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_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.
auto ui_is_color_bright(GdkRGBA* src) -> int
Returns if the color is bright or not.
auto ui_is_color_very_bright(GdkRGBA* src) -> int
Returns if the color is very bright or not.
void ui_get_arranger_object_color(GdkRGBA* color, const int is_hovered, const int is_selected, const int is_transient)
Gets the color the widget should be.

Variables

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.
KnobType
Type of knob.
float(* getter
Getter.
void(* setter
Setter.
void* object
Object to call get/set with.
int size
size in px
int hover
used to detect if hovering or not
float zero
zero point 0.0-1.0 */
int arc
draw arc around the knob or not
int bevel
bevel
int flat
flat or 3D
float min
min value (eg. 1)
float max
max value (eg. 180)
GdkRGBA start_color
color away from zero point
GdkRGBA end_color
color close to zero point
GtkGestureDrag* drag
used for drag gesture
double last_x
used in gesture drag
double last_y
used in gesture drag
int dest_index
Destination index for the destination multipliers of the port.
Plugin* plugin
Plugin, in case of owner type Plugin.
Track* track
Track, in case of owner type Track.
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
Plugin descriptor, used to instantiate plugins.
#define TARGET_ENTRY_PLUGIN
Plugin ID, used to move/copy plugins.
#define TARGET_ENTRY_URI_LIST
URI list.
#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.

Enum documentation

enum BarSliderUpdateMode

Defines how drag_update will work.

Enumerators
BAR_SLIDER_UPDATE_MODE_RELATIVE

Update the value relative from where the drag was started.

BAR_SLIDER_UPDATE_MODE_CURSOR

Update the value to wherever the cursor is.

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_L_LOOP
UI_OVERLAY_ACTION_RESIZING_R
UI_OVERLAY_ACTION_RESIZING_R_LOOP
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 _FoldableNotebookWidget FoldableNotebookWidget

A GtkNotebook that shows or hides itself when the same page tab is clicked.

It assumes that each page is wrapped in a GtkBox. The reason is that Gtk automatically hides the tab widget too if you hide the main child of a page, so we hide the box's child instead.

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 arranger_bg_widget_draw_selections(ArrangerWidget* self, cairo_t* cr, GdkRectangle* rect)

Draws the selection in its background.

Should only be called by the bg widgets when drawing.

void automatable_selector_button_set_automatable(AutomatableSelectorButtonWidget* self, Automatable* a)

Sets the Automatable for this automation track lane.

If different from the current one, it will hide the current AutomationTrack and show the one corresponding to this Automatable.

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

BarSliderWidget* _bar_slider_widget_new(BarSliderType type, float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, Port* dest, float min, float max, int w, int h, float zero, int convert_to_percentage, int decimals, BarSliderUpdateMode mode, const char* prefix, const char* suffix)

Creates a bar slider widget for floats.

Parameters
type
get_val
set_val
object
dest Port destination, if this is a port to port connection slider.
min
max
w
h
zero
convert_to_percentage Multiply the value by 100 when showing it.
decimals
mode
prefix
suffix

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

New label replacing the original status bar label.

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(void)

Creates an export dialog widget and displays it.

Creates an export dialog widget and displays it.

ExportProgressDialogWidget* export_progress_dialog_widget_new(ExportSettings* info)

Creates an export dialog widget and displays it.

Creates an export dialog widget and displays it.

InspectorWidget* inspector_widget_new(void)

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.

KnobWidget* _knob_widget_new(float(*)(void*) get_val, void(*)(void*, float) set_val, void* object, KnobType type, Port* dest, float min, float max, int size, float zero)

Creates a knob widget with the given options and binds it to the given value.

Parameters
get_val Getter function.
set_val Setter function.
object Object to call get/set with.
type
dest Port destination multiplier index, if type is Port, otherwise ignored.
min
max
size
zero

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.

void ports_expander_widget_setup_track(PortsExpanderWidget* self, Track* tr, PortsExpanderTrackPortType type)

Sets up the PortsExpanderWidget for Track ports.

Parameters
self
tr
type The type of ports to include.

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.

int region_widget_should_show_cut_lines(int alt_pressed)

Returns if region widgets should show cut lines.

Parameters
alt_pressed Whether alt is currently pressed.

To be used to set the region's "show_cut".

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?

void timeline_arranger_widget_set_cut_lines_visible(TimelineArrangerWidget* self)

Hides the cut dashed line from hovered regions and redraws them.

Used when alt was unpressed.

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.

void track_widget_do_highlight(TrackWidget* self, gint x, gint y, const int highlight)

Highlights/unhighlights the Tracks appropriately.

Parameters
self
x
y
highlight 1 to highlight top or bottom, 0 to unhighlight all.

VisibilityWidget* visibility_widget_new(void)

Creates the visibility widget.

Only once per project.

void visibility_widget_refresh(VisibilityWidget* self)

Refreshes the visibility widget (shows current selections.

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

int ui_is_child_hit(GtkWidget* 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_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.

void ui_get_arranger_object_color(GdkRGBA* color, const int is_hovered, const int is_selected, const int is_transient)

Gets the color the widget should be.

Parameters
color The original color.
is_hovered
is_selected Whether the widget is supposed to be selected or not.
is_transient

Variable documentation

ProjectInfo

Project file information.

Full path.

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.