]> git.itanic.dy.fi Git - maemo-mapper/blob - src/marshal.h
Administrative changes in preparation for release of Maemo Mapper v2.6.2.
[maemo-mapper] / src / marshal.h
1 /*
2  * Copyright (C) 2006, 2007 John Costigan.
3  *
4  * POI and GPS-Info code originally written by Cezary Jackiewicz.
5  *
6  * Default map data provided by http://www.openstreetmap.org/
7  *
8  * This file is part of Maemo Mapper.
9  *
10  * Maemo Mapper is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * Maemo Mapper is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Maemo Mapper.  If not, see <http://www.gnu.org/licenses/>.
22  */
23
24 #ifndef MAEMO_MAPPER_MARSHAL_H
25 #define MAEMO_MAPPER_MARSHAL_H
26
27 #ifndef __g_cclosure_user_marshal_MARSHAL_H__
28 #define __g_cclosure_user_marshal_MARSHAL_H__
29
30 #include    <glib-object.h>
31
32 G_BEGIN_DECLS
33
34 #ifdef G_ENABLE_DEBUG
35 #define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
36 #define g_marshal_value_peek_char(v)     g_value_get_char (v)
37 #define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
38 #define g_marshal_value_peek_int(v)      g_value_get_int (v)
39 #define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
40 #define g_marshal_value_peek_long(v)     g_value_get_long (v)
41 #define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
42 #define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
43 #define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
44 #define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
45 #define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
46 #define g_marshal_value_peek_float(v)    g_value_get_float (v)
47 #define g_marshal_value_peek_double(v)   g_value_get_double (v)
48 #define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
49 #define g_marshal_value_peek_param(v)    g_value_get_param (v)
50 #define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
51 #define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
52 #define g_marshal_value_peek_object(v)   g_value_get_object (v)
53 #else /* !G_ENABLE_DEBUG */
54 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
55  *          Do not access GValues directly in your code. Instead, use the
56  *          g_value_get_*() functions
57  */
58 #define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
59 #define g_marshal_value_peek_char(v)     (v)->data[0].v_int
60 #define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
61 #define g_marshal_value_peek_int(v)      (v)->data[0].v_int
62 #define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
63 #define g_marshal_value_peek_long(v)     (v)->data[0].v_long
64 #define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
65 #define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
66 #define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
67 #define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
68 #define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
69 #define g_marshal_value_peek_float(v)    (v)->data[0].v_float
70 #define g_marshal_value_peek_double(v)   (v)->data[0].v_double
71 #define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
72 #define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
73 #define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
74 #define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
75 #define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
76 #endif /* !G_ENABLE_DEBUG */
77
78
79 /* VOID:STRING,STRING,POINTER,UCHAR,UINT (marshal.list:1) */
80 extern void g_cclosure_user_marshal_VOID__STRING_STRING_POINTER_UCHAR_UINT (GClosure     *closure,
81                                                                             GValue       *return_value,
82                                                                             guint         n_param_values,
83                                                                             const GValue *param_values,
84                                                                             gpointer      invocation_hint,
85                                                                             gpointer      marshal_data);
86
87 G_END_DECLS
88
89 #endif /* __g_cclosure_user_marshal_MARSHAL_H__ */
90
91
92 #endif /* ifndef MAEMO_MAPPER_MARSHAL_H */