4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #include <glib-object.h>
24 #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
25 #define g_marshal_value_peek_char(v) g_value_get_char (v)
26 #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
27 #define g_marshal_value_peek_int(v) g_value_get_int (v)
28 #define g_marshal_value_peek_uint(v) g_value_get_uint (v)
29 #define g_marshal_value_peek_long(v) g_value_get_long (v)
30 #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
31 #define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
32 #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
33 #define g_marshal_value_peek_enum(v) g_value_get_enum (v)
34 #define g_marshal_value_peek_flags(v) g_value_get_flags (v)
35 #define g_marshal_value_peek_float(v) g_value_get_float (v)
36 #define g_marshal_value_peek_double(v) g_value_get_double (v)
37 #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
38 #define g_marshal_value_peek_param(v) g_value_get_param (v)
39 #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
40 #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
41 #define g_marshal_value_peek_object(v) g_value_get_object (v)
42 #else /* !G_ENABLE_DEBUG */
43 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
44 * Do not access GValues directly in your code. Instead, use the
45 * g_value_get_*() functions
47 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
48 #define g_marshal_value_peek_char(v) (v)->data[0].v_int
49 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
50 #define g_marshal_value_peek_int(v) (v)->data[0].v_int
51 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
52 #define g_marshal_value_peek_long(v) (v)->data[0].v_long
53 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
54 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
55 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
56 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long
57 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
58 #define g_marshal_value_peek_float(v) (v)->data[0].v_float
59 #define g_marshal_value_peek_double(v) (v)->data[0].v_double
60 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
61 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
62 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
63 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
64 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
65 #endif /* !G_ENABLE_DEBUG */
67 /* VOID:INT,STRING (mashal.in:1) */
68 void g_cclosure_user_marshal_VOID__INT_STRING(
70 GValue *return_value G_GNUC_UNUSED,
72 const GValue *param_values,
73 gpointer invocation_hint G_GNUC_UNUSED,
74 gpointer marshal_data)
76 typedef void (*GMarshalFunc_VOID__INT_STRING)(gpointer data1, gint arg_1, gpointer arg_2, gpointer data2);
78 register GMarshalFunc_VOID__INT_STRING callback;
79 register GCClosure *cc = (GCClosure*) closure;
80 register gpointer data1, data2;
82 g_return_if_fail (n_param_values == 3);
84 if (G_CCLOSURE_SWAP_DATA (closure)) {
85 data1 = closure->data;
86 data2 = g_value_peek_pointer(param_values + 0);
89 data1 = g_value_peek_pointer(param_values + 0);
90 data2 = closure->data;
92 callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
94 callback(data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_string (param_values + 2), data2);
97 /* VOID:INT,INT,INT,STRING (mashal.in:2) */
98 void g_cclosure_user_marshal_VOID__INT_INT_INT_STRING(
100 GValue *return_value G_GNUC_UNUSED,
101 guint n_param_values,
102 const GValue *param_values,
103 gpointer invocation_hint G_GNUC_UNUSED,
104 gpointer marshal_data)
106 typedef void (*GMarshalFunc_VOID__INT_INT_INT_STRING)(
114 register GMarshalFunc_VOID__INT_INT_INT_STRING callback;
115 register GCClosure *cc = (GCClosure*) closure;
116 register gpointer data1, data2;
118 g_return_if_fail (n_param_values == 5);
120 if (G_CCLOSURE_SWAP_DATA (closure)) {
121 data1 = closure->data;
122 data2 = g_value_peek_pointer(param_values + 0);
125 data1 = g_value_peek_pointer(param_values + 0);
126 data2 = closure->data;
128 callback = (GMarshalFunc_VOID__INT_INT_INT_STRING) (marshal_data ? marshal_data : cc->callback);
130 callback(data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_int (param_values + 2),
131 g_marshal_value_peek_int (param_values + 3), g_marshal_value_peek_string (param_values + 4), data2);
134 /* VOID:INT,INT,INT,INT,STRING (mashal.in:3) */
135 void g_cclosure_user_marshal_VOID__INT_INT_INT_INT_STRING(
137 GValue *return_value G_GNUC_UNUSED,
138 guint n_param_values,
139 const GValue *param_values,
140 gpointer invocation_hint G_GNUC_UNUSED,
141 gpointer marshal_data)
143 typedef void (*GMarshalFunc_VOID__INT_INT_INT_INT_STRING)(
152 register GMarshalFunc_VOID__INT_INT_INT_INT_STRING callback;
153 register GCClosure *cc = (GCClosure*) closure;
154 register gpointer data1, data2;
156 g_return_if_fail (n_param_values == 6);
158 if (G_CCLOSURE_SWAP_DATA (closure)) {
159 data1 = closure->data;
160 data2 = g_value_peek_pointer(param_values + 0);
163 data1 = g_value_peek_pointer(param_values + 0);
164 data2 = closure->data;
166 callback = (GMarshalFunc_VOID__INT_INT_INT_INT_STRING) (marshal_data ? marshal_data : cc->callback);
168 callback(data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_int (param_values + 2),
169 g_marshal_value_peek_int (param_values + 3), g_marshal_value_peek_int (param_values + 4),
170 g_marshal_value_peek_string (param_values + 5), data2);