General module
Uncategorized.
Classes
- struct Zrythm
- To be used throughout the program.
- struct ZrythmAppUiMessage
- UI message for the message queue.
- struct _ZrythmApp
- The global struct.
Enums
- enum ZrythmDirType { ZRYTHM_DIR_SYSTEM_PREFIX, ZRYTHM_DIR_SYSTEM_BINDIR, ZRYTHM_DIR_SYSTEM_PARENT_DATADIR, ZRYTHM_DIR_SYSTEM_PARENT_LIBDIR, ZRYTHM_DIR_SYSTEM_ZRYTHM_LIBDIR, ZRYTHM_DIR_SYSTEM_BUNDLED_PLUGINSDIR, ZRYTHM_DIR_SYSTEM_LOCALEDIR, ZRYTHM_DIR_SYSTEM_SOURCEVIEW_LANGUAGE_SPECS_DIR, ZRYTHM_DIR_SYSTEM_BUNDLED_SOURCEVIEW_LANGUAGE_SPECS_DIR, ZRYTHM_DIR_SYSTEM_ZRYTHM_DATADIR, ZRYTHM_DIR_SYSTEM_SAMPLESDIR, ZRYTHM_DIR_SYSTEM_SCRIPTSDIR, ZRYTHM_DIR_SYSTEM_THEMESDIR, ZRYTHM_DIR_SYSTEM_THEMES_CSS_DIR, ZRYTHM_DIR_SYSTEM_THEMES_ICONS_DIR, ZRYTHM_DIR_SYSTEM_SPECIAL_LV2_PLUGINS_DIR, ZRYTHM_DIR_SYSTEM_FONTSDIR, ZRYTHM_DIR_USER_TOP, ZRYTHM_DIR_USER_PROJECTS, ZRYTHM_DIR_USER_TEMPLATES, ZRYTHM_DIR_USER_THEMES, ZRYTHM_DIR_USER_THEMES_CSS, ZRYTHM_DIR_USER_THEMES_ICONS, ZRYTHM_DIR_USER_SCRIPTS, ZRYTHM_DIR_USER_LOG, ZRYTHM_DIR_USER_PROFILING, ZRYTHM_DIR_USER_GDB, ZRYTHM_DIR_USER_BACKTRACE }
- Type of Zrythm directory.
Typedefs
- using ZrythmDirType = enum ZrythmDirType
- Type of Zrythm directory.
- using Zrythm = struct Zrythm
- To be used throughout the program.
- using ZrythmAppUiMessage = struct ZrythmAppUiMessage
- UI message for the message queue.
Functions
- auto zrythm_get_version(bool with_v) -> MALLOC char*
- Returns the version string.
- auto zrythm_is_release(bool official) -> bool
- Returns whether the current Zrythm version is a release version.
- auto zrythm_fetch_latest_release_ver(void) -> char*
- Returns the latest release version.
- auto zrythm_is_latest_release(GError** error) -> bool
- Returns whether this is the latest release.
- void zrythm_get_version_with_capabilities(char* buf, bool include_system_info)
- Returns the version and the capabilities.
- auto zrythm_get_system_info(void) -> char*
- Returns system info (mainly used for bug reports).
- 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_init_user_dirs_and_files(Zrythm* self) -> NONNULL void
- Initializes/creates the default dirs/files in the user directory.
- auto zrythm_init_templates(Zrythm* self) -> NONNULL void
- Initializes the array of project templates.
- 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(int argc, const char** argv) -> 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.
- void zrythm_app_check_for_updates(ZrythmApp* self)
- Handles the logic for checking for updates on startup.
- auto zrythm_app_prompt_for_project_func(ZrythmApp* self) -> int
- Unlike the init thread, this will run in the main GTK thread.
- auto zrythm_app_get(void) -> ZrythmApp**
- Returns a pointer to the global zrythm_app.
- auto zrythm_app_check_and_show_trial_limit_error(ZrythmApp* self) -> bool
- Shows the trial limitation error message.
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.
Typedef documentation
typedef struct ZrythmAppUiMessage ZrythmAppUiMessage
#include <zrythm_app.h>
UI message for the message queue.
Function documentation
MALLOC char* zrythm_get_version(bool with_v)
Returns the version string.
Parameters | |
---|---|
with_v | Include a starting "v". |
Must be g_free()'d.
bool zrythm_is_release(bool official)
Returns whether the current Zrythm version is a release version.
bool zrythm_is_latest_release(GError** error)
Returns whether this is the latest release.
error
will be set if an error occurred and the return value should be ignored.
void zrythm_get_version_with_capabilities(char* buf, bool include_system_info)
Returns the version and the capabilities.
Parameters | |
---|---|
buf | Buffer to write the string to. |
include_system_info | Whether to include additional system info (for bug reports). |
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 caller.
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(int argc,
const char** argv)
#include <zrythm_app.h>
Creates the Zrythm GApplication.
This also initializes the Zrythm struct.
void zrythm_app_set_progress_status(ZrythmApp* self,
const char* text,
const double perc)
#include <zrythm_app.h>
Sets the current status and progress percentage during loading.
The splash screen then reads these values from the Zrythm struct.
void zrythm_app_check_for_updates(ZrythmApp* self)
#include <zrythm_app.h>
Handles the logic for checking for updates on startup.
int zrythm_app_prompt_for_project_func(ZrythmApp* self)
#include <zrythm_app.h>
Unlike the init thread, this will run in the main GTK thread.
Do not put expensive logic here.
This should be ran after the expensive initialization has finished.
ZrythmApp** zrythm_app_get(void)
#include <zrythm_app.h>
Returns a pointer to the global zrythm_app.
bool zrythm_app_check_and_show_trial_limit_error(ZrythmApp* self)
#include <zrythm_app.h>
Shows the trial limitation error message.
Returns | Whether the limit was reached. |
---|
Variable documentation
ZrythmApp* zrythm_app
#include <zrythm_app.h>
Global variable, should be available to all files.