|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Various utilities. More...
Files | |
| file | resources.h |
| Helpers for loading and using resources such as icons. | |
Macros | |
| #define | Z_CAIRO_FONT "Bold 9" |
| Default font for drawing pango text. | |
| #define | Z_CAIRO_TEXT_PADDING 2 |
| Padding to leave from the top/left edges when drawing text. | |
| #define | z_cairo_get_text_extents_for_widget(_widget, _layout, _text, _width, _height) |
| #define | z_cairo_draw_text(cr, widget, layout, text) |
| Draw text with default padding. | |
| #define | DEFAULT_CLIPBOARD gdk_display_get_clipboard (gdk_display_get_default ()) |
| #define | CREATE_MIDI_LEARN_MENU_ITEM(action) |
| #define | CREATE_CUT_MENU_ITEM(action) |
| #define | CREATE_COPY_MENU_ITEM(action) |
| #define | CREATE_PASTE_MENU_ITEM(action) |
| #define | CREATE_DELETE_MENU_ITEM(action) |
| #define | CREATE_CLEAR_SELECTION_MENU_ITEM(action) |
| #define | CREATE_SELECT_ALL_MENU_ITEM(action) |
| #define | CREATE_DUPLICATE_MENU_ITEM(action) |
| #define | CREATE_MUTE_MENU_ITEM(action) |
| #define | CREATE_UNMUTE_MENU_ITEM(action) |
| #define | z_gtk_assistant_set_current_page_complete(assistant, complete) |
| #define | Z_GDK_RGBA_INIT(r, g, b, a) |
| #define | Z_GDK_RECTANGLE_INIT(_x, _y, _w, _h) |
| #define | Z_GDK_RECTANGLE_INIT_UNIT(_x, _y) |
| #define | Z_GRAPHENE_RECT_INIT(_x, _y, _w, _h) |
| #define | Z_GRAPHENE_POINT_INIT(_x, _y) |
| #define | Z_GRAPHENE_SIZE_INIT(_w, _h) |
| #define | z_gtk_create_menu_item(lbl_name, icn_name, action_name) |
| #define | RESOURCES_PATH_TOP "/org/zrythm/Zrythm" |
| #define | RESOURCES_PATH RESOURCES_PATH_TOP "/app" |
| #define | RESOURCES_TEMPLATE_PATH RESOURCES_PATH "/ui" |
| #define | RESOURCES_GL_SHADERS_PATH RESOURCES_PATH "/gl/shaders" |
| #define | SUPPORTED_FILE_DND_PREFIX Z_DND_STRING_PREFIX "FileDescriptor::" |
| #define | UI_CACHES (zrythm_app->ui_caches_) |
| #define | UI_COLORS (&UI_CACHES->colors_) |
| #define | z_return_val_if_fail_cmp(a, comparator, b, val) |
| #define | z_return_if_fail_cmp(a, comparator, b) |
| #define | z_warn_if_fail_cmp(a, comparator, b) |
| #define | DEBUG_BREAK() |
| #define | DEFINE_FORMATTER_PRELUDE |
| #define | VA_ARGS_SIZE(...) |
| #define | DEFINE_ENUM_FORMATTER(enum_type, enum_name, ...) |
| #define | ENUM_INT_TO_VALUE_CONST(_enum, _int) |
| #define | ENUM_INT_TO_VALUE(_enum, _int) |
| #define | ENUM_VALUE_TO_INT(_val) |
| #define | ENUM_ENABLE_BITSET(_enum) |
| #define | ENUM_BITSET(_enum, _val) |
| #define | ENUM_BITSET_TEST(_val, _other_val) |
| #define | ENUM_BITSET_TO_STRING(_enum, _val) |
| #define | ENUM_COUNT(_enum) |
| #define | ENUM_NAME(_val) |
| #define | ENUM_NAME_FROM_INT(_enum, _int) |
| #define | ZRYTHM_IS_QT_THREAD (QThread::currentThread () == qApp->thread ()) |
| #define | Z_DISABLE_COPY_MOVE(Class) |
| #define | Z_DISABLE_COPY(Class) |
| #define | Z_DISABLE_MOVE(Class) |
Typedefs | |
| using | PangoLayoutUniquePtr = std::unique_ptr<PangoLayout, PangoLayoutDeleter> |
| using | Color = zrythm::utils::Color |
| using | RtTimePoint = int64_t |
| using | RtDuration = int64_t |
| using | midi_byte_t = uint8_t |
| MIDI byte. | |
| using | nframes_t = uint32_t |
| Frame count. | |
| using | midi_time_t = uint32_t |
| MIDI time in global frames. | |
| using | channels_t = uint_fast8_t |
| Number of channels. | |
| using | audio_sample_type_t = float |
| The sample type. | |
| using | bpm_t = float |
| The BPM type. | |
| using | curviness_t = double |
| using | signed_frame_t = int_fast64_t |
| Signed type for frame index. | |
| using | unsigned_frame_t = uint_fast64_t |
| Unsigned type for frame index. | |
| using | signed_ms_t = signed_frame_t |
| Signed millisecond index. | |
| using | signed_sec_t = signed_frame_t |
| Signed second index. | |
| using | ProcessId = qint64 |
| GPid equivalent. | |
| using | GenericFloatGetter = std::function<float ()> |
| Getter prototype for float values. | |
| using | GenericFloatSetter = std::function<void (float)> |
| Setter prototype for float values. | |
| using | GenericStringGetter = std::function<std::string ()> |
| Getter prototype for strings. | |
| using | GenericStringSetter = std::function<void (const std::string &)> |
| Setter prototype for float values. | |
| using | GenericCallback = std::function<void ()> |
| Generic callback. | |
| using | GenericBoolGetter = std::function<bool ()> |
| using | SteadyClock = std::chrono::steady_clock |
| using | SteadyTimePoint = SteadyClock::time_point |
| using | SteadyDuration = SteadyClock::duration |
| using | basic_enum_base_type_t = uint8_t |
Enumerations | |
| enum | ZGtkResize { Z_GTK_NO_RESIZE , Z_GTK_RESIZE } |
| enum | ZGtkShrink { Z_GTK_NO_SHRINK , Z_GTK_SHRINK } |
| enum class | FileType { Midi , Mp3 , Flac , Ogg , Wav , Directory , FileType::ParentDirectory , Other , NumFileTypes } |
| File type. More... | |
| enum class | 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. More... | |
| enum class | UiOverlayAction { None , CreatingResizingR , CREATING_MOVING , ResizingL , ResizingLLoop , ResizingLFade , ResizingR , ResizingRLoop , ResizingRFade , RESIZING_UP , RESIZING_UP_FADE_IN , RESIZING_UP_FADE_OUT , StretchingL , StretchingR , STARTING_AUDITIONING , AUDITIONING , UiOverlayAction::AUTOFILLING , UiOverlayAction::ERASING , STARTING_ERASING , UiOverlayAction::STARTING_MOVING , STARTING_MOVING_COPY , STARTING_MOVING_LINK , MOVING , MovingCopy , MOVING_LINK , STARTING_CHANGING_CURVE , CHANGING_CURVE , UiOverlayAction::STARTING_SELECTION , SELECTING , UiOverlayAction::STARTING_DELETE_SELECTION , DELETE_SELECTING , STARTING_RAMP , RAMPING , CUTTING , RENAMING , StartingPanning , Panning , NUM_UI_OVERLAY_ACTIONS } |
| Various overlay actions to be shared. More... | |
| enum class | AudioValueFormat { AudioValueFormat::Amplitude , AudioValueFormat::DBFS , AudioValueFormat::Fader } |
| enum class | TimeFormat : std::uint8_t { TimeFormat::Musical , TimeFormat::Absolute } |
| enum class | BeatUnit { Two , Four , Eight , Sixteen } |
| Beat unit. More... | |
| enum class | CacheType { PlaybackSnapshots = 1 << 2 , AutomationLaneRecordModes = 1 << 3 , AutomationLanePorts = 1 << 4 } |
Functions | |
| void | z_cairo_draw_horizontal_line (cairo_t *cr, double y, double from_x, double to_x, double line_width, double alpha) |
| void | z_cairo_draw_vertical_line (cairo_t *cr, double x, double from_y, double to_y, double line_width) |
| void | _z_cairo_get_text_extents_for_widget (GtkWidget *widget, PangoLayout *layout, const char *text, int *width, int *height) |
| Gets the width of the given text in pixels for the given widget. | |
| void | z_cairo_draw_text_full (cairo_t *cr, GtkWidget *widget, PangoLayout *layout, const char *text, int start_x, int start_y) |
| Draws the given text using the given font starting at the given position. | |
| PangoLayoutUniquePtr | z_cairo_create_pango_layout_from_string (GtkWidget *widget, const char *font, PangoEllipsizeMode ellipsize_mode, int ellipsize_padding) |
| Creates a PangoLayout to be cached in widgets based on the given settings. | |
| PangoLayoutUniquePtr | z_cairo_create_pango_layout_from_description (GtkWidget *widget, PangoFontDescription *descr, PangoEllipsizeMode ellipsize_mode, int ellipsize_padding) |
| Creates a PangoLayout to be cached in widgets based on the given settings. | |
| PangoLayout * | z_cairo_create_default_pango_layout (GtkWidget *widget) |
| Creates a PangoLayout with default settings. | |
| void | z_cairo_set_source_color (cairo_t *cr, Color color) |
| GdkMonitor * | z_gtk_get_primary_monitor (void) |
| int | z_gtk_get_primary_monitor_scale_factor (void) |
| int | z_gtk_get_primary_monitor_refresh_rate (void) |
| bool | z_gtk_is_wayland (void) |
| void | z_gtk_tree_view_remove_all_columns (GtkTreeView *treeview) |
| void | z_gtk_column_view_remove_all_columns (GtkColumnView *column_view) |
| GListStore * | z_gtk_column_view_get_list_store (GtkColumnView *column_view) |
| void | z_gtk_list_store_splice (GListStore *store, auto &items) |
| Removes all items and re-populates the list store. | |
| void | z_gtk_widget_remove_all_children (GtkWidget *widget) |
| void | z_gtk_widget_destroy_all_children (GtkWidget *widget) |
| void | z_gtk_widget_remove_children_of_type (GtkWidget *widget, GType type) |
| void | z_gtk_overlay_add_if_not_exists (GtkOverlay *overlay, GtkWidget *widget) |
| void | z_gtk_button_set_icon_name_and_text (GtkButton *btn, const char *name, const char *text, bool icon_first, GtkOrientation orientation, int spacing) |
| Sets the icon name and optionally text. | |
| GtkToggleButton * | z_gtk_toggle_button_new_with_icon (const char *name) |
| Creates a toggle button with the given icon name. | |
| GtkToggleButton * | z_gtk_toggle_button_new_with_icon_and_text (const char *name, const char *text, bool icon_first, GtkOrientation orientation, int spacing) |
| Creates a toggle button with the given icon name. | |
| GtkButton * | z_gtk_button_new_with_icon_and_text (const char *name, const char *text, bool icon_first, GtkOrientation orientation, int spacing) |
| Creates a button with the given icon name and text. | |
| GMenuItem * | z_gtk_create_menu_item_full (const gchar *label_name, const gchar *icon_name, const char *detailed_action) |
| Creates a menu item. | |
| char * | z_gtk_get_tooltip_for_action (const char *detailed_action, const char *tooltip) |
| Gets the tooltip for the given action on the given widget. | |
| void | z_gtk_widget_set_tooltip_for_action (GtkWidget *widget, const char *detailed_action, const char *tooltip) |
| Sets the tooltip for the given action on the given widget. | |
| void | z_gtk_set_tooltip_for_actionable (GtkActionable *actionable, const char *tooltip) |
| Sets the tooltip and finds the accel keys and appends them to the tooltip in small text. | |
| GtkWidget * | z_gtk_widget_get_nth_child (GtkWidget *widget, int index) |
| Returns the nth child of a container. | |
| void | z_gtk_button_set_emblem (GtkButton *btn, const char *emblem_icon) |
| Sets the given emblem to the button, or unsets the emblem if emblem_icon is NULL. | |
| void | z_gtk_setup_foldable_notebook (GtkNotebook *notebook) |
| Makes the given notebook foldable. | |
| void | z_gtk_widget_set_margin (GtkWidget *widget, int margin) |
| Sets the margin on all 4 sides on the widget. | |
| GtkFlowBoxChild * | z_gtk_flow_box_get_selected_child (GtkFlowBox *self) |
| bool | z_gtk_activate_dir_link_func (GtkLabel *label, char *uri, void *data) |
| Callback to use for simple directory links. | |
| void | z_gtk_notebook_make_detachable (GtkNotebook *notebook, GtkWindow *parent_window) |
| Makes the given GtkNotebook detachable to a new window. | |
| char * | z_gtk_text_buffer_get_full_text (GtkTextBuffer *buffer) |
| Returns the full text contained in the text buffer. | |
| void | z_gtk_generate_screenshot_image (GtkWidget *widget, const char *type, char **option_keys, char **option_values, char **ret_dir, char **ret_path, bool accept_fallback) |
| Generates a screenshot image for the given widget. | |
| void | z_gtk_actionable_set_action_from_setting (GtkActionable *actionable, GSettings *settings, const char *key) |
| Sets the action target of the given GtkActionable to be binded to the given setting. | |
| bool | z_gtk_is_event_button (GdkEvent *ev) |
| void | z_gtk_scrolled_window_get_visible_rect (GtkScrolledWindow *scroll, graphene_rect_t *rect) |
| Gets the visible rectangle from the scrolled window's adjustments. | |
| void | z_gtk_graphene_rect_t_to_gdk_rectangle (GdkRectangle *rect, graphene_rect_t *grect) |
| void | z_gdk_rectangle_to_graphene_rect_t (graphene_rect_t *grect, GdkRectangle *rect) |
| void | z_gdk_rectangle_print (const GdkRectangle *rect) |
| int | z_gtk_dialog_run (GtkDialog *dialog, bool destroy_on_close) |
| Mimics the blocking behavior. | |
| void | z_gtk_show_context_menu_from_g_menu (GtkPopoverMenu *popover_menu, double x, double y, GMenu *menu) |
| The popover must already exist as a children of its intended widget (or a common parent). | |
| GdkDragAction | z_gtk_drop_target_get_selected_action (GtkDropTarget *drop_target) |
| Returns the bitmask of the selected action during a drop (eg, GDK_ACTION_COPY). | |
| GtkIconTheme * | z_gtk_icon_theme_get_default (void) |
| char * | z_gdk_clipboard_get_text (GdkClipboard *clipboard) |
| Returns the text on the clipboard, or NULL if there is nothing or the content is not text. | |
| GdkPixbuf * | z_gdk_pixbuf_new_from_icon_name (const char *icon_name, int width, int height, int scale, GError **error) |
| Creates a new pixbuf for the given icon scaled at the given width/height. | |
| GdkTexture * | z_gdk_texture_new_from_icon_name (const char *icon_name, int width, int height, int scale) |
| Creates a new texture for the given icon scaled at the given width/height. | |
| void | z_gtk_print_graphene_rect (graphene_rect_t *rect) |
| void | z_gtk_widget_print_hierarchy (GtkWidget *widget) |
| Prints the widget's hierarchy (parents). | |
| const char * | z_gtk_get_gsk_renderer_type (void) |
| gboolean | z_gtk_simple_action_shortcut_func (GtkWidget *widget, GVariant *args, gpointer user_data) |
| A shortcut callback to use for simple actions. | |
| GtkWidget * | z_gtk_widget_find_child_of_type (GtkWidget *widget, GType type) |
| Recursively searches the children of widget for a child of type type. | |
| void | z_gtk_list_box_remove_all_children (GtkListBox *list_box) |
| void | z_graphene_rect_print (const graphene_rect_t *rect) |
| GtkStringList * | z_gtk_string_list_new_from_string_array (const char **strvals, size_t num_vals, bool localized) |
| GtkWidget * | z_gtk_get_first_focusable_child (GtkWidget *parent) |
| bool | z_gtk_descendant_has_focus (GtkWidget *parent) |
| void | z_gtk_window_make_escapable (GtkWindow *self) |
| void | z_gtk_drop_down_list_item_header_setup_common (GtkSignalListItemFactory *factory, GObject *list_item, gpointer user_data) |
| A common "setup" signal handler for GtkDropDown header factories. | |
| void | z_gtk_drop_down_factory_setup_common (GtkSignalListItemFactory *factory, GObject *list_item, gpointer user_data) |
| void | z_gtk_drop_down_factory_setup_common_ellipsized (GtkSignalListItemFactory *factory, GObject *list_item, gpointer user_data) |
| const char * | z_gtk_get_enum_nick (GType type, gint value) |
| void | z_gtk_snapshot_append_color (GtkSnapshot *snapshot, Color color, const graphene_rect_t *rect) |
| PangoLayoutUniquePtr | z_pango_create_layout_from_description (GtkWidget *widget, PangoFontDescription *descr) |
| void | resources_set_class_template (GtkWidgetClass *klass, const char *filename) |
| Sets class template from resource. | |
| GBytes * | resources_get_gl_shader_data (const char *path) |
| Returns the bytes of the specified OpenGL shader in RESOURCES_GL_SHADERS_PATH. | |
| DEFINE_ENUM_FORMATTER (UiOverlayAction, UiOverlayAction, "NONE", "RESIZING_R", "MOVING", "RESIZING_L", "RESIZING_L_LOOP", "RESIZING_L_FADE", "RESIZING_R", "RESIZING_R_LOOP", "RESIZING_R_FADE", "RESIZING_UP", "RESIZING_UP_FADE_IN", "RESIZING_UP_FADE_OUT", "STRETCHING_L", "STRETCHING_R", "STARTING_AUDITIONING", "AUDITIONING", "AUTOFILLING", "ERASING", "STARTING_ERASING", "STARTING_MOVING", "STARTING_MOVING_COPY", "STARTING_MOVING_LINK", "MOVING", "MOVING_COPY", "MOVING_LINK", "STARTING_CHANGING_CURVE", "CHANGING_CURVE", "STARTING_SELECTION", "SELECTING", "STARTING_DELETE_SELECTION", "DELETE_SELECTING", "STARTING_RAMP", "RAMPING", "CUTTING", "RENAMING", "STARTING_PANNING", "PANNING", "--INVALID--") enum class UiDragMode | |
| Dragging modes for widgets that have click&drag. | |
| double | ui_get_normalized_draggable_value (double size, double cur_val, double start_px, double cur_px, double last_px, double multiplier, UiDragMode mode) |
| Gets a draggable value as a normalized value between 0 and 1. | |
| std::string | ui_get_db_value_as_string (float val) |
| Returns an appropriate string representation of the given dB value. | |
| int | env_get_int (const char *key, int def) |
| Returns an int for the given environment variable if it exists and is valid, otherwise returns the default int. | |
| template<typename... Args> | |
| std::string | format_str (std::string_view format, Args &&... args) |
| Used when fmt::format can't be used (when the format string is not a literal). | |
| template<typename... Args> | |
| QString | format_qstr (const QString &format, Args &&... args) |
| ENUM_ENABLE_BITSET (CacheType) | |
| template<typename T> | |
| std::string | typename_to_string () |
| template<typename Tuple, typename Callable> | |
| void | iterate_tuple (Callable c, Tuple &&t) |
Variables | |
| constexpr const char * | UI_COLOR_DARK_TEXT = "#323232" |
| constexpr const char * | UI_COLOR_BRIGHT_TEXT = "#cdcdcd" |
| constexpr const char * | UI_COLOR_YELLOW = "#F9CA1B" |
| constexpr const char * | UI_COLOR_PURPLE = "#9D3955" |
| constexpr const char * | UI_COLOR_BUTTON_NORMAL = "#343434" |
| constexpr const char * | UI_COLOR_BUTTON_HOVER = "#444444" |
| constexpr const char * | UI_COLOR_RECORD_CHECKED = "#ED2939" |
| constexpr const char * | UI_COLOR_RECORD_ACTIVE = "#FF2400" |
| constexpr const char * | UI_COLOR_BRIGHT_GREEN = "#1DD169" |
| constexpr const char * | UI_COLOR_DARKISH_GREEN = "#19664c" |
| constexpr const char * | UI_COLOR_DARK_ORANGE = "#D68A0C" |
| constexpr const char * | UI_COLOR_Z_YELLOW = "#F9CA1B" |
| constexpr const char * | UI_COLOR_BRIGHT_ORANGE = "#F79616" |
| constexpr const char * | UI_COLOR_Z_PURPLE = "#9D3955" |
| constexpr const char * | UI_COLOR_MATCHA = "#2eb398" |
| constexpr const char * | UI_COLOR_LIGHT_BLUEISH = "#1aa3ffcc" |
| constexpr const char * | UI_COLOR_PREFADER_SEND = "#D21E6D" |
| constexpr const char * | UI_COLOR_POSTFADER_SEND = "#901ed2" |
| constexpr const char * | UI_COLOR_SOLO_ACTIVE = UI_COLOR_MATCHA |
| constexpr const char * | UI_COLOR_SOLO_CHECKED = UI_COLOR_DARKISH_GREEN |
| constexpr const char * | UI_COLOR_HIGHLIGHT_SCALE_BG = "#662266" |
| constexpr const char * | UI_COLOR_HIGHLIGHT_CHORD_BG = "#BB22BB" |
| constexpr const char * | UI_COLOR_HIGHLIGHT_BASS_BG = UI_COLOR_LIGHT_BLUEISH |
| constexpr const char * | UI_COLOR_HIGHLIGHT_BOTH_BG = "#FF22FF" |
| constexpr const char * | UI_COLOR_HIGHLIGHT_SCALE_FG = "#F79616" |
| constexpr const char * | UI_COLOR_HIGHLIGHT_CHORD_FG = UI_COLOR_HIGHLIGHT_SCALE_FG |
| constexpr const char * | UI_COLOR_HIGHLIGHT_BASS_FG = "white" |
| constexpr const char * | UI_COLOR_HIGHLIGHT_BOTH_FG = "white" |
| constexpr const char * | UI_COLOR_FADER_FILL_END = UI_COLOR_Z_YELLOW |
| constexpr const char * | UI_DELETE_ICON_NAME = "z-edit-delete" |
| constexpr CacheType | ALL_CACHE_TYPES |
Various utilities.
| #define CREATE_CLEAR_SELECTION_MENU_ITEM | ( | action | ) |
| #define CREATE_COPY_MENU_ITEM | ( | action | ) |
| #define CREATE_CUT_MENU_ITEM | ( | action | ) |
| #define CREATE_DELETE_MENU_ITEM | ( | action | ) |
| #define CREATE_DUPLICATE_MENU_ITEM | ( | action | ) |
| #define CREATE_MIDI_LEARN_MENU_ITEM | ( | action | ) |
| #define CREATE_MUTE_MENU_ITEM | ( | action | ) |
| #define CREATE_PASTE_MENU_ITEM | ( | action | ) |
| #define CREATE_SELECT_ALL_MENU_ITEM | ( | action | ) |
| #define CREATE_UNMUTE_MENU_ITEM | ( | action | ) |
| #define DEBUG_BREAK | ( | ) |
| #define DEFAULT_CLIPBOARD gdk_display_get_clipboard (gdk_display_get_default ()) |
| #define DEFINE_FORMATTER_PRELUDE |
| #define ENUM_BITSET | ( | _enum, | |
| _val ) |
| #define ENUM_BITSET_TEST | ( | _val, | |
| _other_val ) |
| #define ENUM_BITSET_TO_STRING | ( | _enum, | |
| _val ) |
| #define ENUM_COUNT | ( | _enum | ) |
| #define ENUM_ENABLE_BITSET | ( | _enum | ) |
| #define ENUM_INT_TO_VALUE | ( | _enum, | |
| _int ) |
| #define ENUM_INT_TO_VALUE_CONST | ( | _enum, | |
| _int ) |
| #define ENUM_NAME | ( | _val | ) |
| #define ENUM_NAME_FROM_INT | ( | _enum, | |
| _int ) |
| #define ENUM_VALUE_TO_INT | ( | _val | ) |
| #define RESOURCES_GL_SHADERS_PATH RESOURCES_PATH "/gl/shaders" |
Definition at line 22 of file resources.h.
| #define RESOURCES_PATH RESOURCES_PATH_TOP "/app" |
Definition at line 20 of file resources.h.
| #define RESOURCES_PATH_TOP "/org/zrythm/Zrythm" |
Definition at line 19 of file resources.h.
| #define RESOURCES_TEMPLATE_PATH RESOURCES_PATH "/ui" |
Definition at line 21 of file resources.h.
| #define SUPPORTED_FILE_DND_PREFIX Z_DND_STRING_PREFIX "FileDescriptor::" |
Definition at line 17 of file file_descriptor.h.
| #define UI_CACHES (zrythm_app->ui_caches_) |
| #define VA_ARGS_SIZE | ( | ... | ) |
| #define z_cairo_draw_text | ( | cr, | |
| widget, | |||
| layout, | |||
| text ) |
Draw text with default padding.
| #define Z_CAIRO_FONT "Bold 9" |
| #define z_cairo_get_text_extents_for_widget | ( | _widget, | |
| _layout, | |||
| _text, | |||
| _width, | |||
| _height ) |
| #define Z_CAIRO_TEXT_PADDING 2 |
| #define Z_DISABLE_COPY | ( | Class | ) |
| #define Z_DISABLE_COPY_MOVE | ( | Class | ) |
| #define Z_DISABLE_MOVE | ( | Class | ) |
| #define Z_GDK_RECTANGLE_INIT | ( | _x, | |
| _y, | |||
| _w, | |||
| _h ) |
| #define Z_GDK_RECTANGLE_INIT_UNIT | ( | _x, | |
| _y ) |
| #define Z_GDK_RGBA_INIT | ( | r, | |
| g, | |||
| b, | |||
| a ) |
| #define Z_GRAPHENE_POINT_INIT | ( | _x, | |
| _y ) |
| #define Z_GRAPHENE_RECT_INIT | ( | _x, | |
| _y, | |||
| _w, | |||
| _h ) |
| #define Z_GRAPHENE_SIZE_INIT | ( | _w, | |
| _h ) |
| #define z_gtk_assistant_set_current_page_complete | ( | assistant, | |
| complete ) |
| #define z_gtk_create_menu_item | ( | lbl_name, | |
| icn_name, | |||
| action_name ) |
| #define z_return_if_fail_cmp | ( | a, | |
| comparator, | |||
| b ) |
| #define z_return_val_if_fail_cmp | ( | a, | |
| comparator, | |||
| b, | |||
| val ) |
| #define z_warn_if_fail_cmp | ( | a, | |
| comparator, | |||
| b ) |
| #define ZRYTHM_IS_QT_THREAD (QThread::currentThread () == qApp->thread ()) |
| using audio_sample_type_t = float |
| using channels_t = uint_fast8_t |
| using Color = zrythm::utils::Color |
| using GenericCallback = std::function<void ()> |
| using GenericFloatGetter = std::function<float ()> |
| using GenericFloatSetter = std::function<void (float)> |
| using GenericStringGetter = std::function<std::string ()> |
| using GenericStringSetter = std::function<void (const std::string &)> |
| using midi_byte_t = uint8_t |
| using midi_time_t = uint32_t |
| using PangoLayoutUniquePtr = std::unique_ptr<PangoLayout, PangoLayoutDeleter> |
| using signed_frame_t = int_fast64_t |
| using signed_ms_t = signed_frame_t |
| using signed_sec_t = signed_frame_t |
| using unsigned_frame_t = uint_fast64_t |
|
strong |
|
strong |
File type.
| Enumerator | |
|---|---|
| ParentDirectory | Special entry ".." for the parent dir. |
Definition at line 22 of file file_descriptor.h.
|
strong |
|
strong |
|
strong |
Various overlay actions to be shared.
| void _z_cairo_get_text_extents_for_widget | ( | GtkWidget * | widget, |
| PangoLayout * | layout, | ||
| const char * | text, | ||
| int * | width, | ||
| int * | height ) |
Gets the width of the given text in pixels for the given widget.
| widget | The widget to derive a PangoLayout from. |
| text | The text to draw. |
| width | The width to fill in. |
| height | The height to fill in. |
| DEFINE_ENUM_FORMATTER | ( | UiOverlayAction | , |
| UiOverlayAction | , | ||
| "NONE" | , | ||
| "RESIZING_R" | , | ||
| "MOVING" | , | ||
| "RESIZING_L" | , | ||
| "RESIZING_L_LOOP" | , | ||
| "RESIZING_L_FADE" | , | ||
| "RESIZING_R" | , | ||
| "RESIZING_R_LOOP" | , | ||
| "RESIZING_R_FADE" | , | ||
| "RESIZING_UP" | , | ||
| "RESIZING_UP_FADE_IN" | , | ||
| "RESIZING_UP_FADE_OUT" | , | ||
| "STRETCHING_L" | , | ||
| "STRETCHING_R" | , | ||
| "STARTING_AUDITIONING" | , | ||
| "AUDITIONING" | , | ||
| "AUTOFILLING" | , | ||
| "ERASING" | , | ||
| "STARTING_ERASING" | , | ||
| "STARTING_MOVING" | , | ||
| "STARTING_MOVING_COPY" | , | ||
| "STARTING_MOVING_LINK" | , | ||
| "MOVING" | , | ||
| "MOVING_COPY" | , | ||
| "MOVING_LINK" | , | ||
| "STARTING_CHANGING_CURVE" | , | ||
| "CHANGING_CURVE" | , | ||
| "STARTING_SELECTION" | , | ||
| "SELECTING" | , | ||
| "STARTING_DELETE_SELECTION" | , | ||
| "DELETE_SELECTING" | , | ||
| "STARTING_RAMP" | , | ||
| "RAMPING" | , | ||
| "CUTTING" | , | ||
| "RENAMING" | , | ||
| "STARTING_PANNING" | , | ||
| "PANNING" | , | ||
| "--INVALID--" | ) |
| int env_get_int | ( | const char * | key, |
| int | def ) |
Returns an int for the given environment variable if it exists and is valid, otherwise returns the default int.
| def | Default value to return if not found. |
| QString format_qstr | ( | const QString & | format, |
| Args &&... | args ) |
| std::string format_str | ( | std::string_view | format, |
| Args &&... | args ) |
| void iterate_tuple | ( | Callable | c, |
| Tuple && | t ) |
| GBytes * resources_get_gl_shader_data | ( | const char * | path | ) |
Returns the bytes of the specified OpenGL shader in RESOURCES_GL_SHADERS_PATH.
Caller must free the bytes with g_bytes_unref ().
| void resources_set_class_template | ( | GtkWidgetClass * | klass, |
| const char * | filename ) |
Sets class template from resource.
Filename is part after .../ui/
| double ui_get_normalized_draggable_value | ( | double | size, |
| double | cur_val, | ||
| double | start_px, | ||
| double | cur_px, | ||
| double | last_px, | ||
| double | multiplier, | ||
| UiDragMode | mode ) |
Gets a draggable value as a normalized value between 0 and 1.
| size | Widget size (either width or height). |
| start_px | Px at start of drag. |
| cur_px | Current px. |
| last_px | Px during last call. |
| char * z_gdk_clipboard_get_text | ( | GdkClipboard * | clipboard | ) |
Returns the text on the clipboard, or NULL if there is nothing or the content is not text.
| GdkPixbuf * z_gdk_pixbuf_new_from_icon_name | ( | const char * | icon_name, |
| int | width, | ||
| int | height, | ||
| int | scale, | ||
| GError ** | error ) |
Creates a new pixbuf for the given icon scaled at the given width/height.
Pass -1 for either width/height to maintain aspect ratio.
| GdkTexture * z_gdk_texture_new_from_icon_name | ( | const char * | icon_name, |
| int | width, | ||
| int | height, | ||
| int | scale ) |
Creates a new texture for the given icon scaled at the given width/height.
Pass -1 for either width/height to maintain aspect ratio.
| void z_gtk_actionable_set_action_from_setting | ( | GtkActionable * | actionable, |
| GSettings * | settings, | ||
| const char * | key ) |
Sets the action target of the given GtkActionable to be binded to the given setting.
Mainly used for binding GSettings keys to toggle buttons.
| int z_gtk_dialog_run | ( | GtkDialog * | dialog, |
| bool | destroy_on_close ) |
| void z_gtk_generate_screenshot_image | ( | GtkWidget * | widget, |
| const char * | type, | ||
| char ** | option_keys, | ||
| char ** | option_values, | ||
| char ** | ret_dir, | ||
| char ** | ret_path, | ||
| bool | accept_fallback ) |
Generates a screenshot image for the given widget.
See gdk_pixbuf_savev() for the parameters.
| accept_fallback | Whether to accept a fallback "no image" pixbuf. | |
| [out] | ret_dir | Placeholder for directory to be deleted after using the screenshot. |
| [out] | ret_path | Placeholder for absolute path to the screenshot. |
| char * z_gtk_get_tooltip_for_action | ( | const char * | detailed_action, |
| const char * | tooltip ) |
Gets the tooltip for the given action on the given widget.
If the action is valid, an orange text showing the accelerator will be added to the tooltip.
| void z_gtk_list_store_splice | ( | GListStore * | store, |
| auto & | items ) |
| void z_gtk_setup_foldable_notebook | ( | GtkNotebook * | notebook | ) |
Makes the given notebook foldable.
The pages of the notebook must all be wrapped in GtkBox's.
| void z_gtk_show_context_menu_from_g_menu | ( | GtkPopoverMenu * | popover_menu, |
| double | x, | ||
| double | y, | ||
| GMenu * | menu ) |
The popover must already exist as a children of its intended widget (or a common parent).
This function will set the new menu and show it.
| gboolean z_gtk_simple_action_shortcut_func | ( | GtkWidget * | widget, |
| GVariant * | args, | ||
| gpointer | user_data ) |
A shortcut callback to use for simple actions.
A single parameter must be passed: action name under "app.".
| char * z_gtk_text_buffer_get_full_text | ( | GtkTextBuffer * | buffer | ) |
Returns the full text contained in the text buffer.
Must be free'd using g_free().
| void z_gtk_widget_set_tooltip_for_action | ( | GtkWidget * | widget, |
| const char * | detailed_action, | ||
| const char * | tooltip ) |
Sets the tooltip for the given action on the given widget.
If the action is valid, an orange text showing the accelerator will be added to the tooltip.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |