]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: event_data_note: change function signature to return nothing
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 4 Apr 2020 04:47:47 +0000 (13:47 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Sat, 4 Apr 2020 05:29:02 +0000 (14:29 +0900)
The alsa-gobject project has a loose convention to have functions
returning nothing.

Fixes: 9d7d6ebe8439: ("seq: event_data_note: add accessor methods")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/seq/event-data-note.c
src/seq/event-data-note.h

index acf270da1b160e3e26a26196efe21adc06198e15..3f672dbe3a2216405e9e508d4b87a615115b53a3 100644 (file)
@@ -11,14 +11,14 @@ G_DEFINE_BOXED_TYPE(ALSASeqEventDataNote, alsaseq_event_data_note, seq_event_dat
 /**
  * alsaseq_event_data_note_get_channel:
  * @self: A #ALSASeqEventDataNote.
+ * @channel: (out): The value of channel in the note event.
  *
  * Get the value of channel in the note event.
- *
- * Returns: the value of channel in the note event.
  */
-guint8 alsaseq_event_data_note_get_channel(ALSASeqEventDataNote *self)
+void alsaseq_event_data_note_get_channel(ALSASeqEventDataNote *self,
+                                         guint8 *channel)
 {
-    return self->channel;
+    *channel = self->channel;
 }
 
 /**
@@ -37,14 +37,13 @@ void alsaseq_event_data_note_set_channel(ALSASeqEventDataNote *self,
 /**
  * alsaseq_event_data_note_get_note:
  * @self: A #ALSASeqEventDataNote.
+ * @note: (out): The value of note in the note event.
  *
  * Get the value of note in the note event.
- *
- * Returns: the value of note in the note event.
  */
-guint8 alsaseq_event_data_note_get_note(ALSASeqEventDataNote *self)
+void alsaseq_event_data_note_get_note(ALSASeqEventDataNote *self, guint8 *note)
 {
-    return self->note;
+    *note = self->note;
 }
 
 /**
@@ -62,14 +61,14 @@ void alsaseq_event_data_note_set_note(ALSASeqEventDataNote *self, guint8 note)
 /**
  * alsaseq_event_data_note_get_velocity:
  * @self: A #ALSASeqEventDataNote.
+ * @velocity: (out): The value of velocity in the note event.
  *
  * Get the value of velocity in the note event.
- *
- * Returns: the value of velocity in the note event.
  */
-guint8 alsaseq_event_data_note_get_velocity(ALSASeqEventDataNote *self)
+void alsaseq_event_data_note_get_velocity(ALSASeqEventDataNote *self,
+                                          guint8 *velocity)
 {
-    return self->velocity;
+    *velocity = self->velocity;
 }
 
 /**
@@ -88,14 +87,14 @@ void alsaseq_event_data_note_set_velocity(ALSASeqEventDataNote *self,
 /**
  * alsaseq_event_data_note_get_off_velocity:
  * @self: A #ALSASeqEventDataNote.
+ * @off_velocity: (out): The value of off-velocity in the note event.
  *
  * Get the value of off-velocity in the note event.
- *
- * Returns: the value of off-velocity in the note event.
  */
-guint8 alsaseq_event_data_note_get_off_velocity(ALSASeqEventDataNote *self)
+void alsaseq_event_data_note_get_off_velocity(ALSASeqEventDataNote *self,
+                                              guint8 *off_velocity)
 {
-    return self->off_velocity;
+    *off_velocity = self->off_velocity;
 }
 
 /**
@@ -114,14 +113,14 @@ void alsaseq_event_data_note_set_off_velocity(ALSASeqEventDataNote *self,
 /**
  * alsaseq_event_data_note_get_duration:
  * @self: A #ALSASeqEventDataNote.
+ * @duration: (out): The value of duratino in the note event.
  *
  * Get the value of duration in the note event.
- *
- * Returns: the value of duratino in the note event.
  */
-guint8 alsaseq_event_data_note_get_duration(ALSASeqEventDataNote *self)
+void alsaseq_event_data_note_get_duration(ALSASeqEventDataNote *self,
+                                          guint8 *duration)
 {
-    return self->duration;
+    *duration = self->duration;
 }
 
 /**
index cd21b04e5253fe0bf5aed1ca650fc4b8e57263ea..64d2c334c62fd631e1e72d82717359806e14169f 100644 (file)
@@ -15,22 +15,26 @@ typedef struct snd_seq_ev_note ALSASeqEventDataNote;
 
 GType alsaseq_event_data_note_get_type() G_GNUC_CONST;
 
-guint8 alsaseq_event_data_note_get_channel(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_get_channel(ALSASeqEventDataNote *self,
+                                         guint8 *channel);
 void alsaseq_event_data_note_set_channel(ALSASeqEventDataNote *self,
                                          guint8 channel);
 
-guint8 alsaseq_event_data_note_get_note(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_get_note(ALSASeqEventDataNote *self, guint8 *note);
 void alsaseq_event_data_note_set_note(ALSASeqEventDataNote *self, guint8 note);
 
-guint8 alsaseq_event_data_note_get_velocity(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_get_velocity(ALSASeqEventDataNote *self,
+                                          guint8 *velocity);
 void alsaseq_event_data_note_set_velocity(ALSASeqEventDataNote *self,
                                           guint8 velocity);
 
-guint8 alsaseq_event_data_note_get_off_velocity(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_get_off_velocity(ALSASeqEventDataNote *self,
+                                              guint8 *off_velocity);
 void alsaseq_event_data_note_set_off_velocity(ALSASeqEventDataNote *self,
                                               guint8 off_velocity);
 
-guint8 alsaseq_event_data_note_get_duration(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_get_duration(ALSASeqEventDataNote *self,
+                                          guint8 *duration);
 void alsaseq_event_data_note_set_duration(ALSASeqEventDataNote *self,
                                           guint8 duration);