1 /* GSequencer - Advanced GTK Sequencer 2 * Copyright (C) 2005-2021 Joël Krähemann 3 * 4 * This file is part of GSequencer. 5 * 6 * GSequencer is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * GSequencer is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with GSequencer. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef __AGS_COMPOSITE_EDITOR_H__ 21 #define __AGS_COMPOSITE_EDITOR_H__ 22 23 #include <glib.h> 24 #include <glib-object.h> 25 26 #include <gtk/gtk.h> 27 28 #include <ags/libags.h> 29 #include <ags/libags-audio.h> 30 31 #include <ags/libags-gui.h> 32 33 #include <ags/X/ags_machine.h> 34 35 #include <ags/X/editor/ags_composite_toolbar.h> 36 #include <ags/X/editor/ags_machine_selector.h> 37 #include <ags/X/editor/ags_composite_edit.h> 38 39 G_BEGIN_DECLS 40 41 #define AGS_TYPE_COMPOSITE_EDITOR (ags_composite_editor_get_type ()) 42 #define AGS_COMPOSITE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COMPOSITE_EDITOR, AgsCompositeEditor)) 43 #define AGS_COMPOSITE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COMPOSITE_EDITOR, AgsCompositeEditorClass)) 44 #define AGS_IS_COMPOSITE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COMPOSITE_EDITOR)) 45 #define AGS_IS_COMPOSITE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COMPOSITE_EDITOR)) 46 #define AGS_COMPOSITE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COMPOSITE_EDITOR, AgsCompositeEditorClass)) 47 48 #define AGS_COMPOSITE_EDITOR_DEFAULT_VERSION "3.8.0" 49 #define AGS_COMPOSITE_EDITOR_DEFAULT_BUILD_ID "Mon Dec 14 15:29:38 UTC 2020" 50 51 typedef struct _AgsCompositeEditor AgsCompositeEditor; 52 typedef struct _AgsCompositeEditorClass AgsCompositeEditorClass; 53 54 typedef enum{ 55 AGS_COMPOSITE_EDITOR_ADDED_TO_REGISTRY = 1, 56 AGS_COMPOSITE_EDITOR_CONNECTED = 1 << 1, 57 }AgsCompositeEditorFlags; 58 59 typedef enum{ 60 AGS_COMPOSITE_EDITOR_EDIT_NOTATION = 1, 61 AGS_COMPOSITE_EDITOR_EDIT_SHEET = 1 << 1, 62 AGS_COMPOSITE_EDITOR_EDIT_AUTOMATION = 1 << 2, 63 AGS_COMPOSITE_EDITOR_EDIT_WAVE = 1 << 3, 64 }AgsCompositeEditorEdit; 65 66 struct _AgsCompositeEditor 67 { 68 GtkBox box; 69 70 guint flags; 71 guint edit; 72 73 gchar *version; 74 gchar *build_id; 75 76 AgsUUID *uuid; 77 78 AgsCompositeToolbar *toolbar; 79 80 GtkPaned *paned; 81 82 AgsMachineSelector *machine_selector; 83 AgsMachine *selected_machine; 84 85 AgsCompositeEdit *selected_edit; 86 87 AgsCompositeEdit *notation_edit; 88 AgsCompositeEdit *sheet_edit; 89 AgsCompositeEdit *automation_edit; 90 AgsCompositeEdit *wave_edit; 91 }; 92 93 struct _AgsCompositeEditorClass 94 { 95 GtkBoxClass box; 96 97 void (*machine_changed)(AgsCompositeEditor *composite_editor, 98 AgsMachine *machine); 99 }; 100 101 GType ags_composite_editor_get_type(void); 102 103 gboolean ags_composite_editor_test_flags(AgsCompositeEditor *composite_editor, guint flags); 104 void ags_composite_editor_set_flags(AgsCompositeEditor *composite_editor, guint flags); 105 void ags_composite_editor_unset_flags(AgsCompositeEditor *composite_editor, guint flags); 106 107 void ags_composite_editor_machine_changed(AgsCompositeEditor *composite_editor, 108 AgsMachine *machine); 109 110 /* common */ 111 void ags_composite_editor_paste(AgsCompositeEditor *composite_editor); 112 void ags_composite_editor_copy(AgsCompositeEditor *composite_editor); 113 void ags_composite_editor_cut(AgsCompositeEditor *composite_editor); 114 void ags_composite_editor_invert(AgsCompositeEditor *composite_editor); 115 116 /* instantiate */ 117 AgsCompositeEditor* ags_composite_editor_new(); 118 119 G_END_DECLS 120 121 #endif /*__AGS_COMPOSITE_EDITOR_H__*/ 122