-
Notifications
You must be signed in to change notification settings - Fork 1
/
typemap
340 lines (301 loc) · 8.42 KB
/
typemap
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# --------------------------------------------------------------------------------
# X
XID T_X_ID
Window T_X_ID
Drawable T_X_ID
Font T_X_ID
Pixmap T_X_ID
Cursor T_X_ID
Colormap T_X_ID
GContext T_X_ID
KeySym T_X_ID
EventMask T_X_ID
Atom T_X_ID
VisualID T_X_ID
Time T_X_ID
KeyCode T_X_ID
XContext T_X_ID
Pixel T_X_ID
XrmQuark T_X_ID
XrmName T_X_ID
XrmClass T_X_ID
XrmRepresentation T_X_ID
XrmString T_X_PTR
XrmDatabase T_X_PTR
XrmOptionDescRec * T_X_PTR
XrmValue * T_X_PTR
XrmValuePtr T_X_PTR
Cardinal T_IV
Dimension T_IV
Position T_IV
String T_PV
# these are all structure pointers (used as input)
Display * T_X_PTR
GC T_X_PTR
Screen * T_X_PTR
Visual * T_X_PTR
XColor * T_X_PTR
XGCValues * T_X_PTR
XHostAddress * T_X_PTR
XImage * T_X_PTR
XArc * T_X_PTR
XChar2b * T_X_PTR
XCharStruct * T_X_PTR
XFontSet T_X_PTR
XFontSetExtents * T_X_PTR
XFontStruct * T_X_PTR
XKeyboardControl * T_X_PTR
XKeyboardState * T_X_PTR
XModifierKeymap * T_X_PTR
XPixmapFormatValues * T_X_PTR
XPoint * T_X_PTR
XRectangle * T_X_PTR
XSegment * T_X_PTR
XSetWindowAttributes * T_X_PTR
XTextItem * T_X_PTR
XTextItem16 * T_X_PTR
XTimeCoord * T_X_PTR
XWindowAttributes * T_X_PTR
XWindowChanges * T_X_PTR
Region T_X_PTR
XClassHint * T_X_PTR
XComposeStatus * T_X_PTR
XIconSize * T_X_PTR
XSizeHints * T_X_PTR
XStandardColormap * T_X_PTR
XTextProperty * T_X_PTR
XVisualInfo * T_X_PTR
XWMHints * T_X_PTR
XEvent * T_X_EVENT_PTR
XKeyEvent * T_X_PTR
XMappingEvent * T_X_PTR
XButtonPressedEvent * T_X_PTR
XSelectionRequestEvent * T_X_PTR
# these are all structure pointers (used as input/output)
XrmDatabase * T_DUMMY
# This next section contains (all? mostly?) output types. They
# will certainly require special handling. They way they're
# defined right now will probably cause a core dump if used.
Atom * T_DUMMY
Atom ** T_DUMMY
Colormap * T_DUMMY
KeySym * T_DUMMY
Pixmap * T_DUMMY
Window * T_DUMMY
Window ** T_DUMMY
XFontStruct ** T_DUMMY
XFontStruct *** T_DUMMY
XStandardColormap ** T_DUMMY
XIconSize ** T_DUMMY
XPointer * T_DUMMY
XrmBindingList T_DUMMY
XrmClassList T_DUMMY
XrmNameList T_DUMMY
XrmOptionDescList T_DUMMY
XrmQuarkList T_DUMMY
XrmRepresentation * T_DUMMY
char ** T_DUMMY
char *** T_DUMMY
int * T_DUMMY
long * T_DUMMY
unsigned char ** T_DUMMY
unsigned int * T_DUMMY
int ** T_DUMMY
unsigned short * T_DUMMY
# --------------------------------------------------------------------------------
# Xt
XtAppContext T_X_PTR
WidgetClass T_X_PTR
Widget T_X_PTR
XtInArg T_X_PTR
XtOutArg T_X_PTR
Modifiers T_X_ID
XtAccelerators T_X_PTR
XtTranslations T_X_PTR
XtWidgetGeometry * T_X_PTR
XtActionHookId T_X_ID
XtInputId T_X_ID
XtIntervalId T_X_ID
XtRequestId T_X_ID
XtWorkProcId T_X_ID
XtGCMask T_IV
XtValueMask T_IV
XtListPosition T_IV
XtInputMask T_IV
XtCallbackStatus T_IV
XtGeometryResult T_IV
XtGrabKind T_IV
XtCacheType T_IV
XtPointer T_DUMMY
XtResourceList T_DUMMY
XtActionList T_DUMMY
XtConvertArgList T_DUMMY
XtCallbackList T_DUMMY
KeyCode * T_DUMMY
XtActionHookProc T_DUMMY
XtActionProc T_DUMMY
XtCallbackProc T_DUMMY
XtCancelConvertSelectionProc T_DUMMY
XtCaseProc T_DUMMY
XtConvertSelectionIncrProc T_DUMMY
XtConvertSelectionProc T_DUMMY
XtDestructor T_DUMMY
XtErrorHandler T_DUMMY
XtErrorMsgHandler T_DUMMY
XtEventHandler T_DUMMY
XtFilePredicate T_DUMMY
XtInputCallbackProc T_DUMMY
XtKeyProc T_DUMMY
XtLanguageProc T_DUMMY
XtLoseSelectionIncrProc T_DUMMY
XtLoseSelectionProc T_DUMMY
XtSelectionCallbackProc T_DUMMY
XtSelectionDoneIncrProc T_DUMMY
XtSelectionDoneProc T_DUMMY
XtTimerCallbackProc T_DUMMY
XtTypeConverter T_DUMMY
XtWorkProc T_DUMMY
XtCacheRef * T_DUMMY
XtAppContext * T_DUMMY
Boolean * T_DUMMY
Cardinal * T_DUMMY
Dimension * T_DUMMY
Dimension ** T_DUMMY
KeyCode ** T_DUMMY
Modifiers * T_DUMMY
Pixel * T_DUMMY
Position * T_DUMMY
String * T_DUMMY
Substitution T_DUMMY
Time * T_DUMMY
Widget * T_DUMMY
WidgetList T_DUMMY
XtPointer * T_DUMMY
# --------------------------------------------------------------------------------
# Motif
XmString T_XMSTRING_PTR
XmFontList T_X_PTR
XmAnyCallbackStruct * T_X_PTR
XmArrowButtonCallbackStruct * T_X_PTR
XmDrawingAreaCallbackStruct * T_X_PTR
XmDrawnButtonCallbackStruct * T_X_PTR
XmPushButtonCallbackStruct * T_X_PTR
XmRowColumnCallbackStruct * T_X_PTR
XmScrollBarCallbackStruct * T_X_PTR
XmToggleButtonCallbackStruct * T_X_PTR
XmListCallbackStruct * T_X_PTR
XmSelectionBoxCallbackStruct * T_X_PTR
XmCommandCallbackStruct * T_X_PTR
XmFileSelectionBoxCallbackStruct * T_X_PTR
XmScaleCallbackStruct * T_X_PTR
XmTextVerifyCallbackStruct * T_X_PTR
XmTraverseObscuredCallbackStruct * T_X_PTR
XmFontContext T_X_PTR
XmFontListEntry T_X_PTR
XmFontType T_X_PTR
XmStringCharSet T_X_PTR
XmTextSource T_X_PTR
XmStringContext T_X_PTR
# the handling of wide strings is totally screwed up
# right now. there ought to be automatic casting to/from
# perl strings. most of the X/Xt implementation of
# multi-byte character sets and locales has also been
# removed. hopefully we'll add this stuff in some time
# soon, but I'm in a tough position to test it because
# I only work with ISO latin fonts. (The standard
# Perl typemap for wchar_t is also screwed up.)
wchar_t * T_X_PTR
XmStringComponentType T_IV
XmHighlightMode T_IV
XmTextDirection T_IV
XmTextPosition T_IV
XmTraversalDirection T_IV
XmVisibility T_IV
XmColorProc T_DUMMY
XmFontContext * T_DUMMY
XmFontListEntry * T_DUMMY
XmFontType * T_DUMMY
XmOffsetPtr * T_DUMMY
XmSecondaryResourceData ** T_DUMMY
XmString * T_DUMMY
XmStringCharSet * T_DUMMY
XmStringComponentType * T_DUMMY
XmStringContext * T_DUMMY
XmStringDirection * T_DUMMY
XmTextPosition * T_DUMMY
# --------------------------------------------------------------------------------
# Xbae
XbaeAnyCallbackStruct * T_X_PTR
XbaeRowColumnCallbackStruct * T_X_PTR
XbaeMatrixDefaultActionCallbackStruct * T_X_PTR
XbaeMatrixEnterCellCallbackStruct * T_X_PTR
XbaeMatrixLeaveCellCallbackStruct * T_X_PTR
# --------------------------------------------------------------------------------
# XRT
XrtTextHandle T_X_PTR
XrtDataHandle T_X_PTR
XrtAnyCallbackStruct * T_X_PTR
XrtAnyGearCallbackStruct * T_X_PTR
XrtGenericContainerCallbackStruct * T_X_PTR
XrtGearNodeFolderStateCallbackStruct * T_X_PTR
XrtGearSelectCallbackStruct * T_X_PTR
XrtGearNodeActivateCallbackStruct * T_X_PTR
Xrt_perl_GearString T_X_PTR
Xrt_perl_GearList T_X_PTR
Xrt_perl_DataStyle T_X_PTR
Xrt_perl_DataStyles T_X_PTR
Xrt_perl_Strings T_X_PTR
Xrt_perl_Float T_X_PTR
# ================================================================================
# The input/output type conversions follow. The converters should
# be quite generic and widely useful, even for non-X data types.
# ================================================================================
OUTPUT
T_X_ID
sv_setref_iv($arg, ${ntype}_Package, (IV)$var);
T_X_PTR
sv_setref_pv($arg, ${ntype}_Package, (void *)$var);
T_XMSTRING_PTR
sv_setref_pv($arg, XmString_Package, (void *)$var);
T_DUMMY
sv_setref_pv($arg, \"DUMMY_${ntype}\", (void *)$var);
T_X_EVENT_PTR
sv_setref_pv($arg, XEventPtr_Package($var->type), (void *)$var);
INPUT
T_X_ID
if (sv_derived_from($arg, ${ntype}_Package)) {
$var = ($type)SvIV((SV*)SvRV($arg));
}
else
croak(\"$var is not of type %s\", ${ntype}_Package)
T_X_PTR
if (sv_derived_from($arg, ${ntype}_Package)) {
IV tmp_ = SvIV((SV*)SvRV($arg));
$var = ($type)tmp_;
}
else
croak(\"$var is not of type %s\", ${ntype}_Package)
T_XMSTRING_PTR
if (sv_derived_from($arg, XmString_Package)) {
IV tmp_ = SvIV((SV*)SvRV($arg));
$var = (XmString)tmp_;
}
else {
SV *tmp_ = sv_newmortal();
$var = XmStringCreateSimple(SvPV($arg, na));
sv_setref_pv(tmp_, XmString_Package, (void *)$var);
}
T_DUMMY
if (sv_derived_from($arg, \"DUMMY_${ntype}\")) {
IV tmp_ = SvIV((SV*)SvRV($arg));
$var = ($type)tmp_;
}
else
croak(\"$var is not of type %s\", \"DUMMY_${ntype}\")
T_X_EVENT_PTR
if (sv_derived_from($arg, \"X::Event\")) {
IV tmp_ = SvIV((SV*)SvRV($arg));
$var = ($type)tmp_;
}
else
croak(\"$var is not of type X::Event\")