1 /* keyresponses.h
2  * function prototypes for responses to user keypresses
3  *
4  * for Denemo, a gtk+ frontend to GNU Lilypond
5  * (c) 1999-2005 Matthew Hiller
6  */
7 
8 #ifndef KEYRESPONSES_H
9 #define KEYRESPONSES_H
10 
11 #include <gtk/gtk.h>
12 #include <gdk/gdkkeysyms.h>
13 #include "command/commandfuncs.h"
14 #include <denemo/denemo.h>
15 #include "display/draw.h"
16 #include "command/select.h"
17 #include "command/chord.h"
18 #include "command/object.h"
19 
20 
21 gint scorearea_keypress_event (GtkWidget * widget, GdkEventKey * event);
22 gint scorearea_keyrelease_event (GtkWidget * widget, GdkEventKey * event);
23 gint scorearea_button_press (GtkWidget * widget, GdkEventButton * event);
24 gint scorearea_button_release (GtkWidget * widget, GdkEventButton * event);
25 
26 gboolean intercept_scorearea_keypress (GdkEventKey * pevent);
27 
28 void adjust_measure_less_width_key (GtkAction* action, DenemoScriptParam *param);
29 void adjust_measure_more_width_key (GtkAction* action, DenemoScriptParam *param);
30 void adjust_staff_less_height_key (GtkAction* action, DenemoScriptParam *param);
31 void adjust_staff_more_height_key (GtkAction* action, DenemoScriptParam *param);
32 void unset_selection_key (DenemoScriptParam *param);
33 void insert_chord_xkey (gint duration, DenemoScriptParam *param);
34 void insert_chord_key (DenemoScriptParam *param);
35 void go_to_key (gchar note, DenemoScriptParam *param);
36 void go_to_A_key (GtkAction* action, DenemoScriptParam *param);
37 void go_to_B_key (GtkAction* action, DenemoScriptParam *param);
38 void go_to_C_key (GtkAction* action, DenemoScriptParam *param);
39 void go_to_D_key (GtkAction* action, DenemoScriptParam *param);
40 void go_to_E_key (GtkAction* action, DenemoScriptParam *param);
41 void go_to_F_key (GtkAction* action, DenemoScriptParam *param);
42 void go_to_G_key (GtkAction* action, DenemoScriptParam *param);
43 void octave_up_key (GtkAction* action, DenemoScriptParam *param);
44 void octave_down_key (GtkAction* action, DenemoScriptParam *param);
45 void rest_toggle_key (GtkAction* action, DenemoScriptParam *param);
46 void toggle_blank (GtkAction* action, DenemoScriptParam *param);
47 void append_measure_key (GtkAction* action, DenemoScriptParam *param);
48 void insert_measure_key (GtkAction* action, DenemoScriptParam *param);
49 
50 
51 void insert_chord_0key (GtkAction* action, DenemoScriptParam *param);
52 void insert_chord_1key (GtkAction* action, DenemoScriptParam *param);
53 void insert_chord_2key (GtkAction* action, DenemoScriptParam *param);
54 void insert_chord_3key (GtkAction* action, DenemoScriptParam *param);
55 void insert_chord_4key (GtkAction* action, DenemoScriptParam *param);
56 void insert_chord_5key (GtkAction* action, DenemoScriptParam *param);
57 void insert_chord_6key (GtkAction* action, DenemoScriptParam *param);
58 void insert_chord_7key (GtkAction* action, DenemoScriptParam *param);
59 void insert_chord_8key (GtkAction* action, DenemoScriptParam *param);
60 void insert_blankchord_xkey (gint duration, DenemoScriptParam *param);
61 void insert_blankchord_0key (GtkAction* action, DenemoScriptParam *param);
62 void insert_blankchord_1key (GtkAction* action, DenemoScriptParam *param);
63 void insert_blankchord_2key (GtkAction* action, DenemoScriptParam *param);
64 void insert_blankchord_3key (GtkAction* action, DenemoScriptParam *param);
65 void insert_blankchord_4key (GtkAction* action, DenemoScriptParam *param);
66 void insert_blankchord_5key (GtkAction* action, DenemoScriptParam *param);
67 void insert_blankchord_6key (GtkAction* action, DenemoScriptParam *param);
68 void insert_blankchord_7key (GtkAction* action, DenemoScriptParam *param);
69 void insert_blankchord_8key (GtkAction* action, DenemoScriptParam *param);
70 void insert_rest_xkey(gint duration, DenemoScriptParam* param);
71 void insert_rest_0key (GtkAction* action, DenemoScriptParam *param);
72 void insert_rest_1key (GtkAction* action, DenemoScriptParam *param);
73 void insert_rest_2key (GtkAction* action, DenemoScriptParam *param);
74 void insert_rest_3key (GtkAction* action, DenemoScriptParam *param);
75 void insert_rest_4key (GtkAction* action, DenemoScriptParam *param);
76 void insert_rest_5key (GtkAction* action, DenemoScriptParam *param);
77 void insert_rest_6key (GtkAction* action, DenemoScriptParam *param);
78 void insert_rest_7key (GtkAction* action, DenemoScriptParam *param);
79 void insert_rest_8key (GtkAction* action, DenemoScriptParam *param);
80 
81 gboolean add_tone_key (GtkAction* action, DenemoScriptParam *param);
82 gboolean remove_tone_key (GtkAction* action, DenemoScriptParam *param);
83 void deletepreviousobject (GtkAction* action, DenemoScriptParam *param);
84 void sharpen_key (GtkAction* action, DenemoScriptParam *param);
85 void stem_up (GtkAction* action, DenemoScriptParam *param);
86 void stem_down (GtkAction* action, DenemoScriptParam *param);
87 void flatten_key (GtkAction* action, DenemoScriptParam *param);
88 void pending_flatten (GtkAction* action, DenemoScriptParam *param);
89 void pending_sharpen (GtkAction* action, DenemoScriptParam *param);
90 void tie_notes_key (GtkAction* action, DenemoScriptParam *param);
91 void add_dot_key (GtkAction* action, DenemoScriptParam *param);
92 void remove_dot_key (GtkAction* action, DenemoScriptParam *param);
93 void insert_clone_key (DenemoScriptParam *param);
94 void add_mordent (DenemoScriptParam *param);
95 void add_turn (DenemoScriptParam *param);
96 void set_grace (DenemoScriptParam *param);
97 
98 void force_cautionary (GtkAction* action, DenemoScriptParam *param);
99 void change_pitch (GtkAction* action, DenemoScriptParam *param);
100 void add_coda (DenemoScriptParam *param);
101 void add_flageolet (DenemoScriptParam *param);
102 void add_open (DenemoScriptParam *param);
103 void add_prallmordent (DenemoScriptParam *param);
104 void add_prallprall (DenemoScriptParam *param);
105 void add_prall (DenemoScriptParam *param);
106 void add_reverseturn (DenemoScriptParam *param);
107 void add_segno (DenemoScriptParam *param);
108 void add_sforzato (DenemoScriptParam *param);
109 void add_stopped (DenemoScriptParam *param);
110 void add_thumb (DenemoScriptParam *param);
111 void add_trillelement (DenemoScriptParam *param);
112 void add_trill_element (DenemoScriptParam *param);
113 void add_upprall (DenemoScriptParam *param);
114 void add_arpeggio (DenemoScriptParam *param);
115 void default_mode (DenemoScriptParam *param);
116 void replace_mode (DenemoScriptParam *param);
117 void insert_mode (DenemoScriptParam *param);
118 void insert_opencloserepeat (DenemoScriptParam *param);
119 void insert_closerepeat (DenemoScriptParam *param);
120 void insert_openrepeat (DenemoScriptParam *param);
121 void insert_endbar (DenemoScriptParam *param);
122 void insert_doublebar (DenemoScriptParam *param);
123 void blank_mode (GtkAction * action, DenemoScriptParam *param);
124 
125 
126 
127 void append_measure_score (GtkAction* action, DenemoScriptParam *param);
128 
129 gchar *process_key_event (GdkEventKey * event, gchar * perform_command ());
130 
131 
132 void InsertRest(gint duration);
133 void InsertDur(gint duration);
134 void ChangeDur(gint duration);
135 void SetDur(gint duration);
136 void Dur(gint duration);
137 void ChangeTo(gchar note);
138 void MoveTo(gchar note);
139 void Insert(gchar note);
140 void AddNote(gchar note);
141 void Add(gchar note);
142 
143 void Dur0(GtkAction *action, gpointer param);
144 void ChangeDur0(GtkAction *action, gpointer param);
145 void InsertDur0(GtkAction *action, gpointer param);
146 void InsertRest0(GtkAction *action, gpointer param);
147 void SetDur0(GtkAction *action, gpointer param);
148 void Dur1(GtkAction *action, gpointer param);
149 void ChangeDur1(GtkAction *action, gpointer param);
150 void InsertDur1(GtkAction *action, gpointer param);
151 void InsertRest1(GtkAction *action, gpointer param);
152 void SetDur1(GtkAction *action, gpointer param);
153 void Dur2(GtkAction *action, gpointer param);
154 void ChangeDur2(GtkAction *action, gpointer param);
155 void InsertDur2(GtkAction *action, gpointer param);
156 void InsertRest2(GtkAction *action, gpointer param);
157 void SetDur2(GtkAction *action, gpointer param);
158 void Dur3(GtkAction *action, gpointer param);
159 void ChangeDur3(GtkAction *action, gpointer param);
160 void InsertDur3(GtkAction *action, gpointer param);
161 void InsertRest3(GtkAction *action, gpointer param);
162 void SetDur3(GtkAction *action, gpointer param);
163 void Dur4(GtkAction *action, gpointer param);
164 void ChangeDur4(GtkAction *action, gpointer param);
165 void InsertDur4(GtkAction *action, gpointer param);
166 void InsertRest4(GtkAction *action, gpointer param);
167 void SetDur4(GtkAction *action, gpointer param);
168 void Dur5(GtkAction *action, gpointer param);
169 void ChangeDur5(GtkAction *action, gpointer param);
170 void InsertDur5(GtkAction *action, gpointer param);
171 void InsertRest5(GtkAction *action, gpointer param);
172 void SetDur5(GtkAction *action, gpointer param);
173 void Dur6(GtkAction *action, gpointer param);
174 void ChangeDur6(GtkAction *action, gpointer param);
175 void InsertDur6(GtkAction *action, gpointer param);
176 void InsertRest6(GtkAction *action, gpointer param);
177 void SetDur6(GtkAction *action, gpointer param);
178 void Dur7(GtkAction *action, gpointer param);
179 void ChangeDur7(GtkAction *action, gpointer param);
180 void InsertDur7(GtkAction *action, gpointer param);
181 void InsertRest7(GtkAction *action, gpointer param);
182 void SetDur7(GtkAction *action, gpointer param);
183 void Dur8(GtkAction *action, gpointer param);
184 void ChangeDur8(GtkAction *action, gpointer param);
185 void InsertDur8(GtkAction *action, gpointer param);
186 void InsertRest8(GtkAction *action, gpointer param);
187 void SetDur8(GtkAction *action, gpointer param);
188 void InsertA(GtkAction *action, gpointer param);
189 void AddNoteA(GtkAction *action, gpointer param);
190 void AddA(GtkAction *action, gpointer param);
191 void ChangeToA(GtkAction *action, gpointer param);
192 void MoveToA(GtkAction *action, gpointer param);
193 void InsertB(GtkAction *action, gpointer param);
194 void AddNoteB(GtkAction *action, gpointer param);
195 void AddB(GtkAction *action, gpointer param);
196 void ChangeToB(GtkAction *action, gpointer param);
197 void MoveToB(GtkAction *action, gpointer param);
198 void InsertC(GtkAction *action, gpointer param);
199 void AddNoteC(GtkAction *action, gpointer param);
200 void AddC(GtkAction *action, gpointer param);
201 void ChangeToC(GtkAction *action, gpointer param);
202 void MoveToC(GtkAction *action, gpointer param);
203 void InsertD(GtkAction *action, gpointer param);
204 void AddNoteD(GtkAction *action, gpointer param);
205 void AddD(GtkAction *action, gpointer param);
206 void ChangeToD(GtkAction *action, gpointer param);
207 void MoveToD(GtkAction *action, gpointer param);
208 void InsertE(GtkAction *action, gpointer param);
209 void AddNoteE(GtkAction *action, gpointer param);
210 void AddE(GtkAction *action, gpointer param);
211 void ChangeToE(GtkAction *action, gpointer param);
212 void MoveToE(GtkAction *action, gpointer param);
213 void InsertF(GtkAction *action, gpointer param);
214 void AddNoteF(GtkAction *action, gpointer param);
215 void AddF(GtkAction *action, gpointer param);
216 void ChangeToF(GtkAction *action, gpointer param);
217 void MoveToF(GtkAction *action, gpointer param);
218 void InsertG(GtkAction *action, gpointer param);
219 void AddNoteG(GtkAction *action, gpointer param);
220 void AddG(GtkAction *action, gpointer param);
221 void ChangeToG(GtkAction *action, gpointer param);
222 void MoveToG(GtkAction *action, gpointer param);
223 #endif //KEYRESPONSES_H
224