Mercurial > pidgin.yaz
annotate console/libgnt/gntmarshal.c @ 13935:cd2da4b079cf
[gaim-migrate @ 16466]
New widget GntComboBox. I have addde a test file as an example as well.
Rename gntutils.* to gntmarshal.*
I am going to have some util-functions in gntutils.* later.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 08 Jul 2006 23:58:20 +0000 |
parents | |
children | 0387a167f342 |
rev | line source |
---|---|
13935
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 #include "gntmarshal.h" |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 void gnt_closure_marshal_BOOLEAN__STRING(GClosure *closure, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 GValue *ret_value, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 guint n_param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 const GValue *param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 gpointer invocation_hint, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 gpointer marshal_data) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 typedef gboolean (*func) (gpointer data1, const char *arg1, gpointer data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 register func callback; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 register GCClosure *cc = (GCClosure*)closure; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 register gpointer data1, data2; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 gboolean ret; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 g_return_if_fail(ret_value != NULL); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 g_return_if_fail(n_param_values == 2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
19 if (G_CCLOSURE_SWAP_DATA(closure)) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 data1 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 data2 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 else |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
26 data1 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 data2 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
30 callback = (func) (marshal_data ? marshal_data : cc->callback); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
31 ret = callback(data1, g_value_get_string(param_values + 1) , data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
32 g_value_set_boolean(ret_value, ret); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
33 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
35 void gnt_closure_marshal_VOID__INT_INT_INT_INT(GClosure *closure, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 GValue *ret_value, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
37 guint n_param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
38 const GValue *param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
39 gpointer invocation_hint, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
40 gpointer marshal_data) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
41 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
42 typedef void (*func) (gpointer data1, int, int, int, int, gpointer data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
43 register func callback; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
44 register GCClosure *cc = (GCClosure*)closure; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
45 register gpointer data1, data2; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
46 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
47 g_return_if_fail(n_param_values == 5); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
48 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
49 if (G_CCLOSURE_SWAP_DATA(closure)) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
50 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
51 data1 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
52 data2 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
53 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
54 else |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
56 data1 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
57 data2 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
58 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
59 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
60 callback = (func) (marshal_data ? marshal_data : cc->callback); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
61 callback(data1, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
62 g_value_get_int(param_values + 1) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
63 g_value_get_int(param_values + 2) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
64 g_value_get_int(param_values + 3) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
65 g_value_get_int(param_values + 4) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
66 data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
67 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
68 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
69 void gnt_closure_marshal_VOID__INT_INT(GClosure *closure, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
70 GValue *ret_value, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
71 guint n_param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
72 const GValue *param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
73 gpointer invocation_hint, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
74 gpointer marshal_data) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
75 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
76 typedef void (*func) (gpointer data1, int, int, gpointer data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
77 register func callback; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
78 register GCClosure *cc = (GCClosure*)closure; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
79 register gpointer data1, data2; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
80 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
81 g_return_if_fail(n_param_values == 3); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
82 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
83 if (G_CCLOSURE_SWAP_DATA(closure)) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
84 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
85 data1 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
86 data2 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
87 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
88 else |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
89 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
90 data1 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
91 data2 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
92 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
93 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
94 callback = (func) (marshal_data ? marshal_data : cc->callback); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
95 callback(data1, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
96 g_value_get_int(param_values + 1) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
97 g_value_get_int(param_values + 2) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
98 data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
99 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
100 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
101 void gnt_closure_marshal_VOID__POINTER_POINTER(GClosure *closure, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
102 GValue *ret_value, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
103 guint n_param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
104 const GValue *param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
105 gpointer invocation_hint, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
106 gpointer marshal_data) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
107 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
108 typedef void (*func) (gpointer data1, gpointer, gpointer, gpointer data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
109 register func callback; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
110 register GCClosure *cc = (GCClosure*)closure; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
111 register gpointer data1, data2; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
112 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
113 g_return_if_fail(n_param_values == 3); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
114 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
115 if (G_CCLOSURE_SWAP_DATA(closure)) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
116 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
117 data1 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
118 data2 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
119 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
120 else |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
121 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
122 data1 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
123 data2 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
124 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
125 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
126 callback = (func) (marshal_data ? marshal_data : cc->callback); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
127 callback(data1, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
128 g_value_get_pointer(param_values + 1) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
129 g_value_get_pointer(param_values + 2) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
130 data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
131 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
132 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
133 void gnt_closure_marshal_BOOLEAN__INT_INT(GClosure *closure, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
134 GValue *ret_value, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
135 guint n_param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
136 const GValue *param_values, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
137 gpointer invocation_hint, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
138 gpointer marshal_data) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
139 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
140 typedef gboolean (*func) (gpointer data1, int, int, gpointer data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
141 register func callback; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
142 register GCClosure *cc = (GCClosure*)closure; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
143 register gpointer data1, data2; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
144 gboolean ret; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
145 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
146 g_return_if_fail(ret_value != NULL); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
147 g_return_if_fail(n_param_values == 3); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
148 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
149 if (G_CCLOSURE_SWAP_DATA(closure)) |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
150 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
151 data1 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
152 data2 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
153 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
154 else |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
155 { |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
156 data1 = g_value_peek_pointer(param_values + 0); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
157 data2 = closure->data; |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
158 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
159 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
160 callback = (func) (marshal_data ? marshal_data : cc->callback); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
161 ret = callback(data1, |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
162 g_value_get_int(param_values + 1) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
163 g_value_get_int(param_values + 2) , |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
164 data2); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
165 g_value_set_boolean(ret_value, ret); |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
166 } |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
167 |
cd2da4b079cf
[gaim-migrate @ 16466]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
168 |