Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
main_window.h
1// clang-format off
2// SPDX-FileCopyrightText: © 2018-2022, 2024 Alexandros Theodotou <alex@zrythm.org>
3// SPDX-FileCopyrightText: © 2024 Miró Allard <miro.allard@pm.me>
4// SPDX-License-Identifier: LicenseRef-ZrythmLicense
5// clang-format on
6
7#ifndef __GUI_WIDGETS_MAIN_WINDOW_H__
8#define __GUI_WIDGETS_MAIN_WINDOW_H__
9
10#include "zrythm.h"
11
12#include <adwaita.h>
13#include <gtk/gtk.h>
14#include <libpanel.h>
15
16#define MAIN_WINDOW_WIDGET_TYPE (main_window_widget_get_type ())
17G_DECLARE_FINAL_TYPE (
19 main_window_widget,
20 Z,
21 MAIN_WINDOW_WIDGET,
22 AdwApplicationWindow)
23
24typedef struct _ToolboxWidget ToolboxWidget;
25typedef struct _CenterDockWidget CenterDockWidget;
26typedef struct _BotBarWidget BotBarWidget;
27typedef struct _TopBarWidget TopBarWidget;
28typedef struct _ZrythmApp ZrythmApp;
30
37#define MAIN_WINDOW zrythm_app->main_window
38#define MW MAIN_WINDOW
39
47typedef struct _MainWindowWidget
48{
49 AdwApplicationWindow parent_instance;
50
51 PanelToggleButton * start_dock_switcher;
52 AdwWindowTitle * window_title;
53 PanelToggleButton * end_dock_switcher;
54
55 ToolboxWidget * toolbox;
56
57 AdwSplitButton * undo_btn;
58 AdwSplitButton * redo_btn;
59
60 GtkBox * header_start_box;
61 GtkBox * header_end_box;
62 GtkButton * z_icon;
63
64 GtkBox * center_box;
65 CenterDockWidget * center_dock;
66 BotBarWidget * bot_bar;
67 int is_fullscreen;
68 int height;
69 int width;
70 AdwToastOverlay * toast_overlay;
71
74
79
81 bool setup;
83
89main_window_widget_new (ZrythmApp * app);
90
91void
92main_window_widget_refresh_undo_redo_buttons (MainWindowWidget * self);
93
97void
99
103void
105
109void
111
112void
113main_window_widget_quit (MainWindowWidget * self);
114
119#endif
MainWindowWidget * main_window_widget_new(ZrythmApp *app)
Creates a main_window widget using the given app data.
void main_window_widget_tear_down(MainWindowWidget *self)
Prepare for finalization.
void main_window_widget_set_project_title(MainWindowWidget *self, Project *prj)
Updates the project name at the top of the window.
void main_window_widget_setup(MainWindowWidget *self)
Refreshes the state of the main window.
Bot bar.
Definition bot_bar.h:43
Center dock.
Definition center_dock.h:41
The main window of Zrythm.
Definition main_window.h:48
bool log_has_pending_warnings
Whether log has pending warnings (if true, the log viewer button will have an emblem until clicked).
Definition main_window.h:78
bool setup
Whether set up already or not.
Definition main_window.h:81
bool preferences_opened
Whether preferences window is opened.
Definition main_window.h:73
Contains all of the info that will be serialized into a project file.
Definition project.h:146
The global struct.
Definition zrythm_app.h:60
The main Zrythm struct.