summaryrefslogtreecommitdiff
path: root/gobject
diff options
context:
space:
mode:
authorPavel Holejsovsky <pholejs@src.gnome.org>2011-08-30 16:20:55 +0200
committerPavel Holejsovsky <pholejs@src.gnome.org>2011-08-31 09:37:51 +0200
commitfe4fc3e8b5a5ad8d4113c4df1fe8e0e9f295035e (patch)
tree7a39f65f1678edcdbdf5784aaf0c3e8d6d2b157a /gobject
parent3354b02ccdb5bdc714cdfbe9bbe9a10589c84153 (diff)
Make GMainLoop, GMainContext and GSource boxed types
Also add some annotations for better usage of these types in bindings. https://bugzilla.gnome.org/show_bug.cgi?id=657725
Diffstat (limited to 'gobject')
-rw-r--r--gobject/gboxed.c3
-rw-r--r--gobject/glib-types.h30
-rw-r--r--gobject/gobject.symbols3
3 files changed, 36 insertions, 0 deletions
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index 944ddc338..93415af40 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -145,6 +145,9 @@ G_DEFINE_BOXED_TYPE (GVariantBuilder, g_variant_builder, g_variant_builder_ref,
G_DEFINE_BOXED_TYPE (GError, g_error, g_error_copy, g_error_free)
G_DEFINE_BOXED_TYPE (GDateTime, g_date_time, g_date_time_ref, g_date_time_unref);
+G_DEFINE_BOXED_TYPE (GMainLoop, g_main_loop, g_main_loop_ref, g_main_loop_unref)
+G_DEFINE_BOXED_TYPE (GMainContext, g_main_context, g_main_context_ref, g_main_context_unref)
+G_DEFINE_BOXED_TYPE (GSource, g_source, g_source_ref, g_source_unref)
/* This one can't use G_DEFINE_BOXED_TYPE (GStrv, g_strv, g_strdupv, g_strfreev) */
GType
diff --git a/gobject/glib-types.h b/gobject/glib-types.h
index db511e667..a4826caa0 100644
--- a/gobject/glib-types.h
+++ b/gobject/glib-types.h
@@ -182,6 +182,33 @@ typedef gsize GType;
*/
#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
+/**
+ * G_TYPE_MAIN_LOOP:
+ *
+ * The #GType for a boxed type holding a #GMainLoop.
+ *
+ * Since: 2.30
+ */
+#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
+
+/**
+ * G_TYPE_MAIN_CONTEXT:
+ *
+ * The #GType for a boxed type holding a #GMainContext.
+ *
+ * Since: 2.30
+ */
+#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
+
+/**
+ * G_TYPE_SOURCE:
+ *
+ * The #GType for a boxed type holding a #GSource.
+ *
+ * Since: 2.30
+ */
+#define G_TYPE_SOURCE (g_source_get_type ())
+
GType g_date_get_type (void) G_GNUC_CONST;
GType g_strv_get_type (void) G_GNUC_CONST;
GType g_gstring_get_type (void) G_GNUC_CONST;
@@ -197,6 +224,9 @@ GType g_date_time_get_type (void) G_GNUC_CONST;
GType g_io_channel_get_type (void) G_GNUC_CONST;
GType g_io_condition_get_type (void) G_GNUC_CONST;
GType g_variant_builder_get_type (void) G_GNUC_CONST;
+GType g_main_loop_get_type (void) G_GNUC_CONST;
+GType g_main_context_get_type (void) G_GNUC_CONST;
+GType g_source_get_type (void) G_GNUC_CONST;
#if !defined(G_DISABLE_DEPRECATED) || defined(__GI_SCANNER__)
GType g_variant_get_gtype (void) G_GNUC_CONST;
diff --git a/gobject/gobject.symbols b/gobject/gobject.symbols
index 55494ab65..f03f551a8 100644
--- a/gobject/gobject.symbols
+++ b/gobject/gobject.symbols
@@ -27,6 +27,9 @@ g_regex_get_type
g_match_info_get_type
g_variant_builder_get_type
g_variant_type_get_gtype
+g_main_loop_get_type
+g_main_context_get_type
+g_source_get_type
g_closure_get_type
g_value_get_type
g_value_array_get_type