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

Go to the source code of this file.

Data Structures

struct  _GValue
 

Macros

#define G_TYPE_IS_VALUE(type)   (g_type_check_is_value_type (type))
 
#define G_IS_VALUE(value)   (G_TYPE_CHECK_VALUE (value))
 
#define G_VALUE_TYPE(value)   (((GValue*) (value))->g_type)
 
#define G_VALUE_TYPE_NAME(value)   (g_type_name (G_VALUE_TYPE (value)))
 
#define G_VALUE_HOLDS(value, type)   (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
 
#define G_VALUE_NOCOPY_CONTENTS   (1 << 27)
 
#define G_VALUE_INTERNED_STRING   (1 << 28) GOBJECT_AVAILABLE_MACRO_IN_2_66
 
#define G_VALUE_INIT   { 0, { { 0 } } }
 

Typedefs

typedef void(* GValueTransform) (const GValue *src_value, GValue *dest_value)
 

Functions

GOBJECT_AVAILABLE_IN_ALL GValueg_value_init (GValue *value, GType g_type)
 
GOBJECT_AVAILABLE_IN_ALL void g_value_copy (const GValue *src_value, GValue *dest_value)
 
GOBJECT_AVAILABLE_IN_ALL GValueg_value_reset (GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL void g_value_unset (GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL void g_value_set_instance (GValue *value, gpointer instance)
 
GOBJECT_AVAILABLE_IN_2_42 void g_value_init_from_instance (GValue *value, gpointer instance)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_value_fits_pointer (const GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL gpointer g_value_peek_pointer (const GValue *value)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_value_type_compatible (GType src_type, GType dest_type)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_value_type_transformable (GType src_type, GType dest_type)
 
GOBJECT_AVAILABLE_IN_ALL gboolean g_value_transform (const GValue *src_value, GValue *dest_value)
 
GOBJECT_AVAILABLE_IN_ALL void g_value_register_transform_func (GType src_type, GType dest_type, GValueTransform transform_func)
 

Macro Definition Documentation

◆ G_IS_VALUE

#define G_IS_VALUE ( value)    (G_TYPE_CHECK_VALUE (value))

G_IS_VALUE: @value: A GValue structure.

Checks if @value is a valid and initialized GValue structure.

Returns: TRUE on success.

Definition at line 53 of file gvalue.h.

◆ G_TYPE_IS_VALUE

#define G_TYPE_IS_VALUE ( type)    (g_type_check_is_value_type (type))

G_TYPE_IS_VALUE: @type: A GType value.

Checks whether the passed in type ID can be used for g_value_init().

That is, this macro checks whether this type provides an implementation of the GTypeValueTable functions required for a type to create a GValue of.

Returns: Whether @type is suitable as a GValue type.

Definition at line 44 of file gvalue.h.

◆ G_VALUE_HOLDS

#define G_VALUE_HOLDS ( value,
type )   (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))

G_VALUE_HOLDS: @value: A GValue structure. @type: A GType value.

Checks if @value holds (or contains) a value of @type. This macro will also check for @value != NULL and issue a warning if the check fails.

Returns: TRUE if @value holds the @type.

Definition at line 83 of file gvalue.h.

◆ G_VALUE_INIT

#define G_VALUE_INIT   { 0, { { 0 } } }

G_VALUE_INIT:

A GValue must be initialized before it can be used. This macro can be used as initializer instead of an explicit { 0 } when declaring a variable, but it cannot be assigned to a variable.

|[ GValue value = G_VALUE_INIT; ]|

Since: 2.30

Definition at line 207 of file gvalue.h.

◆ G_VALUE_INTERNED_STRING

#define G_VALUE_INTERNED_STRING   (1 << 28) GOBJECT_AVAILABLE_MACRO_IN_2_66

G_VALUE_INTERNED_STRING:

For string values, indicates that the string contained is canonical and will exist for the duration of the process. See g_value_set_interned_string().

Since: 2.66

Definition at line 192 of file gvalue.h.

◆ G_VALUE_NOCOPY_CONTENTS

#define G_VALUE_NOCOPY_CONTENTS   (1 << 27)

G_VALUE_NOCOPY_CONTENTS:

If passed to G_VALUE_COLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. This does not affect usage of g_value_copy(), the data will be copied if it is not ref-counted.

Definition at line 182 of file gvalue.h.

◆ G_VALUE_TYPE

#define G_VALUE_TYPE ( value)    (((GValue*) (value))->g_type)

G_VALUE_TYPE: @value: A GValue structure.

Get the type identifier of @value.

Returns: the GType.

Definition at line 62 of file gvalue.h.

◆ G_VALUE_TYPE_NAME

#define G_VALUE_TYPE_NAME ( value)    (g_type_name (G_VALUE_TYPE (value)))

G_VALUE_TYPE_NAME: @value: A GValue structure.

Gets the type name of @value.

Returns: the type name.

Definition at line 71 of file gvalue.h.

Typedef Documentation

◆ GValueTransform

typedef void(* GValueTransform) (const GValue *src_value, GValue *dest_value)

GValueTransform: @src_value: Source value. @dest_value: Target value.

The type of value transformation functions which can be registered with g_value_register_transform_func().

@dest_value will be initialized to the correct destination type.

Definition at line 97 of file gvalue.h.

Function Documentation

◆ g_value_copy()

GOBJECT_AVAILABLE_IN_ALL void g_value_copy ( const GValue * src_value,
GValue * dest_value )

◆ g_value_fits_pointer()

GOBJECT_AVAILABLE_IN_ALL gboolean g_value_fits_pointer ( const GValue * value)

◆ g_value_init()

GOBJECT_AVAILABLE_IN_ALL GValue * g_value_init ( GValue * value,
GType g_type )

◆ g_value_init_from_instance()

GOBJECT_AVAILABLE_IN_2_42 void g_value_init_from_instance ( GValue * value,
gpointer instance )

◆ g_value_peek_pointer()

GOBJECT_AVAILABLE_IN_ALL gpointer g_value_peek_pointer ( const GValue * value)

◆ g_value_register_transform_func()

GOBJECT_AVAILABLE_IN_ALL void g_value_register_transform_func ( GType src_type,
GType dest_type,
GValueTransform transform_func )

◆ g_value_reset()

GOBJECT_AVAILABLE_IN_ALL GValue * g_value_reset ( GValue * value)

◆ g_value_set_instance()

GOBJECT_AVAILABLE_IN_ALL void g_value_set_instance ( GValue * value,
gpointer instance )

◆ g_value_transform()

GOBJECT_AVAILABLE_IN_ALL gboolean g_value_transform ( const GValue * src_value,
GValue * dest_value )

◆ g_value_type_compatible()

GOBJECT_AVAILABLE_IN_ALL gboolean g_value_type_compatible ( GType src_type,
GType dest_type )

◆ g_value_type_transformable()

GOBJECT_AVAILABLE_IN_ALL gboolean g_value_type_transformable ( GType src_type,
GType dest_type )

◆ g_value_unset()

GOBJECT_AVAILABLE_IN_ALL void g_value_unset ( GValue * value)