Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm.h File Reference

The main Zrythm struct. More...

#include "zrythm-config.h"
#include <stdbool.h>
#include <glib.h>
#include "zix/sem.h"
#include <gio/gio.h>
Include dependency graph for zrythm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Zrythm
 To be used throughout the program. More...
 

Macros

#define ZRYTHM   (zrythm)
 
#define ZRYTHM_PROJECTS_DIR   "projects"
 
#define MAX_RECENT_PROJECTS   20
 
#define DEBUGGING   (G_UNLIKELY (ZRYTHM && ZRYTHM->debug))
 
#define ZRYTHM_TESTING   (G_UNLIKELY (ZRYTHM && ZRYTHM->testing))
 
#define ZRYTHM_GENERATING_PROJECT   (ZRYTHM->generating_project)
 
#define ZRYTHM_HAVE_UI   (ZRYTHM && ZRYTHM->have_ui)
 
#define ZRYTHM_USE_OPTIMIZED_DSP   false
 

Typedefs

typedef struct PCGRand PCGRand
 

Enumerations

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_SYSTEM_TEMPLATES , 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. More...
 

Functions

void zrythm_add_to_recent_projects (Zrythm *self, const char *filepath)
 
void zrythm_remove_recent_project (char *filepath)
 
MALLOC char * zrythm_get_version (bool with_v)
 Returns the version string.
 
bool zrythm_is_release (bool official)
 Returns whether the current Zrythm version is a release version.
 
char * zrythm_fetch_latest_release_ver_finish (GAsyncResult *result, GError **error)
 
void zrythm_fetch_latest_release_ver_async (GAsyncReadyCallback callback, gpointer callback_data)
 
bool zrythm_is_latest_release (const char *remote_latest_release)
 Returns whether the given release string is the latest release.
 
void zrythm_get_version_with_capabilities (char *buf, bool include_system_info)
 Returns the version and the capabilities.
 
char * zrythm_get_system_info (void)
 Returns system info (mainly used for bug reports).
 
char * zrythm_get_default_user_dir (void)
 Returns the default user "zrythm" dir.
 
char * zrythm_get_dir (ZrythmDirType type)
 Returns a Zrythm directory specified by type.
 
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.
 
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).
 
NONNULL bool zrythm_init_user_dirs_and_files (Zrythm *self, GError **error)
 Initializes/creates the default dirs/files in the user directory.
 
NONNULL void zrythm_init_templates (Zrythm *self)
 Initializes the array of project templates.
 
Zrythmzrythm_new (const char *exe_path, bool have_ui, bool testing, bool optimized_dsp)
 Creates a new Zrythm instance.
 
void zrythm_free (Zrythm *self)
 Frees the instance and any unfreed members.
 

Variables

Zrythmzrythm
 Global variable, should be available to all files.
 

Detailed Description

The main Zrythm struct.

Definition in file zrythm.h.

Typedef Documentation

◆ PCGRand

typedef struct PCGRand PCGRand

Definition at line 32 of file zrythm.h.