Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
main_window.h
1// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#ifndef __GUI_WIDGETS_MAIN_WINDOW_H__
5#define __GUI_WIDGETS_MAIN_WINDOW_H__
6
7#include "zrythm.h"
8
9#include <adwaita.h>
10#include <gtk/gtk.h>
11#include <libpanel.h>
12
13#define MAIN_WINDOW_WIDGET_TYPE \
14 (main_window_widget_get_type ())
15G_DECLARE_FINAL_TYPE (
17 main_window_widget,
18 Z,
19 MAIN_WINDOW_WIDGET,
20 AdwApplicationWindow)
21
22typedef struct _HeaderWidget HeaderWidget;
23typedef struct _CenterDockWidget CenterDockWidget;
24typedef struct _BotBarWidget BotBarWidget;
25typedef struct _TopBarWidget TopBarWidget;
26typedef struct _ZrythmApp ZrythmApp;
28
35#define MAIN_WINDOW zrythm_app->main_window
36#define MW MAIN_WINDOW
37
45typedef struct _MainWindowWidget
46{
47 AdwApplicationWindow parent_instance;
48
49 GtkHeaderBar * header_bar;
50 PanelToggleButton * start_dock_switcher;
51 AdwWindowTitle * window_title;
52 PanelToggleButton * end_dock_switcher;
53
54 AdwViewSwitcher * view_switcher;
55
56 GtkBox * header_start_box;
57 GtkBox * header_end_box;
58 GtkButton * z_icon;
59 GtkButton * preferences;
60 GtkButton * log_viewer;
61 GtkButton * scripting_interface;
62
63 GtkBox * main_box;
64 HeaderWidget * header;
65 TopBarWidget * top_bar;
66 GtkBox * center_box;
67 CenterDockWidget * center_dock;
68 BotBarWidget * bot_bar;
69 int is_fullscreen;
70 int height;
71 int width;
72 AdwToastOverlay * toast_overlay;
73
76
81
83 bool setup;
85
91main_window_widget_new (ZrythmApp * app);
92
96void
98
99void
100main_window_widget_set_project_title (
101 MainWindowWidget * self,
102 Project * prj);
103
107void
109
113void
115
116void
117main_window_widget_quit (MainWindowWidget * self);
118
123#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_open(MainWindowWidget *win, GFile *file)
TODO.
void main_window_widget_setup(MainWindowWidget *self)
Refreshes the state of the main window.
Center dock.
Definition center_dock.h:42
Header notebook to be used at the very top of the main window.
Definition header.h:41
The main window of Zrythm.
Definition main_window.h:46
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:80
bool setup
Whether set up already or not.
Definition main_window.h:83
bool preferences_opened
Whether preferences window is opened.
Definition main_window.h:75
Contains all of the info that will be serialized into a project file.
Definition project.h:157
The global struct.
Definition zrythm_app.h:66
The main Zrythm struct.