Parameter Specifications

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);

Description

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 */
};


struct GParamSpecClass

struct GParamSpecClass;


G_PARAM_SPEC_TYPE()

#define G_PARAM_SPEC_TYPE(pspec)	(G_TYPE_FROM_INSTANCE (pspec))

pspec : 


G_PARAM_SPEC_TYPE_NAME()

#define G_PARAM_SPEC_TYPE_NAME(pspec)	(g_type_name (G_PARAM_SPEC_TYPE (pspec)))

pspec : 


G_PARAM_SPEC()

#define G_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))

pspec : 


G_IS_PARAM_SPEC()

#define G_IS_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))

pspec : 


G_PARAM_SPEC_GET_CLASS()

#define G_PARAM_SPEC_GET_CLASS(pspec)	(G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))

pspec : 


G_PARAM_SPEC_VALUE_TYPE()

#define	G_PARAM_SPEC_VALUE_TYPE(pspec)	(G_PARAM_SPEC (pspec)->value_type)

pspec : 


G_TYPE_IS_PARAM()

#define     G_TYPE_IS_PARAM(type)

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_ref ()

GParamSpec* g_param_spec_ref                (GParamSpec *pspec);

pspec : 
Returns : 


g_param_spec_unref ()

void        g_param_spec_unref              (GParamSpec *pspec);

pspec : 


g_param_spec_sink ()

void        g_param_spec_sink               (GParamSpec *pspec);

pspec : 


g_param_spec_get_qdata ()

gpointer    g_param_spec_get_qdata          (GParamSpec *pspec,
                                             GQuark quark);

pspec : 
quark : 
Returns : 


g_param_spec_set_qdata ()

void        g_param_spec_set_qdata          (GParamSpec *pspec,
                                             GQuark quark,
                                             gpointer data);

pspec : 
quark : 
data : 


g_param_spec_set_qdata_full ()

void        g_param_spec_set_qdata_full     (GParamSpec *pspec,
                                             GQuark quark,
                                             gpointer data,
                                             GDestroyNotify destroy);

pspec : 
quark : 
data : 
destroy : 


g_param_spec_steal_qdata ()

gpointer    g_param_spec_steal_qdata        (GParamSpec *pspec,
                                             GQuark quark);

pspec : 
quark : 
Returns : 


g_param_value_set_default ()

void        g_param_value_set_default       (GParamSpec *pspec,
                                             GValue *value);

pspec : 
value : 


g_param_value_defaults ()

gboolean    g_param_value_defaults          (GParamSpec *pspec,
                                             GValue *value);

pspec : 
value : 
Returns : 


g_param_value_validate ()

gboolean    g_param_value_validate          (GParamSpec *pspec,
                                             GValue *value);

pspec : 
value : 
Returns : 


g_param_values_cmp ()

gint        g_param_values_cmp              (GParamSpec *pspec,
                                             const GValue *value1,
                                             const GValue *value2);

pspec : 
value1 : 
value2 : 
Returns : 


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 ()

GType       g_param_type_register_static    (const gchar *name,
                                             const GParamSpecTypeInfo *pspec_info);

name : 
pspec_info : 
Returns : 


struct GParamSpecPool

struct GParamSpecPool;


g_param_spec_pool_new ()

GParamSpecPool* g_param_spec_pool_new       (gboolean type_prefixing);

type_prefixing : 
Returns : 


g_param_spec_pool_insert ()

void        g_param_spec_pool_insert        (GParamSpecPool *pool,
                                             GParamSpec *pspec,
                                             GType owner_type);

pool : 
pspec : 
owner_type : 


g_param_spec_pool_remove ()

void        g_param_spec_pool_remove        (GParamSpecPool *pool,
                                             GParamSpec *pspec);

pool : 
pspec : 


g_param_spec_pool_lookup ()

GParamSpec* g_param_spec_pool_lookup        (GParamSpecPool *pool,
                                             const gchar *param_name,
                                             GType owner_type,
                                             gboolean walk_ancestors);

pool : 
param_name : 
owner_type : 
walk_ancestors : 
Returns : 


g_param_spec_internal ()

gpointer    g_param_spec_internal           (GType param_type,
                                             const gchar *name,
                                             const gchar *nick,
                                             const gchar *blurb,
                                             GParamFlags flags);

param_type : 
name : 
nick : 
blurb : 
flags : 
Returns :