~ubuntu-branches/debian/sid/glib2.0/sid

« back to all changes in this revision

Viewing changes to gobject/gvalue.h

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 06:25:57 UTC
  • mfrom: (1.27.14) (3.1.181 experimental)
  • Revision ID: package-import@ubuntu.com-20130508062557-i7gbku66mls70gi2
Tags: 2.36.1-2
Merge experimental branch, upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *
19
19
 * gvalue.h: generic GValue functions
20
20
 */
 
21
#ifndef __G_VALUE_H__
 
22
#define __G_VALUE_H__
 
23
 
21
24
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
22
25
#error "Only <glib-object.h> can be included directly."
23
26
#endif
24
27
 
25
 
#ifndef __G_VALUE_H__
26
 
#define __G_VALUE_H__
27
 
 
28
28
#include        <gobject/gtype.h>
29
29
 
30
30
G_BEGIN_DECLS
53
53
/**
54
54
 * G_VALUE_TYPE:
55
55
 * @value: A #GValue structure.
56
 
 * 
 
56
 *
57
57
 * Get the type identifier of @value.
58
58
 *
59
59
 * Returns: the #GType.
63
63
 * G_VALUE_TYPE_NAME:
64
64
 * @value: A #GValue structure.
65
65
 *
66
 
 * Gets the the type name of @value. 
 
66
 * Gets the type name of @value.
67
67
 *
68
68
 * Returns: the type name.
69
69
 */
72
72
 * G_VALUE_HOLDS:
73
73
 * @value: A #GValue structure.
74
74
 * @type: A #GType value.
75
 
 * 
 
75
 *
76
76
 * Checks if @value holds (or contains) a value of @type.
77
77
 * This macro will also check for @value != %NULL and issue a
78
78
 * warning if the check fails.
126
126
 
127
127
 
128
128
/* --- prototypes --- */
 
129
GLIB_AVAILABLE_IN_ALL
129
130
GValue*         g_value_init            (GValue       *value,
130
131
                                         GType         g_type);
 
132
GLIB_AVAILABLE_IN_ALL
131
133
void            g_value_copy            (const GValue *src_value,
132
134
                                         GValue       *dest_value);
 
135
GLIB_AVAILABLE_IN_ALL
133
136
GValue*         g_value_reset           (GValue       *value);
 
137
GLIB_AVAILABLE_IN_ALL
134
138
void            g_value_unset           (GValue       *value);
 
139
GLIB_AVAILABLE_IN_ALL
135
140
void            g_value_set_instance    (GValue       *value,
136
141
                                         gpointer      instance);
137
142
 
138
143
 
139
144
/* --- private --- */
 
145
GLIB_AVAILABLE_IN_ALL
140
146
gboolean        g_value_fits_pointer    (const GValue *value);
 
147
GLIB_AVAILABLE_IN_ALL
141
148
gpointer        g_value_peek_pointer    (const GValue *value);
142
149
 
143
150
 
144
151
/* --- implementation details --- */
 
152
GLIB_AVAILABLE_IN_ALL
145
153
gboolean g_value_type_compatible        (GType           src_type,
146
154
                                         GType           dest_type);
 
155
GLIB_AVAILABLE_IN_ALL
147
156
gboolean g_value_type_transformable     (GType           src_type,
148
157
                                         GType           dest_type);
 
158
GLIB_AVAILABLE_IN_ALL
149
159
gboolean g_value_transform              (const GValue   *src_value,
150
160
                                         GValue         *dest_value);
 
161
GLIB_AVAILABLE_IN_ALL
151
162
void    g_value_register_transform_func (GType           src_type,
152
163
                                         GType           dest_type,
153
164
                                         GValueTransform transform_func);