file
ui.hUser Interface utils.
Classes
- struct UiColors
- Commonly used UI colors.
- struct UiTextures
- Commonly used UI textures.
- struct UiCursor
- Specification for a cursor.
- struct UiCaches
- Caches.
Enums
- 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_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, UI_OVERLAY_ACTION_RENAMING, NUM_UI_OVERLAY_ACTIONS }
- 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 UiColors = struct UiColors
- Commonly used UI colors.
- using UiTextures = struct UiTextures
- Commonly used UI textures.
- 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.
Functions
- 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* format, ...) G_GNUC_PRINTF(3
- 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(GtkWidget* parent, double x, double y, GType type) -> GtkWidget*
- Returns the matching hit child, or NULL.
- auto ui_px_to_pos_timeline(double px, Position* pos, bool has_padding) -> NONNULL void
- 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) -> NONNULL int
- Converts position to px, optionally adding the ruler padding.
- auto ui_pos_to_px_editor(Position* pos, bool use_padding) -> NONNULL int
- Converts position to px, optionally adding the ruler padding.
- auto ui_px_to_pos_editor(double px, Position* pos, bool has_padding) -> NONNULL void
- 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_setup_language_dropdown(GtkDropDown* dropdown)
- 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 float transition)
- Returns the color in-between two colors.
- static auto ui_rectangle_overlap(const GdkRectangle*const rect1, const GdkRectangle*const rect2) -> NONNULL static PURE 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
- static const char* ui_overlay_strings
- Various overlay actions to be shared.
Defines
- #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 TARGET_ENTRY_CHORD_DESCR
- Chord descriptor target entry.
- #define ui_show_notification_idle(msg)
- Shows the notification when idle.
- #define ui_show_error_message(win, msg)
- Wrapper to show error message so that no casting of the window is needed on the caller side.
- #define ui_show_message_printf(win, type, fmt, ...)
- Type can be GTK_MESSAGE_ERROR, etc.