use correct path for various actions/bindings in monitor section
[ardour.git] / gtk2_ardour / gtk_pianokeyboard.h
index 27d9a8a5c2eaccbaf4270bb73daeb9b4d8671995..3fd0fc2a2b74a728d7d236e36d7272b99ea222bf 100644 (file)
@@ -1,3 +1,22 @@
+/*
+    Copyright (C) 2012 Paul Davis
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
 #ifndef __PIANO_KEYBOARD_H__
 #define __PIANO_KEYBOARD_H__
 
@@ -21,7 +40,7 @@ typedef struct        _PianoKeyboardClass             PianoKeyboardClass;
 #define OCTAVE_MIN     -1
 #define OCTAVE_MAX     7
 
-struct Note {
+struct PKNote {
        int                     pressed;                /* 1 if key is in pressed down state. */
        int                     sustained;              /* 1 if note is sustained. */
        int                     x;                      /* Distance between the left edge of the key
@@ -40,7 +59,9 @@ struct _PianoKeyboard
        int                     octave;
        int                     widget_margin;
        int                     note_being_pressed_using_mouse;
-       volatile struct Note    notes[NNOTES];
+       int         last_key;
+       gboolean    monophonic;
+       struct PKNote   notes[NNOTES];
        /* Table used to translate from PC keyboard character to MIDI note number. */
        GHashTable              *key_bindings;
 };
@@ -57,6 +78,7 @@ void          piano_keyboard_sustain_release  (PianoKeyboard *pk);
 void           piano_keyboard_set_note_on      (PianoKeyboard *pk, int note);
 void           piano_keyboard_set_note_off     (PianoKeyboard *pk, int note);
 void           piano_keyboard_set_keyboard_cue (PianoKeyboard *pk, int enabled);
+void           piano_keyboard_set_monophonic (PianoKeyboard *pk, gboolean monophonic);
 void           piano_keyboard_set_octave (PianoKeyboard *pk, int octave);
 gboolean       piano_keyboard_set_keyboard_layout (PianoKeyboard *pk, const char *layout);