]> git.itanic.dy.fi Git - maemo-mapper/blob - src/marshal.c
Administrative changes in preparation for release of Maemo Mapper v2.6.2.
[maemo-mapper] / src / marshal.c
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
25 #define _GNU_SOURCE
26
27 #include "marshal.h"
28
29 #include    <glib-object.h>
30
31 G_BEGIN_DECLS
32
33 void
34 g_cclosure_user_marshal_VOID__STRING_STRING_POINTER_UCHAR_UINT (GClosure     *closure,
35                                                                 GValue       *return_value,
36                                                                 guint         n_param_values,
37                                                                 const GValue *param_values,
38                                                                 gpointer      invocation_hint,
39                                                                 gpointer      marshal_data)
40 {
41   typedef void (*GMarshalFunc_VOID__STRING_STRING_POINTER_UCHAR_UINT) (gpointer     data1,
42                                                                        gpointer     arg_1,
43                                                                        gpointer     arg_2,
44                                                                        gpointer     arg_3,
45                                                                        guchar       arg_4,
46                                                                        guint        arg_5,
47                                                                        gpointer     data2);
48   register GMarshalFunc_VOID__STRING_STRING_POINTER_UCHAR_UINT callback;
49   register GCClosure *cc = (GCClosure*) closure;
50   register gpointer data1, data2;
51
52   g_return_if_fail (n_param_values == 6);
53
54   if (G_CCLOSURE_SWAP_DATA (closure))
55     {
56       data1 = closure->data;
57       data2 = g_value_peek_pointer (param_values + 0);
58     }
59   else
60     {
61       data1 = g_value_peek_pointer (param_values + 0);
62       data2 = closure->data;
63     }
64   callback = (GMarshalFunc_VOID__STRING_STRING_POINTER_UCHAR_UINT) (marshal_data ? marshal_data : cc->callback);
65
66   callback (data1,
67             g_marshal_value_peek_string (param_values + 1),
68             g_marshal_value_peek_string (param_values + 2),
69             g_marshal_value_peek_pointer (param_values + 3),
70             g_marshal_value_peek_uchar (param_values + 4),
71             g_marshal_value_peek_uint (param_values + 5),
72             data2);
73 }
74
75 G_END_DECLS
76