Widgets module

Custom GUI elements that reflect the backend.

Classes

struct _ArrangerWidget
The arranger widget is a canvas that draws all the arranger objects it contains.
struct _AudioEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUDIO region is selected.
struct _AutomatableSelectorPopoverWidget
A popover for selecting the automation track to automate.
struct _AutomationEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUTOMATION region is selected.
struct AutomationModeWidget
Custom button group to be drawn inside drawing areas.
struct _BarSliderWidget
Draggable slider to adjust an amount (such as a percentage).
struct _CenterDockWidget
Center dock.
struct _ChannelSendsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
struct _ChordEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a CHORD region is selected.
struct _ChordKeyWidget
Piano roll note widget to be shown on the left side of the piano roll (128 of these).
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 CustomButtonWidget
Custom button to be drawn inside drawing areas.
struct _ArrangerObjectInfoDialogWidget
The arranger_object_info dialog.
struct _BounceDialogWidget
The export dialog.
struct _ExportProgressDialogWidget
The export dialog.
struct _PortInfoDialogWidget
The port_info dialog.
struct ExpanderBoxWidgetPrivate
An expander box is a base widget with a button that when clicked expands the contents.
struct _FaderWidget
A FaderWidget reflects a Fader object's state.
struct _FaderControlsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
struct _FileBrowserWindowWidget
The file browser window.
struct _FoldableNotebookWidget
A GtkNotebook that shows or hides itself when the same page tab is clicked.
struct _InspectorPortWidget
A Port to show in the inspector for Plugin's.
struct _InspectorTrackWidget
Inspector section for tracks.
struct _InstrumentTrackWidget
Top is the track part and bot is the automation part.
struct _MainWindowWidget
The main window of Zrythm.
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 _PianoKeyboardWidget
Piano Keyboard widget.
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 _PluginPropertiesExpanderWidget
A widget for selecting plugin_properties in the plugin inspector.
struct _PluginStripExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
struct _PortSelectorPopoverWidget
A GtkPopover to select Port's.
struct _PortsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
struct _PreferencesWidget
Preferences widget.
struct _ProjectAssistantWidget
A widget that allows selecting a project to load or create.
struct _ScaleSelectorWindowWidget
A GtkPopover to create a ScaleDescriptor for use in the ScaleTrack's ScaleObject's.
struct _TextExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
struct _TimelineToolbarWidget
The Timeline toolbar in the top.
struct _TrackWidget
The TrackWidget is split into 3 parts.
struct _TrackTopGridWidget
Top is the track part and bot is the automation part.
struct _TracklistWidget
The TracklistWidget holds all the Track's in the Project.
struct UiColors
Commonly used UI colors.
struct UiCursor
Specification for a cursor.
struct UiCaches
Caches.

Enums

enum ArrangerCursor { ARRANGER_CURSOR_NONE, ARRANGER_CURSOR_SELECT, ARRANGER_CURSOR_EDIT, ARRANGER_CURSOR_CUT, ARRANGER_CURSOR_ERASER, ARRANGER_CURSOR_AUDITION, ARRANGER_CURSOR_RAMP, ARRANGER_CURSOR_GRAB, ARRANGER_CURSOR_GRABBING, ARRANGER_CURSOR_RESIZING_L, ARRANGER_CURSOR_STRETCHING_L, ARRANGER_CURSOR_RESIZING_L_LOOP, ARRANGER_CURSOR_RESIZING_R, ARRANGER_CURSOR_STRETCHING_R, ARRANGER_CURSOR_RESIZING_R_LOOP, ARRANGER_CURSOR_RESIZING_UP, ARRANGER_CURSOR_RESIZING_UP_FADE_IN, ARRANGER_CURSOR_RESIZING_UP_FADE_OUT, ARRANGER_CURSOR_GRABBING_COPY, ARRANGER_CURSOR_GRABBING_LINK, ARRANGER_CURSOR_RANGE, ARRANGER_CURSOR_FADE_IN, ARRANGER_CURSOR_FADE_OUT }
enum ArrangerWidgetType { ARRANGER_WIDGET_TYPE_TIMELINE, ARRANGER_WIDGET_TYPE_MIDI, ARRANGER_WIDGET_TYPE_MIDI_MODIFIER, ARRANGER_WIDGET_TYPE_AUDIO, ARRANGER_WIDGET_TYPE_CHORD, ARRANGER_WIDGET_TYPE_AUTOMATION }
Type of arranger.
enum BarSliderType { BAR_SLIDER_TYPE_NORMAL, BAR_SLIDER_TYPE_PORT_MULTIPLIER, BAR_SLIDER_TYPE_CONTROL_PORT }
Type of slider.
enum MidiActivityBarAnimation { MAB_ANIMATION_BAR, MAB_ANIMATION_FLASH }
enum PortsExpanderTrackPortType { PE_TRACK_PORT_TYPE_CONTROLS, 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 RWTarget { RW_TARGET_PLAYHEAD, RW_TARGET_LOOP_START, RW_TARGET_LOOP_END, RW_TARGET_CLIP_START, RW_TARGET_RANGE }
The ruler widget target acting upon.
enum RulerWidgetRangeType { RW_RANGE_START, RW_RANGE_FULL, RW_RANGE_END }
Range type.
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 TrackWidgetResizeTarget { TRACK_WIDGET_RESIZE_TARGET_TRACK, TRACK_WIDGET_RESIZE_TARGET_AT, TRACK_WIDGET_RESIZE_TARGET_LANE }
Resize target.
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_L_FADE, UI_OVERLAY_ACTION_RESIZING_R, UI_OVERLAY_ACTION_RESIZING_R_LOOP, UI_OVERLAY_ACTION_RESIZING_R_FADE, UI_OVERLAY_ACTION_RESIZING_UP, UI_OVERLAY_ACTION_RESIZING_UP_FADE_IN, UI_OVERLAY_ACTION_RESIZING_UP_FADE_OUT, 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.
enum UiDragMode { UI_DRAG_MODE_CURSOR, UI_DRAG_MODE_RELATIVE, UI_DRAG_MODE_RELATIVE_WITH_MULTIPLIER }
Dragging modes for widgets that have click&drag.

Typedefs

using ArrangerWidgetType = enum ArrangerWidgetType
Type of arranger.
using ArrangerWidget = struct _ArrangerWidget
The arranger widget is a canvas that draws all the arranger objects it contains.
using AudioEditorSpaceWidget = struct _AudioEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUDIO region is selected.
using AutomatableSelectorPopoverWidget = struct _AutomatableSelectorPopoverWidget
A popover for selecting the automation track to automate.
using AutomationEditorSpaceWidget = struct _AutomationEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a AUTOMATION region is selected.
using AutomationModeWidget = struct AutomationModeWidget
Custom button group to be drawn inside drawing areas.
using BarSliderType = enum BarSliderType
Type of slider.
using BarSliderWidget = struct _BarSliderWidget
Draggable slider to adjust an amount (such as a percentage).
using CenterDockWidget = struct _CenterDockWidget
Center dock.
using ChannelSendsExpanderWidget = struct _ChannelSendsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
using ChordEditorSpaceWidget = struct _ChordEditorSpaceWidget
The piano roll widget is the whole space inside the clip editor tab when a CHORD region is selected.
using ChordKeyWidget = struct _ChordKeyWidget
Piano roll note widget to be shown on the left side of the piano roll (128 of these).
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 CustomButtonWidget = struct CustomButtonWidget
Custom button to be drawn inside drawing areas.
using ArrangerObjectInfoDialogWidget = struct _ArrangerObjectInfoDialogWidget
The arranger_object_info dialog.
using BounceDialogWidget = struct _BounceDialogWidget
The export dialog.
using ExportProgressDialogWidget = struct _ExportProgressDialogWidget
The export dialog.
using PortInfoDialogWidget = struct _PortInfoDialogWidget
The port_info dialog.
using FaderWidget = struct _FaderWidget
A FaderWidget reflects a Fader object's state.
using FaderControlsExpanderWidget = struct _FaderControlsExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
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 InspectorPortWidget = struct _InspectorPortWidget
A Port to show in the inspector for Plugin's.
using InspectorTrackWidget = struct _InspectorTrackWidget
Inspector section for tracks.
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 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 PianoKeyboardWidget = struct _PianoKeyboardWidget
Piano Keyboard widget.
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 PluginPropertiesExpanderWidget = struct _PluginPropertiesExpanderWidget
A widget for selecting plugin_properties in the plugin inspector.
using PluginStripExpanderWidget = struct _PluginStripExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
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 PreferencesWidget = struct _PreferencesWidget
Preferences widget.
using ProjectAssistantWidget = struct _ProjectAssistantWidget
A widget that allows selecting a project to load or create.
using RWTarget = enum RWTarget
The ruler widget target acting upon.
using RulerWidgetRangeType = enum RulerWidgetRangeType
Range type.
using ScaleSelectorWindowWidget = struct _ScaleSelectorWindowWidget
A GtkPopover to create a ScaleDescriptor for use in the ScaleTrack's ScaleObject's.
using TextExpanderWidget = struct _TextExpanderWidget
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
using TimelineToolbarWidget = struct _TimelineToolbarWidget
The Timeline toolbar in the top.
using TrackWidgetResizeTarget = enum TrackWidgetResizeTarget
Resize target.
using TrackWidget = struct _TrackWidget
The TrackWidget is split into 3 parts.
using TrackTopGridWidget = struct _TrackTopGridWidget
Top is the track part and bot is the automation part.
using TracklistWidget = struct _TracklistWidget
The TracklistWidget holds all the Track's in the Project.
using UiColors = struct UiColors
Commonly used UI colors.
using UiCursor = struct UiCursor
Specification for a cursor.
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 UiDragMode = enum UiDragMode
Dragging modes for widgets that have click&drag.
using KnobWithNameWidget = struct _KnobWithNameWidget
A vertical box with a knob at the top and a name at the bottom.

Functions

void arranger_widget_setup(ArrangerWidget* self, ArrangerWidgetType type, SnapGrid* snap_grid)
Creates a timeline widget using the given timeline data.
void arranger_widget_set_cursor(ArrangerWidget* self, ArrangerCursor cursor)
Sets the cursor on the arranger and all of its children.
auto arranger_widget_pos_to_px(ArrangerWidget* self, Position* pos, int use_padding) -> int
Wrapper of the UI functions based on the arranger type.
void arranger_widget_refresh_cursor(ArrangerWidget* self)
Figures out which cursor should be used based on the current state and then sets it.
auto arranger_widget_get_scrolled_window(ArrangerWidget* self) -> GtkScrolledWindow*
Sets transient object and actual object visibility for every ArrangerObject in the ArrangerWidget based on the current action.
void arranger_widget_get_all_objects(ArrangerWidget* self, ArrangerObject** objs, int* size)
Get all objects currently present in the arranger.
void arranger_widget_px_to_pos(ArrangerWidget* self, double px, Position* pos, int has_padding)
Wrapper for ui_px_to_pos depending on the arranger type.
void arranger_widget_get_visible_rect(ArrangerWidget* self, GdkRectangle* rect)
Returns the current visible rectangle.
void arranger_widget_get_hit_objects_at_point(ArrangerWidget* self, ArrangerObjectType type, double x, double y, ArrangerObject** array, int* array_size)
Fills in the given array with the ArrangerObject's of the given type that appear in the given ranger.
void arranger_widget_get_hit_objects_in_rect(ArrangerWidget* self, ArrangerObjectType type, GdkRectangle* rect, ArrangerObject** array, int* array_size)
Fills in the given array with the ArrangerObject's of the given type that appear in the given ranger.
auto arranger_widget_get_hit_arranger_object(ArrangerWidget* self, ArrangerObjectType type, const double x, const double y) -> ArrangerObject*
Returns the ArrangerObject of the given type at (x,y).
auto arranger_widget_is_in_moving_operation(ArrangerWidget* self) -> bool
Returns if the arranger is in a moving-related operation or starting a moving-related operation.
auto arranger_widget_get_selections(ArrangerWidget* self) -> ArrangerSelections*
Returns the ArrangerSelections for this ArrangerWidget.
void arranger_widget_redraw_whole(ArrangerWidget* self)
Queues a redraw of the whole visible arranger.
void arranger_widget_redraw_playhead(ArrangerWidget* self)
Only redraws the playhead part.
void arranger_widget_redraw_rectangle(ArrangerWidget* self, GdkRectangle* rect)
Only redraws the given rectangle.
auto arranger_widget_on_key_action(GtkWidget* widget, GdkEventKey* event, ArrangerWidget* self) -> gboolean
Called from MainWindowWidget because some events don't reach here.
void arranger_widget_scroll_until_obj(ArrangerWidget* self, ArrangerObject* obj, int horizontal, int up, int left, double padding)
Scroll until the given object is visible.
void arranger_widget_toggle_selections_muted(ArrangerWidget* self, ArrangerObject* clicked_object)
Toggles the mute status of the selection, based on the mute status of the selected object.
void arranger_widget_get_min_possible_position(ArrangerWidget* self, Position* pos)
Returns the earliest possible position allowed in this arranger (eg, 1.1.0.0 for timeline).
auto arranger_object_is_fade_in(ArrangerObject* self, const int x, const int y, int only_handle, int only_outer) -> int
Returns if the current position is for moving the fade in mark.
auto arranger_object_is_fade_out(ArrangerObject* self, const int x, const int y, int only_handle, int only_outer) -> int
Returns if the current position is for moving the fade out mark.
auto arranger_object_is_resize_l(ArrangerObject* self, const int x) -> int
Returns if the current position is for resizing L.
auto arranger_object_is_resize_r(ArrangerObject* self, const int x) -> int
Returns if the current position is for resizing R.
auto arranger_object_is_resize_up(ArrangerObject* self, const int x, const int y) -> int
Returns if the current position is for resizing up (eg, Velocity).
auto arranger_object_is_resize_loop(ArrangerObject* self, const int y) -> int
Returns if the current position is for resizing loop.
auto arranger_object_should_show_cut_lines(ArrangerObject* self, int alt_pressed) -> int
Returns if arranger_object widgets should show cut lines.
auto arranger_object_get_full_rect_x_for_region_child(ArrangerObject* self, ZRegion* region, GdkRectangle* full_rect) -> int
Gets the full rectangle for a linked object.
auto arranger_object_get_draw_rectangle(ArrangerObject* self, GdkRectangle* parent_rect, GdkRectangle* full_rect, GdkRectangle* draw_rect) -> int
Gets the draw rectangle based on the given full rectangle of the arranger object.
void arranger_object_draw(ArrangerObject* self, ArrangerWidget* arranger, cairo_t* cr, GdkRectangle* rect)
Draws the given object.
void arranger_object_queue_redraw(ArrangerObject* self)
Queues a redraw in the area covered by this object.
void audio_editor_space_widget_update_size_group(AudioEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
auto automatable_selector_popover_widget_new(AutomationTrack* owner) -> AutomatableSelectorPopoverWidget*
Creates the popover.
void automation_arranger_widget_create_ap(ArrangerWidget* self, const Position* pos, const double start_y, ZRegion* region)
Create an AutomationPointat the given Position in the given Track's AutomationTrack.
void automation_arranger_widget_resize_curves(ArrangerWidget* self, double offset_y)
Change curviness of selected curves.
void automation_arranger_widget_show_context_menu(ArrangerWidget* self, double x, double y)
Show context menu at x, y.
void automation_editor_space_widget_update_size_group(AutomationEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
auto automation_mode_widget_new(int height, PangoLayout* layout, AutomationTrack* owner) -> AutomationModeWidget*
Creates a new track widget from the given track.
auto automation_point_is_point_hit(AutomationPoint* self, double x, double y) -> bool
Returns if the automation point (circle) is hit.
auto automation_point_is_curve_hit(AutomationPoint* self, double x, double y, double delta_from_curve) -> bool
Returns if the automation curve is hit.
void automation_point_draw(AutomationPoint* self, cairo_t* cr, GdkRectangle* rect)
Draws the AutomationPoint in the given cairo context in absolute coordinates.
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, UiDragMode mode, const char* prefix, const char* suffix) -> BarSliderWidget*
Creates a bar slider widget for floats.
auto bind_cc_dialog_widget_new(void) -> BindCcDialogWidget*
Creates an bind_cc dialog widget and displays it.
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 channel_send_widget_new(ChannelSend* send) -> ChannelSendWidget*
Creates a new ChannelSend widget and binds it to the given value.
void channel_sends_expander_widget_refresh(ChannelSendsExpanderWidget* self)
Refreshes each field.
void channel_sends_expander_widget_setup(ChannelSendsExpanderWidget* self, ChannelSendsExpanderPosition position, Track* track)
Sets up the ChannelSendsExpanderWidget.
auto channel_slot_widget_new_instrument(void) -> ChannelSlotWidget*
Creates a new ChannelSlot widget whose track and plugin can change.
auto channel_slot_widget_new(int slot_index, Channel* ch, PluginSlotType type, bool open_plugin_inspector_on_click) -> ChannelSlotWidget*
Creates a new ChannelSlot widget and binds it to the given value.
void channel_slot_widget_set_state_flags(ChannelSlotWidget* self, GtkStateFlags flags, bool set)
Sets or unsets state flags and redraws the widget.
auto chord_arranger_widget_get_chord_at_y(double y) -> int
Returns the chord index at y.
void chord_arranger_widget_create_chord(ArrangerWidget* self, const Position* pos, int chord_index, ZRegion* region)
Called on drag begin in parent when background is double clicked (i.e., a note is created).
void chord_editor_space_widget_update_size_group(ChordEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
auto chord_key_widget_new(ChordDescriptor* descr) -> ChordKeyWidget*
Creates a ChordKeyWidget for the given MIDI note descriptor.
void chord_object_recreate_pango_layouts(ChordObject* self)
Recreates the pango layouts for drawing.
void chord_object_draw(ChordObject* self, cairo_t* cr, GdkRectangle* rect)
void chord_region_recreate_pango_layouts(ZRegion* self)
Recreates the pango layout for drawing chord names inside the region.
auto chord_selector_window_widget_new(ChordDescriptor* descr) -> ChordSelectorWindowWidget*
Creates the popover.
void clip_editor_inner_widget_add_to_left_of_ruler_sizegroup(ClipEditorInnerWidget* self, GtkWidget* widget, bool add)
Adds or remove the widget from the "left of ruler" size group.
auto control_room_widget_new(void) -> 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 custom_button_widget_new(const char* icon_name, int size) -> CustomButtonWidget*
Creates a new track widget from the given track.
void custom_button_widget_draw_with_text(CustomButtonWidget* self, cairo_t* cr, double x, double y, double width, CustomButtonWidgetState state)
void custom_button_widget_set_text(CustomButtonWidget* self, PangoLayout* layout, char* text, const char* font_descr)
Sets the text and layout to draw the text width.
auto about_dialog_widget_new(GtkWindow* parent) -> GtkAboutDialog*
Creates and displays the about dialog.
auto arranger_object_info_dialog_widget_new(ArrangerObject* object) -> ArrangerObjectInfoDialogWidget*
Creates an arranger_object_info dialog widget and displays it.
auto bounce_dialog_widget_new(BounceDialogWidgetType type, const char* bounce_name) -> BounceDialogWidget*
Creates a bounce dialog.
auto export_progress_dialog_widget_new(ExportSettings* info, int autoclose, int show_open_dir_btn) -> ExportProgressDialogWidget*
Creates an export dialog widget and displays it.
auto port_info_dialog_widget_new(Port* port) -> PortInfoDialogWidget*
Creates an port_info dialog widget and displays it.
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_draw_markers(RulerWidget* self)
Called from RulerWidget to draw the markers specific to the editor, such as region loop points.
void editor_ruler_on_drag_begin_no_marker_hit(RulerWidget* self, gdouble start_x, gdouble start_y)
Called from ruler drag begin.
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 expander_box_widget_get_private(ExpanderBoxWidget* self) -> ExpanderBoxWidgetPrivate*
Gets the private.
void expander_box_widget_set_label(ExpanderBoxWidget* self, const char* label)
Sets the label to show.
void expander_box_widget_set_icon_name(ExpanderBoxWidget* self, const char* icon_name)
Sets the icon name to show.
static void expander_box_widget_set_icon_resource(ExpanderBoxWidget* self, IconType icon_type, const char* path)
Sets the icon resource to show.
void expander_box_widget_set_reveal(ExpanderBoxWidget* self, int reveal)
Reveals or hides the expander box's contents.
auto export_dialog_widget_new(void) -> ExportDialogWidget*
Creates an export dialog widget and displays it.
void fader_widget_setup(FaderWidget* self, Fader* fader, int width, int height)
Creates a new Fader widget and binds it to the given Fader.
void fader_controls_expander_widget_refresh(FaderControlsExpanderWidget* self)
Refreshes each field.
void fader_controls_expander_widget_setup(FaderControlsExpanderWidget* self, Track* track)
Sets up the FaderControlsExpanderWidget.
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.
auto foldable_notebook_widget_get_widget_at_page(FoldableNotebookWidget* self, int page) -> GtkWidget*
Get the widget at the given page.
auto foldable_notebook_widget_get_current_widget(FoldableNotebookWidget* self) -> GtkWidget*
Get the widget currently visible.
void foldable_notebook_widget_set_visibility(FoldableNotebookWidget* self, int new_visibility)
Sets the folded space visible or not.
auto foldable_notebook_widget_is_content_visible(FoldableNotebookWidget* self) -> int
Returns if the content of the foldable notebook is visible.
void foldable_notebook_widget_toggle_visibility(FoldableNotebookWidget* self)
Combines the above.
void foldable_notebook_widget_setup(FoldableNotebookWidget* self, GtkPaned* paned, GtkPositionType pos_in_paned)
Sets up an existing FoldableNotebookWidget.
void inspector_plugin_widget_show(InspectorPluginWidget* self, MixerSelections* ms)
Shows the appropriate information based on if the Audio or MIDI plugin are visible.
auto inspector_port_widget_new(Port* port) -> InspectorPortWidget*
Creates a new widget.
void inspector_track_widget_show_tracks(InspectorTrackWidget* self, TracklistSelections* tls)
Refreshes the inspector section based on the given tls.
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 log_viewer_widget_new(void) -> LogViewerWidget*
Creates a log viewer widget.
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 main_window_get_last_focused_arranger_selections(MainWindowWidget* self) -> ArrangerSelections*
Returns the selections for the last focused arranger.
void marker_recreate_pango_layouts(Marker* self)
Recreates the pango layouts for drawing.
void marker_draw(Marker* self, cairo_t* cr, GdkRectangle* rect)
auto marker_dialog_widget_new(Marker* 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_arranger_widget_create_note(ArrangerWidget* self, Position* pos, int note, ZRegion* region)
Returns the note value (0-127) at y.
auto midi_arranger_widget_snap_midi_notes_l(ArrangerWidget* self, Position* pos, int dry_run) -> int
Called during drag_update in the parent when resizing the selection.
auto midi_arranger_widget_snap_midi_notes_r(ArrangerWidget* self, Position* pos, int dry_run) -> int
Called during drag_update in the parent when resizing the selection.
void midi_arranger_widget_set_hovered_note(ArrangerWidget* self, int pitch)
Sets the currently hovered note and queues a redraw if it changed.
void midi_arranger_widget_reset_transients(ArrangerWidget* self)
Resets the transient of each note in the arranger.
auto midi_arranger_calc_deltamax_for_note_movement(int y_delta) -> int
Called on move items_y setup.
void midi_arranger_listen_notes(ArrangerWidget* self, int listen)
Listen to the currently selected notes.
void midi_editor_space_widget_update_size_group(MidiEditorSpaceWidget* self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
void midi_modifier_arranger_widget_set_start_vel(ArrangerWidget* self)
Sets the start velocities of all velocities in the current region.
void midi_modifier_arranger_widget_ramp(ArrangerWidget* self, double offset_x, double offset_y)
Draws a ramp from the start coordinates to the given coordinates.
void midi_note_draw(MidiNote* self, cairo_t* cr, GdkRectangle* arr_rect)
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 piano_keyboard_widget_new(GtkOrientation orientation) -> PianoKeyboardWidget*
Creates a piano keyboard widget.
auto piano_keyboard_widget_new_for_chord_key(ChordDescriptor* descr) -> PianoKeyboardWidget*
Creates a piano keyboard widget.
auto piano_roll_keys_widget_get_font_size(PianoRollKeysWidget* self) -> int
Returns the appropriate font size based on the current pixels (height) per key.
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.
void plugin_properties_expander_widget_refresh(PluginPropertiesExpanderWidget* self, Plugin* pl)
Refreshes each field.
void plugin_properties_expander_widget_setup(PluginPropertiesExpanderWidget* self, Plugin* pl)
Sets up the PluginPropertiesExpanderWidget for a Plugin.
void plugin_strip_expander_widget_redraw_slot(PluginStripExpanderWidget* self, int slot)
Queues a redraw of the given slot.
void plugin_strip_expander_widget_set_state_flags(PluginStripExpanderWidget* self, int slot, GtkStateFlags flags, bool set)
Unsets state flags and redraws the widget at the given slot.
void plugin_strip_expander_widget_refresh(PluginStripExpanderWidget* self)
Refreshes each field.
void plugin_strip_expander_widget_setup(PluginStripExpanderWidget* self, PluginSlotType type, PluginStripExpanderPosition position, Track* track)
Sets up the PluginStripExpanderWidget.
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_get_lane_full_rect(ZRegion* self, GdkRectangle* rect)
Returns the lane rectangle for the region.
void region_draw(ZRegion* self, cairo_t* cr, GdkRectangle* rect)
Draws the ZRegion in the given cairo context in relative coordinates.
void right_dock_edge_widget_setup(RightDockEdgeWidget* self)
Sets up the widget.
auto ruler_widget_set_zoom_level(RulerWidget* self, double zoom_level) -> int
Sets zoom level and disables/enables buttons accordingly.
auto ruler_widget_get_beat_interval(RulerWidget* self) -> int
Returns the beat interval for drawing vertical lines.
auto ruler_widget_get_sixteenth_interval(RulerWidget* self) -> int
Returns the sixteenth interval for drawing vertical lines.
void ruler_widget_redraw_whole(RulerWidget* self)
Queues a redraw of the whole visible ruler.
void ruler_widget_redraw_playhead(RulerWidget* self)
Only redraws the playhead part.
void scale_object_recreate_pango_layouts(ScaleObject* self)
Recreates the pango layouts for drawing.
void scale_object_draw(ScaleObject* self, cairo_t* cr, GdkRectangle* rect)
auto scale_selector_window_widget_new(ScaleObject* owner) -> ScaleSelectorWindowWidget*
Creates the popover.
auto scripting_window_widget_new(void) -> ScriptingWindowWidget*
Creates a bounce dialog.
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 splash_window_widget_new(ZrythmApp* app) -> SplashWindowWidget*
Creates a splash_window widget.
void text_expander_widget_refresh(TextExpanderWidget* self)
Refreshes the text.
void text_expander_widget_setup(TextExpanderWidget* self, GenericStringGetter getter, GenericStringSetter setter, void* obj)
Sets up the TextExpanderWidget.
auto timeline_arranger_widget_get_track_lane_at_y(ArrangerWidget* self, double y) -> TrackLane*
Gets hit TrackLane at y.
auto timeline_arranger_widget_get_track_at_y(ArrangerWidget* self, double y) -> Track*
Gets the Track at y.
auto timeline_arranger_widget_get_at_at_y(ArrangerWidget* self, double y) -> AutomationTrack*
Returns the hit AutomationTrack at y.
void timeline_arranger_widget_set_select_type(ArrangerWidget* self, double y)
Determines the selection time (objects/range) and sets it.
void timeline_arranger_widget_create_region(ArrangerWidget* self, const RegionType type, Track* track, TrackLane* lane, AutomationTrack* at, const Position* pos)
Create a ZRegion at the given Position in the given Track's given TrackLane.
void timeline_arranger_widget_create_chord_or_scale(ArrangerWidget* 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(ArrangerWidget* self, Track* track, const Position* pos)
Create a ScaleObject at the given Position in the given Track.
void timeline_arranger_widget_create_marker(ArrangerWidget* self, Track* track, const Position* pos)
Create a Marker at the given Position in the given Track.
auto timeline_arranger_widget_snap_regions_l(ArrangerWidget* 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(ArrangerWidget* 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(ArrangerWidget* self, Position* pos)
Scroll to the given position.
auto timeline_arranger_move_regions_to_new_tracks(ArrangerWidget* self, const int vis_track_diff) -> int
Move the selected Regions to the new Track.
auto timeline_arranger_move_regions_to_new_lanes(ArrangerWidget* self, const int diff) -> int
Move the selected Regions to new Lanes.
void timeline_arranger_widget_set_cut_lines_visible(ArrangerWidget* self)
Hides the cut dashed line from hovered regions and redraws them.
void timeline_arranger_widget_remove_children(ArrangerWidget* self)
To be called when pinning/unpinning.
void timeline_arranger_widget_show_context_menu(ArrangerWidget* self, double x, double y)
Show context menu at x, y.
void timeline_arranger_widget_fade_up(ArrangerWidget* self, double offset_y, int fade_in)
Fade up/down.
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(RulerWidget* self, gdouble start_x, gdouble start_y, int height)
Called from ruler drag begin.
void timeline_ruler_on_drag_end(RulerWidget* self)
Called from ruler drag end.
void timeline_ruler_on_drag_update(RulerWidget* self, gdouble offset_x, gdouble offset_y)
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_force_redraw(TrackWidget* self)
Blocks all signal handlers.
void track_widget_on_show_automation_toggled(TrackWidget* self)
Wrapper to refresh mute button only.
void track_widget_on_show_lanes_toggled(TrackWidget* self)
Callback when automation button is toggled.
void track_widget_on_record_toggled(TrackWidget* self)
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_update_size(TrackWidget* self)
Updates the full track size and redraws the track.
void track_widget_do_highlight(TrackWidget* self, gint x, gint y, const int highlight)
Highlights/unhighlights the Tracks appropriately.
auto track_widget_get_local_y(TrackWidget* self, ArrangerWidget* arranger, int arranger_y) -> int
Converts Y from the arranger coordinates to the track coordinates.
void track_widget_redraw_meters(TrackWidget* self)
Causes a redraw of the meters only.
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_update_track_visibility(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 velocity_draw(Velocity* self, cairo_t* cr, GdkRectangle* rect)
Draws the Velocity in the given cairo context in relative coordinates.
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_point_in_rect_hit(GdkRectangle* rect, const bool check_x, const bool check_y, double x, double y, double x_padding, double y_padding) -> bool
Returns if rect is hit or not by the given coordinate.
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_rgb_to_hex(double red, double green, double blue, char* buf)
Converts RGB to hex string.
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_setup_buffer_size_combo_box(GtkComboBox* cb)
Sets up a pan law combo box.
void ui_setup_samplerate_combo_box(GtkComboBox* cb)
Sets up a pan law combo box.
void ui_setup_device_name_combo_box(GtkComboBoxText* cb)
Sets up a pan law combo box.
void ui_setup_vst_paths_entry(GtkEntry* entry)
Sets up the VST paths entry.
void ui_update_vst_paths_from_entry(GtkEntry* entry)
Updates the the VST paths in the gsettings from the text in the entry.
auto ui_get_locale_not_available_string(LocalizationLanguage lang) -> char*
Returns the "a locale for the language you have selected..." text based on the given language.
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.
void ui_get_mid_color(GdkRGBA* dest, const GdkRGBA* c1, const GdkRGBA* c2, const double transition)
Returns the color in-between two colors.
auto ui_is_color_bright(GdkRGBA* src) -> int
Returns if the color is bright or not.
auto ui_is_color_very_bright(GdkRGBA* src) -> bool
Returns if the color is very bright or not.
auto ui_rectangle_overlap(GdkRectangle* rect1, GdkRectangle* rect2) -> bool
Returns if the 2 rectangles overlay.
void ui_get_arranger_object_color(GdkRGBA* color, const bool is_hovered, const bool is_selected, const bool is_transient, const bool is_muted)
Gets the color the widget should be.
auto ui_get_normalized_draggable_value(double size, double cur_val, double start_px, double cur_px, double last_px, double multiplier, UiDragMode mode) -> double
Gets a draggable value as a normalized value between 0 and 1.

Variables

BounceDialogWidgetType
Type of bounce.
KnobType
Type of knob.
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 DEFAULT_PX_PER_TICK
Pixels to draw between each beat, before being adjusted for zoom.
#define SPACE_BEFORE_START
Pixels to put before 1st bar.
#define UI_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_SUPPORTED_FILE
For SupportedFile pointers.
#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 ArrangerWidgetType

Type of arranger.

enum BarSliderType

Type of slider.

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 RWTarget

The ruler widget target acting upon.

Enumerators
RW_TARGET_PLAYHEAD
RW_TARGET_LOOP_START
RW_TARGET_LOOP_END
RW_TARGET_CLIP_START
RW_TARGET_RANGE

for timeline only

enum RulerWidgetRangeType

Range type.

Enumerators
RW_RANGE_START

Range start.

RW_RANGE_FULL

Whole range.

RW_RANGE_END

Range end.

enum TrackWidgetResizeTarget

Resize target.

enum UiCursorState
#include <utils/ui.h>

Various cursor states to be shared.

enum UiOverlayAction
#include <utils/ui.h>

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_L_FADE
UI_OVERLAY_ACTION_RESIZING_R
UI_OVERLAY_ACTION_RESIZING_R_LOOP
UI_OVERLAY_ACTION_RESIZING_R_FADE
UI_OVERLAY_ACTION_RESIZING_UP
UI_OVERLAY_ACTION_RESIZING_UP_FADE_IN
UI_OVERLAY_ACTION_RESIZING_UP_FADE_OUT
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

enum UiDragMode
#include <utils/ui.h>

Dragging modes for widgets that have click&drag.

Enumerators
UI_DRAG_MODE_CURSOR

Value is wherever the cursor is.

UI_DRAG_MODE_RELATIVE

Value is changed based on the offset.

UI_DRAG_MODE_RELATIVE_WITH_MULTIPLIER

Value is changed based on the offset, times a multiplier.

Typedef documentation

typedef enum ArrangerWidgetType ArrangerWidgetType

Type of arranger.

typedef struct _ArrangerWidget ArrangerWidget

The arranger widget is a canvas that draws all the arranger objects it contains.

typedef struct _AudioEditorSpaceWidget AudioEditorSpaceWidget

The piano roll widget is the whole space inside the clip editor tab when a AUDIO region is selected.

typedef struct _AutomationEditorSpaceWidget AutomationEditorSpaceWidget

The piano roll widget is the whole space inside the clip editor tab when a AUTOMATION region is selected.

typedef struct AutomationModeWidget AutomationModeWidget

Custom button group to be drawn inside drawing areas.

typedef enum BarSliderType BarSliderType

Type of slider.

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 _CenterDockWidget CenterDockWidget

Center dock.

typedef struct _ChannelSendsExpanderWidget ChannelSendsExpanderWidget

A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.

typedef struct _ChordEditorSpaceWidget ChordEditorSpaceWidget

The piano roll widget is the whole space inside the clip editor tab when a CHORD region is selected.

typedef struct _ChordSelectorWindowWidget ChordSelectorWindowWidget

A GtkPopover to create a ChordDescriptor for use in the ChordTrack's ChordObject's.

typedef struct _ClipEditorInnerWidget ClipEditorInnerWidget

The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.

typedef struct CustomButtonWidget CustomButtonWidget

Custom button to be drawn inside drawing areas.

typedef struct _PortInfoDialogWidget PortInfoDialogWidget

The port_info dialog.

typedef struct _FaderWidget FaderWidget

A FaderWidget reflects a Fader object's state.

typedef struct _FaderControlsExpanderWidget FaderControlsExpanderWidget

A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.

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 _InspectorPortWidget InspectorPortWidget

A Port to show in the inspector for Plugin's.

typedef struct _InspectorTrackWidget InspectorTrackWidget

Inspector section for tracks.

typedef struct _InstrumentTrackWidget InstrumentTrackWidget

Top is the track part and bot is the automation part.

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 _MarkerDialogWidget MarkerDialogWidget

A dialog to edit a Marker's name.

typedef struct _MidiEditorSpaceWidget MidiEditorSpaceWidget

The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.

typedef struct _MidiTrackWidget MidiTrackWidget

Top is the track part and bot is the automation part.

typedef struct _PianoKeyboardWidget PianoKeyboardWidget

Piano Keyboard widget.

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.

typedef struct _PluginPropertiesExpanderWidget PluginPropertiesExpanderWidget

A widget for selecting plugin_properties in the plugin inspector.

typedef struct _PluginStripExpanderWidget PluginStripExpanderWidget

A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.

typedef struct _PortsExpanderWidget PortsExpanderWidget

A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.

typedef struct _PreferencesWidget PreferencesWidget

Preferences widget.

typedef struct _ProjectAssistantWidget ProjectAssistantWidget

A widget that allows selecting a project to load or create.

typedef enum RWTarget RWTarget

The ruler widget target acting upon.

typedef struct _ScaleSelectorWindowWidget ScaleSelectorWindowWidget

A GtkPopover to create a ScaleDescriptor for use in the ScaleTrack's ScaleObject's.

typedef struct _TextExpanderWidget TextExpanderWidget

A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.

typedef struct _TimelineToolbarWidget TimelineToolbarWidget

The Timeline toolbar in the top.

typedef struct _TrackWidget TrackWidget

The TrackWidget is split into 3 parts.

  • 1. Top part contains the "main" view.
  • 2. Lane part contains each lane.
  • 3. Automation tracklist part contains each automation track.

typedef struct _TrackTopGridWidget TrackTopGridWidget

Top is the track part and bot is the automation part.

typedef struct _TracklistWidget TracklistWidget

The TracklistWidget holds all the Track's in the Project.

It is a box with all the pinned tracks, plus a scrolled window at the end containing unpinned tracks and the DragDestBoxWidget at the end.

typedef struct UiColors UiColors
#include <utils/ui.h>

Commonly used UI colors.

typedef struct UiCursor UiCursor
#include <utils/ui.h>

Specification for a cursor.

Used for caching.

typedef struct UiCaches UiCaches
#include <utils/ui.h>

Caches.

typedef enum UiCursorState UiCursorState
#include <utils/ui.h>

Various cursor states to be shared.

typedef enum UiOverlayAction UiOverlayAction
#include <utils/ui.h>

Various overlay actions to be shared.

typedef enum UiDragMode UiDragMode
#include <utils/ui.h>

Dragging modes for widgets that have click&drag.

Function documentation

void arranger_widget_setup(ArrangerWidget* self, ArrangerWidgetType type, SnapGrid* snap_grid)

Creates a timeline widget using the given timeline data.

void arranger_widget_set_cursor(ArrangerWidget* self, ArrangerCursor cursor)

Sets the cursor on the arranger and all of its children.

int arranger_widget_pos_to_px(ArrangerWidget* self, Position* pos, int use_padding)

Wrapper of the UI functions based on the arranger type.

void arranger_widget_refresh_cursor(ArrangerWidget* self)

Figures out which cursor should be used based on the current state and then sets it.

GtkScrolledWindow* arranger_widget_get_scrolled_window(ArrangerWidget* self)

Sets transient object and actual object visibility for every ArrangerObject in the ArrangerWidget based on the current action.

Gets the corresponding scrolled window.

void arranger_widget_get_all_objects(ArrangerWidget* self, ArrangerObject** objs, int* size)

Get all objects currently present in the arranger.

Parameters
self
objs Array to fill in.
size Array size to fill in.

void arranger_widget_px_to_pos(ArrangerWidget* self, double px, Position* pos, int has_padding)

Wrapper for ui_px_to_pos depending on the arranger type.

void arranger_widget_get_visible_rect(ArrangerWidget* self, GdkRectangle* rect)

Returns the current visible rectangle.

Parameters
self
rect The rectangle to fill in.

void arranger_widget_get_hit_objects_at_point(ArrangerWidget* self, ArrangerObjectType type, double x, double y, ArrangerObject** array, int* array_size)

Fills in the given array with the ArrangerObject's of the given type that appear in the given ranger.

Parameters
self
type The type of arranger objects to find, or -1 to look for all objects.
x Global x.
y Global y.
array The array to fill.
array_size The size of the array to fill.

void arranger_widget_get_hit_objects_in_rect(ArrangerWidget* self, ArrangerObjectType type, GdkRectangle* rect, ArrangerObject** array, int* array_size)

Fills in the given array with the ArrangerObject's of the given type that appear in the given ranger.

Parameters
self
type The type of arranger objects to find, or -1 to look for all objects.
rect The rectangle to search in.
array The array to fill.
array_size The size of the array to fill.

ArrangerObject* arranger_widget_get_hit_arranger_object(ArrangerWidget* self, ArrangerObjectType type, const double x, const double y)

Returns the ArrangerObject of the given type at (x,y).

Parameters
self
type The arranger object type, or -1 to search for all types.
x
y

bool arranger_widget_is_in_moving_operation(ArrangerWidget* self)

Returns if the arranger is in a moving-related operation or starting a moving-related operation.

Useful to know if we need transient widgets or not.

void arranger_widget_redraw_whole(ArrangerWidget* self)

Queues a redraw of the whole visible arranger.

void arranger_widget_redraw_playhead(ArrangerWidget* self)

Only redraws the playhead part.

void arranger_widget_redraw_rectangle(ArrangerWidget* self, GdkRectangle* rect)

Only redraws the given rectangle.

gboolean arranger_widget_on_key_action(GtkWidget* widget, GdkEventKey* event, ArrangerWidget* self)

Called from MainWindowWidget because some events don't reach here.

void arranger_widget_scroll_until_obj(ArrangerWidget* self, ArrangerObject* obj, int horizontal, int up, int left, double padding)

Scroll until the given object is visible.

Parameters
self
obj
horizontal 1 for horizontal, 2 for vertical.
up Whether scrolling up or down.
left
padding Padding pixels.

void arranger_widget_toggle_selections_muted(ArrangerWidget* self, ArrangerObject* clicked_object)

Toggles the mute status of the selection, based on the mute status of the selected object.

This creates an undoable action and executes it.

void arranger_widget_get_min_possible_position(ArrangerWidget* self, Position* pos)

Returns the earliest possible position allowed in this arranger (eg, 1.1.0.0 for timeline).

int arranger_object_is_fade_in(ArrangerObject* self, const int x, const int y, int only_handle, int only_outer)

Returns if the current position is for moving the fade in mark.

Parameters
self
x X in local coordinates.
y
only_handle Whether to only check if this is inside the fade handle. If this is false, only_outer will be considered.
only_outer Whether to only check if this is inside the fade's outter (unplayed) region. If this is false, the whole fade area will be considered.

int arranger_object_is_fade_out(ArrangerObject* self, const int x, const int y, int only_handle, int only_outer)

Returns if the current position is for moving the fade out mark.

Parameters
self
x X in local coordinates.
y
only_handle Whether to only check if this is inside the fade handle. If this is false, only_outer will be considered.
only_outer Whether to only check if this is inside the fade's outter (unplayed) region. If this is false, the whole fade area will be considered.

int arranger_object_is_resize_l(ArrangerObject* self, const int x)

Returns if the current position is for resizing L.

Parameters
self
x X in local coordinates.

int arranger_object_is_resize_r(ArrangerObject* self, const int x)

Returns if the current position is for resizing R.

Parameters
self
x X in local coordinates.

int arranger_object_is_resize_up(ArrangerObject* self, const int x, const int y)

Returns if the current position is for resizing up (eg, Velocity).

Parameters
self
x X in local coordinates.
y Y in local coordinates.

int arranger_object_is_resize_loop(ArrangerObject* self, const int y)

Returns if the current position is for resizing loop.

Parameters
self
y Y in local coordinates.

int arranger_object_should_show_cut_lines(ArrangerObject* self, int alt_pressed)

Returns if arranger_object widgets should show cut lines.

Parameters
self
alt_pressed Whether alt is currently pressed.

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

int arranger_object_get_full_rect_x_for_region_child(ArrangerObject* self, ZRegion* region, GdkRectangle* full_rect)

Gets the full rectangle for a linked object.

int arranger_object_get_draw_rectangle(ArrangerObject* self, GdkRectangle* parent_rect, GdkRectangle* full_rect, GdkRectangle* draw_rect)

Gets the draw rectangle based on the given full rectangle of the arranger object.

Parameters
self
parent_rect The current arranger rectangle.
full_rect The object's full rectangle. This will usually be ArrangerObject->full_rect, unless drawing in a lane (for Region's).
draw_rect The rectangle will be set here.
Returns Whether the draw rect is visible.

void arranger_object_draw(ArrangerObject* self, ArrangerWidget* arranger, cairo_t* cr, GdkRectangle* rect)

Draws the given object.

Parameters
self
arranger
cr Cairo context of the arranger.
rect Rectangle in the arranger.

To be called from the arranger's draw callback.

void arranger_object_queue_redraw(ArrangerObject* self)

Queues a redraw in the area covered by this object.

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(ArrangerWidget* self, const Position* pos, const double start_y, ZRegion* region)

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

Parameters
self
pos The pre-snapped position.
start_y
region

void automation_arranger_widget_resize_curves(ArrangerWidget* self, double offset_y)

Change curviness of selected curves.

void automation_arranger_widget_show_context_menu(ArrangerWidget* self, double x, double y)

Show context menu at x, y.

void automation_editor_space_widget_update_size_group(AutomationEditorSpaceWidget* self, int visible)

See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.

AutomationModeWidget* automation_mode_widget_new(int height, PangoLayout* layout, AutomationTrack* owner)

Creates a new track widget from the given track.

bool automation_point_is_point_hit(AutomationPoint* self, double x, double y)

Returns if the automation point (circle) is hit.

Parameters
self
x X in global coordinates.
y Y in global coordinates.

This function assumes that the point is already inside the full rect of the automation point.

bool automation_point_is_curve_hit(AutomationPoint* self, double x, double y, double delta_from_curve)

Returns if the automation curve is hit.

Parameters
self
x X in global coordinates.
y Y in global coordinates.
delta_from_curve Allowed distance from the curve.

This function assumes that the point is already inside the full rect of the automation point.

void automation_point_draw(AutomationPoint* self, cairo_t* cr, GdkRectangle* rect)

Draws the AutomationPoint in the given cairo context in absolute coordinates.

Parameters
self
cr The cairo context of the arranger.
rect Arranger rectangle.

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, UiDragMode 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

BindCcDialogWidget* bind_cc_dialog_widget_new(void)

Creates an bind_cc dialog widget and displays it.

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.

Overlay for showing things on top of the playhead positionmeter.

The playhead digital meter.

Jack timebase master image.

Jack client master image.

Menuitems in context menu of digital transport.

Color in hex to use in pango markups.

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.

ChannelSendWidget* channel_send_widget_new(ChannelSend* send)

Creates a new ChannelSend widget and binds it to the given value.

void channel_sends_expander_widget_setup(ChannelSendsExpanderWidget* self, ChannelSendsExpanderPosition position, Track* track)

Sets up the ChannelSendsExpanderWidget.

ChannelSlotWidget* channel_slot_widget_new_instrument(void)

Creates a new ChannelSlot widget whose track and plugin can change.

ChannelSlotWidget* channel_slot_widget_new(int slot_index, Channel* ch, PluginSlotType type, bool open_plugin_inspector_on_click)

Creates a new ChannelSlot widget and binds it to the given value.

void channel_slot_widget_set_state_flags(ChannelSlotWidget* self, GtkStateFlags flags, bool set)

Sets or unsets state flags and redraws the widget.

Parameters
self
flags
set True to set, false to unset.

void chord_editor_space_widget_update_size_group(ChordEditorSpaceWidget* self, int visible)

See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.

void chord_object_recreate_pango_layouts(ChordObject* self)

Recreates the pango layouts for drawing.

void chord_object_draw(ChordObject* self, cairo_t* cr, GdkRectangle* rect)

Parameters
self
cr Cairo context of the arranger.
rect Rectangle in the arranger.

void chord_region_recreate_pango_layouts(ZRegion* self)

Recreates the pango layout for drawing chord names inside the region.

void clip_editor_inner_widget_add_to_left_of_ruler_sizegroup(ClipEditorInnerWidget* self, GtkWidget* widget, bool add)

Adds or remove the widget from the "left of ruler" size group.

ControlRoomWidget* control_room_widget_new(void)

Creates a ControlRoomWidget.

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

CPU load (0-100).

DSP load (0-100).

Source func IDs.

void cpu_widget_setup(CpuWidget* self)

Starts drawing the CPU usage.

CustomButtonWidget* custom_button_widget_new(const char* icon_name, int size)

Creates a new track widget from the given track.

void custom_button_widget_draw_with_text(CustomButtonWidget* self, cairo_t* cr, double x, double y, double width, CustomButtonWidgetState state)

Parameters
self
cr
x
y
width Max width for the button to use.
state

void custom_button_widget_set_text(CustomButtonWidget* self, PangoLayout* layout, char* text, const char* font_descr)

Sets the text and layout to draw the text width.

Parameters
self
layout
text
font_descr Font description to set the pango layout font to.

GtkAboutDialog* about_dialog_widget_new(GtkWindow* parent)

Creates and displays the about dialog.

ArrangerObjectInfoDialogWidget* arranger_object_info_dialog_widget_new(ArrangerObject* object)

Creates an arranger_object_info dialog widget and displays it.

BounceDialogWidget* bounce_dialog_widget_new(BounceDialogWidgetType type, const char* bounce_name)

Creates a bounce dialog.

ExportProgressDialogWidget* export_progress_dialog_widget_new(ExportSettings* info, int autoclose, int show_open_dir_btn)

Creates an export dialog widget and displays it.

PortInfoDialogWidget* port_info_dialog_widget_new(Port* port)

Creates an port_info dialog widget and displays it.

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).

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. @parram 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.

void editor_ruler_widget_draw_markers(RulerWidget* self)

Called from RulerWidget to draw the markers specific to the editor, such as region loop points.

void editor_ruler_on_drag_begin_no_marker_hit(RulerWidget* self, gdouble start_x, gdouble start_y)

Called from ruler drag begin.

void event_viewer_widget_refresh(EventViewerWidget* self)

Called to update the models.

void event_viewer_widget_setup(EventViewerWidget* self, EventViewerType type)

Sets up the event viewer.

ExpanderBoxWidgetPrivate* expander_box_widget_get_private(ExpanderBoxWidget* self)

Gets the private.

void expander_box_widget_set_label(ExpanderBoxWidget* self, const char* label)

Sets the label to show.

void expander_box_widget_set_icon_name(ExpanderBoxWidget* self, const char* icon_name)

Sets the icon name to show.

static void expander_box_widget_set_icon_resource(ExpanderBoxWidget* self, IconType icon_type, const char* path)

Sets the icon resource to show.

void expander_box_widget_set_reveal(ExpanderBoxWidget* self, int reveal)

Reveals or hides the expander box's contents.

ExportDialogWidget* export_dialog_widget_new(void)

Creates an export dialog widget and displays it.

void fader_widget_setup(FaderWidget* self, Fader* fader, int width, int height)

Creates a new Fader widget and binds it to the given Fader.

void fader_controls_expander_widget_setup(FaderControlsExpanderWidget* self, Track* track)

Sets up the FaderControlsExpanderWidget.

FileBrowserWidget* file_browser_widget_new(void)

Creates a new FileBrowserWidget.

FileBrowserWindowWidget* file_browser_window_widget_new(void)

Creates a new FileBrowserWindowWidget.

GtkWidget* foldable_notebook_widget_get_widget_at_page(FoldableNotebookWidget* self, int page)

Get the widget at the given page.

GtkWidget* foldable_notebook_widget_get_current_widget(FoldableNotebookWidget* self)

Get the widget currently visible.

FIXME this is not working with nested containers like scrolled windows. this whole widget needs a rewrite.

void foldable_notebook_widget_set_visibility(FoldableNotebookWidget* self, int new_visibility)

Sets the folded space visible or not.

int foldable_notebook_widget_is_content_visible(FoldableNotebookWidget* self)

Returns if the content of the foldable notebook is visible.

void foldable_notebook_widget_setup(FoldableNotebookWidget* self, GtkPaned* paned, GtkPositionType pos_in_paned)

Sets up an existing FoldableNotebookWidget.

void inspector_plugin_widget_show(InspectorPluginWidget* self, MixerSelections* ms)

Shows the appropriate information based on if the Audio or MIDI plugin are visible.

void inspector_track_widget_show_tracks(InspectorTrackWidget* self, TracklistSelections* tls)

Refreshes the inspector section based on the given tls.

Parameters
self
tls Track selections.

void inspector_track_widget_setup(InspectorTrackWidget* self, TracklistSelections* tls)

Sets up the inspector track widget for the first time.

InstrumentTrackWidget* instrument_track_widget_new(Track* track)

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.

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

void live_waveform_widget_setup_engine(LiveWaveformWidget* self)

Creates a LiveWaveformWidget for the AudioEngine.

LogViewerWidget* log_viewer_widget_new(void)

Creates a log viewer widget.

void marker_recreate_pango_layouts(Marker* self)

Recreates the pango layouts for drawing.

void marker_draw(Marker* self, cairo_t* cr, GdkRectangle* rect)

Parameters
self
cr Cairo context of the arranger.
rect Rectangle in the arranger.

void midi_activity_bar_widget_setup_track(MidiActivityBarWidget* self, Track* track)

Creates a MidiActivityBarWidget for use inside TrackWidget implementations.

void midi_arranger_widget_create_note(ArrangerWidget* self, Position* pos, int note, ZRegion* region)

Returns the note value (0-127) at y.

Called on drag begin in parent when background is double clicked (i.e., a note is created).

int midi_arranger_widget_snap_midi_notes_l(ArrangerWidget* self, Position* pos, int dry_run)

Called during drag_update in the parent when resizing the selection.

Parameters
self
pos Absolute position in the arrranger. @parram 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.

It sets the start Position of the selected MidiNote's.

int midi_arranger_widget_snap_midi_notes_r(ArrangerWidget* self, Position* pos, int dry_run)

Called during drag_update in the parent when resizing the selection.

Parameters
self
pos Absolute position in the arrranger. @parram 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.

It sets the end Position of the selected MidiNote's.

void midi_arranger_widget_set_hovered_note(ArrangerWidget* self, int pitch)

Sets the currently hovered note and queues a redraw if it changed.

Parameters
self
pitch The note pitch, or -1 for no note.

int midi_arranger_calc_deltamax_for_note_movement(int y_delta)

Called on move items_y setup.

calculates the max possible y movement

void midi_arranger_listen_notes(ArrangerWidget* self, int listen)

Listen to the currently selected notes.

Parameters
self
listen Turn notes on if 1, or turn them off if 0.

This function either turns on the notes if they are not playing, changes the notes if the pitch changed, or otherwise does nothing.

void midi_editor_space_widget_update_size_group(MidiEditorSpaceWidget* self, int visible)

See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.

void midi_note_draw(MidiNote* self, cairo_t* cr, GdkRectangle* arr_rect)

Parameters
self
cr Arranger's cairo context.
arr_rect Arranger's rectangle.

MidiTrackWidget* midi_track_widget_new(Track* track)

Creates a new track widget from the given track.

void midi_track_widget_refresh(MidiTrackWidget* self)

Updates changes in the backend to the ui.

PianoKeyboardWidget* piano_keyboard_widget_new(GtkOrientation orientation)

Creates a piano keyboard widget.

int piano_roll_keys_widget_get_font_size(PianoRollKeysWidget* self)

Returns the appropriate font size based on the current pixels (height) per key.

TrackWidget* pinned_tracklist_widget_get_hit_track(PinnedTracklistWidget* self, double x, double y)

Gets TrackWidget hit at the given coordinates.

void pinned_tracklist_widget_setup(PinnedTracklistWidget* self, Tracklist* tracklist)

Sets up the PinnedTracklistWidget.

PluginBrowserWidget* plugin_browser_widget_new(void)

Instantiates a new PluginBrowserWidget.

void plugin_properties_expander_widget_setup(PluginPropertiesExpanderWidget* self, Plugin* pl)

Sets up the PluginPropertiesExpanderWidget for a Plugin.

void plugin_strip_expander_widget_redraw_slot(PluginStripExpanderWidget* self, int slot)

Queues a redraw of the given slot.

void plugin_strip_expander_widget_set_state_flags(PluginStripExpanderWidget* self, int slot, GtkStateFlags flags, bool set)

Unsets state flags and redraws the widget at the given slot.

Parameters
self
slot Slot, or -1 for all slots.
flags
set True to set, false to unset.

void plugin_strip_expander_widget_setup(PluginStripExpanderWidget* self, PluginSlotType type, PluginStripExpanderPosition position, Track* track)

Sets up the PluginStripExpanderWidget.

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.

Parameters
self
tr
type The type of ports to include.

ProjectAssistantWidget* project_assistant_widget_new(GtkWindow* parent, int show_create_new_project)

Creates a ProjectAssistantWidget.

QuantizeDialogWidget* quantize_dialog_widget_new(QuantizeOptions* opts)

Creates an quantize dialog widget and displays it.

void region_get_lane_full_rect(ZRegion* self, GdkRectangle* rect)

Returns the lane rectangle for the region.

void region_draw(ZRegion* self, cairo_t* cr, GdkRectangle* rect)

Draws the ZRegion in the given cairo context in relative coordinates.

Parameters
self
cr The cairo context in the region's drawable coordinates.
rect Arranger rectangle.

int ruler_widget_set_zoom_level(RulerWidget* self, double zoom_level)

Sets zoom level and disables/enables buttons accordingly.

Returns if the zoom level was set or not.

int ruler_widget_get_beat_interval(RulerWidget* self)

Returns the beat interval for drawing vertical lines.

int ruler_widget_get_sixteenth_interval(RulerWidget* self)

Returns the sixteenth interval for drawing vertical lines.

void ruler_widget_redraw_whole(RulerWidget* self)

Queues a redraw of the whole visible ruler.

void ruler_widget_redraw_playhead(RulerWidget* self)

Only redraws the playhead part.

void scale_object_recreate_pango_layouts(ScaleObject* self)

Recreates the pango layouts for drawing.

void scale_object_draw(ScaleObject* self, cairo_t* cr, GdkRectangle* rect)

Parameters
self
cr Cairo context of the arranger.
rect Rectangle in the arranger.

ScriptingWindowWidget* scripting_window_widget_new(void)

Creates a bounce dialog.

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 text_expander_widget_setup(TextExpanderWidget* self, GenericStringGetter getter, GenericStringSetter setter, void* obj)

Sets up the TextExpanderWidget.

void timeline_arranger_widget_set_select_type(ArrangerWidget* self, double y)

Determines the selection time (objects/range) and sets it.

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

Create a ZRegion 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(ArrangerWidget* 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 ArrangerWidget.
pos

void timeline_arranger_widget_create_scale(ArrangerWidget* 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(ArrangerWidget* 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(ArrangerWidget* 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. @parram 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(ArrangerWidget* 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. @parram 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(ArrangerWidget* self, Position* pos)

Scroll to the given position.

FIXME move to parent?

int timeline_arranger_move_regions_to_new_tracks(ArrangerWidget* self, const int vis_track_diff)

Move the selected Regions to the new Track.

Returns 1 if moved.

int timeline_arranger_move_regions_to_new_lanes(ArrangerWidget* self, const int diff)

Move the selected Regions to new Lanes.

Parameters
self
diff The delta to move the Tracks.
Returns 1 if moved.

void timeline_arranger_widget_set_cut_lines_visible(ArrangerWidget* self)

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

Used when alt was unpressed.

void timeline_arranger_widget_remove_children(ArrangerWidget* self)

To be called when pinning/unpinning.

void timeline_arranger_widget_show_context_menu(ArrangerWidget* self, double x, double y)

Show context menu at x, y.

void timeline_arranger_widget_fade_up(ArrangerWidget* self, double offset_y, int fade_in)

Fade up/down.

Parameters
self
offset_y
fade_in 1 for in, 0 for out.

void timeline_minimap_widget_px_to_pos(TimelineMinimapWidget* self, Position* pos, int px)

Taken from arranger.c.

void timeline_ruler_on_drag_begin_no_marker_hit(RulerWidget* self, gdouble start_x, gdouble start_y, int height)

Called from ruler drag begin.

void timeline_ruler_on_drag_end(RulerWidget* self)

Called from ruler drag end.

void timeline_ruler_on_drag_update(RulerWidget* self, gdouble offset_x, gdouble offset_y)

Called from ruler drag update.

TrackWidget* track_widget_new(Track* track)

Sets up the track widget.

Sets color, draw callback, etc.

void track_widget_set_name(TrackWidget* self, const char* name)

Sets the Track name on the TrackWidget.

void track_widget_force_redraw(TrackWidget* self)

Blocks all signal handlers.

Unblocks all signal handlers. Wrapper.

void track_widget_on_show_automation_toggled(TrackWidget* self)

Wrapper to refresh mute button only.

Callback when automation button is toggled.

void track_widget_on_show_lanes_toggled(TrackWidget* self)

Callback when automation button is toggled.

void track_widget_on_record_toggled(TrackWidget* self)

Callback when record 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_update_size(TrackWidget* self)

Updates the full track size and redraws the track.

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.

int track_widget_get_local_y(TrackWidget* self, ArrangerWidget* arranger, int arranger_y)

Converts Y from the arranger coordinates to the track coordinates.

void track_widget_redraw_meters(TrackWidget* self)

Causes a redraw of the meters only.

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.

TrackVisibilityTreeWidget* track_visibility_tree_widget_new(void)

Instantiates a new TrackVisibilityTreeWidget.

void velocity_draw(Velocity* self, cairo_t* cr, GdkRectangle* rect)

Draws the Velocity in the given cairo context in relative coordinates.

Parameters
self
cr The arranger cairo context.
rect Arranger rectangle.

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.

GdkModifierType ui_get_state_mask(GtkGesture* gesture)
#include <utils/ui.h>

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)
#include <utils/ui.h>

Sets cursor from icon name.

void ui_set_cursor_from_name(GtkWidget* widget, const char* name)
#include <utils/ui.h>

Sets cursor from standard cursor name.

void ui_show_message_full(GtkWindow* parent_window, GtkMessageType type, const char* message)
#include <utils/ui.h>

Shows a popup message of the given type with the given message.

bool ui_is_point_in_rect_hit(GdkRectangle* rect, const bool check_x, const bool check_y, double x, double y, double x_padding, double y_padding)
#include <utils/ui.h>

Returns if rect is hit or not by the given coordinate.

Parameters
rect
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.

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)
#include <utils/ui.h>

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)
#include <utils/ui.h>

Returns the matching hit child, or NULL.

type to look for

void ui_px_to_pos_timeline(double px, Position* pos, int has_padding)
#include <utils/ui.h>

Converts from pixels to position.

Parameters
px
pos
has_padding Whether the given px contain padding.

long ui_px_to_frames_timeline(double px, int has_padding)
#include <utils/ui.h>

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)
#include <utils/ui.h>

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)
#include <utils/ui.h>

Converts position to px, optionally adding the ruler padding.

int ui_pos_to_px_editor(Position* pos, int use_padding)
#include <utils/ui.h>

Converts position to px, optionally adding the ruler padding.

void ui_px_to_pos_editor(double px, Position* pos, int has_padding)
#include <utils/ui.h>

Converts from pixels to position.

Parameters
px
pos
has_padding Whether px contains padding.

void ui_rgb_to_hex(double red, double green, double blue, char* buf)
#include <utils/ui.h>

Converts RGB to hex string.

void ui_show_notification(const char* msg)
#include <utils/ui.h>

Shows a notification in the revealer.

int ui_show_notification_idle_func(char* msg)
#include <utils/ui.h>

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)
#include <utils/ui.h>

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

return value

void ui_setup_language_combo_box(GtkComboBox* language)
#include <utils/ui.h>

Sets up a combo box to have a selection of languages.

void ui_setup_audio_backends_combo_box(GtkComboBox* cb)
#include <utils/ui.h>

Sets up an audio backends combo box.

void ui_setup_midi_backends_combo_box(GtkComboBox* cb)
#include <utils/ui.h>

Sets up a MIDI backends combo box.

void ui_setup_pan_algo_combo_box(GtkComboBox* cb)
#include <utils/ui.h>

Sets up a pan algorithm combo box.

void ui_setup_pan_law_combo_box(GtkComboBox* cb)
#include <utils/ui.h>

Sets up a pan law combo box.

void ui_setup_buffer_size_combo_box(GtkComboBox* cb)
#include <utils/ui.h>

Sets up a pan law combo box.

void ui_setup_samplerate_combo_box(GtkComboBox* cb)
#include <utils/ui.h>

Sets up a pan law combo box.

void ui_setup_device_name_combo_box(GtkComboBoxText* cb)
#include <utils/ui.h>

Sets up a pan law combo box.

void ui_setup_vst_paths_entry(GtkEntry* entry)
#include <utils/ui.h>

Sets up the VST paths entry.

void ui_update_vst_paths_from_entry(GtkEntry* entry)
#include <utils/ui.h>

Updates the the VST paths in the gsettings from the text in the entry.

char* ui_get_locale_not_available_string(LocalizationLanguage lang)
#include <utils/ui.h>

Returns the "a locale for the language you have selected..." text based on the given language.

Must be free'd by caller.

void ui_get_contrast_color(GdkRGBA* src, GdkRGBA* dest)
#include <utils/ui.h>

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_mid_color(GdkRGBA* dest, const GdkRGBA* c1, const GdkRGBA* c2, const double transition)
#include <utils/ui.h>

Returns the color in-between two colors.

Parameters
dest
c1
c2
transition How far to transition (0.5 for half).

int ui_is_color_bright(GdkRGBA* src)
#include <utils/ui.h>

Returns if the color is bright or not.

bool ui_is_color_very_bright(GdkRGBA* src)
#include <utils/ui.h>

Returns if the color is very bright or not.

bool ui_rectangle_overlap(GdkRectangle* rect1, GdkRectangle* rect2)
#include <utils/ui.h>

Returns if the 2 rectangles overlay.

void ui_get_arranger_object_color(GdkRGBA* color, const bool is_hovered, const bool is_selected, const bool is_transient, const bool is_muted)
#include <utils/ui.h>

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
is_muted

double ui_get_normalized_draggable_value(double size, double cur_val, double start_px, double cur_px, double last_px, double multiplier, UiDragMode mode)
#include <utils/ui.h>

Gets a draggable value as a normalized value between 0 and 1.

Parameters
size Widget size (either width or height).
cur_val
start_px Px at start of drag.
cur_px Current px.
last_px Px during last call.
multiplier
mode

Variable documentation

KnobType

Type of knob.

ProjectInfo

Project file information.

Full path.

Define documentation

#define bar_slider_widget_new(getter, setter, obj, min, max, w, h, zero, dec, mode, suffix)

Helper to create a bar slider widget.

#define DEFAULT_PX_PER_TICK

Pixels to draw between each beat, before being adjusted for zoom.

Used by the ruler and timeline.

#define SPACE_BEFORE_START

Pixels to put before 1st bar.

#define UI_RESIZE_CURSOR_SPACE
#include <utils/ui.h>

Space on the edges to show resize cursors.

#define TARGET_ENTRY_PLUGIN_DESCR
#include <utils/ui.h>

Plugin descriptor, used to instantiate plugins.

#define TARGET_ENTRY_SUPPORTED_FILE
#include <utils/ui.h>

For SupportedFile pointers.

#define TARGET_ENTRY_PLUGIN
#include <utils/ui.h>

Plugin ID, used to move/copy plugins.

#define TARGET_ENTRY_URI_LIST
#include <utils/ui.h>

URI list.

#define TARGET_ENTRY_TRACK
#include <utils/ui.h>

Track target entry.

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

#define ui_show_notification_idle(msg)
#include <utils/ui.h>

Shows the notification when idle.

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

#define ui_show_error_message(win, msg)
#include <utils/ui.h>

Wrapper to show error message so that no casting of the window is needed on the caller side.