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 (main_window_widget_get_type ())
14G_DECLARE_FINAL_TYPE (
16 main_window_widget,
17 Z,
18 MAIN_WINDOW_WIDGET,
19 AdwApplicationWindow)
20
21typedef struct _HeaderWidget HeaderWidget;
22typedef struct _CenterDockWidget CenterDockWidget;
23typedef struct _BotBarWidget BotBarWidget;
24typedef struct _TopBarWidget TopBarWidget;
25typedef struct _ZrythmApp ZrythmApp;
27
34#define MAIN_WINDOW zrythm_app->main_window
35#define MW MAIN_WINDOW
36
44typedef struct _MainWindowWidget
45{
46 AdwApplicationWindow parent_instance;
47
48 GtkHeaderBar * header_bar;
49 PanelToggleButton * start_dock_switcher;
50 AdwWindowTitle * window_title;
51 PanelToggleButton * end_dock_switcher;
52
53 AdwViewSwitcher * view_switcher;
54
55 GtkBox * header_start_box;
56 GtkBox * header_end_box;
57 GtkButton * z_icon;
58 GtkButton * preferences;
59 GtkButton * log_viewer;
60 GtkButton * scripting_interface;
61
62 GtkBox * main_box;
63 HeaderWidget * header;
64 TopBarWidget * top_bar;
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
95void
97
101void
103
107void
109
110void
111main_window_widget_quit (MainWindowWidget * self);
112
117#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:39
Center dock.
Definition center_dock.h:41
Header notebook to be used at the very top of the main window.
Definition header.h:36
The main window of Zrythm.
Definition main_window.h:45
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:157
The global struct.
Definition zrythm_app.h:59
The main Zrythm struct.