Optimize the common cases (init == NULL or init == "") a bit. replace uses
[platform/upstream/glib.git] / gobject / gparam.h
index 4ac8286..3fbea4b 100644 (file)
  *
  * gparam.h: GParamSpec base class implementation
  */
+#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
+#error "Only <glib-object.h> can be included directly."
+#endif
+
 #ifndef __G_PARAM_H__
 #define __G_PARAM_H__
 
-
 #include       <gobject/gvalue.h>
 
 G_BEGIN_DECLS
@@ -95,6 +98,7 @@ struct _GParamSpecClass
   gint          (*values_cmp)           (GParamSpec   *pspec,
                                         const GValue *value1,
                                         const GValue *value2);
+  gpointer       dummy[4];
 };
 struct _GParameter /* auxillary structure for _setv() variants */
 {
@@ -131,15 +135,20 @@ gboolean  g_param_value_convert           (GParamSpec    *pspec,
 gint           g_param_values_cmp              (GParamSpec    *pspec,
                                                 const GValue  *value1,
                                                 const GValue  *value2);
-G_CONST_RETURN gchar*  g_param_get_name        (GParamSpec    *pspec);
-G_CONST_RETURN gchar*  g_param_get_nick        (GParamSpec    *pspec);
-G_CONST_RETURN gchar*  g_param_get_blurb       (GParamSpec    *pspec);
+G_CONST_RETURN gchar*  g_param_spec_get_name   (GParamSpec    *pspec);
+G_CONST_RETURN gchar*  g_param_spec_get_nick   (GParamSpec    *pspec);
+G_CONST_RETURN gchar*  g_param_spec_get_blurb  (GParamSpec    *pspec);
 void            g_value_set_param               (GValue               *value,
                                                 GParamSpec    *param);
 GParamSpec*     g_value_get_param               (const GValue  *value);
 GParamSpec*     g_value_dup_param               (const GValue  *value);
 
 
+/* --- marshaller specific --- */
+void           g_value_set_param_take_ownership (GValue        *value,
+                                                GParamSpec    *param);
+
+
 /* --- convenience functions --- */
 typedef struct _GParamSpecTypeInfo GParamSpecTypeInfo;
 struct _GParamSpecTypeInfo
@@ -163,6 +172,11 @@ struct _GParamSpecTypeInfo
 GType  g_param_type_register_static    (const gchar              *name,
                                         const GParamSpecTypeInfo *pspec_info);
 
+/* For registering builting types */
+GType  _g_param_type_register_static_constant (const gchar              *name,
+                                              const GParamSpecTypeInfo *pspec_info,
+                                              GType                     opt_type);
+
 
 /* --- protected --- */
 gpointer       g_param_spec_internal           (GType          param_type,