1 /*******************************************************************************
2 **3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
3 ** 10 20 30 40 50 60 70 80
5 ** library for GtkXPaned-widget, a 2x2 grid-like variation of GtkPaned of gtk+
6 ** Copyright (C) 2005-2006 Mirco "MacSlow" Müller <macslow@bangang.de>
8 ** This library is free software; you can redistribute it and/or
9 ** modify it under the terms of the GNU Lesser General Public
10 ** License as published by the Free Software Foundation; either
11 ** version 2.1 of the License, or (at your option) any later version.
13 ** This library is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ** Lesser General Public License for more details.
18 ** You should have received a copy of the GNU Lesser General Public
19 ** License along with this library; if not, write to the Free Software
20 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 ** GtkXPaned is based on GtkPaned which was done by...
24 ** "Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald"
26 ** and later modified by...
28 ** "the GTK+ Team and others 1997-2000"
30 *******************************************************************************/
32 #include "gtkmarshalers.h"
34 /* lazy copied some marshalers copied from gtk+-2.6.10/gtk/gtkmarshalers.c */
35 void gtk_marshal_BOOLEAN__BOOLEAN (GClosure* closure,
38 const GValue* param_values,
39 gpointer invocation_hint,
40 gpointer marshal_data)
42 typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN) (gpointer data1,
45 register GMarshalFunc_BOOLEAN__BOOLEAN callback;
46 register GCClosure* cc = (GCClosure*) closure;
47 register gpointer data1;
48 register gpointer data2;
51 g_return_if_fail (return_value != NULL);
52 g_return_if_fail (n_param_values == 2);
54 if (G_CCLOSURE_SWAP_DATA (closure))
56 data1 = closure->data;
57 data2 = g_value_peek_pointer (param_values + 0);
61 data1 = g_value_peek_pointer (param_values + 0);
62 data2 = closure->data;
65 callback = (GMarshalFunc_BOOLEAN__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
66 v_return = callback (data1, g_marshal_value_peek_boolean (param_values + 1), data2);
67 g_value_set_boolean (return_value, v_return);
70 void gtk_marshal_BOOLEAN__ENUM (GClosure* closure,
73 const GValue* param_values,
74 gpointer invocation_hint,
75 gpointer marshal_data)
77 typedef gboolean (*GMarshalFunc_BOOLEAN__ENUM) (gpointer data1,
80 register GMarshalFunc_BOOLEAN__ENUM callback;
81 register GCClosure* cc = (GCClosure*) closure;
82 register gpointer data1;
83 register gpointer data2;
86 g_return_if_fail (return_value != NULL);
87 g_return_if_fail (n_param_values == 2);
89 if (G_CCLOSURE_SWAP_DATA (closure))
91 data1 = closure->data;
92 data2 = g_value_peek_pointer (param_values + 0);
96 data1 = g_value_peek_pointer (param_values + 0);
97 data2 = closure->data;
100 callback = (GMarshalFunc_BOOLEAN__ENUM) (marshal_data ? marshal_data : cc->callback);
101 v_return = callback (data1, g_marshal_value_peek_enum (param_values + 1), data2);
102 g_value_set_boolean (return_value, v_return);
105 void gtk_marshal_BOOLEAN__VOID (GClosure* closure,
106 GValue* return_value,
107 guint n_param_values,
108 const GValue* param_values,
109 gpointer invocation_hint,
110 gpointer marshal_data)
112 typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
114 register GMarshalFunc_BOOLEAN__VOID callback;
115 register GCClosure* cc = (GCClosure*) closure;
116 register gpointer data1;
117 register gpointer data2;
120 g_return_if_fail (return_value != NULL);
121 g_return_if_fail (n_param_values == 1);
123 if (G_CCLOSURE_SWAP_DATA (closure))
125 data1 = closure->data;
126 data2 = g_value_peek_pointer (param_values + 0);
130 data1 = g_value_peek_pointer (param_values + 0);
131 data2 = closure->data;
134 callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
135 v_return = callback (data1, data2);
136 g_value_set_boolean (return_value, v_return);