|
#define | SUPPORTED_FILE_DND_PREFIX Z_DND_STRING_PREFIX "SupportedFile::" |
|
#define | STRIP_SIZE 9 |
| Number of plugin slots per channel.
|
|
#define | backtrace_get(prefix, max_lines, write_to_file) _backtrace_get (NULL, prefix, max_lines, false, write_to_file) |
|
#define | backtrace_get_with_lines(prefix, max_lines, write_to_file) |
|
#define | CAIRO_CACHES (gZrythm->cairo_caches) |
|
#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 | COLOR_DEFAULT_BRIGHTEN_VAL 0.1f |
|
#define | z_return_val_if_fail_cmp(a, comparator, b, val) |
|
#define | z_return_if_fail_cmp(a, comparator, b) z_return_val_if_fail_cmp (a, comparator, b, ) |
|
#define | z_warn_if_fail_cmp(a, comparator, b) |
|
#define | file_exists(file) g_file_test (file, G_FILE_TEST_EXISTS) |
| Returns 1 if the file/dir exists.
|
|
#define | RETURN_OK return 0; |
|
#define | RETURN_ERROR return 1; |
|
#define | DEFAULT_CLIPBOARD gdk_display_get_clipboard (gdk_display_get_default ()) |
|
#define | CREATE_MIDI_LEARN_MENU_ITEM(action) z_gtk_create_menu_item (_ ("MIDI learn"), "signal-midi", action) |
|
#define | CREATE_CUT_MENU_ITEM(action) z_gtk_create_menu_item (_ ("Cu_t"), "edit-cut", action) |
|
#define | CREATE_COPY_MENU_ITEM(action) z_gtk_create_menu_item (_ ("_Copy"), "edit-copy", action) |
|
#define | CREATE_PASTE_MENU_ITEM(action) z_gtk_create_menu_item (_ ("_Paste"), "edit-paste", action) |
|
#define | CREATE_DELETE_MENU_ITEM(action) z_gtk_create_menu_item (_ ("_Delete"), "edit-delete", action) |
|
#define | CREATE_CLEAR_SELECTION_MENU_ITEM(action) |
|
#define | CREATE_SELECT_ALL_MENU_ITEM(action) z_gtk_create_menu_item (_ ("Select A_ll"), "edit-select-all", action) |
|
#define | CREATE_DUPLICATE_MENU_ITEM(action) z_gtk_create_menu_item (_ ("Duplicate"), "edit-duplicate", action) |
|
#define | CREATE_MUTE_MENU_ITEM(action) z_gtk_create_menu_item (_ ("Mute"), "mute", action) |
|
#define | CREATE_UNMUTE_MENU_ITEM(action) z_gtk_create_menu_item (_ ("Unmute"), NULL, 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) GRAPHENE_POINT_INIT (static_cast<float> (_x), static_cast<float> (_y)) |
|
#define | z_gtk_create_menu_item(lbl_name, icn_name, action_name) z_gtk_create_menu_item_full (lbl_name, icn_name, action_name) |
|
#define | io_path_get_basename(filename) g_path_get_basename (filename) |
|
#define | io_get_files_in_dir(dir, allow_empty) io_get_files_in_dir_ending_in (dir, 0, NULL, allow_empty) |
| Returns a list of the files in the given directory.
|
|
#define | io_write_file g_file_set_contents |
|
#define | LOG (zlog) |
|
#define | MATH_RMS_FRAMES 1 |
| Frames to skip when calculating the RMS.
|
|
#define | MATH_TINY_NUMBER (0.0000001) |
| Tiny number to be used for denormaml prevention (-140dB).
|
|
#define | MATH_MINUS_INFINITY (-HUGE_VAL) |
|
#define | math_floats_equal_epsilon(a, b, e) ((a) > (b) ? (a) - (b) < e : (b) - (a) < e) |
| Checks if 2 doubles are equal.
|
|
#define | math_doubles_equal_epsilon math_floats_equal_epsilon |
|
#define | math_floats_equal(a, b) ((a) > (b) ? (a) - (b) < FLT_EPSILON : (b) - (a) < FLT_EPSILON) |
| Checks if 2 doubles are equal.
|
|
#define | math_doubles_equal(a, b) ((a) > (b) ? (a) - (b) < DBL_EPSILON : (b) - (a) < DBL_EPSILON) |
|
#define | math_round_double_to_signed_32(x) (lround (x)) |
| Rounds a double to a (minimum) signed 32-bit integer.
|
|
#define | math_round_double_to_signed_64(x) (llround (x)) |
| Rounds a double to a (minimum) signed 64-bit integer.
|
|
#define | math_round_double_to_signed_frame_t(x) math_round_double_to_signed_64 (x) |
|
#define | math_round_float_to_signed_32(x) (lroundf (x)) |
| Rounds a float to a (minimum) signed 32-bit integer.
|
|
#define | math_round_float_to_signed_64(x) (llroundf (x)) |
| Rounds a float to a (minimum) signed 64-bit integer.
|
|
#define | math_round_float_to_signed_frame_t(x) math_round_float_to_signed_64 (x) |
|
#define | object_new(type) (type *) g_malloc0 (sizeof (type)) |
| Allocates memory for an object of type type.
|
|
#define | object_new_unresizable(type) object_new (type) |
| Allocates memory for an object of type type.
|
|
#define | object_new_n_sizeof(n, sz) g_malloc0_n (n, sz) |
| Calloc equivalent.
|
|
#define | object_new_n(n, type) (static_cast<type *> (object_new_n_sizeof (n, sizeof (type)))) |
| Calloc n blocks for type type.
|
|
#define | object_realloc_n_sizeof(obj, prev_sz, sz) realloc_zero (obj, prev_sz, sz) |
|
#define | object_realloc_n(obj, prev_n, n, type) |
| Reallocate memory for obj.
|
|
#define | object_set_to_zero(ptr) memset (ptr, 0, sizeof (*(ptr))) |
| Zero's out the struct pointed to by ptr.
|
|
#define | object_free_unresizable(type, obj) free (obj) |
| Frees memory for objects created with object_new().
|
|
#define | object_zero_and_free(ptr) _object_zero_and_free ((void **) &(ptr), sizeof (*(ptr))) |
| Zero's out a struct pointed to by ptr and frees the object.
|
|
#define | object_zero_and_free_unresizable(type, ptr) _object_zero_and_free_unresizable ((void **) &(ptr), sizeof (type)) |
|
#define | object_free_w_func_and_null(_func, _obj) |
| Call the function _func to free _obj and set _obj to NULL.
|
|
#define | object_delete_and_null(_obj) |
|
#define | object_zero_and_free_if_nonnull(ptr) object_free_w_func_and_null (object_zero_and_free, ptr) |
|
#define | g_object_unref_and_null(ptr) object_free_w_func_and_null (g_object_unref, ptr) |
| Convenience wrapper.
|
|
#define | g_free_and_null(ptr) object_free_w_func_and_null (g_free, ptr) |
| Convenience wrapper.
|
|
#define | g_error_free_and_null(ptr) object_free_w_func_and_null (g_error_free, ptr) |
| Convenience wrapper.
|
|
#define | object_free_w_func_and_null_cast(_func, _cast, _obj) |
| Convenience wrapper.
|
|
#define | g_source_remove_and_zero(src_id) |
|
#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 | STACK_PUSH(s, element) stack_push (s, (void *) element) |
|
#define | string_is_equal(str1, str2) (!g_strcmp0 (str1, str2)) |
| Returns if the two strings are exactly equal.
|
|
#define | TYPEDEF_STRUCT(s) typedef struct s s |
|
#define | TYPEDEF_STRUCT_UNDERSCORED(s) typedef struct _##s s |
|
#define | SIGNED_FRAME_FORMAT PRId64 |
|
#define | UNSIGNED_FRAME_FORMAT PRIu64 |
|
#define | CACHE_TYPE_ALL |
|
#define | ENUM_INT_TO_VALUE_CONST(_enum, _int) (magic_enum::enum_value<_enum, _int> ()) |
|
#define | ENUM_INT_TO_VALUE(_enum, _int) (magic_enum::enum_value<_enum> (_int)) |
|
#define | ENUM_VALUE_TO_INT(_val) (magic_enum::enum_integer (_val)) |
|
#define | ENUM_ENABLE_BITSET(_enum) |
|
#define | ENUM_BITSET(_enum, _val) (magic_enum::containers::bitset<_enum> (_val)) |
|
#define | ENUM_BITSET_TEST(_enum, _val, _other_val) |
|
#define | ENUM_BITSET_TO_STRING(_enum, _val) (ENUM_BITSET (_enum, _val).to_string ().data ()) |
|
#define | ENUM_COUNT(_enum) (magic_enum::enum_count<_enum> ()) |
|
#define | ENUM_NAME(_val) (magic_enum::enum_name (_val).data ()) |
|
#define | ENUM_NAME_FROM_INT(_enum, _int) ENUM_NAME (ENUM_INT_TO_VALUE (_enum, _int)) |
|
#define | UI_MAX_CURSORS 400 |
|
#define | UI_CACHES (zrythm_app->ui_caches) |
|
#define | UI_COLORS (&UI_CACHES->colors) |
|
#define | UI_COLOR_DARK_TEXT "#323232" |
|
#define | UI_COLOR_BRIGHT_TEXT "#cdcdcd" |
|
#define | UI_COLOR_YELLOW "#F9CA1B" |
|
#define | UI_COLOR_PURPLE "#9D3955" |
|
#define | UI_COLOR_BUTTON_NORMAL "#343434" |
|
#define | UI_COLOR_BUTTON_HOVER "#444444" |
|
#define | UI_COLOR_RECORD_CHECKED "#ED2939" |
|
#define | UI_COLOR_RECORD_ACTIVE "#FF2400" |
|
#define | UI_COLOR_BRIGHT_GREEN "#1DD169" |
|
#define | UI_COLOR_DARKISH_GREEN "#19664c" |
|
#define | UI_COLOR_DARK_ORANGE "#D68A0C" |
|
#define | UI_COLOR_Z_YELLOW "#F9CA1B" |
|
#define | UI_COLOR_BRIGHT_ORANGE "#F79616" |
|
#define | UI_COLOR_Z_PURPLE "#9D3955" |
|
#define | UI_COLOR_MATCHA "#2eb398" |
|
#define | UI_COLOR_LIGHT_BLUEISH "#1aa3ffcc" |
|
#define | UI_COLOR_PREFADER_SEND "#D21E6D" |
|
#define | UI_COLOR_POSTFADER_SEND "#901ed2" |
|
#define | UI_COLOR_SOLO_ACTIVE UI_COLOR_MATCHA |
|
#define | UI_COLOR_SOLO_CHECKED UI_COLOR_DARKISH_GREEN |
|
#define | UI_COLOR_HIGHLIGHT_SCALE_BG "#662266" |
|
#define | UI_COLOR_HIGHLIGHT_CHORD_BG "#BB22BB" |
|
#define | UI_COLOR_HIGHLIGHT_BASS_BG UI_COLOR_LIGHT_BLUEISH |
|
#define | UI_COLOR_HIGHLIGHT_BOTH_BG "#FF22FF" |
|
#define | UI_COLOR_HIGHLIGHT_SCALE_FG "#F79616" |
|
#define | UI_COLOR_HIGHLIGHT_CHORD_FG UI_COLOR_HIGHLIGHT_SCALE_FG |
|
#define | UI_COLOR_HIGHLIGHT_BASS_FG "white" |
|
#define | UI_COLOR_HIGHLIGHT_BOTH_FG "white" |
|
#define | UI_COLOR_FADER_FILL_END UI_COLOR_Z_YELLOW |
|
#define | UI_DELETE_ICON_NAME "z-edit-delete" |
|
#define | UI_RESIZE_CURSOR_SPACE 8 |
| Space on the edges to show resize cursors.
|
|
#define | TARGET_ENTRY_PLUGIN_DESCR "PLUGIN_DESCR" |
| Plugin descriptor, used to instantiate plugins.
|
|
#define | TARGET_ENTRY_SUPPORTED_FILE "SUPPORTED_FILE" |
| For SupportedFile pointers.
|
|
#define | TARGET_ENTRY_PLUGIN "PLUGIN" |
| Plugin ID, used to move/copy plugins.
|
|
#define | TARGET_ENTRY_FILE_PATH "FILE_PATH" |
|
#define | TARGET_ENTRY_URI_LIST "text/uri-list" |
| URI list.
|
|
#define | TARGET_ENTRY_TRACK "TRACK" |
| Track target entry.
|
|
#define | TARGET_ENTRY_CHORD_DESCR "CHORD_DESCR" |
| Chord descriptor target entry.
|
|
#define | TARGET_ENTRY_TL_SELECTIONS "TL_SELECTIONS" |
|
#define | GET_ATOM(x) gdk_atom_intern (x, 1) |
|
#define | ui_add_widget_tooltip(widget, txt) gtk_widget_set_tooltip_text (GTK_WIDGET (widget), txt) |
|
#define | ui_set_hover_status_bar_signals(w, t) |
|
#define | ui_show_notification_idle_printf(fmt, ...) |
| Shows the notification when idle.
|
|
#define | ui_show_notification_idle(msg) ui_show_notification_idle_printf ("%s", msg) |
|
#define | ui_is_widget_revealed(widget) |
|
#define | ui_set_pencil_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "edit-cursor", 2, 3); |
|
#define | ui_set_brush_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "brush-cursor", 2, 3); |
|
#define | ui_set_cut_clip_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "cut-cursor", 9, 7); |
|
#define | ui_set_eraser_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "eraser-cursor", 4, 2); |
|
#define | ui_set_line_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "ramp-cursor", 2, 3); |
|
#define | ui_set_speaker_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "audition-cursor", 10, 12); |
|
#define | ui_set_hand_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "move-cursor", 12, 11); |
|
#define | ui_set_left_resize_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "w-resize-cursor", 14, 11); |
|
#define | ui_set_left_stretch_cursor(widget) |
|
#define | ui_set_left_resize_loop_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "w-loop-cursor", 14, 11); |
|
#define | ui_set_right_resize_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "e-resize-cursor", 10, 11); |
|
#define | ui_set_right_stretch_cursor(widget) |
|
#define | ui_set_right_resize_loop_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "e-loop-cursor", 10, 11); |
|
#define | ui_set_time_select_cursor(widget) |
|
#define | ui_set_fade_in_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "fade-in-cursor", 3, 1); |
|
#define | ui_set_fade_out_cursor(widget) ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "fade-out-cursor", 3, 1); |
|
#define | UI_ACTIVE_WINDOW_OR_NULL |
|
#define | ui_show_message_printf(title, fmt, ...) |
| Type can be GTK_MESSAGE_ERROR, etc.
|
|
#define | ui_show_message_literal(title, str) ui_show_message_full (GTK_WIDGET (UI_ACTIVE_WINDOW_OR_NULL), title, "%s", str) |
| Type can be GTK_MESSAGE_ERROR, etc.
|
|
#define | ui_show_error_message_printf(title, fmt, ...) ui_show_message_printf (title, fmt, __VA_ARGS__); |
| Wrapper to show error message so that no casting of the window is needed on the caller side.
|
|
#define | ui_show_error_message(title, msg) ui_show_message_literal (title, msg) |
|
|
SupportedFile * | supported_file_new_from_path (const char *path) |
| Creates a new SupportedFile from the given absolute path.
|
|
SupportedFile * | supported_file_new_from_uri (const char *uri, GError **error) |
|
char * | supported_file_type_get_description (ZFileType type) |
| Returns a human readable description of the given file type.
|
|
SupportedFile * | supported_file_clone (const SupportedFile *src) |
| Clones the given SupportedFile.
|
|
int | supported_file_type_is_supported (ZFileType type) |
| Returns if the given type is supported.
|
|
int | supported_file_type_is_audio (ZFileType type) |
| Returns if the SupportedFile is an audio file.
|
|
int | supported_file_type_is_midi (ZFileType type) |
| Returns if the SupportedFile is a midi file.
|
|
const char * | supported_file_type_get_ext (ZFileType type) |
| Returns the most common extension for the given filetype.
|
|
NONNULL ZFileType | supported_file_get_type (const char *file) |
| Returns the file type of the given file path.
|
|
NONNULL bool | supported_file_should_autoplay (const SupportedFile *self) |
| Returns whether the given file should auto-play (shorter than 1 min).
|
|
const char * | supported_file_get_icon_name (const SupportedFile *const self) |
| Gets the corresponding icon name for the given SupportedFile's type.
|
|
NONNULL char * | supported_file_get_info_text_for_label (const SupportedFile *self) |
| Returns a pango markup to be used in GTK labels.
|
|
void | supported_file_free (SupportedFile *self) |
| Frees the instance and all its members.
|
|
BitDepth | audio_bit_depth_from_pretty_str (const char *str) |
|
const char * | audio_bit_depth_to_pretty_str (BitDepth depth) |
|
WARN_UNUSED_RESULT bool | audio_write_raw_file (float *buff, size_t frames_already_written, size_t nframes, uint32_t samplerate, bool flac, BitDepth bit_depth, channels_t channels, const char *filename, GError **error) |
| Writes the buffer as a raw file to the given path.
|
|
unsigned_frame_t | audio_get_num_frames (const char *filepath) |
| Returns the number of frames in the given audio file.
|
|
bool | audio_frames_equal (const float *src1, const float *src2, size_t num_frames, float epsilon) |
| Returns whether the frame buffers are equal.
|
|
bool | audio_files_equal (const char *f1, const char *f2, size_t num_frames, float epsilon) |
| Returns whether the file contents are equal.
|
|
bool | audio_frames_empty (float *src, size_t num_frames) |
| Returns whether the frame buffer is empty (zero).
|
|
float | audio_detect_bpm (float *src, size_t num_frames, unsigned int samplerate, GArray *candidates) |
| Detect BPM.
|
|
bool | audio_file_is_silent (const char *filepath) |
|
int | audio_get_num_cores (void) |
| Returns the number of CPU cores.
|
|
char * | _backtrace_get (const char *exe_path, const char *prefix, int max_lines, bool with_lines, bool write_to_file) |
| Returns the backtrace with max_lines number of lines and a string prefix.
|
|
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.
|
|
cairo_surface_t * | z_cairo_get_surface_from_icon_name (const char *icon_name, int size, int scale) |
| Returns a surface for the icon name.
|
|
PangoLayout * | 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.
|
|
PangoLayout * | 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_reset_caches (cairo_t **cr_cache, cairo_surface_t **surface_cache, int width, int height, cairo_t *new_cr) |
| Resets a surface and cairo_t with a new surface and cairo_t based on the given rectangle and cairo_t.
|
|
CairoCaches * | z_cairo_caches_new (void) |
|
void | z_cairo_caches_free (CairoCaches *self) |
|
void | color_brighten (GdkRGBA *src, float val) |
| Brightens the color by the given amount.
|
|
void | color_brighten_default (GdkRGBA *src) |
| Brightens the color by the default amount.
|
|
void | color_darken (GdkRGBA *src, float val) |
| Darkens the color by the given amount.
|
|
void | color_darken_default (GdkRGBA *src) |
| Darkens the color by the default amount.
|
|
bool | color_is_same (GdkRGBA *src, GdkRGBA *dest) |
| Returns whether the color is the same.
|
|
bool | color_is_bright (GdkRGBA *src) |
| Returns if the color is bright or not.
|
|
bool | color_is_very_bright (GdkRGBA *src) |
| Returns if the color is very bright or not.
|
|
bool | color_is_very_very_bright (GdkRGBA *src) |
| Returns if the color is very very bright or not.
|
|
bool | color_is_very_dark (GdkRGBA *src) |
| Returns if the color is very dark or not.
|
|
bool | color_is_very_very_dark (GdkRGBA *src) |
| Returns if the color is very very dark or not.
|
|
void | color_get_opposite (GdkRGBA *src, GdkRGBA *dest) |
|
float | color_get_brightness (GdkRGBA *color) |
|
float | color_get_darkness (GdkRGBA *color) |
|
void | color_morph (GdkRGBA *a, GdkRGBA *b, float amt, GdkRGBA *result) |
| Morphs from a to b, depending on the given amount.
|
|
char * | z_curl_get_page_contents (const char *url, int timeout, GError **error) |
| Returns the contents of the page in a newly allocated string.
|
|
char * | z_curl_get_page_contents_default (const char *url) |
| Returns the contents of the page in a newly allocated string.
|
|
int | z_curl_post_json_no_auth (const char *url, const char *data, int timeout, GError **error,...) G_GNUC_NULL_TERMINATED |
| Posts the given JSON to the URL without any authentication.
|
|
char * | z_curl_get_page_contents_finish (GAsyncResult *res, GError **error) |
|
void | z_curl_get_page_contents_async (const char *url, int timeout_sec, GAsyncReadyCallback callback, gpointer callback_data) |
|
char * | datetime_get_current_as_string (void) |
| Returns the current datetime as a string.
|
|
char * | datetime_epoch_to_str (gint64 epoch, const char *format) |
|
char * | datetime_get_for_filename (void) |
| Get the current datetime to be used in filenames, eg, for the log file.
|
|
char * | env_get_string (const char *key, const char *def) |
| Returns a newly allocated string.
|
|
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.
|
|
char * | file_path_relative_to (const char *path, const char *base) |
|
int | file_symlink (const char *old_path, const char *new_path) |
|
int | file_reflink (const char *dest, const char *src) |
| Do cp –reflink from src to dest.
|
|
unsigned int | utils_get_uint_from_bitfield_val (unsigned int bitfield) |
| From https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear.
|
|
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_columnes (GtkColumnView *column_view) |
|
GListStore * | z_gtk_column_view_get_list_store (GtkColumnView *column_view) |
|
void | z_gtk_list_store_splice (GListStore *store, GPtrArray *ptr_array) |
| 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.
|
|
GtkSourceLanguageManager * | z_gtk_source_language_manager_get (void) |
|
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) |
|
char * | hash_get_from_file (const char *filepath, HashAlgorithm algo) |
|
uint32_t | hash_get_from_file_simple (const char *filepath) |
|
void * | hash_create_state (void) |
|
void | hash_free_state (void *in_state) |
|
uint32_t | hash_get_for_struct_full (XXH32_state_t *state, const void *const obj, size_t size) |
|
uint32_t | hash_get_for_struct (const void *const obj, size_t size) |
|
NONNULL char * | io_get_dir (const char *filename) |
| Gets directory part of filename.
|
|
WARN_UNUSED_RESULT | NONNULL_ARGS (1) bool io_mkdir(const char *dir |
| Makes directory if doesn't exist.
|
|
NONNULL FILE * | io_create_file (const char *filename) |
| Creates the file if doesn't exist.
|
|
void | io_touch_file (const char *filename) |
| Touches a file similar to UNIX touch.
|
|
NONNULL char * | io_path_get_parent_dir (const char *path) |
|
NONNULL char * | io_file_strip_ext (const char *filename) |
| Strips extensions from given filename.
|
|
NONNULL const char * | io_file_get_ext (const char *file) |
| Returns file extension or NULL.
|
|
NONNULL char * | io_path_get_basename_without_ext (const char *filename) |
| Strips path from given filename.
|
|
NONNULL char * | io_file_get_creation_datetime (const char *filename) |
|
NONNULL gint64 | io_file_get_last_modified_datetime (const char *filename) |
| Returns the number of seconds since the epoch, or -1 if failed.
|
|
NONNULL char * | io_file_get_last_modified_datetime_as_str (const char *filename) |
|
NONNULL int | io_remove (const char *path) |
| Removes the given file.
|
|
NONNULL int | io_rmdir (const char *path, bool force) |
| Removes a dir, optionally forcing deletion.
|
|
char ** | io_get_files_in_dir_as_basenames (const char *dir, bool allow_empty, bool with_ext) |
|
char ** | io_get_files_in_dir_ending_in (const char *_dir, const int recursive, const char *end_string, bool allow_empty) |
| Returns a list of the files in the given directory.
|
|
WARN_UNUSED_RESULT bool | io_copy_dir (const char *destdir_str, const char *srcdir_str, bool follow_symlinks, bool recursive, GError **error) |
| Copies a directory.
|
|
NONNULL char * | io_get_next_available_filepath (const char *filepath) |
| Returns a newly allocated path that is either a copy of the original path if the path does not exist, or the original path appended with (n), where n is a number.
|
|
NONNULL void | io_open_directory (const char *path) |
| Opens the given directory using the default program.
|
|
NONNULL void | io_escape_dir_name (char *dest, const char *dir) |
| Returns a clone of the given string after removing forbidden characters.
|
|
NONNULL char * | io_traverse_path (const char *abs_path) |
| Returns the new path after traversing any symlinks (using readlink()).
|
|
NONNULL void | log_init_writer_idle (Log *self, unsigned int secs) |
| Initializes logging to a file.
|
|
NONNULL int | log_idle_cb (Log *self) |
| Idle callback.
|
|
NONNULL char * | log_get_last_n_lines (Log *self, int n) |
| Returns the last n lines as a newly allocated string.
|
|
bool | log_generate_compressed_file (Log *self, char **ret_dir, char **ret_path, GError **error) |
| Generates a compressed log file (for sending with bug reports).
|
|
WARN_UNUSED_RESULT bool | log_init_with_file (Log *self, const char *filepath, GError **error) |
| Initializes logging to a file.
|
|
CONST WARN_UNUSED_RESULT Log ** | log_get (void) |
| Returns a pointer to the global zlog.
|
|
Log * | log_new (void) |
| Creates the logger and sets the writer func.
|
|
NONNULL void | log_free (Log *self) |
| Stops logging and frees any allocated memory.
|
|
sample_t | math_calculate_rms_amp (sample_t *buf, const nframes_t nframes) |
|
sample_t | math_calculate_rms_db (sample_t *buf, const nframes_t nframes) |
| Calculate db using RMS method.
|
|
bool | math_assert_nonnann (float x) |
| Asserts that the value is non-nan.
|
|
bool | math_is_string_valid_float (const char *str, float *ret) |
| Returns whether the given string is a valid float.
|
|
MPMCQueue * | mpmc_queue_new (void) |
|
NONNULL void | mpmc_queue_reserve (MPMCQueue *self, size_t buffer_size) |
|
NONNULL void | mpmc_queue_free (MPMCQueue *self) |
|
NONNULL void | mpmc_queue_clear (MPMCQueue *self) |
|
HOT NONNULL int | mpmc_queue_push_back (MPMCQueue *self, void *const data) |
|
HOT NONNULL int | mpmc_queue_dequeue (MPMCQueue *self, void **data) |
|
PangoLayout * | z_pango_create_layout_from_description (GtkWidget *widget, PangoFontDescription *descr) |
|
ProgressInfo * | progress_info_new (void) |
|
ProgressStatus | progress_info_get_status (ProgressInfo *self) |
|
ProgressCompletionType | progress_info_get_completion_type (ProgressInfo *self) |
|
void | progress_info_request_cancellation (ProgressInfo *self) |
| To be called by the task caller.
|
|
void | progress_info_mark_completed (ProgressInfo *self, ProgressCompletionType type, const char *msg) |
| To be called by the task itself.
|
|
char * | progress_info_get_message (ProgressInfo *self) |
| Returns a newly allocated string.
|
|
void | progress_info_get_progress (ProgressInfo *self, double *progress, char **str) |
| To be called by the task caller.
|
|
void | progress_info_update_progress (ProgressInfo *self, double progress, const char *msg) |
| To be called by the task itself.
|
|
bool | progress_info_pending_cancellation (ProgressInfo *self) |
|
void | progress_info_free (ProgressInfo *self) |
|
Resampler * | resampler_new (const float *in_frames, const size_t num_in_frames, const double input_rate, const double output_rate, const unsigned int num_channels, const ResamplerQuality quality, GError **error) |
| Creates a new instance of a Resampler with the given settings.
|
|
NONNULL bool | resampler_is_done (Resampler *self) |
| Indicates whether resampling is finished.
|
|
NONNULL void | resampler_free (Resampler *self) |
|
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.
|
|
int | sort_alphabetical_func (const void *a, const void *b) |
| Alphabetical sort func.
|
|
Stack * | stack_new (int length) |
| Creates a new stack of the given size.
|
|
int | stack_size (Stack *s) |
|
int | stack_is_empty (Stack *s) |
|
int | stack_is_full (Stack *s) |
|
void * | stack_peek (Stack *s) |
|
void * | stack_peek_last (Stack *s) |
|
void | stack_push (Stack *s, void *element) |
|
void * | stack_pop (Stack *s) |
|
void * | stack_pop_last (Stack *s) |
| Pops the last element and moves everything back.
|
|
void | stack_free_members (Stack *s) |
|
void | stack_free (Stack *s) |
|
int | string_is_ascii (const char *string) |
| Returns if the string is ASCII.
|
|
char * | string_array_contains_substr (char **str_array, int num_str, const char *substr) |
| Returns the matched string if the string array contains the given substring.
|
|
bool | string_contains_substr (const char *str, const char *substr) |
| Returns if the given string contains the given substring.
|
|
bool | string_contains_substr_case_insensitive (const char *str, const char *substr) |
|
void | string_to_upper (const char *in, char *out) |
| Converts the given string to uppercase in out.
|
|
void | string_to_lower (const char *in, char *out) |
| Converts the given string to lowercase in out.
|
|
bool | string_is_equal_ignore_case (const char *str1, const char *str2) |
| Returns if the two strings are equal ignoring case.
|
|
NONNULL char * | string_convert_to_filename (const char *str) |
| Returns a newly allocated string that is a filename version of the given string.
|
|
MALLOC NONNULL char * | string_get_substr_before_suffix (const char *str, const char *suffix) |
| Removes the suffix starting from suffix from full_str and returns a newly allocated string.
|
|
char * | string_remove_until_after_first_match (const char *str, const char *match) |
| Removes everything up to and including the first match of match from the start of the string and returns a newly allocated string.
|
|
void | string_replace_regex (char **str, const char *regex, const char *replace_str) |
| Replaces src_str with replace_str in all instances matched by regex.
|
|
char * | string_replace (const char *str, const char *from, const char *to) |
|
char * | string_get_regex_group (const char *str, const char *regex, int group) |
| Gets the string in the given regex group.
|
|
int | string_get_regex_group_as_int (const char *str, const char *regex, int group, int def) |
| Gets the string in the given regex group as an integer.
|
|
int | string_get_int_after_last_space (const char *str, char *str_without_num) |
| Returns the integer found at the end of a string like "My String 3" -> 3, or -1 if no number is found.
|
|
char ** | string_array_sort_and_remove_duplicates (char **str_arr) |
| TODO Sorts the given string array and removes duplicates.
|
|
void | string_copy_w_realloc (char **dest, const char *src) |
| Copies the string src to the buffer in dest after reallocating the buffer in dest to the length of src.
|
|
char * | string_symbolify (const char *in) |
| Returns a new string with only ASCII alphanumeric characters and replaces the rest with underscore.
|
|
bool | string_is_empty (const char *str) |
| Returns whether the string is NULL or empty.
|
|
int | string_utf8_strcasecmp (const char *s1, const char *s2) |
| Compares two UTF-8 strings using approximate case-insensitive ordering.
|
|
char * | string_expand_env_vars (const char *src) |
| Expands environment variables enclosed in ${} in the given string.
|
|
void | string_print_strv (const char *prefix, char **strv) |
|
char ** | string_array_clone (const char **src) |
| Clones the given string array.
|
|
char * | system_get_cmd_output (char **argv, long ms_timer, bool always_wait) |
| Runs the command and returns the output, or NULL.
|
|
void | ui_set_pointer_cursor (GtkWidget *widget) |
|
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.
|
|
gboolean | ui_on_motion_set_status_bar_text_cb (GtkWidget *widget, GdkEvent *event, char *text) |
|
AdwDialog * | ui_show_message_full (GtkWidget *parent, const char *title, const char *format,...) G_GNUC_PRINTF(3 |
| 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) |
| Returns if rect is hit or not by the given coordinate.
|
|
NONNULL int | ui_is_child_hit (GtkWidget *parent, GtkWidget *child, const int check_x, const int check_y, const double x, const double y, const double x_padding, const double y_padding) |
| Returns if the child is hit or not by the coordinates in parent.
|
|
GtkWidget * | ui_get_hit_child (GtkWidget *parent, double x, double y, GType type) |
| Returns the matching hit child, or NULL.
|
|
UiDetail | ui_get_detail_level (void) |
|
NONNULL void | ui_px_to_pos_timeline (double px, Position *pos, bool has_padding) |
| Converts from pixels to position.
|
|
signed_frame_t | ui_px_to_frames_timeline (double px, bool has_padding) |
| Converts from pixels to frames.
|
|
signed_frame_t | ui_px_to_frames_editor (double px, bool has_padding) |
| Converts from pixels to frames.
|
|
NONNULL int | ui_pos_to_px_timeline (const Position *pos, int use_padding) |
| Converts position to px, optionally adding the ruler padding.
|
|
NONNULL int | ui_pos_to_px_editor (const Position *pos, bool use_padding) |
| Converts position to px, optionally adding the ruler padding.
|
|
NONNULL void | ui_px_to_pos_editor (double px, Position *pos, bool 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_gdk_rgba_to_hex (GdkRGBA *color, char *buf) |
|
void | ui_show_notification (const char *msg) |
| Shows a notification in the revealer.
|
|
int | ui_show_notification_idle_func (char *msg) |
| Show notification from non-GTK threads.
|
|
void | ui_setup_language_combo_row (AdwComboRow *combo_row) |
| Sets up a combo box to have a selection of languages.
|
|
AdwComboRow * | ui_gen_audio_backends_combo_row (bool with_signal) |
| Generates a combo row for selecting the audio backend.
|
|
AdwComboRow * | ui_gen_midi_backends_combo_row (bool with_signal) |
| Generates a combo row for selecting the MIDI backend.
|
|
void | ui_setup_audio_device_name_combo_row (AdwComboRow *combo_row, bool populate, bool with_signal) |
| Sets up a combo row for selecting the audio device name.
|
|
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.
|
|
char * | ui_get_locale_not_available_string (LocalizationLanguage lang) |
| Returns the "a locale for the language you have
selected..." text based on the given language.
|
|
void | ui_show_warning_for_tempo_track_experimental_feature (void) |
|
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.
|
|
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.
|
|
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.
|
|
void | ui_get_db_value_as_string (float val, char *buf) |
| Returns an appropriate string representation of the given dB value.
|
|
UiCaches * | ui_caches_new (void) |
|
void | ui_caches_free (UiCaches *self) |
|
void | vamp_print_all (void) |
| Prints detected vamp plugins.
|
|
const VampPluginDescriptor * | vamp_get_simple_fixed_tempo_estimator_descriptor (void) |
|
ZVampPlugin * | vamp_get_plugin (ZVampPluginType type, float samplerate) |
|
void | vamp_plugin_initialize (ZVampPlugin *plugin, size_t channels, size_t step_size, size_t block_size) |
|
ZVampFeatureSet * | vamp_plugin_process (ZVampPlugin *plugin, const float *const *input_buffers, long timestamp, unsigned int samplerate) |
|
ZVampFeatureSet * | vamp_plugin_get_remaining_features (ZVampPlugin *plugin, unsigned int samplerate) |
|
size_t | vamp_plugin_get_preferred_step_size (ZVampPlugin *plugin) |
|
size_t | vamp_plugin_get_preferred_block_size (ZVampPlugin *plugin) |
|
ZVampOutputList * | vamp_plugin_get_output_descriptors (ZVampPlugin *plugin) |
|
ZVampOutputDescriptor * | vamp_output_descriptor_new (const char *identifier, const char *name, const char *description, const char *unit, bool hasFixedBinCount, bool hasKnownExtents, float minValue, float maxValue, int sampleType, float sampleRate, bool hasDuration) |
|
ZVampFeature * | vamp_feature_new (bool has_timestamp, long timestamp, bool hasDuration, size_t duration, float *values, size_t num_values, const char *label) |
|
const ZVampFeatureList * | vamp_feature_set_get_list_for_output (ZVampFeatureSet *self, int output_idx) |
|
void | vamp_feature_list_print (const ZVampFeatureList *self) |
|
void | vamp_feature_set_print (const ZVampFeatureSet *self) |
|
void | vamp_feature_print (ZVampFeature *self) |
|
void | vamp_plugin_output_print (ZVampOutputDescriptor *self) |
|
void | vamp_plugin_output_list_print (ZVampOutputList *self) |
|
void | vamp_feature_free (void *self) |
|
void | vamp_feature_list_free (void *list) |
|
void | vamp_output_descriptor_free (void *descr) |
|
void | vamp_feature_set_free (ZVampFeatureSet *self) |
|
void | vamp_plugin_output_list_free (ZVampOutputList *self) |
|
Various utilities.