sl@0
|
1 |
/* GObject - GLib Type, Object, Parameter and Signal Library
|
sl@0
|
2 |
* Copyright (C) 2001 Red Hat, Inc.
|
sl@0
|
3 |
*
|
sl@0
|
4 |
* This library is free software; you can redistribute it and/or
|
sl@0
|
5 |
* modify it under the terms of the GNU Lesser General Public
|
sl@0
|
6 |
* License as published by the Free Software Foundation; either
|
sl@0
|
7 |
* version 2 of the License, or (at your option) any later version.
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* This library is distributed in the hope that it will be useful,
|
sl@0
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
sl@0
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
sl@0
|
12 |
* Lesser General Public License for more details.
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* You should have received a copy of the GNU Lesser General
|
sl@0
|
15 |
* Public License along with this library; if not, write to the
|
sl@0
|
16 |
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
sl@0
|
17 |
* Boston, MA 02111-1307, USA.
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
#include "config.h"
|
sl@0
|
21 |
|
sl@0
|
22 |
#include <string.h>
|
sl@0
|
23 |
|
sl@0
|
24 |
#include "gvalue.h"
|
sl@0
|
25 |
#include "genums.h"
|
sl@0
|
26 |
#include "gobjectalias.h"
|
sl@0
|
27 |
|
sl@0
|
28 |
|
sl@0
|
29 |
/* same type transforms
|
sl@0
|
30 |
*/
|
sl@0
|
31 |
static void
|
sl@0
|
32 |
value_transform_memcpy_data0 (const GValue *src_value,
|
sl@0
|
33 |
GValue *dest_value)
|
sl@0
|
34 |
{
|
sl@0
|
35 |
memcpy (&dest_value->data[0], &src_value->data[0], sizeof (src_value->data[0]));
|
sl@0
|
36 |
}
|
sl@0
|
37 |
#define value_transform_int_int value_transform_memcpy_data0
|
sl@0
|
38 |
#define value_transform_uint_uint value_transform_memcpy_data0
|
sl@0
|
39 |
#define value_transform_long_long value_transform_memcpy_data0
|
sl@0
|
40 |
#define value_transform_ulong_ulong value_transform_memcpy_data0
|
sl@0
|
41 |
#define value_transform_int64_int64 value_transform_memcpy_data0
|
sl@0
|
42 |
#define value_transform_uint64_uint64 value_transform_memcpy_data0
|
sl@0
|
43 |
#define value_transform_float_float value_transform_memcpy_data0
|
sl@0
|
44 |
#define value_transform_double_double value_transform_memcpy_data0
|
sl@0
|
45 |
|
sl@0
|
46 |
|
sl@0
|
47 |
/* numeric casts
|
sl@0
|
48 |
*/
|
sl@0
|
49 |
#define DEFINE_CAST(func_name, from_member, ctype, to_member) \
|
sl@0
|
50 |
static void \
|
sl@0
|
51 |
value_transform_##func_name (const GValue *src_value, \
|
sl@0
|
52 |
GValue *dest_value) \
|
sl@0
|
53 |
{ \
|
sl@0
|
54 |
ctype c_value = src_value->data[0].from_member; \
|
sl@0
|
55 |
dest_value->data[0].to_member = c_value; \
|
sl@0
|
56 |
} extern void glib_dummy_decl (void)
|
sl@0
|
57 |
DEFINE_CAST (int_s8, v_int, gint8, v_int);
|
sl@0
|
58 |
DEFINE_CAST (int_u8, v_int, guint8, v_uint);
|
sl@0
|
59 |
DEFINE_CAST (int_uint, v_int, guint, v_uint);
|
sl@0
|
60 |
DEFINE_CAST (int_long, v_int, glong, v_long);
|
sl@0
|
61 |
DEFINE_CAST (int_ulong, v_int, gulong, v_ulong);
|
sl@0
|
62 |
DEFINE_CAST (int_int64, v_int, gint64, v_int64);
|
sl@0
|
63 |
DEFINE_CAST (int_uint64, v_int, guint64, v_uint64);
|
sl@0
|
64 |
DEFINE_CAST (int_float, v_int, gfloat, v_float);
|
sl@0
|
65 |
DEFINE_CAST (int_double, v_int, gdouble, v_double);
|
sl@0
|
66 |
DEFINE_CAST (uint_s8, v_uint, gint8, v_int);
|
sl@0
|
67 |
DEFINE_CAST (uint_u8, v_uint, guint8, v_uint);
|
sl@0
|
68 |
DEFINE_CAST (uint_int, v_uint, gint, v_int);
|
sl@0
|
69 |
DEFINE_CAST (uint_long, v_uint, glong, v_long);
|
sl@0
|
70 |
DEFINE_CAST (uint_ulong, v_uint, gulong, v_ulong);
|
sl@0
|
71 |
DEFINE_CAST (uint_int64, v_uint, gint64, v_int64);
|
sl@0
|
72 |
DEFINE_CAST (uint_uint64, v_uint, guint64, v_uint64);
|
sl@0
|
73 |
DEFINE_CAST (uint_float, v_uint, gfloat, v_float);
|
sl@0
|
74 |
DEFINE_CAST (uint_double, v_uint, gdouble, v_double);
|
sl@0
|
75 |
DEFINE_CAST (long_s8, v_long, gint8, v_int);
|
sl@0
|
76 |
DEFINE_CAST (long_u8, v_long, guint8, v_uint);
|
sl@0
|
77 |
DEFINE_CAST (long_int, v_long, gint, v_int);
|
sl@0
|
78 |
DEFINE_CAST (long_uint, v_long, guint, v_uint);
|
sl@0
|
79 |
DEFINE_CAST (long_ulong, v_long, gulong, v_ulong);
|
sl@0
|
80 |
DEFINE_CAST (long_int64, v_long, gint64, v_int64);
|
sl@0
|
81 |
DEFINE_CAST (long_uint64, v_long, guint64, v_uint64);
|
sl@0
|
82 |
DEFINE_CAST (long_float, v_long, gfloat, v_float);
|
sl@0
|
83 |
DEFINE_CAST (long_double, v_long, gdouble, v_double);
|
sl@0
|
84 |
DEFINE_CAST (ulong_s8, v_ulong, gint8, v_int);
|
sl@0
|
85 |
DEFINE_CAST (ulong_u8, v_ulong, guint8, v_uint);
|
sl@0
|
86 |
DEFINE_CAST (ulong_int, v_ulong, gint, v_int);
|
sl@0
|
87 |
DEFINE_CAST (ulong_uint, v_ulong, guint, v_uint);
|
sl@0
|
88 |
DEFINE_CAST (ulong_int64, v_ulong, gint64, v_int64);
|
sl@0
|
89 |
DEFINE_CAST (ulong_uint64, v_ulong, guint64, v_uint64);
|
sl@0
|
90 |
DEFINE_CAST (ulong_long, v_ulong, glong, v_long);
|
sl@0
|
91 |
DEFINE_CAST (ulong_float, v_ulong, gfloat, v_float);
|
sl@0
|
92 |
DEFINE_CAST (ulong_double, v_ulong, gdouble, v_double);
|
sl@0
|
93 |
DEFINE_CAST (int64_s8, v_int64, gint8, v_int);
|
sl@0
|
94 |
DEFINE_CAST (int64_u8, v_int64, guint8, v_uint);
|
sl@0
|
95 |
DEFINE_CAST (int64_int, v_int64, gint, v_int);
|
sl@0
|
96 |
DEFINE_CAST (int64_uint, v_int64, guint, v_uint);
|
sl@0
|
97 |
DEFINE_CAST (int64_long, v_int64, glong, v_long);
|
sl@0
|
98 |
DEFINE_CAST (int64_uint64, v_int64, guint64, v_uint64);
|
sl@0
|
99 |
DEFINE_CAST (int64_ulong, v_int64, gulong, v_ulong);
|
sl@0
|
100 |
DEFINE_CAST (int64_float, v_int64, gfloat, v_float);
|
sl@0
|
101 |
DEFINE_CAST (int64_double, v_int64, gdouble, v_double);
|
sl@0
|
102 |
DEFINE_CAST (uint64_s8, v_uint64, gint8, v_int);
|
sl@0
|
103 |
DEFINE_CAST (uint64_u8, v_uint64, guint8, v_uint);
|
sl@0
|
104 |
DEFINE_CAST (uint64_int, v_uint64, gint, v_int);
|
sl@0
|
105 |
DEFINE_CAST (uint64_uint, v_uint64, guint, v_uint);
|
sl@0
|
106 |
DEFINE_CAST (uint64_long, v_uint64, glong, v_long);
|
sl@0
|
107 |
DEFINE_CAST (uint64_ulong, v_uint64, gulong, v_ulong);
|
sl@0
|
108 |
DEFINE_CAST (uint64_int64, v_uint64, gint64, v_int64);
|
sl@0
|
109 |
#ifdef _MSC_VER
|
sl@0
|
110 |
/* work around error C2520: conversion from unsigned __int64 to double
|
sl@0
|
111 |
* not implemented, use signed __int64
|
sl@0
|
112 |
* If it is supported don't miss to g_value_register_transform_func() below
|
sl@0
|
113 |
*/
|
sl@0
|
114 |
#pragma message ("Check if cast from uint64 to double is supported with msvc 6.0")
|
sl@0
|
115 |
#else
|
sl@0
|
116 |
DEFINE_CAST (uint64_float, v_uint64, gfloat, v_float);
|
sl@0
|
117 |
DEFINE_CAST (uint64_double, v_uint64, gdouble, v_double);
|
sl@0
|
118 |
#endif
|
sl@0
|
119 |
DEFINE_CAST (float_s8, v_float, gint8, v_int);
|
sl@0
|
120 |
DEFINE_CAST (float_u8, v_float, guint8, v_uint);
|
sl@0
|
121 |
DEFINE_CAST (float_int, v_float, gint, v_int);
|
sl@0
|
122 |
DEFINE_CAST (float_uint, v_float, guint, v_uint);
|
sl@0
|
123 |
DEFINE_CAST (float_long, v_float, glong, v_long);
|
sl@0
|
124 |
DEFINE_CAST (float_ulong, v_float, gulong, v_ulong);
|
sl@0
|
125 |
DEFINE_CAST (float_int64, v_float, gint64, v_int64);
|
sl@0
|
126 |
DEFINE_CAST (float_uint64, v_float, guint64, v_uint64);
|
sl@0
|
127 |
DEFINE_CAST (float_double, v_float, gdouble, v_double);
|
sl@0
|
128 |
DEFINE_CAST (double_s8, v_double, gint8, v_int);
|
sl@0
|
129 |
DEFINE_CAST (double_u8, v_double, guint8, v_uint);
|
sl@0
|
130 |
DEFINE_CAST (double_int, v_double, gint, v_int);
|
sl@0
|
131 |
DEFINE_CAST (double_uint, v_double, guint, v_uint);
|
sl@0
|
132 |
DEFINE_CAST (double_long, v_double, glong, v_long);
|
sl@0
|
133 |
DEFINE_CAST (double_ulong, v_double, gulong, v_ulong);
|
sl@0
|
134 |
DEFINE_CAST (double_int64, v_double, gint64, v_int64);
|
sl@0
|
135 |
DEFINE_CAST (double_uint64, v_double, guint64, v_uint64);
|
sl@0
|
136 |
DEFINE_CAST (double_float, v_double, gfloat, v_float);
|
sl@0
|
137 |
|
sl@0
|
138 |
|
sl@0
|
139 |
/* boolean assignments
|
sl@0
|
140 |
*/
|
sl@0
|
141 |
#define DEFINE_BOOL_CHECK(func_name, from_member) \
|
sl@0
|
142 |
static void \
|
sl@0
|
143 |
value_transform_##func_name (const GValue *src_value, \
|
sl@0
|
144 |
GValue *dest_value) \
|
sl@0
|
145 |
{ \
|
sl@0
|
146 |
dest_value->data[0].v_int = src_value->data[0].from_member != 0; \
|
sl@0
|
147 |
} extern void glib_dummy_decl (void)
|
sl@0
|
148 |
DEFINE_BOOL_CHECK (int_bool, v_int);
|
sl@0
|
149 |
DEFINE_BOOL_CHECK (uint_bool, v_uint);
|
sl@0
|
150 |
DEFINE_BOOL_CHECK (long_bool, v_long);
|
sl@0
|
151 |
DEFINE_BOOL_CHECK (ulong_bool, v_uint);
|
sl@0
|
152 |
DEFINE_BOOL_CHECK (int64_bool, v_int64);
|
sl@0
|
153 |
DEFINE_BOOL_CHECK (uint64_bool, v_uint64);
|
sl@0
|
154 |
|
sl@0
|
155 |
|
sl@0
|
156 |
/* string printouts
|
sl@0
|
157 |
*/
|
sl@0
|
158 |
#define DEFINE_SPRINTF(func_name, from_member, format) \
|
sl@0
|
159 |
static void \
|
sl@0
|
160 |
value_transform_##func_name (const GValue *src_value, \
|
sl@0
|
161 |
GValue *dest_value) \
|
sl@0
|
162 |
{ \
|
sl@0
|
163 |
dest_value->data[0].v_pointer = g_strdup_printf ((format), \
|
sl@0
|
164 |
src_value->data[0].from_member); \
|
sl@0
|
165 |
} extern void glib_dummy_decl (void)
|
sl@0
|
166 |
DEFINE_SPRINTF (int_string, v_int, "%d");
|
sl@0
|
167 |
DEFINE_SPRINTF (uint_string, v_uint, "%u");
|
sl@0
|
168 |
DEFINE_SPRINTF (long_string, v_long, "%ld");
|
sl@0
|
169 |
DEFINE_SPRINTF (ulong_string, v_ulong, "%lu");
|
sl@0
|
170 |
DEFINE_SPRINTF (int64_string, v_int64, "%" G_GINT64_FORMAT);
|
sl@0
|
171 |
DEFINE_SPRINTF (uint64_string, v_uint64, "%" G_GUINT64_FORMAT);
|
sl@0
|
172 |
DEFINE_SPRINTF (float_string, v_float, "%f");
|
sl@0
|
173 |
DEFINE_SPRINTF (double_string, v_double, "%f");
|
sl@0
|
174 |
|
sl@0
|
175 |
|
sl@0
|
176 |
/* special cases
|
sl@0
|
177 |
*/
|
sl@0
|
178 |
static void
|
sl@0
|
179 |
value_transform_bool_string (const GValue *src_value,
|
sl@0
|
180 |
GValue *dest_value)
|
sl@0
|
181 |
{
|
sl@0
|
182 |
dest_value->data[0].v_pointer = g_strdup_printf ("%s",
|
sl@0
|
183 |
src_value->data[0].v_int ?
|
sl@0
|
184 |
"TRUE" : "FALSE");
|
sl@0
|
185 |
}
|
sl@0
|
186 |
static void
|
sl@0
|
187 |
value_transform_string_string (const GValue *src_value,
|
sl@0
|
188 |
GValue *dest_value)
|
sl@0
|
189 |
{
|
sl@0
|
190 |
dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
|
sl@0
|
191 |
}
|
sl@0
|
192 |
static void
|
sl@0
|
193 |
value_transform_enum_string (const GValue *src_value,
|
sl@0
|
194 |
GValue *dest_value)
|
sl@0
|
195 |
{
|
sl@0
|
196 |
GEnumClass *class = g_type_class_ref (G_VALUE_TYPE (src_value));
|
sl@0
|
197 |
GEnumValue *enum_value = g_enum_get_value (class, src_value->data[0].v_long);
|
sl@0
|
198 |
|
sl@0
|
199 |
if (enum_value)
|
sl@0
|
200 |
dest_value->data[0].v_pointer = g_strdup (enum_value->value_name);
|
sl@0
|
201 |
else
|
sl@0
|
202 |
dest_value->data[0].v_pointer = g_strdup_printf ("%ld", src_value->data[0].v_long);
|
sl@0
|
203 |
|
sl@0
|
204 |
g_type_class_unref (class);
|
sl@0
|
205 |
}
|
sl@0
|
206 |
static void
|
sl@0
|
207 |
value_transform_flags_string (const GValue *src_value,
|
sl@0
|
208 |
GValue *dest_value)
|
sl@0
|
209 |
{
|
sl@0
|
210 |
GFlagsClass *class = g_type_class_ref (G_VALUE_TYPE (src_value));
|
sl@0
|
211 |
GFlagsValue *flags_value = g_flags_get_first_value (class, src_value->data[0].v_ulong);
|
sl@0
|
212 |
|
sl@0
|
213 |
if (flags_value)
|
sl@0
|
214 |
{
|
sl@0
|
215 |
GString *gstring = g_string_new (NULL);
|
sl@0
|
216 |
guint v_flags = src_value->data[0].v_ulong;
|
sl@0
|
217 |
|
sl@0
|
218 |
do
|
sl@0
|
219 |
{
|
sl@0
|
220 |
v_flags &= ~flags_value->value;
|
sl@0
|
221 |
|
sl@0
|
222 |
if (gstring->str[0])
|
sl@0
|
223 |
g_string_append (gstring, " | ");
|
sl@0
|
224 |
g_string_append (gstring, flags_value->value_name);
|
sl@0
|
225 |
flags_value = g_flags_get_first_value (class, v_flags);
|
sl@0
|
226 |
}
|
sl@0
|
227 |
while (flags_value);
|
sl@0
|
228 |
|
sl@0
|
229 |
if (v_flags)
|
sl@0
|
230 |
dest_value->data[0].v_pointer = g_strdup_printf ("%s | %u",
|
sl@0
|
231 |
gstring->str,
|
sl@0
|
232 |
v_flags);
|
sl@0
|
233 |
else
|
sl@0
|
234 |
dest_value->data[0].v_pointer = g_strdup (gstring->str);
|
sl@0
|
235 |
g_string_free (gstring, TRUE);
|
sl@0
|
236 |
}
|
sl@0
|
237 |
else
|
sl@0
|
238 |
dest_value->data[0].v_pointer = g_strdup_printf ("%lu", src_value->data[0].v_ulong);
|
sl@0
|
239 |
|
sl@0
|
240 |
g_type_class_unref (class);
|
sl@0
|
241 |
}
|
sl@0
|
242 |
|
sl@0
|
243 |
|
sl@0
|
244 |
/* registration
|
sl@0
|
245 |
*/
|
sl@0
|
246 |
void
|
sl@0
|
247 |
g_value_transforms_init (void)
|
sl@0
|
248 |
{
|
sl@0
|
249 |
/* some transformations are a bit questionable,
|
sl@0
|
250 |
* we currently skip those
|
sl@0
|
251 |
*/
|
sl@0
|
252 |
#define SKIP____register_transform_func(type1,type2,transform_func) /* skip questionable transforms */ \
|
sl@0
|
253 |
(void)0
|
sl@0
|
254 |
|
sl@0
|
255 |
/* numeric types (plus to string) */
|
sl@0
|
256 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_CHAR, value_transform_int_int);
|
sl@0
|
257 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UCHAR, value_transform_int_u8);
|
sl@0
|
258 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_BOOLEAN, value_transform_int_bool);
|
sl@0
|
259 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT, value_transform_int_int);
|
sl@0
|
260 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT, value_transform_int_uint);
|
sl@0
|
261 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_LONG, value_transform_int_long);
|
sl@0
|
262 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ULONG, value_transform_int_ulong);
|
sl@0
|
263 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT64, value_transform_int_int64);
|
sl@0
|
264 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT64, value_transform_int_uint64);
|
sl@0
|
265 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ENUM, value_transform_int_long);
|
sl@0
|
266 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLAGS, value_transform_int_ulong);
|
sl@0
|
267 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLOAT, value_transform_int_float);
|
sl@0
|
268 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_DOUBLE, value_transform_int_double);
|
sl@0
|
269 |
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_STRING, value_transform_int_string);
|
sl@0
|
270 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_CHAR, value_transform_uint_s8);
|
sl@0
|
271 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UCHAR, value_transform_uint_uint);
|
sl@0
|
272 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_BOOLEAN, value_transform_uint_bool);
|
sl@0
|
273 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT, value_transform_uint_int);
|
sl@0
|
274 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT, value_transform_uint_uint);
|
sl@0
|
275 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_LONG, value_transform_uint_long);
|
sl@0
|
276 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ULONG, value_transform_uint_ulong);
|
sl@0
|
277 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT64, value_transform_uint_int64);
|
sl@0
|
278 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT64, value_transform_uint_uint64);
|
sl@0
|
279 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ENUM, value_transform_uint_long);
|
sl@0
|
280 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLAGS, value_transform_uint_ulong);
|
sl@0
|
281 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLOAT, value_transform_uint_float);
|
sl@0
|
282 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_DOUBLE, value_transform_uint_double);
|
sl@0
|
283 |
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_STRING, value_transform_uint_string);
|
sl@0
|
284 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_CHAR, value_transform_int_s8);
|
sl@0
|
285 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UCHAR, value_transform_int_u8);
|
sl@0
|
286 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, value_transform_int_int);
|
sl@0
|
287 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT, value_transform_int_int);
|
sl@0
|
288 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT, value_transform_int_uint);
|
sl@0
|
289 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_LONG, value_transform_int_long);
|
sl@0
|
290 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ULONG, value_transform_int_ulong);
|
sl@0
|
291 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT64, value_transform_int_int64);
|
sl@0
|
292 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT64, value_transform_int_uint64);
|
sl@0
|
293 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ENUM, value_transform_int_long);
|
sl@0
|
294 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLAGS, value_transform_int_ulong);
|
sl@0
|
295 |
SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLOAT, value_transform_int_float);
|
sl@0
|
296 |
SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_DOUBLE, value_transform_int_double);
|
sl@0
|
297 |
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_STRING, value_transform_bool_string);
|
sl@0
|
298 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_CHAR, value_transform_int_s8);
|
sl@0
|
299 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_UCHAR, value_transform_int_u8);
|
sl@0
|
300 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_BOOLEAN, value_transform_int_bool);
|
sl@0
|
301 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT, value_transform_int_int);
|
sl@0
|
302 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT, value_transform_int_uint);
|
sl@0
|
303 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_LONG, value_transform_int_long);
|
sl@0
|
304 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_ULONG, value_transform_int_ulong);
|
sl@0
|
305 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT64, value_transform_int_int64);
|
sl@0
|
306 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT64, value_transform_int_uint64);
|
sl@0
|
307 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_ENUM, value_transform_int_long);
|
sl@0
|
308 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLAGS, value_transform_int_ulong);
|
sl@0
|
309 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLOAT, value_transform_int_float);
|
sl@0
|
310 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_DOUBLE, value_transform_int_double);
|
sl@0
|
311 |
g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, value_transform_int_string);
|
sl@0
|
312 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_CHAR, value_transform_uint_s8);
|
sl@0
|
313 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UCHAR, value_transform_uint_u8);
|
sl@0
|
314 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_BOOLEAN, value_transform_uint_bool);
|
sl@0
|
315 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT, value_transform_uint_int);
|
sl@0
|
316 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT, value_transform_uint_uint);
|
sl@0
|
317 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_LONG, value_transform_uint_long);
|
sl@0
|
318 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ULONG, value_transform_uint_ulong);
|
sl@0
|
319 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT64, value_transform_uint_int64);
|
sl@0
|
320 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT64, value_transform_uint_uint64);
|
sl@0
|
321 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ENUM, value_transform_uint_long);
|
sl@0
|
322 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLAGS, value_transform_uint_ulong);
|
sl@0
|
323 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLOAT, value_transform_uint_float);
|
sl@0
|
324 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_DOUBLE, value_transform_uint_double);
|
sl@0
|
325 |
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_STRING, value_transform_uint_string);
|
sl@0
|
326 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_CHAR, value_transform_long_s8);
|
sl@0
|
327 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UCHAR, value_transform_long_u8);
|
sl@0
|
328 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_BOOLEAN, value_transform_long_bool);
|
sl@0
|
329 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT, value_transform_long_int);
|
sl@0
|
330 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT, value_transform_long_uint);
|
sl@0
|
331 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_LONG, value_transform_long_long);
|
sl@0
|
332 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ULONG, value_transform_long_ulong);
|
sl@0
|
333 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT64, value_transform_long_int64);
|
sl@0
|
334 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT64, value_transform_long_uint64);
|
sl@0
|
335 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ENUM, value_transform_long_long);
|
sl@0
|
336 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLAGS, value_transform_long_ulong);
|
sl@0
|
337 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLOAT, value_transform_long_float);
|
sl@0
|
338 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_DOUBLE, value_transform_long_double);
|
sl@0
|
339 |
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_STRING, value_transform_long_string);
|
sl@0
|
340 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_CHAR, value_transform_ulong_s8);
|
sl@0
|
341 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UCHAR, value_transform_ulong_u8);
|
sl@0
|
342 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_BOOLEAN, value_transform_ulong_bool);
|
sl@0
|
343 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT, value_transform_ulong_int);
|
sl@0
|
344 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT, value_transform_ulong_uint);
|
sl@0
|
345 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_LONG, value_transform_ulong_long);
|
sl@0
|
346 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ULONG, value_transform_ulong_ulong);
|
sl@0
|
347 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT64, value_transform_ulong_int64);
|
sl@0
|
348 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT64, value_transform_ulong_uint64);
|
sl@0
|
349 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ENUM, value_transform_ulong_long);
|
sl@0
|
350 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLAGS, value_transform_ulong_ulong);
|
sl@0
|
351 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLOAT, value_transform_ulong_float);
|
sl@0
|
352 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_DOUBLE, value_transform_ulong_double);
|
sl@0
|
353 |
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_STRING, value_transform_ulong_string);
|
sl@0
|
354 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_CHAR, value_transform_int64_s8);
|
sl@0
|
355 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UCHAR, value_transform_int64_u8);
|
sl@0
|
356 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_BOOLEAN, value_transform_int64_bool);
|
sl@0
|
357 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_INT, value_transform_int64_int);
|
sl@0
|
358 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UINT, value_transform_int64_uint);
|
sl@0
|
359 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_LONG, value_transform_int64_long);
|
sl@0
|
360 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_ULONG, value_transform_int64_ulong);
|
sl@0
|
361 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_INT64, value_transform_int64_int64);
|
sl@0
|
362 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UINT64, value_transform_int64_uint64);
|
sl@0
|
363 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_ENUM, value_transform_int64_long);
|
sl@0
|
364 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_FLAGS, value_transform_int64_ulong);
|
sl@0
|
365 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_FLOAT, value_transform_int64_float);
|
sl@0
|
366 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_DOUBLE, value_transform_int64_double);
|
sl@0
|
367 |
g_value_register_transform_func (G_TYPE_INT64, G_TYPE_STRING, value_transform_int64_string);
|
sl@0
|
368 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_CHAR, value_transform_uint64_s8);
|
sl@0
|
369 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UCHAR, value_transform_uint64_u8);
|
sl@0
|
370 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_BOOLEAN, value_transform_uint64_bool);
|
sl@0
|
371 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_INT, value_transform_uint64_int);
|
sl@0
|
372 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UINT, value_transform_uint64_uint);
|
sl@0
|
373 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_LONG, value_transform_uint64_long);
|
sl@0
|
374 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_ULONG, value_transform_uint64_ulong);
|
sl@0
|
375 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_INT64, value_transform_uint64_int64);
|
sl@0
|
376 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UINT64, value_transform_uint64_uint64);
|
sl@0
|
377 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_ENUM, value_transform_uint64_long);
|
sl@0
|
378 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_FLAGS, value_transform_uint64_ulong);
|
sl@0
|
379 |
#ifndef _MSC_VER
|
sl@0
|
380 |
/* required casts unsupported with msvc 5.0 */
|
sl@0
|
381 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_FLOAT, value_transform_uint64_float);
|
sl@0
|
382 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_DOUBLE, value_transform_uint64_double);
|
sl@0
|
383 |
#endif
|
sl@0
|
384 |
g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_STRING, value_transform_uint64_string);
|
sl@0
|
385 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_CHAR, value_transform_long_s8);
|
sl@0
|
386 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UCHAR, value_transform_long_u8);
|
sl@0
|
387 |
SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_BOOLEAN, value_transform_long_bool);
|
sl@0
|
388 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT, value_transform_long_int);
|
sl@0
|
389 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT, value_transform_long_uint);
|
sl@0
|
390 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_LONG, value_transform_long_long);
|
sl@0
|
391 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ULONG, value_transform_long_ulong);
|
sl@0
|
392 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT64, value_transform_long_int64);
|
sl@0
|
393 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT64, value_transform_long_uint64);
|
sl@0
|
394 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ENUM, value_transform_long_long);
|
sl@0
|
395 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_FLAGS, value_transform_long_ulong);
|
sl@0
|
396 |
SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_FLOAT, value_transform_long_float);
|
sl@0
|
397 |
SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_DOUBLE, value_transform_long_double);
|
sl@0
|
398 |
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_STRING, value_transform_enum_string);
|
sl@0
|
399 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_CHAR, value_transform_ulong_s8);
|
sl@0
|
400 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UCHAR, value_transform_ulong_u8);
|
sl@0
|
401 |
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_BOOLEAN, value_transform_ulong_bool);
|
sl@0
|
402 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT, value_transform_ulong_int);
|
sl@0
|
403 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT, value_transform_ulong_uint);
|
sl@0
|
404 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_LONG, value_transform_ulong_long);
|
sl@0
|
405 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_ULONG, value_transform_ulong_ulong);
|
sl@0
|
406 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT64, value_transform_ulong_int64);
|
sl@0
|
407 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT64, value_transform_ulong_uint64);
|
sl@0
|
408 |
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_ENUM, value_transform_ulong_long);
|
sl@0
|
409 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_FLAGS, value_transform_ulong_ulong);
|
sl@0
|
410 |
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_FLOAT, value_transform_ulong_float);
|
sl@0
|
411 |
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_DOUBLE, value_transform_ulong_double);
|
sl@0
|
412 |
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_STRING, value_transform_flags_string);
|
sl@0
|
413 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_CHAR, value_transform_float_s8);
|
sl@0
|
414 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UCHAR, value_transform_float_u8);
|
sl@0
|
415 |
SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_BOOLEAN, value_transform_float_bool);
|
sl@0
|
416 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT, value_transform_float_int);
|
sl@0
|
417 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT, value_transform_float_uint);
|
sl@0
|
418 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_LONG, value_transform_float_long);
|
sl@0
|
419 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_ULONG, value_transform_float_ulong);
|
sl@0
|
420 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT64, value_transform_float_int64);
|
sl@0
|
421 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT64, value_transform_float_uint64);
|
sl@0
|
422 |
SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_ENUM, value_transform_float_long);
|
sl@0
|
423 |
SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_FLAGS, value_transform_float_ulong);
|
sl@0
|
424 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_FLOAT, value_transform_float_float);
|
sl@0
|
425 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_DOUBLE, value_transform_float_double);
|
sl@0
|
426 |
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_STRING, value_transform_float_string);
|
sl@0
|
427 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_CHAR, value_transform_double_s8);
|
sl@0
|
428 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UCHAR, value_transform_double_u8);
|
sl@0
|
429 |
SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_BOOLEAN, value_transform_double_bool);
|
sl@0
|
430 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT, value_transform_double_int);
|
sl@0
|
431 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT, value_transform_double_uint);
|
sl@0
|
432 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_LONG, value_transform_double_long);
|
sl@0
|
433 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_ULONG, value_transform_double_ulong);
|
sl@0
|
434 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT64, value_transform_double_int64);
|
sl@0
|
435 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT64, value_transform_double_uint64);
|
sl@0
|
436 |
SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_ENUM, value_transform_double_long);
|
sl@0
|
437 |
SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLAGS, value_transform_double_ulong);
|
sl@0
|
438 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLOAT, value_transform_double_float);
|
sl@0
|
439 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_DOUBLE, value_transform_double_double);
|
sl@0
|
440 |
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_STRING, value_transform_double_string);
|
sl@0
|
441 |
/* string types */
|
sl@0
|
442 |
g_value_register_transform_func (G_TYPE_STRING, G_TYPE_STRING, value_transform_string_string);
|
sl@0
|
443 |
}
|