summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@src.gnome.org>2010-03-10 07:56:23 +0100
committerVincent Untz <vuntz@gnome.org>2010-04-08 15:35:52 +0200
commit82c7342531d4f991d436c220825a68c9e5868eef (patch)
tree17c42134c11798085507cac43d032da83121e441
parent7c18f17b0c9556dab4502beca4ea9a4e425449b9 (diff)
downloadgconf-82c7342531d4f991d436c220825a68c9e5868eef.tar.gz
Add boxed types for GConfEntry and GConfValue
Without a GType, these are unavailable to gobject-introspection. https://bugzilla.gnome.org/show_bug.cgi?id=613247
-rw-r--r--gconf/gconf-value.c24
-rw-r--r--gconf/gconf-value.h3
2 files changed, 27 insertions, 0 deletions
diff --git a/gconf/gconf-value.c b/gconf/gconf-value.c
index e941eb4c..499403db 100644
--- a/gconf/gconf-value.c
+++ b/gconf/gconf-value.c
@@ -710,6 +710,18 @@ copy_value_list(GSList* list)
return copy;
}
+GType
+gconf_value_get_type ()
+{
+ static GType type = 0;
+
+ if (type == 0)
+ type = g_boxed_type_register_static (g_intern_static_string ("GConfValue"),
+ (GBoxedCopyFunc) gconf_value_copy,
+ (GBoxedFreeFunc) gconf_value_free);
+ return type;
+}
+
GConfValue*
gconf_value_copy (const GConfValue* src)
{
@@ -1439,6 +1451,18 @@ typedef struct {
#define REAL_ENTRY(x) ((GConfRealEntry*)(x))
+GType
+gconf_entry_get_type ()
+{
+ static GType type = 0;
+
+ if (type == 0)
+ type = g_boxed_type_register_static (g_intern_static_string ("GConfEntry"),
+ (GBoxedCopyFunc) gconf_entry_ref,
+ (GBoxedFreeFunc) gconf_entry_unref);
+ return type;
+}
+
GConfEntry*
gconf_entry_new (const char *key,
const GConfValue *val)
diff --git a/gconf/gconf-value.h b/gconf/gconf-value.h
index f8d2f229..1f575107 100644
--- a/gconf/gconf-value.h
+++ b/gconf/gconf-value.h
@@ -22,6 +22,7 @@
#define GCONF_GCONF_VALUE_H
#include <glib.h>
+#include <glib-object.h>
#include "gconf-error.h"
G_BEGIN_DECLS
@@ -76,6 +77,7 @@ GConfValue* gconf_value_new_from_string (GConfValueType type,
const gchar* str,
GError** err);
+GType gconf_value_get_type (void) G_GNUC_CONST;
GConfValue* gconf_value_copy (const GConfValue* src);
void gconf_value_free (GConfValue* value);
@@ -163,6 +165,7 @@ struct _GConfEntry {
GConfValue *value;
};
+GType gconf_entry_get_type (void) G_GNUC_CONST;
const char* gconf_entry_get_key (const GConfEntry *entry);
GConfValue* gconf_entry_get_value (const GConfEntry *entry);
const char* gconf_entry_get_schema_name (const GConfEntry *entry);