define gstring in terms of gchar*. this typedef reflects the type name of
[platform/upstream/glib.git] / gobject / gvaluetypes.h
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2  * Copyright (C) 1997, 1998, 1999, 2000 Tim Janik and Red Hat, Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General
15  * Public License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17  * Boston, MA 02111-1307, USA.
18  *
19  * gvaluetypes.h: GLib default values
20  */
21 #ifndef __G_VALUETYPES_H__
22 #define __G_VALUETYPES_H__
23
24
25 #include        <gobject/gvalue.h>
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32
33 /* --- type macros --- */
34 #define G_IS_VALUE_CHAR(value)          (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_CHAR))
35 #define G_IS_VALUE_UCHAR(value)         (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_UCHAR))
36 #define G_IS_VALUE_BOOLEAN(value)       (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_BOOLEAN))
37 #define G_IS_VALUE_INT(value)           (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_INT))
38 #define G_IS_VALUE_UINT(value)          (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_UINT))
39 #define G_IS_VALUE_LONG(value)          (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_LONG))
40 #define G_IS_VALUE_ULONG(value)         (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_ULONG))
41 #define G_IS_VALUE_FLOAT(value)         (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_FLOAT))
42 #define G_IS_VALUE_DOUBLE(value)        (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_DOUBLE))
43 #define G_IS_VALUE_STRING(value)        (G_TYPE_CHECK_CLASS_TYPE ((value), G_TYPE_STRING))
44
45
46 /* --- prototypes --- */
47 void            g_value_set_char        (GValue         *value,
48                                          gint8           v_char);
49 gint8           g_value_get_char        (GValue         *value);
50 void            g_value_set_uchar       (GValue         *value,
51                                          guint8          v_uchar);
52 guint8          g_value_get_uchar       (GValue         *value);
53 void            g_value_set_boolean     (GValue         *value,
54                                          gboolean        v_boolean);
55 gboolean        g_value_get_boolean     (GValue         *value);
56 void            g_value_set_int         (GValue         *value,
57                                          gint            v_int);
58 gint            g_value_get_int         (GValue         *value);
59 void            g_value_set_uint        (GValue         *value,
60                                          guint           v_uint);
61 guint           g_value_get_uint        (GValue         *value);
62 void            g_value_set_long        (GValue         *value,
63                                          glong           v_long);
64 glong           g_value_get_long        (GValue         *value);
65 void            g_value_set_ulong       (GValue         *value,
66                                          gulong          v_ulong);
67 gulong          g_value_get_ulong       (GValue         *value);
68 void            g_value_set_float       (GValue         *value,
69                                          gfloat          v_float);
70 gfloat          g_value_get_float       (GValue         *value);
71 void            g_value_set_double      (GValue         *value,
72                                          gdouble         v_double);
73 gdouble         g_value_get_double      (GValue         *value);
74 void            g_value_set_string      (GValue         *value,
75                                          const gchar    *v_string);
76 gchar*          g_value_get_string      (GValue         *value);
77 gchar*          g_value_dup_string      (GValue         *value);
78
79
80
81
82 #ifdef __cplusplus
83 }
84 #endif /* __cplusplus */
85
86 #endif /* __G_VALUETYPES_H__ */