Debian Codegraph @

typemap

raw
1 TYPEMAP
2 const Uint16 * T_PTR
3 const Sint16 * T_PTR
4 Uint8 T_U_CHAR
5 Uint8 * T_PTR
6 const Uint8* T_PTR
7 Uint8 ** T_PTR
8 Uint16 T_UV
9 Uint16 * T_PTR
10 Uint32 T_UV
11 Uint32 * T_PTR
12 SDLKey T_UV
13 SDLKey * T_PTR
14 SDLMod T_UV
15 SDLMod * T_PTR
16 Sint16 T_IV
17 Sint16 * T_PTR
18 Sint32 T_IV
19 Sint32 * T_PTR
20 SDL_Event * O_OBJECT
21 SDL_ActiveEvent * O_OBJECT
22 SDL_KeyboardEvent * O_OBJECT
23 SDL_TextInputEvent * O_OBJECT
24 SDL_MouseMotionEvent * O_OBJECT
25 SDL_MouseButtonEvent * O_OBJECT
26 SDL_JoyAxisEvent * O_OBJECT
27 SDL_JoyHatEvent * O_OBJECT
28 SDL_JoyButtonEvent * O_OBJECT
29 SDL_JoyBallEvent * O_OBJECT
30 SDL_ResizeEvent * O_OBJECT
31 SDL_ExposeEvent * O_OBJECT
32 SDL_SysWMEvent * O_OBJECT
33 SDL_UserEvent * O_OBJECT
34 SDL_QuitEvent * O_OBJECT
35 SDL_keysym * O_OBJECT
36 SDL_Surface * O_OBJECT
37 SDL_SysWMmsg * T_PTR
38 SDL_CD * O_OBJECT
39 SDL_CDtrack * O_OBJECT
40 SDL_TimerCallback T_PTR
41 SDL_Rect * O_OBJECT
42 SDL_Color * O_OBJECT
43 SDL_Palette * O_OBJECT
44 SDL_PixelFormat * O_OBJECT
45 SDL_VideoInfo * O_OBJECT
46 SDL_version * O_OBJECT
47 const SDL_version * O_OBJECT
48 SDL_SysWMInfo * O_OBJECT
49 SDL_Cursor * O_OBJECT
50 SDL_AudioSpec * O_OBJECT
51 SDL_AudioCVT * O_OBJECT
52 Mix_Fading T_UV
53 Mix_Chunk * O_OBJECT
54 Mix_Music * O_OBJECT
55 SDL_GLattr T_IV
56 SDLPango_Context * O_OBJECT
57 int * T_PTR
58 int ** T_PTR
59 void * T_PTR
60 SDL_TimerID T_PTR
61 SDL_NewTimerCallback T_PTR
62 SDL_Joystick * O_OBJECT
63 FPSmanager * O_OBJECT
64 SDLNet_SocketSet T_PTR
65 TCPsocket T_PTR
66 UDPsocket T_PTR
67 UDPpacket * T_PTR
68 UDPpacket ** T_PTR
69 IPaddress* O_OBJECT
70 SDLNet_GenericSocket T_PTR
71 TTF_Font * O_OBJECT
72 SDL_Overlay * O_OBJECT
73 SMPEG_Info * T_PTR
74 SMPEG * T_PTR
75 SMPEGstatus T_IV
76 SDL_mutex * T_PTR
77 GLbitfield T_IV
78 GLenum T_IV
79 ConsoleInformation * T_PTR
80 GLboolean T_U_CHAR
81 GLUquadric * T_PTR
82 GLdouble T_NV
83 GLUnurbsObj * T_PTR
84 GLUtesselator * T_PTR
85 GLuint T_UV
86 GLuint* T_PTR
87 GLint T_IV
88 GLint* T_PTR
89 float * T_PTR
90 float T_NV
91 GLfloat T_NV
92 Sound_DecoderInfo * T_PTR
93 const Sound_DecoderInfo * T_PTR
94 Sound_Sample * T_PTR
95 Sound_AudioInfo * T_PTR
96 SDL_RWops* O_OBJECT
97 SDL_svg_context* T_PTR
98 int T_IV
99 intArray T_ARRAY
100
101 OUTPUT
102
103 # The Perl object is blessed into 'CLASS', which should be a
104 # char* having the name of the package for the blessing.
105 O_OBJECT
106 if ($var) {
107 void** pointers = malloc(2 * sizeof(void*));
108 pointers[0] = (void*)$var;
109 pointers[1] = (void*)PERL_GET_CONTEXT;
110 sv_setref_pv( $arg, CLASS, (void*)pointers );
111 } else {
112 XSRETURN_UNDEF;
113 }
114
115 INPUT
116
117 O_OBJECT
118 if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) {
119 void** pointers = (void**)(SvIV((SV*)SvRV( $arg )));
120 $var = ($type)(pointers[0]);
121 } else if ($arg == 0) {
122 XSRETURN(0);
123 } else {
124 XSRETURN_UNDEF;
125 }