Add g_type_module_register_enum() and g_type_module_register_flags().
[platform/upstream/glib.git] / docs / reference / gobject / tmpl / gtypemodule.sgml
index 9f4c034..ed3cc58 100644 (file)
@@ -145,3 +145,42 @@ not be unloaded.
 @interface_info: type information structure
 
 
+<!-- ##### FUNCTION g_type_module_register_enum ##### -->
+<para>
+Looks up or registers an enumeration that is implemented with a particular
+type plugin. If a type with name @type_name was previously registered,
+the #GType identifier for the type is returned, otherwise the type
+is newly registered, and the resulting #GType identifier returned.
+</para>
+<para>
+As long as any instances of the type exist, the type plugin will
+not be unloaded.
+</para>
+
+@module:              a #GTypeModule
+@name:                name for the type
+@const_static_values: an array of #GEnumValue structs for the possible
+  enumeration values. The array is terminated by a struct with all 
+  members being 0.
+@Returns: the new or existing type ID
+@Since: 2.6
+
+<!-- ##### FUNCTION g_type_module_register_flags ##### -->
+<para>
+Looks up or registers a flags type that is implemented with a particular
+type plugin. If a type with name @type_name was previously registered,
+the #GType identifier for the type is returned, otherwise the type
+is newly registered, and the resulting #GType identifier returned.
+</para>
+<para>
+As long as any instances of the type exist, the type plugin will
+not be unloaded.
+</para>
+
+@module:              a #GTypeModule
+@name:                name for the type
+@const_static_values: an array of #GFlagsValue structs for the possible
+  flags values. The array is terminated by a struct with all 
+  members being 0.
+@Returns: the new or existing type ID
+@Since: 2.6