diff options
author | Michal Ratajsky <[email protected]> | 2014-05-25 15:07:48 +0200 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-05-25 15:07:48 +0200 |
commit | f594ba9dea7bbf1ae262f28a949bc50a7444b528 (patch) | |
tree | a9eaa6981b60c6c234bd94d4d06fbeca8d6c2943 /libmatemixer/matemixer-enum-types.c | |
parent | 4db8dc0cbb3959d6278a9e7650d5103a475ab897 (diff) | |
download | libmatemixer-f594ba9dea7bbf1ae262f28a949bc50a7444b528.tar.bz2 libmatemixer-f594ba9dea7bbf1ae262f28a949bc50a7444b528.tar.xz |
Fix enum types
Diffstat (limited to 'libmatemixer/matemixer-enum-types.c')
-rw-r--r-- | libmatemixer/matemixer-enum-types.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/libmatemixer/matemixer-enum-types.c b/libmatemixer/matemixer-enum-types.c new file mode 100644 index 0000000..390e32d --- /dev/null +++ b/libmatemixer/matemixer-enum-types.c @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2014 Michal Ratajsky <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the licence, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#include "matemixer-enum-types.h" +#include "matemixer-enums.h" + +/* + * GTypes are not generated by glib-mkenums, see: + * https://bugzilla.gnome.org/show_bug.cgi?id=621942 + */ + +GType +mate_mixer_backend_type_get_type (void) +{ + static GType etype = 0; + + if (etype == 0) { + static const GEnumValue values[] = { + { MATE_MIXER_BACKEND_TYPE_UNKNOWN, "MATE_MIXER_BACKEND_TYPE_UNKNOWN", "unknown" }, + { MATE_MIXER_BACKEND_TYPE_PULSE, "MATE_MIXER_BACKEND_TYPE_PULSE", "pulse" }, + { MATE_MIXER_BACKEND_TYPE_NULL, "MATE_MIXER_BACKEND_TYPE_NULL", "null" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ( + g_intern_static_string ("MateMixerBackendType"), + values); + } + return etype; +} + +GType +mate_mixer_device_port_direction_get_type (void) +{ + static GType etype = 0; + + if (etype == 0) { + static const GFlagsValue values[] = { + { MATE_MIXER_DEVICE_PORT_DIRECTION_INPUT, "MATE_MIXER_DEVICE_PORT_DIRECTION_INPUT", "input" }, + { MATE_MIXER_DEVICE_PORT_DIRECTION_OUTPUT, "MATE_MIXER_DEVICE_PORT_DIRECTION_OUTPUT", "output" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ( + g_intern_static_string ("MateMixerDevicePortDirection"), + values); + } + return etype; +} + +GType +mate_mixer_device_port_status_get_type (void) +{ + static GType etype = 0; + + if (etype == 0) { + static const GFlagsValue values[] = { + { MATE_MIXER_DEVICE_PORT_STATUS_AVAILABLE, "MATE_MIXER_DEVICE_PORT_STATUS_AVAILABLE", "available" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ( + g_intern_static_string ("MateMixerDevicePortStatus"), + values); + } + return etype; +} |