Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gparam.h File Reference
#include <gobject/gvalue.h>

Go to the source code of this file.

Data Structures

struct  _GParamSpec
 
struct  _GParamSpecClass
 
struct  _GParameter
 
struct  _GParamSpecTypeInfo
 

Macros

#define G_TYPE_IS_PARAM(type)   (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
 
#define G_PARAM_SPEC(pspec)   (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
 
#define G_IS_PARAM_SPEC(pspec)   (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((pspec), G_TYPE_PARAM))
 
#define G_PARAM_SPEC_CLASS(pclass)   (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
 
#define G_IS_PARAM_SPEC_CLASS(pclass)   (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
 
#define G_PARAM_SPEC_GET_CLASS(pspec)   (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
 
#define G_PARAM_SPEC_TYPE(pspec)   (G_TYPE_FROM_INSTANCE (pspec))
 
#define G_PARAM_SPEC_TYPE_NAME(pspec)   (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
 
#define G_PARAM_SPEC_VALUE_TYPE(pspec)   (G_PARAM_SPEC (pspec)->value_type)
 
#define G_VALUE_HOLDS_PARAM(value)   (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
 
#define G_PARAM_STATIC_STRINGS   (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
 
#define G_PARAM_MASK   (0x000000ff)
 
#define G_PARAM_USER_SHIFT   (8)
 

Typedefs

typedef struct _GParamSpec GParamSpec
 
typedef struct _GParamSpecClass GParamSpecClass
 
typedef struct _GParamSpecPool GParamSpecPool
 

Enumerations

enum  GParamFlags {
  G_PARAM_READABLE = 1 << 0 , G_PARAM_WRITABLE = 1 << 1 , G_PARAM_READWRITE = (G_PARAM_READABLE | G_PARAM_WRITABLE) , G_PARAM_CONSTRUCT = 1 << 2 ,
  G_PARAM_CONSTRUCT_ONLY = 1 << 3 , G_PARAM_LAX_VALIDATION = 1 << 4 , G_PARAM_STATIC_NAME = 1 << 5 , GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26 = G_PARAM_STATIC_NAME ,
  G_PARAM_STATIC_NICK = 1 << 6 , G_PARAM_STATIC_BLURB = 1 << 7 , G_PARAM_EXPLICIT_NOTIFY = 1 << 30 , G_PARAM_DEPRECATED = (gint)(1u << 31)
}
 

: the parameter name

GParameter:

@value: the parameter value

The GParameter struct is an auxiliary structure used to hand parameter name/value pairs to g_object_newv().

Deprecated: 2.54: This type is not introspectable.

typedef struct _GParameter GParameter GOBJECT_DEPRECATED_TYPE_IN_2_54
 
typedef struct _GParamSpecTypeInfo GParamSpecTypeInfo
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecg_param_spec_ref (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_spec_unref (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_spec_sink (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecg_param_spec_ref_sink (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL gpointer g_param_spec_get_qdata (GParamSpec *pspec, GQuark quark)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_spec_set_qdata (GParamSpec *pspec, GQuark quark, gpointer data)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_spec_set_qdata_full (GParamSpec *pspec, GQuark quark, gpointer data, GDestroyNotify destroy)
 
GOBJECT_AVAILABLE_IN_ALL gpointer g_param_spec_steal_qdata (GParamSpec *pspec, GQuark quark)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecg_param_spec_get_redirect_target (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_value_set_default (GParamSpec *pspec, GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_param_value_defaults (GParamSpec *pspec, const GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_param_value_validate (GParamSpec *pspec, GValue *value)
 
GOBJECT_AVAILABLE_IN_2_74 gboolean g_param_value_is_valid (GParamSpec *pspec, const GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_param_value_convert (GParamSpec *pspec, const GValue *src_value, GValue *dest_value, gboolean strict_validation)
 
GOBJECT_AVAILABLE_IN_ALL gint g_param_values_cmp (GParamSpec *pspec, const GValue *value1, const GValue *value2)
 
GOBJECT_AVAILABLE_IN_ALL const gcharg_param_spec_get_name (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL const gcharg_param_spec_get_nick (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL const gcharg_param_spec_get_blurb (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL void g_value_set_param (GValue *value, GParamSpec *param)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecg_value_get_param (const GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecg_value_dup_param (const GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL void g_value_take_param (GValue *value, GParamSpec *param)
 
void g_value_set_param_take_ownership (GValue *value, GParamSpec *param)
 
GOBJECT_AVAILABLE_IN_2_36 const GValueg_param_spec_get_default_value (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_2_46 GQuark g_param_spec_get_name_quark (GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL GType g_param_type_register_static (const gchar *name, const GParamSpecTypeInfo *pspec_info)
 
GOBJECT_AVAILABLE_IN_2_66 gboolean g_param_spec_is_valid_name (const gchar *name)
 
GType _g_param_type_register_static_constant (const gchar *name, const GParamSpecTypeInfo *pspec_info, GType opt_type)
 
GOBJECT_AVAILABLE_IN_ALL gpointer g_param_spec_internal (GType param_type, const gchar *name, const gchar *nick, const gchar *blurb, GParamFlags flags)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecPoolg_param_spec_pool_new (gboolean type_prefixing)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_spec_pool_insert (GParamSpecPool *pool, GParamSpec *pspec, GType owner_type)
 
GOBJECT_AVAILABLE_IN_ALL void g_param_spec_pool_remove (GParamSpecPool *pool, GParamSpec *pspec)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpecg_param_spec_pool_lookup (GParamSpecPool *pool, const gchar *param_name, GType owner_type, gboolean walk_ancestors)
 
GOBJECT_AVAILABLE_IN_ALL GListg_param_spec_pool_list_owned (GParamSpecPool *pool, GType owner_type)
 
GOBJECT_AVAILABLE_IN_ALL GParamSpec ** g_param_spec_pool_list (GParamSpecPool *pool, GType owner_type, guint *n_pspecs_p)
 
GOBJECT_AVAILABLE_IN_2_80 void g_param_spec_pool_free (GParamSpecPool *pool)
 

Macro Definition Documentation

◆ G_IS_PARAM_SPEC

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

G_IS_PARAM_SPEC: @pspec: a GParamSpec

Checks whether @pspec "is a" valid GParamSpec structure of type G_TYPE_PARAM or derived.

Definition at line 56 of file gparam.h.

◆ G_IS_PARAM_SPEC_CLASS

#define G_IS_PARAM_SPEC_CLASS ( pclass)    (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))

G_IS_PARAM_SPEC_CLASS: @pclass: a GParamSpecClass

Checks whether @pclass "is a" valid GParamSpecClass structure of type G_TYPE_PARAM or derived.

Definition at line 74 of file gparam.h.

◆ G_PARAM_MASK

#define G_PARAM_MASK   (0x000000ff)

G_PARAM_MASK:

Mask containing the bits of GParamSpec.flags which are reserved for GLib.

Definition at line 192 of file gparam.h.

◆ G_PARAM_SPEC

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

G_PARAM_SPEC: @pspec: a valid GParamSpec

Casts a derived GParamSpec object (e.g. of type GParamSpecInt) into a GParamSpec object.

Definition at line 47 of file gparam.h.

◆ G_PARAM_SPEC_CLASS

#define G_PARAM_SPEC_CLASS ( pclass)    (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))

G_PARAM_SPEC_CLASS: @pclass: a valid GParamSpecClass

Casts a derived GParamSpecClass structure into a GParamSpecClass structure.

Definition at line 66 of file gparam.h.

◆ 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_GET_CLASS: @pspec: a valid GParamSpec

Retrieves the GParamSpecClass of a GParamSpec.

Definition at line 81 of file gparam.h.

◆ G_PARAM_SPEC_TYPE

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

G_PARAM_SPEC_TYPE: @pspec: a valid GParamSpec

Retrieves the GType of this @pspec.

Definition at line 91 of file gparam.h.

◆ G_PARAM_SPEC_TYPE_NAME

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

G_PARAM_SPEC_TYPE_NAME: @pspec: a valid GParamSpec

Retrieves the GType name of this @pspec.

Definition at line 98 of file gparam.h.

◆ G_PARAM_SPEC_VALUE_TYPE

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

G_PARAM_SPEC_VALUE_TYPE: @pspec: a valid GParamSpec

Retrieves the GType to initialize a GValue for this parameter.

Definition at line 105 of file gparam.h.

◆ G_PARAM_STATIC_STRINGS

#define G_PARAM_STATIC_STRINGS   (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)

G_PARAM_STATIC_STRINGS:

GParamFlags value alias for G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB.

It is recommended to use this for all properties by default, as it allows for internal performance improvements in GObject.

It is very rare that a property would have a dynamically constructed name, nickname or blurb.

Since 2.13.0

Definition at line 185 of file gparam.h.

◆ G_PARAM_USER_SHIFT

#define G_PARAM_USER_SHIFT   (8)

G_PARAM_USER_SHIFT:

Minimum shift count to be used for user defined flags, to be stored in GParamSpec.flags. The maximum allowed is 10.

Definition at line 199 of file gparam.h.

◆ G_TYPE_IS_PARAM

#define G_TYPE_IS_PARAM ( type)    (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)

G_TYPE_IS_PARAM: @type: a GType ID

Checks whether @type "is a" G_TYPE_PARAM.

Definition at line 39 of file gparam.h.

◆ G_VALUE_HOLDS_PARAM

#define G_VALUE_HOLDS_PARAM ( value)    (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))

G_VALUE_HOLDS_PARAM: @value: a valid GValue structure

Checks whether the given GValue can hold values derived from type G_TYPE_PARAM.

Returns: TRUE on success.

Definition at line 114 of file gparam.h.

Typedef Documentation

◆ GOBJECT_DEPRECATED_TYPE_IN_2_54

Definition at line 204 of file gparam.h.

◆ GParamSpec

typedef struct _GParamSpec GParamSpec

Definition at line 202 of file gparam.h.

◆ GParamSpecClass

Definition at line 203 of file gparam.h.

◆ GParamSpecPool

typedef struct _GParamSpecPool GParamSpecPool

Definition at line 205 of file gparam.h.

◆ GParamSpecTypeInfo

Definition at line 361 of file gparam.h.

Enumeration Type Documentation

◆ GParamFlags

GParamFlags: @G_PARAM_READABLE: the parameter is readable @G_PARAM_WRITABLE: the parameter is writable @G_PARAM_READWRITE: alias for G_PARAM_READABLE | G_PARAM_WRITABLE @G_PARAM_CONSTRUCT: the parameter will be set upon object construction @G_PARAM_CONSTRUCT_ONLY: the parameter can only be set upon object construction @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8 @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8 @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8 @G_PARAM_EXPLICIT_NOTIFY: calls to g_object_set_property() for this property will not automatically result in a "notify" signal being emitted: the implementation must call g_object_notify() themselves in case the property actually changes. Since: 2.42. @G_PARAM_PRIVATE: internal @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since 2.26

Through the GParamFlags flag values, certain aspects of parameters can be configured.

See also: G_PARAM_STATIC_STRINGS

Enumerator
G_PARAM_READABLE 
G_PARAM_WRITABLE 
G_PARAM_READWRITE 
G_PARAM_CONSTRUCT 
G_PARAM_CONSTRUCT_ONLY 
G_PARAM_LAX_VALIDATION 
G_PARAM_STATIC_NAME 
GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26 
G_PARAM_STATIC_NICK 
G_PARAM_STATIC_BLURB 
G_PARAM_EXPLICIT_NOTIFY 
G_PARAM_DEPRECATED 

Definition at line 154 of file gparam.h.

155{
156 G_PARAM_READABLE = 1 << 0,
157 G_PARAM_WRITABLE = 1 << 1,
159 G_PARAM_CONSTRUCT = 1 << 2,
160 G_PARAM_CONSTRUCT_ONLY = 1 << 3,
161 G_PARAM_LAX_VALIDATION = 1 << 4,
162 G_PARAM_STATIC_NAME = 1 << 5,
164 G_PARAM_STATIC_NICK = 1 << 6,
165 G_PARAM_STATIC_BLURB = 1 << 7,
166 /* User defined flags go here */
167 G_PARAM_EXPLICIT_NOTIFY = 1 << 30,
168 /* Avoid warning with -Wpedantic for gcc6 */
169 G_PARAM_DEPRECATED = (gint)(1u << 31)
GParamFlags
Definition gparam.h:155
@ GOBJECT_DEPRECATED_ENUMERATOR_IN_2_26
Definition gparam.h:163
@ G_PARAM_DEPRECATED
Definition gparam.h:169
@ G_PARAM_LAX_VALIDATION
Definition gparam.h:161
@ G_PARAM_READWRITE
Definition gparam.h:158
@ G_PARAM_STATIC_NICK
Definition gparam.h:164
@ G_PARAM_WRITABLE
Definition gparam.h:157
@ G_PARAM_STATIC_NAME
Definition gparam.h:162
@ G_PARAM_CONSTRUCT_ONLY
Definition gparam.h:160
@ G_PARAM_EXPLICIT_NOTIFY
Definition gparam.h:167
@ G_PARAM_STATIC_BLURB
Definition gparam.h:165
@ G_PARAM_READABLE
Definition gparam.h:156
@ G_PARAM_CONSTRUCT
Definition gparam.h:159
int gint
Definition gtypes.h:55

Function Documentation

◆ _g_param_type_register_static_constant()

GType _g_param_type_register_static_constant ( const gchar * name,
const GParamSpecTypeInfo * pspec_info,
GType opt_type )

◆ g_param_spec_get_blurb()

GOBJECT_AVAILABLE_IN_ALL const gchar * g_param_spec_get_blurb ( GParamSpec * pspec)

◆ g_param_spec_get_default_value()

GOBJECT_AVAILABLE_IN_2_36 const GValue * g_param_spec_get_default_value ( GParamSpec * pspec)

◆ g_param_spec_get_name()

GOBJECT_AVAILABLE_IN_ALL const gchar * g_param_spec_get_name ( GParamSpec * pspec)

◆ g_param_spec_get_name_quark()

GOBJECT_AVAILABLE_IN_2_46 GQuark g_param_spec_get_name_quark ( GParamSpec * pspec)

◆ g_param_spec_get_nick()

GOBJECT_AVAILABLE_IN_ALL const gchar * g_param_spec_get_nick ( GParamSpec * pspec)

◆ g_param_spec_get_qdata()

GOBJECT_AVAILABLE_IN_ALL gpointer g_param_spec_get_qdata ( GParamSpec * pspec,
GQuark quark )

◆ g_param_spec_get_redirect_target()

GOBJECT_AVAILABLE_IN_ALL GParamSpec * g_param_spec_get_redirect_target ( GParamSpec * pspec)

◆ g_param_spec_internal()

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

◆ g_param_spec_is_valid_name()

GOBJECT_AVAILABLE_IN_2_66 gboolean g_param_spec_is_valid_name ( const gchar * name)

◆ g_param_spec_pool_free()

GOBJECT_AVAILABLE_IN_2_80 void g_param_spec_pool_free ( GParamSpecPool * pool)

◆ g_param_spec_pool_insert()

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

◆ g_param_spec_pool_list()

GOBJECT_AVAILABLE_IN_ALL GParamSpec ** g_param_spec_pool_list ( GParamSpecPool * pool,
GType owner_type,
guint * n_pspecs_p )

◆ g_param_spec_pool_list_owned()

GOBJECT_AVAILABLE_IN_ALL GList * g_param_spec_pool_list_owned ( GParamSpecPool * pool,
GType owner_type )

◆ g_param_spec_pool_lookup()

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

◆ g_param_spec_pool_new()

GOBJECT_AVAILABLE_IN_ALL GParamSpecPool * g_param_spec_pool_new ( gboolean type_prefixing)

◆ g_param_spec_pool_remove()

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

◆ g_param_spec_ref()

GOBJECT_AVAILABLE_IN_ALL GParamSpec * g_param_spec_ref ( GParamSpec * pspec)

◆ g_param_spec_ref_sink()

GOBJECT_AVAILABLE_IN_ALL GParamSpec * g_param_spec_ref_sink ( GParamSpec * pspec)

◆ g_param_spec_set_qdata()

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

◆ g_param_spec_set_qdata_full()

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

◆ g_param_spec_sink()

GOBJECT_AVAILABLE_IN_ALL void g_param_spec_sink ( GParamSpec * pspec)

◆ g_param_spec_steal_qdata()

GOBJECT_AVAILABLE_IN_ALL gpointer g_param_spec_steal_qdata ( GParamSpec * pspec,
GQuark quark )

◆ g_param_spec_unref()

GOBJECT_AVAILABLE_IN_ALL void g_param_spec_unref ( GParamSpec * pspec)

◆ g_param_type_register_static()

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

◆ g_param_value_convert()

GOBJECT_AVAILABLE_IN_ALL gboolean g_param_value_convert ( GParamSpec * pspec,
const GValue * src_value,
GValue * dest_value,
gboolean strict_validation )

◆ g_param_value_defaults()

GOBJECT_AVAILABLE_IN_ALL gboolean g_param_value_defaults ( GParamSpec * pspec,
const GValue * value )

◆ g_param_value_is_valid()

GOBJECT_AVAILABLE_IN_2_74 gboolean g_param_value_is_valid ( GParamSpec * pspec,
const GValue * value )

◆ g_param_value_set_default()

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

◆ g_param_value_validate()

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

◆ g_param_values_cmp()

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

◆ g_value_dup_param()

GOBJECT_AVAILABLE_IN_ALL GParamSpec * g_value_dup_param ( const GValue * value)

◆ g_value_get_param()

GOBJECT_AVAILABLE_IN_ALL GParamSpec * g_value_get_param ( const GValue * value)

◆ g_value_set_param()

GOBJECT_AVAILABLE_IN_ALL void g_value_set_param ( GValue * value,
GParamSpec * param )

◆ g_value_set_param_take_ownership()

void g_value_set_param_take_ownership ( GValue * value,
GParamSpec * param )

◆ g_value_take_param()

GOBJECT_AVAILABLE_IN_ALL void g_value_take_param ( GValue * value,
GParamSpec * param )