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
14#include "gtk_wrapper.h"
15#include "libpanel_wrapper.h"
16
17#define MAIN_WINDOW_WIDGET_TYPE (main_window_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
20 main_window_widget,
21 Z,
22 MAIN_WINDOW_WIDGET,
23 AdwApplicationWindow)
24
25typedef struct _ToolboxWidget ToolboxWidget;
26typedef struct _CenterDockWidget CenterDockWidget;
27typedef struct _BotBarWidget BotBarWidget;
28typedef struct _TopBarWidget TopBarWidget;
29typedef struct _ZrythmApp ZrythmApp;
31
38#define MAIN_WINDOW zrythm_app->main_window
39#define MW MAIN_WINDOW
40
48typedef struct _MainWindowWidget
49{
50 AdwApplicationWindow parent_instance;
51
52 PanelToggleButton * start_dock_switcher;
53 AdwWindowTitle * window_title;
54 PanelToggleButton * end_dock_switcher;
55
56 ToolboxWidget * toolbox;
57
58 AdwSplitButton * undo_btn;
59 AdwSplitButton * redo_btn;
60
61 GtkBox * header_start_box;
62 GtkBox * header_end_box;
63 GtkButton * z_icon;
64
65 GtkBox * center_box;
66 CenterDockWidget * center_dock;
67 BotBarWidget * bot_bar;
68 int is_fullscreen;
69 int height;
70 int width;
71 AdwToastOverlay * toast_overlay;
72
75
80
82 bool setup;
84
90main_window_widget_new (ZrythmApp * app);
91
92void
93main_window_widget_refresh_undo_redo_buttons (MainWindowWidget * self);
94
98void
100
104void
106
110void
112
113void
114main_window_widget_quit (MainWindowWidget * self);
115
120#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:49
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:79
bool setup
Whether set up already or not.
Definition main_window.h:82
bool preferences_opened
Whether preferences window is opened.
Definition main_window.h:74
Contains all of the info that will be serialized into a project file.
Definition project.h:145
The global struct.
Definition zrythm_app.h:64
The main Zrythm struct.