File: bindings.cmacros.h

package info (click to toggle)
haskell-bindings-dsl 1.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 84 kB
  • sloc: ansic: 517; makefile: 4; haskell: 3
file content (293 lines) | stat: -rw-r--r-- 9,929 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/******
 * Copyright © 2008–2009 Maurício C. Antunes
 * This file is distributed under the BSD license.
 * Check LICENSE file in distribution package for
 * details.
******/

#ifndef __BINDINGS_CMACROS_H__
#define __BINDINGS_CMACROS_H__

#define BC_GLOBALARRAY(name,type) \
type const *array_##name (void) \
{ \
  return name; \
} \

#define BC_INLINE_(name,ret) \
ret inline_##name (void) \
{ \
  return name; \
} \

#define BC_INLINE_VOID(name) \
void inline_##name (void) \
{ \
  name; \
} \

#define BC_INLINE0(name,ret) \
ret inline_##name (void) \
{ \
  return name (); \
} \

#define BC_INLINE0VOID(name) \
void inline_##name (void) \
{ \
  name (); \
} \

#define BC_INLINE1(name,t1,ret) \
ret inline_##name (t1 v1) \
{ \
  return name (v1); \
} \

#define BC_INLINE1VOID(name,t1) \
void inline_##name (t1 v1) \
{ \
  name (v1); \
} \

#define BC_INLINE2(name,t1,t2,ret) \
ret inline_##name (t1 v1,t2 v2) \
{ \
  return name (v1,v2); \
} \

#define BC_INLINE2VOID(name,t1,t2) \
void inline_##name (t1 v1,t2 v2) \
{ \
  name (v1,v2); \
} \

#define BC_INLINE3(name,t1,t2,t3,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3) \
{ \
  return name (v1,v2,v3); \
} \

#define BC_INLINE3VOID(name,t1,t2,t3) \
void inline_##name (t1 v1,t2 v2,t3 v3) \
{ \
  name (v1,v2,v3); \
} \

#define BC_INLINE4(name,t1,t2,t3,t4,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4) \
{ \
  return name (v1,v2,v3,v4); \
} \

#define BC_INLINE4VOID(name,t1,t2,t3,t4) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4) \
{ \
  name (v1,v2,v3,v4); \
} \

#define BC_INLINE5(name,t1,t2,t3,t4,t5,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5) \
{ \
  return name (v1,v2,v3,v4,v5); \
} \

#define BC_INLINE5VOID(name,t1,t2,t3,t4,t5) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5) \
{ \
  name (v1,v2,v3,v4,v5); \
} \

#define BC_INLINE6(name,t1,t2,t3,t4,t5,t6,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6) \
{ \
  return name (v1,v2,v3,v4,v5,v6); \
} \

#define BC_INLINE6VOID(name,t1,t2,t3,t4,t5,t6) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6) \
{ \
  name (v1,v2,v3,v4,v5,v6); \
} \

#define BC_INLINE7(name,t1,t2,t3,t4,t5,t6,t7,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7); \
} \

#define BC_INLINE7VOID(name,t1,t2,t3,t4,t5,t6,t7) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7); \
} \

#define BC_INLINE8(name,t1,t2,t3,t4,t5,t6,t7,t8,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8); \
} \

#define BC_INLINE8VOID(name,t1,t2,t3,t4,t5,t6,t7,t8) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8); \
} \

#define BC_INLINE9(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9); \
} \

#define BC_INLINE9VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9); \
} \

#define BC_INLINE10(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10); \
} \

#define BC_INLINE10VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10); \
} \

#define BC_INLINE11(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11); \
} \

#define BC_INLINE11VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11); \
} \

#define BC_INLINE12(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12); \
} \

#define BC_INLINE12VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12); \
} \

#define BC_INLINE13(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13); \
} \

#define BC_INLINE13VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13); \
} \

#define BC_INLINE14(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14); \
} \

#define BC_INLINE14VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14); \
} \

#define BC_INLINE15(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15); \
} \

#define BC_INLINE15VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15); \
} \

#define BC_INLINE16(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16); \
} \

#define BC_INLINE16VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16); \
} \

#define BC_INLINE17(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17); \
} \

#define BC_INLINE17VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17); \
} \

#define BC_INLINE18(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17,t18 v18) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18); \
} \

#define BC_INLINE18VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17,t18 v18) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18); \
} \

#define BC_INLINE19(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17,t18 v18,t19 v19) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19); \
} \

#define BC_INLINE19VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17,t18 v18,t19 v19) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19); \
} \

#define BC_INLINE20(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,ret) \
ret inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17,t18 v18,t19 v19,t20 v20) \
{ \
  return name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20); \
} \

#define BC_INLINE20VOID(name,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20) \
void inline_##name (t1 v1,t2 v2,t3 v3,t4 v4,t5 v5,t6 v6,t7 v7,t8 v8,t9 v9,t10 v10,t11 v11,t12 v12,t13 v13,t14 v14,t15 v15,t16 v16,t17 v17,t18 v18,t19 v19,t20 v20) \
{ \
  name (v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20); \
} \

#define BC_GOBJECT_NOTCLASSED(prefix,object,CamelCase) \
    BC_INLINE_(prefix##_TYPE_##object,GType) \
    BC_INLINE1(prefix##_##object,void*,CamelCase*) \
    BC_INLINE1(prefix##_IS_##object,void*,gboolean) \

#define BC_GOBJECT(prefix,object,CamelCase) \
    BC_GOBJECT_NOTCLASSED(prefix,object,CamelCase) \
    BC_INLINE1(prefix##_##object##_CLASS,void*,CamelCase##Class*) \
    BC_INLINE1(prefix##_IS_##object##_CLASS,void*,gboolean) \
    BC_INLINE1(prefix##_##object##_GET_CLASS,void*,CamelCase##Class*) \

#endif /* __BINDINGS_CMACROS_H__ */