]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
ctl: elem_info_iec60958: add constructor
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 11 Dec 2019 10:04:03 +0000 (19:04 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 12 Dec 2019 05:29:12 +0000 (14:29 +0900)
src/ctl/alsactl.map
src/ctl/elem-info-iec60958.c
src/ctl/elem-info-iec60958.h
tests/alsactl-elem-info-iec60958

index 962bb413907353aba2c27723312528be26880b66..f4f617e2bf6d43f684582bd4869584c7bcfc25b1 100644 (file)
@@ -45,6 +45,7 @@ ALSA_GOBJECT_0_0_0 {
     "alsactl_elem_info_bytes_new";
 
     "alsactl_elem_info_iec60958_get_type";
+    "alsactl_elem_info_iec60958_new";
   local:
     *;
 };
index ddfd1d49935b6bee2084b4a191faa14baa9daba5..75b3d749fd070975e9d8798e7c43a45f52675579 100644 (file)
@@ -12,3 +12,16 @@ static void alsactl_elem_info_iec60958_init(ALSACtlElemInfoIec60958 *self)
 {
     return;
 }
+
+/**
+ * alsactl_elem_info_iec60958_new:
+ *
+ * Allocate and return an instance of ALSACtlElemInfoIec60958.
+ *
+ * Returns: (transfer full): A #ALSACtlElemInfoIec60958.
+ */
+ALSACtlElemInfoIec60958 *alsactl_elem_info_iec60958_new()
+{
+    return g_object_new(ALSACTL_TYPE_ELEM_INFO_IEC60958,
+                        "type", ALSACTL_ELEM_TYPE_IEC60958, NULL);
+}
index 4ea57c09cff6e50c4287a1c57dc51f3293eb98a5..c1ac7ca70fc32d4aeebd36ba9596611d5957a3b1 100644 (file)
@@ -44,6 +44,8 @@ struct _ALSACtlElemInfoIec60958Class {
 
 GType alsactl_elem_info_iec60958_get_type(void) G_GNUC_CONST;
 
+ALSACtlElemInfoIec60958 *alsactl_elem_info_iec60958_new();
+
 G_END_DECLS
 
 #endif
index b310bb85b4acb096acb8b64128af5cd1a855d37d..9e30f31eea5cbb3cb7f33eb2611be4a825df0ad1 100644 (file)
@@ -11,7 +11,9 @@ from gi.repository import ALSACtl
 
 target = ALSACtl.ElemInfoIec60958()
 props = ()
-methods = ()
+methods = (
+    'new',
+)
 signals = ()
 
 if not test(target, props, methods, signals):