|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Various utilities. More...
Data Structures | |
| struct | PangoLayoutDeleter |
| class | zrythm::legacy::FileDescriptor |
| Descriptor of a file. More... | |
| class | UiColors |
| Commonly used UI colors. More... | |
| class | UiTextures |
| Commonly used UI textures. More... | |
| class | MPMCQueue< T > |
| Multiple Producer Multiple Consumer lock-free queue. More... | |
| class | Resampler |
| Audio resampler. More... | |
Macros | |
| #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 | 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 | 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 class | zrythm::legacy::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 | BeatUnit { Two , Four , Eight , Sixteen } |
| Beat unit. More... | |
Functions | |
| PangoLayoutUniquePtr | z_pango_create_layout_from_description (GtkWidget *widget, PangoFontDescription *descr) |
| 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 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" |
Various utilities.
| #define DEBUG_BREAK | ( | ) |
| #define SUPPORTED_FILE_DND_PREFIX Z_DND_STRING_PREFIX "FileDescriptor::" |
Definition at line 19 of file file_descriptor.h.
| #define UI_CACHES (zrythm_app->ui_caches_) |
| #define Z_DISABLE_COPY | ( | Class | ) |
| #define Z_DISABLE_COPY_MOVE | ( | Class | ) |
| #define Z_DISABLE_MOVE | ( | Class | ) |
| #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 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 24 of file file_descriptor.h.
|
strong |
|
strong |
Various overlay actions to be shared.
| 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. |
| void iterate_tuple | ( | Callable | c, |
| Tuple && | t ) |
| 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. |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |