10#ifndef __ZRYTHM_APP_H__
11#define __ZRYTHM_APP_H__
13#include "zrythm-config.h"
21#include "gtk_wrapper.h"
24#define ZRYTHM_APP_TYPE (zrythm_app_get_type ())
25G_DECLARE_FINAL_TYPE (ZrythmApp,
zrythm_app, ZRYTHM, APP, GtkApplication)
27#define ZRYTHM_APP_IS_GTK_THREAD \
28 (zrythm_app && zrythm_app->gtk_thread == g_thread_self ())
31TYPEDEF_STRUCT_UNDERSCORED (BugReportDialogWidget);
52zrythm_app_ui_message_new (GtkMessageType type,
const char * msg);
65 GtkApplication parent;
100 bool have_svg_loader;
122 int num_startup_errors;
150 guint project_autosave_source_id;
167zrythm_app_set_font_scale (ZrythmApp * self,
double font_scale);
200zrythm_app_init_thread (ZrythmApp * self);
208zrythm_app_install_action_accel (
210 const char * primary,
211 const char * secondary,
212 const char * action_name);
218zrythm_app_get_primary_accel_for_action (
220 const char * action_name);
ZrythmApp ** zrythm_app_get(void)
Returns a pointer to the global zrythm_app.
void zrythm_app_check_for_updates(ZrythmApp *self)
Handles the logic for checking for updates on startup.
ZrythmApp * zrythm_app_new(int argc, const char **argv)
Creates the Zrythm GApplication.
int zrythm_app_prompt_for_project_func(ZrythmApp *self)
Unlike the init thread, this will run in the main GTK thread.
bool zrythm_app_check_and_show_trial_limit_error(ZrythmApp *self)
Shows the trial limitation error message.
void zrythm_exit_response_callback(AdwDialog *dialog, gpointer user_data)
To be used to exit Zrythm using the "response" signal on a message dialog.
ZrythmApp * zrythm_app
Global variable, should be available to all files.
The main window of Zrythm.
UI message for the message queue.
char * startup_errors[24]
Messages to show when the main window is shown.
bool is_first_run
True if this is the first time Zrythm is runh.
char * midi_backend
MIDI backend passed with –audio-backend=, if any.
GtkSettings * default_settings
Default settings (got from gtk_settings_get_default()).
char * appimage_runtime_path
AppImage runtime path, if AppImage build.
GThread * gtk_thread
The GTK thread where the main GUI loop runs.
int buf_size
Buffer size passed with –buf-size=, if any.
char * output_file
Output file passed with –output.
bool rt_priority_message_shown
Flag used to only show the RT priority message once.
GAsyncQueue * project_load_message_queue
Queue for messages to be shown when the project loads.
bool pretty_print
Whether to pretty-print.
GreeterWidget * greeter
Greeter screen.
bool init_finished
Flag to set when initialization has finished.
BugReportDialogWidget * bug_report_dialog
Currently opened bug report dialog.
MainWindowWidget * main_window
Main window.
int samplerate
Samplerate passed with –samplerate=, if any.
char * audio_backend
Audio backend passed with –audio-backend=, if any.