Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 135 lines (129 sloc) 2.904 kb
10444e6d » kthakore
2010-12-26 Added proper typemap compile
1 TYPEMAP
2 const Uint16 * T_PTR
3 const Sint16 * T_PTR
4 Uint8 T_UV
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 sdlx_timer * O_OBJECT
58 SDLx_LayerManager * O_OBJECT
59 SDLx_Layer * O_OBJECT
60 SDLx_Interface * O_OBJECT
61 SDLx_State * O_OBJECT
62 SDLPango_Alignment T_UV
63 int * T_PTR
64 int ** T_PTR
65 void * T_PTR
66 SDL_TimerID T_PTR
67 SDL_NewTimerCallback T_PTR
68 SDL_Joystick * O_OBJECT
69 FPSmanager * O_OBJECT
70 SDLNet_SocketSet T_PTR
71 TCPsocket T_PTR
72 UDPsocket T_PTR
73 UDPpacket * T_PTR
74 UDPpacket ** T_PTR
75 IPaddress* O_OBJECT
76 SDLNet_GenericSocket T_PTR
77 TTF_Font * O_OBJECT
78 SDL_Overlay * O_OBJECT
79 SMPEG_Info * T_PTR
80 SMPEG * T_PTR
81 SMPEGstatus T_IV
82 SDL_mutex * T_PTR
83 GLbitfield T_IV
84 GLenum T_IV
85 ConsoleInformation * T_PTR
86 GLboolean T_U_CHAR
87 GLUquadric * T_PTR
88 GLdouble T_NV
89 GLUnurbsObj * T_PTR
90 GLUtesselator * T_PTR
91 GLuint T_UV
92 GLuint* T_PTR
93 GLint T_IV
94 GLint* T_PTR
95 float * T_PTR
96 float T_NV
97 GLfloat T_NV
98 Sound_DecoderInfo * T_PTR
99 const Sound_DecoderInfo * T_PTR
100 Sound_Sample * T_PTR
101 Sound_AudioInfo * T_PTR
102 SDL_RWops* O_OBJECT
103 SDL_svg_context* T_PTR
104 int T_IV
105 intArray T_ARRAY
106
107 OUTPUT
108
109 O_OBJECT_NPGC
110 sv_setref_pv( $arg, CLASS, (void*)$var );
111
112 O_OBJECT
113 if ($var) {
114 void** pointers = malloc(2 * sizeof(void*));
115 pointers[0] = (void*)$var;
116 pointers[1] = (void*)PERL_GET_CONTEXT;
117 sv_setref_pv( $arg, CLASS, (void*)pointers );
118 } else {
119 XSRETURN_UNDEF;
120 }
121
122 INPUT
123
124 O_OBJECT_NPGC
125 $var = ($type) SvIV((SV*)SvRV($arg));
126
127 O_OBJECT
128 if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) {
129 void** pointers = (void**)(SvIV((SV*)SvRV( $arg )));
130 $var = ($type)(pointers[0]);
131 } else if ($arg == 0) {
132 XSRETURN(0);
133 } else {
134 XSRETURN_UNDEF;
135 }
Something went wrong with that request. Please try again.