General module

Uncategorized.

Classes

struct Zrythm
To be used throughout the program.
struct _ZrythmApp
The global struct.

Enums

enum ZrythmDirType { ZRYTHM_DIR_SYSTEM_PREFIX, ZRYTHM_DIR_SYSTEM_BINDIR, ZRYTHM_DIR_SYSTEM_PARENT_DATADIR, ZRYTHM_DIR_SYSTEM_LOCALEDIR, ZRYTHM_DIR_SYSTEM_ZRYTHM_DATADIR, ZRYTHM_DIR_SYSTEM_SAMPLESDIR, ZRYTHM_DIR_SYSTEM_THEMESDIR, ZRYTHM_DIR_USER_TOP, ZRYTHM_DIR_USER_PROJECTS, ZRYTHM_DIR_USER_TEMPLATES, ZRYTHM_DIR_USER_THEMES, ZRYTHM_DIR_USER_LOG, ZRYTHM_DIR_USER_PROFILING, ZRYTHM_DIR_USER_GDB }
Type of Zrythm directory.

Typedefs

using ZrythmDirType = enum ZrythmDirType
Type of Zrythm directory.
using Zrythm = struct Zrythm
To be used throughout the program.

Functions

auto zrythm_get_version(int with_v) -> char*
Returns the version string.
void zrythm_get_version_with_capabilities(char* str)
Returns the veresion and the capabilities.
auto zrythm_get_default_user_dir(void) -> char*
Returns the default user "zrythm" dir.
auto zrythm_get_dir(ZrythmDirType type) -> char*
Returns a Zrythm directory specified by type.
auto zrythm_get_prefix(void) -> char*
Returns the prefix or in the case of windows the root dir (C/program files/zrythm) or in the case of macos the bundle path.
auto zrythm_get_user_dir(bool force_default) -> char*
Gets the zrythm directory, either from the settings if non-empty, or the default ($XDG_DATA_DIR/zrythm).
auto zrythm_new(const char* exe_path, bool have_ui, bool testing, bool optimized_dsp) -> Zrythm*
Creates a new Zrythm instance.
void zrythm_free(Zrythm* self)
Frees the instance and any unfreed members.
auto zrythm_app_new(const char* exe_path, char* audio_backend, char* midi_backend, char* buf_size) -> ZrythmApp*
Creates the Zrythm GApplication.
void zrythm_app_set_progress_status(ZrythmApp* self, const char* text, const double perc)
Sets the current status and progress percentage during loading.

Variables

Zrythm* zrythm
Global variable, should be available to all files.
ZrythmApp* zrythm_app
Global variable, should be available to all files.

Enum documentation

enum ZrythmDirType

Type of Zrythm directory.

Enumerators
ZRYTHM_DIR_SYSTEM_PREFIX

The prefix, or in the case of windows installer the root dir (C/program files/zrythm), or in the case of macos installer the bundle path.

In all cases, "share" is expected to be found in this dir.

ZRYTHM_DIR_SYSTEM_BINDIR

"bin" under ZRYTHM_DIR_SYSTEM_PREFIX.

ZRYTHM_DIR_SYSTEM_PARENT_DATADIR

"share" under ZRYTHM_DIR_SYSTEM_PREFIX.

ZRYTHM_DIR_SYSTEM_LOCALEDIR

Localization under "share".

ZRYTHM_DIR_SYSTEM_ZRYTHM_DATADIR

share/zrythm

ZRYTHM_DIR_SYSTEM_SAMPLESDIR

Samples.

ZRYTHM_DIR_SYSTEM_THEMESDIR

Themes.

ZRYTHM_DIR_USER_TOP

Main zrythm directory from gsettings.

ZRYTHM_DIR_USER_PROJECTS

Subdirs of ZRYTHM_DIR_USER_TOP.

ZRYTHM_DIR_USER_TEMPLATES
ZRYTHM_DIR_USER_THEMES
ZRYTHM_DIR_USER_LOG

Log files.

ZRYTHM_DIR_USER_PROFILING

Profiling files.

ZRYTHM_DIR_USER_GDB

Gdb backtrace files.

Typedef documentation

typedef struct Zrythm Zrythm

To be used throughout the program.

Everything here should be global and function regardless of the project.

Function documentation

char* zrythm_get_version(int with_v)

Returns the version string.

Parameters
with_v Include a starting "v".

Must be g_free()'d.

char* zrythm_get_default_user_dir(void)

Returns the default user "zrythm" dir.

This is used when resetting or when the dir is not selected by the user yet.

char* zrythm_get_dir(ZrythmDirType type)

Returns a Zrythm directory specified by type.

Returns A newly allocated string.

char* zrythm_get_prefix(void)

Returns the prefix or in the case of windows the root dir (C/program files/zrythm) or in the case of macos the bundle path.

Returns A newly allocated string.

In all cases, "share" is expected to be found in this dir.

char* zrythm_get_user_dir(bool force_default)

Gets the zrythm directory, either from the settings if non-empty, or the default ($XDG_DATA_DIR/zrythm).

Parameters
force_default Ignore the settings and get the default dir.

Must be free'd by caler.

Zrythm* zrythm_new(const char* exe_path, bool have_ui, bool testing, bool optimized_dsp)

Creates a new Zrythm instance.

Parameters
exe_path
have_ui Whether Zrythm is instantiated with a UI (false if headless).
testing Whether this is a unit test.
optimized_dsp

ZrythmApp* zrythm_app_new(const char* exe_path, char* audio_backend, char* midi_backend, char* buf_size)

Creates the Zrythm GApplication.

This also initializes the Zrythm struct.

void zrythm_app_set_progress_status(ZrythmApp* self, const char* text, const double perc)

Sets the current status and progress percentage during loading.

The splash screen then reads these values from the Zrythm struct.

Variable documentation

ZrythmApp* zrythm_app

Global variable, should be available to all files.