diff options
author | Robin Gareus <robin@gareus.org> | 2019-04-13 17:48:27 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-04-13 17:57:46 +0200 |
commit | 31815b5f268fa0233cd25b7ff2c8a246c12c20d1 (patch) | |
tree | cd80e3a8335ba5c27ac0709e2f12ffd4057cf71e /gtk2_ardour/gtk_pianokeyboard.h | |
parent | 90a7bef656d9cf76825db3c30c489b93cf9c8894 (diff) |
NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used
for indenting as well as some related code alignment issues.
Diffstat (limited to 'gtk2_ardour/gtk_pianokeyboard.h')
-rw-r--r-- | gtk2_ardour/gtk_pianokeyboard.h | 83 |
1 files changed, 42 insertions, 41 deletions
diff --git a/gtk2_ardour/gtk_pianokeyboard.h b/gtk2_ardour/gtk_pianokeyboard.h index 3fd0fc2a2b..d0b1be8098 100644 --- a/gtk2_ardour/gtk_pianokeyboard.h +++ b/gtk2_ardour/gtk_pianokeyboard.h @@ -25,64 +25,65 @@ G_BEGIN_DECLS -#define TYPE_PIANO_KEYBOARD (piano_keyboard_get_type ()) -#define PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboard)) -#define PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIANO_KEYBOARD, PianoKeyboardClass)) -#define IS_PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIANO_KEYBOARD)) -#define IS_PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIANO_KEYBOARD)) -#define PIANO_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboardClass)) +#define TYPE_PIANO_KEYBOARD (piano_keyboard_get_type ()) +#define PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboard)) +#define PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIANO_KEYBOARD, PianoKeyboardClass)) +#define IS_PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIANO_KEYBOARD)) +#define IS_PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIANO_KEYBOARD)) +#define PIANO_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboardClass)) -typedef struct _PianoKeyboard PianoKeyboard; -typedef struct _PianoKeyboardClass PianoKeyboardClass; +typedef struct _PianoKeyboard PianoKeyboard; +typedef struct _PianoKeyboardClass PianoKeyboardClass; -#define NNOTES 127 +#define NNOTES (127) -#define OCTAVE_MIN -1 -#define OCTAVE_MAX 7 +#define OCTAVE_MIN (-1) +#define OCTAVE_MAX (7) 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 - * and the left edge of the widget, in pixels. */ - int w; /* Width of the key, in pixels. */ - int h; /* Height of the key, in pixels. */ - int white; /* 1 if key is white; 0 otherwise. */ + 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 + * and the left edge of the widget, in pixels. */ + int w; /* Width of the key, in pixels. */ + int h; /* Height of the key, in pixels. */ + int white; /* 1 if key is white; 0 otherwise. */ }; struct _PianoKeyboard { - GtkDrawingArea da; - int maybe_stop_sustained_notes; - int sustain_new_notes; - int enable_keyboard_cue; - int octave; - int widget_margin; - int note_being_pressed_using_mouse; - int last_key; - gboolean monophonic; - struct PKNote notes[NNOTES]; + GtkDrawingArea da; + int maybe_stop_sustained_notes; + int sustain_new_notes; + int enable_keyboard_cue; + int octave; + int widget_margin; + int note_being_pressed_using_mouse; + int last_key; + gboolean monophonic; + struct PKNote notes[NNOTES]; /* Table used to translate from PC keyboard character to MIDI note number. */ - GHashTable *key_bindings; + GHashTable* key_bindings; }; struct _PianoKeyboardClass { - GtkDrawingAreaClass parent_class; + GtkDrawingAreaClass parent_class; }; -GType piano_keyboard_get_type (void) G_GNUC_CONST; -GtkWidget* piano_keyboard_new (void); -void piano_keyboard_sustain_press (PianoKeyboard *pk); -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); +GType piano_keyboard_get_type (void) G_GNUC_CONST; +GtkWidget* piano_keyboard_new (void); + +void piano_keyboard_sustain_press (PianoKeyboard *pk); +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); G_END_DECLS #endif /* __PIANO_KEYBOARD_H__ */ - |