From: Takashi Sakamoto Date: Wed, 11 Dec 2019 10:04:03 +0000 (+0900) Subject: ctl: elem_info_iec60958: add constructor X-Git-Tag: v0.1.0~403 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d605b9e2a7efeb1f8f10acb4231bc9291cd9153d;p=alsa-gobject.git ctl: elem_info_iec60958: add constructor --- diff --git a/src/ctl/alsactl.map b/src/ctl/alsactl.map index 962bb41..f4f617e 100644 --- a/src/ctl/alsactl.map +++ b/src/ctl/alsactl.map @@ -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: *; }; diff --git a/src/ctl/elem-info-iec60958.c b/src/ctl/elem-info-iec60958.c index ddfd1d4..75b3d74 100644 --- a/src/ctl/elem-info-iec60958.c +++ b/src/ctl/elem-info-iec60958.c @@ -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); +} diff --git a/src/ctl/elem-info-iec60958.h b/src/ctl/elem-info-iec60958.h index 4ea57c0..c1ac7ca 100644 --- a/src/ctl/elem-info-iec60958.h +++ b/src/ctl/elem-info-iec60958.h @@ -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 diff --git a/tests/alsactl-elem-info-iec60958 b/tests/alsactl-elem-info-iec60958 index b310bb8..9e30f31 100644 --- a/tests/alsactl-elem-info-iec60958 +++ b/tests/alsactl-elem-info-iec60958 @@ -11,7 +11,9 @@ from gi.repository import ALSACtl target = ALSACtl.ElemInfoIec60958() props = () -methods = () +methods = ( + 'new', +) signals = () if not test(target, props, methods, signals):