sl@0: /* GObject - GLib Type, Object, Parameter and Signal Library sl@0: * Copyright (C) 2001 Red Hat, Inc. sl@0: * sl@0: * This library is free software; you can redistribute it and/or sl@0: * modify it under the terms of the GNU Lesser General Public sl@0: * License as published by the Free Software Foundation; either sl@0: * version 2 of the License, or (at your option) any later version. sl@0: * sl@0: * This library is distributed in the hope that it will be useful, sl@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of sl@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU sl@0: * Lesser General Public License for more details. sl@0: * sl@0: * You should have received a copy of the GNU Lesser General sl@0: * Public License along with this library; if not, write to the sl@0: * Free Software Foundation, Inc., 59 Temple Place, Suite 330, sl@0: * Boston, MA 02111-1307, USA. sl@0: */ sl@0: sl@0: #include "config.h" sl@0: sl@0: #include sl@0: sl@0: #include "gvalue.h" sl@0: #include "genums.h" sl@0: #include "gobjectalias.h" sl@0: sl@0: sl@0: /* same type transforms sl@0: */ sl@0: static void sl@0: value_transform_memcpy_data0 (const GValue *src_value, sl@0: GValue *dest_value) sl@0: { sl@0: memcpy (&dest_value->data[0], &src_value->data[0], sizeof (src_value->data[0])); sl@0: } sl@0: #define value_transform_int_int value_transform_memcpy_data0 sl@0: #define value_transform_uint_uint value_transform_memcpy_data0 sl@0: #define value_transform_long_long value_transform_memcpy_data0 sl@0: #define value_transform_ulong_ulong value_transform_memcpy_data0 sl@0: #define value_transform_int64_int64 value_transform_memcpy_data0 sl@0: #define value_transform_uint64_uint64 value_transform_memcpy_data0 sl@0: #define value_transform_float_float value_transform_memcpy_data0 sl@0: #define value_transform_double_double value_transform_memcpy_data0 sl@0: sl@0: sl@0: /* numeric casts sl@0: */ sl@0: #define DEFINE_CAST(func_name, from_member, ctype, to_member) \ sl@0: static void \ sl@0: value_transform_##func_name (const GValue *src_value, \ sl@0: GValue *dest_value) \ sl@0: { \ sl@0: ctype c_value = src_value->data[0].from_member; \ sl@0: dest_value->data[0].to_member = c_value; \ sl@0: } extern void glib_dummy_decl (void) sl@0: DEFINE_CAST (int_s8, v_int, gint8, v_int); sl@0: DEFINE_CAST (int_u8, v_int, guint8, v_uint); sl@0: DEFINE_CAST (int_uint, v_int, guint, v_uint); sl@0: DEFINE_CAST (int_long, v_int, glong, v_long); sl@0: DEFINE_CAST (int_ulong, v_int, gulong, v_ulong); sl@0: DEFINE_CAST (int_int64, v_int, gint64, v_int64); sl@0: DEFINE_CAST (int_uint64, v_int, guint64, v_uint64); sl@0: DEFINE_CAST (int_float, v_int, gfloat, v_float); sl@0: DEFINE_CAST (int_double, v_int, gdouble, v_double); sl@0: DEFINE_CAST (uint_s8, v_uint, gint8, v_int); sl@0: DEFINE_CAST (uint_u8, v_uint, guint8, v_uint); sl@0: DEFINE_CAST (uint_int, v_uint, gint, v_int); sl@0: DEFINE_CAST (uint_long, v_uint, glong, v_long); sl@0: DEFINE_CAST (uint_ulong, v_uint, gulong, v_ulong); sl@0: DEFINE_CAST (uint_int64, v_uint, gint64, v_int64); sl@0: DEFINE_CAST (uint_uint64, v_uint, guint64, v_uint64); sl@0: DEFINE_CAST (uint_float, v_uint, gfloat, v_float); sl@0: DEFINE_CAST (uint_double, v_uint, gdouble, v_double); sl@0: DEFINE_CAST (long_s8, v_long, gint8, v_int); sl@0: DEFINE_CAST (long_u8, v_long, guint8, v_uint); sl@0: DEFINE_CAST (long_int, v_long, gint, v_int); sl@0: DEFINE_CAST (long_uint, v_long, guint, v_uint); sl@0: DEFINE_CAST (long_ulong, v_long, gulong, v_ulong); sl@0: DEFINE_CAST (long_int64, v_long, gint64, v_int64); sl@0: DEFINE_CAST (long_uint64, v_long, guint64, v_uint64); sl@0: DEFINE_CAST (long_float, v_long, gfloat, v_float); sl@0: DEFINE_CAST (long_double, v_long, gdouble, v_double); sl@0: DEFINE_CAST (ulong_s8, v_ulong, gint8, v_int); sl@0: DEFINE_CAST (ulong_u8, v_ulong, guint8, v_uint); sl@0: DEFINE_CAST (ulong_int, v_ulong, gint, v_int); sl@0: DEFINE_CAST (ulong_uint, v_ulong, guint, v_uint); sl@0: DEFINE_CAST (ulong_int64, v_ulong, gint64, v_int64); sl@0: DEFINE_CAST (ulong_uint64, v_ulong, guint64, v_uint64); sl@0: DEFINE_CAST (ulong_long, v_ulong, glong, v_long); sl@0: DEFINE_CAST (ulong_float, v_ulong, gfloat, v_float); sl@0: DEFINE_CAST (ulong_double, v_ulong, gdouble, v_double); sl@0: DEFINE_CAST (int64_s8, v_int64, gint8, v_int); sl@0: DEFINE_CAST (int64_u8, v_int64, guint8, v_uint); sl@0: DEFINE_CAST (int64_int, v_int64, gint, v_int); sl@0: DEFINE_CAST (int64_uint, v_int64, guint, v_uint); sl@0: DEFINE_CAST (int64_long, v_int64, glong, v_long); sl@0: DEFINE_CAST (int64_uint64, v_int64, guint64, v_uint64); sl@0: DEFINE_CAST (int64_ulong, v_int64, gulong, v_ulong); sl@0: DEFINE_CAST (int64_float, v_int64, gfloat, v_float); sl@0: DEFINE_CAST (int64_double, v_int64, gdouble, v_double); sl@0: DEFINE_CAST (uint64_s8, v_uint64, gint8, v_int); sl@0: DEFINE_CAST (uint64_u8, v_uint64, guint8, v_uint); sl@0: DEFINE_CAST (uint64_int, v_uint64, gint, v_int); sl@0: DEFINE_CAST (uint64_uint, v_uint64, guint, v_uint); sl@0: DEFINE_CAST (uint64_long, v_uint64, glong, v_long); sl@0: DEFINE_CAST (uint64_ulong, v_uint64, gulong, v_ulong); sl@0: DEFINE_CAST (uint64_int64, v_uint64, gint64, v_int64); sl@0: #ifdef _MSC_VER sl@0: /* work around error C2520: conversion from unsigned __int64 to double sl@0: * not implemented, use signed __int64 sl@0: * If it is supported don't miss to g_value_register_transform_func() below sl@0: */ sl@0: #pragma message ("Check if cast from uint64 to double is supported with msvc 6.0") sl@0: #else sl@0: DEFINE_CAST (uint64_float, v_uint64, gfloat, v_float); sl@0: DEFINE_CAST (uint64_double, v_uint64, gdouble, v_double); sl@0: #endif sl@0: DEFINE_CAST (float_s8, v_float, gint8, v_int); sl@0: DEFINE_CAST (float_u8, v_float, guint8, v_uint); sl@0: DEFINE_CAST (float_int, v_float, gint, v_int); sl@0: DEFINE_CAST (float_uint, v_float, guint, v_uint); sl@0: DEFINE_CAST (float_long, v_float, glong, v_long); sl@0: DEFINE_CAST (float_ulong, v_float, gulong, v_ulong); sl@0: DEFINE_CAST (float_int64, v_float, gint64, v_int64); sl@0: DEFINE_CAST (float_uint64, v_float, guint64, v_uint64); sl@0: DEFINE_CAST (float_double, v_float, gdouble, v_double); sl@0: DEFINE_CAST (double_s8, v_double, gint8, v_int); sl@0: DEFINE_CAST (double_u8, v_double, guint8, v_uint); sl@0: DEFINE_CAST (double_int, v_double, gint, v_int); sl@0: DEFINE_CAST (double_uint, v_double, guint, v_uint); sl@0: DEFINE_CAST (double_long, v_double, glong, v_long); sl@0: DEFINE_CAST (double_ulong, v_double, gulong, v_ulong); sl@0: DEFINE_CAST (double_int64, v_double, gint64, v_int64); sl@0: DEFINE_CAST (double_uint64, v_double, guint64, v_uint64); sl@0: DEFINE_CAST (double_float, v_double, gfloat, v_float); sl@0: sl@0: sl@0: /* boolean assignments sl@0: */ sl@0: #define DEFINE_BOOL_CHECK(func_name, from_member) \ sl@0: static void \ sl@0: value_transform_##func_name (const GValue *src_value, \ sl@0: GValue *dest_value) \ sl@0: { \ sl@0: dest_value->data[0].v_int = src_value->data[0].from_member != 0; \ sl@0: } extern void glib_dummy_decl (void) sl@0: DEFINE_BOOL_CHECK (int_bool, v_int); sl@0: DEFINE_BOOL_CHECK (uint_bool, v_uint); sl@0: DEFINE_BOOL_CHECK (long_bool, v_long); sl@0: DEFINE_BOOL_CHECK (ulong_bool, v_uint); sl@0: DEFINE_BOOL_CHECK (int64_bool, v_int64); sl@0: DEFINE_BOOL_CHECK (uint64_bool, v_uint64); sl@0: sl@0: sl@0: /* string printouts sl@0: */ sl@0: #define DEFINE_SPRINTF(func_name, from_member, format) \ sl@0: static void \ sl@0: value_transform_##func_name (const GValue *src_value, \ sl@0: GValue *dest_value) \ sl@0: { \ sl@0: dest_value->data[0].v_pointer = g_strdup_printf ((format), \ sl@0: src_value->data[0].from_member); \ sl@0: } extern void glib_dummy_decl (void) sl@0: DEFINE_SPRINTF (int_string, v_int, "%d"); sl@0: DEFINE_SPRINTF (uint_string, v_uint, "%u"); sl@0: DEFINE_SPRINTF (long_string, v_long, "%ld"); sl@0: DEFINE_SPRINTF (ulong_string, v_ulong, "%lu"); sl@0: DEFINE_SPRINTF (int64_string, v_int64, "%" G_GINT64_FORMAT); sl@0: DEFINE_SPRINTF (uint64_string, v_uint64, "%" G_GUINT64_FORMAT); sl@0: DEFINE_SPRINTF (float_string, v_float, "%f"); sl@0: DEFINE_SPRINTF (double_string, v_double, "%f"); sl@0: sl@0: sl@0: /* special cases sl@0: */ sl@0: static void sl@0: value_transform_bool_string (const GValue *src_value, sl@0: GValue *dest_value) sl@0: { sl@0: dest_value->data[0].v_pointer = g_strdup_printf ("%s", sl@0: src_value->data[0].v_int ? sl@0: "TRUE" : "FALSE"); sl@0: } sl@0: static void sl@0: value_transform_string_string (const GValue *src_value, sl@0: GValue *dest_value) sl@0: { sl@0: dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); sl@0: } sl@0: static void sl@0: value_transform_enum_string (const GValue *src_value, sl@0: GValue *dest_value) sl@0: { sl@0: GEnumClass *class = g_type_class_ref (G_VALUE_TYPE (src_value)); sl@0: GEnumValue *enum_value = g_enum_get_value (class, src_value->data[0].v_long); sl@0: sl@0: if (enum_value) sl@0: dest_value->data[0].v_pointer = g_strdup (enum_value->value_name); sl@0: else sl@0: dest_value->data[0].v_pointer = g_strdup_printf ("%ld", src_value->data[0].v_long); sl@0: sl@0: g_type_class_unref (class); sl@0: } sl@0: static void sl@0: value_transform_flags_string (const GValue *src_value, sl@0: GValue *dest_value) sl@0: { sl@0: GFlagsClass *class = g_type_class_ref (G_VALUE_TYPE (src_value)); sl@0: GFlagsValue *flags_value = g_flags_get_first_value (class, src_value->data[0].v_ulong); sl@0: sl@0: if (flags_value) sl@0: { sl@0: GString *gstring = g_string_new (NULL); sl@0: guint v_flags = src_value->data[0].v_ulong; sl@0: sl@0: do sl@0: { sl@0: v_flags &= ~flags_value->value; sl@0: sl@0: if (gstring->str[0]) sl@0: g_string_append (gstring, " | "); sl@0: g_string_append (gstring, flags_value->value_name); sl@0: flags_value = g_flags_get_first_value (class, v_flags); sl@0: } sl@0: while (flags_value); sl@0: sl@0: if (v_flags) sl@0: dest_value->data[0].v_pointer = g_strdup_printf ("%s | %u", sl@0: gstring->str, sl@0: v_flags); sl@0: else sl@0: dest_value->data[0].v_pointer = g_strdup (gstring->str); sl@0: g_string_free (gstring, TRUE); sl@0: } sl@0: else sl@0: dest_value->data[0].v_pointer = g_strdup_printf ("%lu", src_value->data[0].v_ulong); sl@0: sl@0: g_type_class_unref (class); sl@0: } sl@0: sl@0: sl@0: /* registration sl@0: */ sl@0: void sl@0: g_value_transforms_init (void) sl@0: { sl@0: /* some transformations are a bit questionable, sl@0: * we currently skip those sl@0: */ sl@0: #define SKIP____register_transform_func(type1,type2,transform_func) /* skip questionable transforms */ \ sl@0: (void)0 sl@0: sl@0: /* numeric types (plus to string) */ sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_CHAR, value_transform_int_int); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UCHAR, value_transform_int_u8); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_BOOLEAN, value_transform_int_bool); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT, value_transform_int_int); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT, value_transform_int_uint); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_LONG, value_transform_int_long); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ULONG, value_transform_int_ulong); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT64, value_transform_int_int64); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT64, value_transform_int_uint64); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ENUM, value_transform_int_long); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLAGS, value_transform_int_ulong); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLOAT, value_transform_int_float); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_DOUBLE, value_transform_int_double); sl@0: g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_STRING, value_transform_int_string); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_CHAR, value_transform_uint_s8); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UCHAR, value_transform_uint_uint); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_BOOLEAN, value_transform_uint_bool); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT, value_transform_uint_int); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT, value_transform_uint_uint); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_LONG, value_transform_uint_long); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ULONG, value_transform_uint_ulong); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT64, value_transform_uint_int64); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT64, value_transform_uint_uint64); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ENUM, value_transform_uint_long); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLAGS, value_transform_uint_ulong); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLOAT, value_transform_uint_float); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_DOUBLE, value_transform_uint_double); sl@0: g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_STRING, value_transform_uint_string); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_CHAR, value_transform_int_s8); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UCHAR, value_transform_int_u8); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, value_transform_int_int); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT, value_transform_int_int); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT, value_transform_int_uint); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_LONG, value_transform_int_long); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ULONG, value_transform_int_ulong); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT64, value_transform_int_int64); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT64, value_transform_int_uint64); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ENUM, value_transform_int_long); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLAGS, value_transform_int_ulong); sl@0: SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLOAT, value_transform_int_float); sl@0: SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_DOUBLE, value_transform_int_double); sl@0: g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_STRING, value_transform_bool_string); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_CHAR, value_transform_int_s8); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_UCHAR, value_transform_int_u8); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_BOOLEAN, value_transform_int_bool); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT, value_transform_int_int); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT, value_transform_int_uint); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_LONG, value_transform_int_long); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_ULONG, value_transform_int_ulong); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT64, value_transform_int_int64); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT64, value_transform_int_uint64); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_ENUM, value_transform_int_long); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLAGS, value_transform_int_ulong); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLOAT, value_transform_int_float); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_DOUBLE, value_transform_int_double); sl@0: g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, value_transform_int_string); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_CHAR, value_transform_uint_s8); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UCHAR, value_transform_uint_u8); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_BOOLEAN, value_transform_uint_bool); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT, value_transform_uint_int); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT, value_transform_uint_uint); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_LONG, value_transform_uint_long); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ULONG, value_transform_uint_ulong); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT64, value_transform_uint_int64); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT64, value_transform_uint_uint64); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ENUM, value_transform_uint_long); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLAGS, value_transform_uint_ulong); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLOAT, value_transform_uint_float); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_DOUBLE, value_transform_uint_double); sl@0: g_value_register_transform_func (G_TYPE_UINT, G_TYPE_STRING, value_transform_uint_string); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_CHAR, value_transform_long_s8); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UCHAR, value_transform_long_u8); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_BOOLEAN, value_transform_long_bool); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT, value_transform_long_int); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT, value_transform_long_uint); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_LONG, value_transform_long_long); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ULONG, value_transform_long_ulong); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT64, value_transform_long_int64); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT64, value_transform_long_uint64); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ENUM, value_transform_long_long); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLAGS, value_transform_long_ulong); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLOAT, value_transform_long_float); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_DOUBLE, value_transform_long_double); sl@0: g_value_register_transform_func (G_TYPE_LONG, G_TYPE_STRING, value_transform_long_string); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_CHAR, value_transform_ulong_s8); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UCHAR, value_transform_ulong_u8); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_BOOLEAN, value_transform_ulong_bool); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT, value_transform_ulong_int); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT, value_transform_ulong_uint); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_LONG, value_transform_ulong_long); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ULONG, value_transform_ulong_ulong); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT64, value_transform_ulong_int64); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT64, value_transform_ulong_uint64); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ENUM, value_transform_ulong_long); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLAGS, value_transform_ulong_ulong); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLOAT, value_transform_ulong_float); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_DOUBLE, value_transform_ulong_double); sl@0: g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_STRING, value_transform_ulong_string); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_CHAR, value_transform_int64_s8); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UCHAR, value_transform_int64_u8); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_BOOLEAN, value_transform_int64_bool); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_INT, value_transform_int64_int); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UINT, value_transform_int64_uint); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_LONG, value_transform_int64_long); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_ULONG, value_transform_int64_ulong); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_INT64, value_transform_int64_int64); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UINT64, value_transform_int64_uint64); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_ENUM, value_transform_int64_long); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_FLAGS, value_transform_int64_ulong); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_FLOAT, value_transform_int64_float); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_DOUBLE, value_transform_int64_double); sl@0: g_value_register_transform_func (G_TYPE_INT64, G_TYPE_STRING, value_transform_int64_string); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_CHAR, value_transform_uint64_s8); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UCHAR, value_transform_uint64_u8); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_BOOLEAN, value_transform_uint64_bool); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_INT, value_transform_uint64_int); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UINT, value_transform_uint64_uint); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_LONG, value_transform_uint64_long); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_ULONG, value_transform_uint64_ulong); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_INT64, value_transform_uint64_int64); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UINT64, value_transform_uint64_uint64); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_ENUM, value_transform_uint64_long); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_FLAGS, value_transform_uint64_ulong); sl@0: #ifndef _MSC_VER sl@0: /* required casts unsupported with msvc 5.0 */ sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_FLOAT, value_transform_uint64_float); sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_DOUBLE, value_transform_uint64_double); sl@0: #endif sl@0: g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_STRING, value_transform_uint64_string); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_CHAR, value_transform_long_s8); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UCHAR, value_transform_long_u8); sl@0: SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_BOOLEAN, value_transform_long_bool); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT, value_transform_long_int); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT, value_transform_long_uint); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_LONG, value_transform_long_long); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ULONG, value_transform_long_ulong); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT64, value_transform_long_int64); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT64, value_transform_long_uint64); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ENUM, value_transform_long_long); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_FLAGS, value_transform_long_ulong); sl@0: SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_FLOAT, value_transform_long_float); sl@0: SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_DOUBLE, value_transform_long_double); sl@0: g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_STRING, value_transform_enum_string); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_CHAR, value_transform_ulong_s8); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UCHAR, value_transform_ulong_u8); sl@0: SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_BOOLEAN, value_transform_ulong_bool); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT, value_transform_ulong_int); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT, value_transform_ulong_uint); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_LONG, value_transform_ulong_long); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_ULONG, value_transform_ulong_ulong); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT64, value_transform_ulong_int64); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT64, value_transform_ulong_uint64); sl@0: SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_ENUM, value_transform_ulong_long); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_FLAGS, value_transform_ulong_ulong); sl@0: SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_FLOAT, value_transform_ulong_float); sl@0: SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_DOUBLE, value_transform_ulong_double); sl@0: g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_STRING, value_transform_flags_string); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_CHAR, value_transform_float_s8); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UCHAR, value_transform_float_u8); sl@0: SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_BOOLEAN, value_transform_float_bool); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT, value_transform_float_int); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT, value_transform_float_uint); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_LONG, value_transform_float_long); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_ULONG, value_transform_float_ulong); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT64, value_transform_float_int64); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT64, value_transform_float_uint64); sl@0: SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_ENUM, value_transform_float_long); sl@0: SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_FLAGS, value_transform_float_ulong); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_FLOAT, value_transform_float_float); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_DOUBLE, value_transform_float_double); sl@0: g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_STRING, value_transform_float_string); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_CHAR, value_transform_double_s8); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UCHAR, value_transform_double_u8); sl@0: SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_BOOLEAN, value_transform_double_bool); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT, value_transform_double_int); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT, value_transform_double_uint); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_LONG, value_transform_double_long); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_ULONG, value_transform_double_ulong); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT64, value_transform_double_int64); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT64, value_transform_double_uint64); sl@0: SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_ENUM, value_transform_double_long); sl@0: SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLAGS, value_transform_double_ulong); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLOAT, value_transform_double_float); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_DOUBLE, value_transform_double_double); sl@0: g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_STRING, value_transform_double_string); sl@0: /* string types */ sl@0: g_value_register_transform_func (G_TYPE_STRING, G_TYPE_STRING, value_transform_string_string); sl@0: }