Name
Parameter Specifications --
Synopsis
#include <gobject.h>
struct GParamSpec;
struct GParamSpecClass;
#define G_PARAM_SPEC_TYPE (pspec)
#define G_PARAM_SPEC_TYPE_NAME (pspec)
#define G_PARAM_SPEC (pspec)
#define G_IS_PARAM_SPEC (pspec)
#define G_PARAM_SPEC_GET_CLASS (pspec)
#define G_PARAM_SPEC_VALUE_TYPE (pspec)
#define G_TYPE_IS_PARAM (type)
#define G_PARAM_READWRITE
#define G_PARAM_MASK
#define G_PARAM_USER_SHIFT
enum GParamFlags;
GParamSpec* g_param_spec_ref (GParamSpec *pspec);
void g_param_spec_unref (GParamSpec *pspec);
void g_param_spec_sink (GParamSpec *pspec);
gpointer g_param_spec_get_qdata (GParamSpec *pspec,
GQuark quark);
void g_param_spec_set_qdata (GParamSpec *pspec,
GQuark quark,
gpointer data);
void g_param_spec_set_qdata_full (GParamSpec *pspec,
GQuark quark,
gpointer data,
GDestroyNotify destroy);
gpointer g_param_spec_steal_qdata (GParamSpec *pspec,
GQuark quark);
void g_param_value_set_default (GParamSpec *pspec,
GValue *value);
gboolean g_param_value_defaults (GParamSpec *pspec,
GValue *value);
gboolean g_param_value_validate (GParamSpec *pspec,
GValue *value);
gint g_param_values_cmp (GParamSpec *pspec,
const GValue *value1,
const GValue *value2);
struct GParamSpecTypeInfo;
GType g_param_type_register_static (const gchar *name,
const GParamSpecTypeInfo *pspec_info);
struct GParamSpecPool;
GParamSpecPool* g_param_spec_pool_new (gboolean type_prefixing);
void g_param_spec_pool_insert (GParamSpecPool *pool,
GParamSpec *pspec,
GType owner_type);
void g_param_spec_pool_remove (GParamSpecPool *pool,
GParamSpec *pspec);
GParamSpec* g_param_spec_pool_lookup (GParamSpecPool *pool,
const gchar *param_name,
GType owner_type,
gboolean walk_ancestors);
gpointer g_param_spec_internal (GType param_type,
const gchar *name,
const gchar *nick,
const gchar *blurb,
GParamFlags flags); |
Details
struct GParamSpec
struct GParamSpec
{
GTypeInstance g_type_instance;
gchar *name;
gchar *nick;
gchar *blurb;
GParamFlags flags;
GType value_type;
GType owner_type; /* class using this property */
/*< private >*/
GData *qdata;
guint ref_count;
guint param_id; /* sort-criteria */
}; |
G_PARAM_SPEC_TYPE()
#define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec)) |
G_PARAM_SPEC_TYPE_NAME()
#define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec))) |
G_PARAM_SPEC()
#define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec)) |
G_IS_PARAM_SPEC()
#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM)) |
G_PARAM_SPEC_GET_CLASS()
#define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass)) |
G_PARAM_SPEC_VALUE_TYPE()
#define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type) |
G_TYPE_IS_PARAM()
#define G_TYPE_IS_PARAM(type) |
G_PARAM_READWRITE
#define G_PARAM_READWRITE (G_PARAM_READABLE | G_PARAM_WRITABLE) |
G_PARAM_MASK
#define G_PARAM_MASK (0x000000ff) |
G_PARAM_USER_SHIFT
#define G_PARAM_USER_SHIFT (8) |
enum GParamFlags
typedef enum
{
G_PARAM_READABLE = 1 << 0,
G_PARAM_WRITABLE = 1 << 1,
G_PARAM_CONSTRUCT = 1 << 2,
G_PARAM_CONSTRUCT_ONLY = 1 << 3,
G_PARAM_LAX_VALIDATION = 1 << 4,
G_PARAM_PRIVATE = 1 << 5
} GParamFlags; |
g_param_spec_get_qdata ()
g_param_spec_set_qdata ()
g_param_spec_set_qdata_full ()
g_param_spec_steal_qdata ()
g_param_value_set_default ()
g_param_value_defaults ()
g_param_value_validate ()
struct GParamSpecTypeInfo
struct GParamSpecTypeInfo
{
/* type system portion */
guint16 instance_size; /* obligatory */
guint16 n_preallocs; /* optional */
void (*instance_init) (GParamSpec *pspec); /* optional */
/* class portion */
GType value_type; /* obligatory */
void (*finalize) (GParamSpec *pspec); /* optional */
void (*value_set_default) (GParamSpec *pspec, /* recommended */
GValue *value);
gboolean (*value_validate) (GParamSpec *pspec, /* optional */
GValue *value);
gint (*values_cmp) (GParamSpec *pspec, /* recommended */
const GValue *value1,
const GValue *value2);
}; |
g_param_type_register_static ()
g_param_spec_pool_insert ()
g_param_spec_pool_remove ()
g_param_spec_pool_lookup ()