-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtypemap
136 lines (115 loc) · 4.14 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
TYPEMAP
Display * O_X11_Xlib
DisplayOrNull O_X11_XlibOrNull
Screen * O_X11_Xlib_Screen
ScreenNumber O_X11_Xlib_ScreenNumber
Visual * O_X11_Xlib_OpaqueDisplayMember
VisualOrNull O_X11_Xlib_OpaqueDisplayMemberOrNull
GC O_X11_Xlib_OpaqueDisplayMember
XEvent * O_X11_Xlib_Struct
XKeyboardState * O_X11_Xlib_Struct
XVisualInfo * O_X11_Xlib_Struct
XWindowChanges * O_X11_Xlib_Struct
XWindowAttributes * O_X11_Xlib_Struct
XSetWindowAttributes* O_X11_Xlib_Struct
XSizeHints * O_X11_Xlib_Struct
XRectangle * O_X11_Xlib_Struct
XRenderPictFormat * O_X11_Xlib_Struct
Window O_X11_Xlib_XID
WindowOrNull O_X11_Xlib_XIDorNull
Pixmap O_X11_Xlib_XID
Cursor O_X11_Xlib_XID
Colormap O_X11_Xlib_XID
Drawable O_X11_Xlib_XID
VisualID O_X11_Xlib_XID
XserverRegion O_X11_Xlib_XID
Glyph O_X11_Xlib_XID
GlyphSet O_X11_Xlib_XID
Picture O_X11_Xlib_XID
PictFormat O_X11_Xlib_XID
Atom T_UV
Time T_UV
Bool T_BOOL
KeyCode T_IV
KeySym T_IV
INPUT
O_X11_Xlib
$var = PerlXlib_display_objref_get_pointer($arg, PerlXlib_OR_DIE);
OUTPUT
O_X11_Xlib
$arg = PerlXlib_get_display_objref($var, PerlXlib_OR_UNDEF);
INPUT
O_X11_XlibOrNull
$var = PerlXlib_display_objref_get_pointer($arg, PerlXlib_OR_NULL);
OUTPUT
O_X11_XlibOrNull
$arg = PerlXlib_get_display_objref($var, PerlXlib_OR_UNDEF);
INPUT
O_X11_Xlib_ScreenNumber
if (!SvOK($arg))
$var = DefaultScreen(dpy);
else if (SvROK($arg)) {
SV **fp;
if (SvTYPE(SvRV($arg)) == SVt_PVHV && (fp= hv_fetch((HV*)SvRV($arg), \"screen_number\", 13, 0)) && fp) {
$var= SvIV(*fp);
}
else croak(\"Invalid object passed as Screen number\");
}
else {
$var= SvIV($arg);
if ($var == -1) $var= DefaultScreen(dpy);
}
INPUT
O_X11_Xlib_Screen
$var = PerlXlib_sv_to_screen($arg, 1);
OUTPUT
O_X11_Xlib_Screen
$arg = PerlXlib_obj_for_screen($var, 0);
INPUT
O_X11_Xlib_XID
$var = PerlXlib_sv_to_xid($arg);
OUTPUT
O_X11_Xlib_XID
// Always return unsigned integer. X11::Xlib::* can override this as needed.
sv_setuv( $arg, $var );
INPUT
O_X11_Xlib_XIDorNull
$var = SvOK($arg)? PerlXlib_sv_to_xid($arg) : 0;
OUTPUT
O_X11_Xlib_XIDorNull
// Always return unsigned integer. X11::Xlib::* can override this as needed.
sv_setuv( $arg, $var );
INPUT
O_X11_Xlib_Struct
$var= ( $type ) PerlXlib_get_struct_ptr(
$arg, 0, \"X11::Xlib::@{[ $type =~ /(\w+)/ ]}\", sizeof(@{[ $type =~ /(\w+)/ ]}),
(PerlXlib_struct_pack_fn*) &PerlXlib_@{[ $type =~ /(\w+)/ ]}_pack
);
INPUT
O_X11_Xlib_Opaque
$var= ($type) PerlXlib_objref_get_pointer($arg, \"@{[ $type =~ /(\w+)/ ]}\", PerlXlib_OR_DIE);
INPUT
O_X11_Xlib_OpaqueDisplayMember
$var= ($type) PerlXlib_objref_get_pointer($arg, \"@{[ $type =~ /(\w+)/ ]}\", PerlXlib_OR_DIE);
INPUT
O_X11_Xlib_OpaqueOrNull
$var= ($type) PerlXlib_objref_get_pointer($arg, \"@{[ $type =~ /(\w+?)OrNull/ ]}\", PerlXlib_OR_NULL);
INPUT
O_X11_Xlib_OpaqueDisplayMemberOrNull
$var= ($type) PerlXlib_objref_get_pointer($arg, \"@{[ $type =~ /(\w+?)OrNull/ ]}\", PerlXlib_OR_NULL);
OUTPUT
O_X11_Xlib_Opaque
sv_setsv($arg, PerlXlib_get_objref($var, PerlXlib_AUTOCREATE, \"@{[ $type =~ /(\w+)/ ]}\",
SVt_PVHV, \"X11::Xlib::@{[ $type =~ /(\w+)/ ]}\", NULL));
OUTPUT
O_X11_Xlib_OpaqueDisplayMember
sv_setsv($arg, PerlXlib_get_objref($var, PerlXlib_AUTOCREATE, \"@{[ $type =~ /(\w+)/ ]}\",
SVt_PVHV, \"X11::Xlib::@{[ $type =~ /(\w+)/ ]}\", dpy));
OUTPUT
O_X11_Xlib_OpaqueOrNull
sv_setsv($arg, PerlXlib_get_objref($var, PerlXlib_AUTOCREATE, \"@{[ $type =~ /(\w+?)OrNull/ ]}\",
SVt_PVHV, \"X11::Xlib::@{[ $type =~ /(\w+?)OrNull/ ]}\", NULL));
OUTPUT
O_X11_Xlib_OpaqueDisplayMemberOrNull
sv_setsv($arg, PerlXlib_get_objref($var, PerlXlib_AUTOCREATE, \"@{[ $type =~ /(\w+?)OrNull/ ]}\",
SVt_PVHV, \"X11::Xlib::@{[ $type =~ /(\w+?)OrNull/ ]}\", dpy));