]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: event_cntr: add GObject-derived object to represent container for a batch of...
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 8 Jun 2020 14:10:10 +0000 (23:10 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Tue, 9 Jun 2020 00:16:09 +0000 (09:16 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/seq/alsaseq.map
src/seq/event-cntr.c [new file with mode: 0644]
src/seq/event-cntr.h [new file with mode: 0644]
src/seq/meson.build

index f002ff121bfaba4fe1a44c96d57346f0d4b568b8..09985d38b98ab684aba1d729836e0b2caba384bc 100644 (file)
@@ -169,6 +169,8 @@ ALSA_GOBJECT_0_0_0 {
     "alsaseq_remove_filter_new_with_tag";
     "alsaseq_remove_filter_new_with_tick_time";
     "alsaseq_remove_filter_new_with_real_time";
+
+    "alsaseq_event_cntr_get_type";
   local:
     *;
 };
diff --git a/src/seq/event-cntr.c b/src/seq/event-cntr.c
new file mode 100644 (file)
index 0000000..7d96ff5
--- /dev/null
@@ -0,0 +1,13 @@
+#include "event-cntr.h"
+
+G_DEFINE_TYPE(ALSASeqEventCntr, alsaseq_event_cntr, G_TYPE_OBJECT)
+
+static void alsaseq_event_cntr_class_init(ALSASeqEventCntrClass *klass)
+{
+    return;
+}
+
+static void alsaseq_event_cntr_init(ALSASeqEventCntr *self)
+{
+    return;
+}
diff --git a/src/seq/event-cntr.h b/src/seq/event-cntr.h
new file mode 100644 (file)
index 0000000..8a6ca85
--- /dev/null
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: LGPL-3.0-or-later
+#ifndef __ALSA_GOBJECT_ALSASEQ_EVENT_CNTR__H__
+#define __ALSA_GOBJECT_ALSASEQ_EVENT_CNTR__H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define ALSASEQ_TYPE_EVENT_CNTR     (alsaseq_event_cntr_get_type())
+
+#define ALSASEQ_EVENT_CNTR(obj)                             \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj),                      \
+                                ALSASEQ_TYPE_EVENT_CNTR,    \
+                                ALSASeqEventCntr))
+#define ALSASEQ_IS_EVENT_CNTR(obj)                          \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj),                      \
+                                ALSASEQ_TYPE_EVENT_CNTR))
+
+#define ALSASEQ_EVENT_CNTR_CLASS(klass)                     \
+    (G_TYPE_CHECK_CLASS_CAST((klass),                       \
+                             ALSASEQ_TYPE_EVENT_CNTR,       \
+                             ALSASeqEventCntrClass))
+#define ALSASEQ_IS_EVENT_CNTR_CLASS(klass)                  \
+    (G_TYPE_CHECK_CLASS_TYPE((klass),                       \
+                             ALSASEQ_TYPE_EVENT_CNTR))
+#define ALSASEQ_EVENT_CNTR_GET_CLASS(obj)                   \
+    (G_TYPE_INSTANCE_GET_CLASS((obj),                       \
+                               ALSASEQ_TYPE_EVENT_CNTR,     \
+                               ALSASeqEventCntrClass))
+
+typedef struct _ALSASeqEventCntr            ALSASeqEventCntr;
+typedef struct _ALSASeqEventCntrClass       ALSASeqEventCntrClass;
+
+struct _ALSASeqEventCntr {
+    GObject parent_instance;
+};
+
+struct _ALSASeqEventCntrClass {
+    GObjectClass parent_class;
+};
+
+GType alsaseq_event_cntr_get_type() G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif
index 8907b80d650d579b2f043ce1df659810b478c30f..03e2244f92416480ea5b5815ede426d001503ca7 100644 (file)
@@ -32,6 +32,7 @@ sources = files(
   'queue-timer.c',
   'queue-timer-alsa.c',
   'remove-filter.c',
+  'event-cntr.c',
 )
 
 headers = files(
@@ -58,6 +59,7 @@ headers = files(
   'queue-timer.h',
   'queue-timer-alsa.h',
   'remove-filter.h',
+  'event-cntr.h',
 )
 
 privates = files(