X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=gobject%2Fgenums.h;h=15c9d81fd9012c5c105e164fbd03e2af52583981;hb=459fee5e64d03de3f0660d529949a55f1de6b6fe;hp=bf8a4191e6f96afa9357562cd339e66393876202;hpb=d85b722734a6fcfe94032f6113de9e5c190fd7c3;p=platform%2Fupstream%2Fglib.git diff --git a/gobject/genums.h b/gobject/genums.h index bf8a419..15c9d81 100644 --- a/gobject/genums.h +++ b/gobject/genums.h @@ -12,17 +12,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . */ +#ifndef __G_ENUMS_H__ +#define __G_ENUMS_H__ + #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) #error "Only can be included directly." #endif -#ifndef __G_ENUMS_H__ -#define __G_ENUMS_H__ - #include G_BEGIN_DECLS @@ -217,23 +215,33 @@ struct _GFlagsValue /* --- prototypes --- */ +GLIB_AVAILABLE_IN_ALL GEnumValue* g_enum_get_value (GEnumClass *enum_class, gint value); +GLIB_AVAILABLE_IN_ALL GEnumValue* g_enum_get_value_by_name (GEnumClass *enum_class, const gchar *name); +GLIB_AVAILABLE_IN_ALL GEnumValue* g_enum_get_value_by_nick (GEnumClass *enum_class, const gchar *nick); +GLIB_AVAILABLE_IN_ALL GFlagsValue* g_flags_get_first_value (GFlagsClass *flags_class, guint value); +GLIB_AVAILABLE_IN_ALL GFlagsValue* g_flags_get_value_by_name (GFlagsClass *flags_class, const gchar *name); +GLIB_AVAILABLE_IN_ALL GFlagsValue* g_flags_get_value_by_nick (GFlagsClass *flags_class, const gchar *nick); +GLIB_AVAILABLE_IN_ALL void g_value_set_enum (GValue *value, gint v_enum); +GLIB_AVAILABLE_IN_ALL gint g_value_get_enum (const GValue *value); +GLIB_AVAILABLE_IN_ALL void g_value_set_flags (GValue *value, guint v_flags); +GLIB_AVAILABLE_IN_ALL guint g_value_get_flags (const GValue *value); @@ -242,16 +250,20 @@ guint g_value_get_flags (const GValue *value); /* const_static_values is a NULL terminated array of enum/flags * values that is taken over! */ +GLIB_AVAILABLE_IN_ALL GType g_enum_register_static (const gchar *name, const GEnumValue *const_static_values); +GLIB_AVAILABLE_IN_ALL GType g_flags_register_static (const gchar *name, const GFlagsValue *const_static_values); /* functions to complete the type information * for enums/flags implemented by plugins */ +GLIB_AVAILABLE_IN_ALL void g_enum_complete_type_info (GType g_enum_type, GTypeInfo *info, const GEnumValue *const_values); +GLIB_AVAILABLE_IN_ALL void g_flags_complete_type_info (GType g_flags_type, GTypeInfo *info, const GFlagsValue *const_values);