]> git.cworth.org Git - scherzo/blobdiff - score.c
Don't queue up as many widget redraws.
[scherzo] / score.c
diff --git a/score.c b/score.c
index b2866096e3c0183c254ae6ae3838e9325c637dcb..0c9d5f37cb37e20d9913e0601ef4b66246ccf777 100644 (file)
--- a/score.c
+++ b/score.c
@@ -58,13 +58,6 @@ struct score
     int num_staves;
 };
 
-typedef struct score_note
-{
-    score_pitch_t pitch;
-    int octave;
-    score_duration_t duration;
-} score_note_t;
-
 score_t *
 score_create (void *ctx)
 {
@@ -373,10 +366,10 @@ score_add_staff (score_t *score, score_clef_t clef)
 }
 
 score_note_t *
-score_staff_add_note (score_staff_t *staff,
-                     score_pitch_t pitch,
-                     int octave,
-                     score_duration_t duration)
+score_add_note (score_staff_t *staff,
+               score_pitch_t pitch,
+               int octave,
+               score_duration_t duration)
 {
     score_note_t *note;
 
@@ -384,6 +377,7 @@ score_staff_add_note (score_staff_t *staff,
     if (note == NULL)
        return NULL;
 
+    note->staff = staff;
     note->pitch = pitch;
     note->octave = octave;
     note->duration = duration;
@@ -404,8 +398,9 @@ score_staff_add_note (score_staff_t *staff,
 }
 
 void
-score_staff_remove_note (score_staff_t *staff, score_note_t *note)
+score_remove_note (score_note_t *note)
 {
+    score_staff_t *staff = note->staff;
     int i;
 
     for (i = 0; i < staff->num_notes; i++)