1 /* 2 * Copyright (C) 2019 Alexandros Theodotou <alex at zrythm dot org> 3 * 4 * This file is part of Zrythm 5 * 6 * Zrythm is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Affero 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 * Zrythm 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 Affero General Public License for more details. 15 * 16 * You should have received a copy of the GNU Affero General Public License 17 * along with Zrythm. If not, see <https://www.gnu.org/licenses/>. 18 */ 19 20 /** 21 * \file 22 */ 23 24 #ifndef __GUI_WIDGETS_CHORD_KEY_H__ 25 #define __GUI_WIDGETS_CHORD_KEY_H__ 26 27 #include <gtk/gtk.h> 28 29 #define CHORD_KEY_WIDGET_TYPE \ 30 (chord_key_widget_get_type ()) 31 G_DECLARE_FINAL_TYPE ( 32 ChordKeyWidget, 33 chord_key_widget, 34 Z, CHORD_KEY_WIDGET, 35 GtkGrid) 36 37 typedef struct _PianoKeyboardWidget 38 PianoKeyboardWidget; 39 40 /** 41 * @addtogroup widgets 42 * 43 * @{ 44 */ 45 46 /** 47 * Piano roll note widget to be shown on the left 48 * side of the piano roll (128 of these). 49 */ 50 typedef struct _ChordKeyWidget 51 { 52 GtkGrid parent_instance; 53 54 /** The chord this widget is for. */ 55 ChordDescriptor * descr; 56 57 GtkLabel * chord_lbl; 58 GtkBox * piano_box; 59 PianoKeyboardWidget * piano; 60 GtkButtonBox * btn_box; 61 GtkButton * choose_chord_btn; 62 GtkButton * invert_prev_btn; 63 GtkButton * invert_next_btn; 64 65 GtkGestureMultiPress * multipress; 66 } ChordKeyWidget; 67 68 void 69 chord_key_widget_refresh ( 70 ChordKeyWidget * self); 71 72 /** 73 * Creates a ChordKeyWidget for the given 74 * MIDI note descriptor. 75 */ 76 ChordKeyWidget * 77 chord_key_widget_new ( 78 ChordDescriptor * descr); 79 80 /** 81 * @} 82 */ 83 84 #endif 85