File: typemap

package info (click to toggle)
libsdl-perl 2.548-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 5,904 kB
  • sloc: perl: 13,985; ansic: 582; makefile: 35
file content (138 lines) | stat: -rw-r--r-- 3,100 bytes parent folder | download | duplicates (7)
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
TYPEMAP
const Uint16 *		T_PTR
const Sint16 *		T_PTR
Uint8			T_UV
Uint8 *			T_PTR
const Uint8*		T_PTR
Uint8 **		T_PTR
Uint16			T_UV
Uint16 *		T_PTR
Uint32			T_UV
Uint32 *		T_PTR
SDLKey			T_UV
SDLKey *		T_PTR
SDLMod			T_UV
SDLMod *		T_PTR
Sint16			T_IV
Sint16 *		T_PTR
Sint32			T_IV
Sint32 *		T_PTR
SDL_Event *		O_OBJECT	
SDL_ActiveEvent * 	O_OBJECT
SDL_KeyboardEvent * 	O_OBJECT
SDL_TextInputEvent * 	O_OBJECT
SDL_MouseMotionEvent * 	O_OBJECT
SDL_MouseButtonEvent * 	O_OBJECT
SDL_JoyAxisEvent * 	O_OBJECT
SDL_JoyHatEvent * 	O_OBJECT
SDL_JoyButtonEvent *	O_OBJECT
SDL_JoyBallEvent * 	O_OBJECT
SDL_ResizeEvent * 	O_OBJECT
SDL_ExposeEvent * 	O_OBJECT
SDL_SysWMEvent * 	O_OBJECT
SDL_UserEvent * 	O_OBJECT
SDL_QuitEvent * 	O_OBJECT
SDL_keysym *		O_OBJECT
SDL_Surface *		O_OBJECT
SDL_SysWMmsg *		T_PTR
SDL_CD *		O_OBJECT
SDL_CDtrack *		O_OBJECT
SDL_TimerCallback	T_PTR
SDL_Rect *		O_OBJECT
SDL_Color *		O_OBJECT
SDL_Palette *		O_OBJECT
SDL_PixelFormat *	O_OBJECT
SDL_VideoInfo *		O_OBJECT
SDL_version *		O_OBJECT
const SDL_version *		O_OBJECT
SDL_SysWMInfo *		O_OBJECT
SDL_Cursor *		O_OBJECT	
SDL_AudioSpec *		O_OBJECT
SDL_AudioCVT *		O_OBJECT
Mix_Fading		T_UV
Mix_Chunk *		O_OBJECT
Mix_Music *		O_OBJECT
SDL_GLattr              T_IV
SDLPango_Context * 	O_OBJECT
sdlx_timer * 		O_OBJECT
SDLx_LayerManager *	O_OBJECT
SDLx_Layer *		O_OBJECT
SDLx_Interface *	O_OBJECT
SDLx_State *		O_OBJECT
SDLPango_Alignment T_UV
int *			T_PTR
int **			T_PTR
void *			T_PTR
SDL_TimerID		T_PTR
SDL_NewTimerCallback	T_PTR
SDL_Joystick *		O_OBJECT	
FPSmanager *	O_OBJECT
SDLNet_SocketSet	T_PTR
TCPsocket		T_PTR
UDPsocket		T_PTR
UDPpacket *		T_PTR
UDPpacket **		T_PTR
IPaddress*		O_OBJECT			
SDLNet_GenericSocket	T_PTR
TTF_Font *		O_OBJECT
SDL_Overlay *		O_OBJECT	
SMPEG_Info *		O_OBJECT
SMPEG *			O_OBJECT
SMPEGstatus		T_IV
SDL_mutex *		T_PTR
GLbitfield		T_IV
GLenum			T_IV
ConsoleInformation * 	T_PTR
GLboolean		T_U_CHAR
GLUquadric *		T_PTR
GLdouble		T_NV
GLUnurbsObj *		T_PTR
GLUtesselator *		T_PTR
GLuint			T_UV
GLuint*			T_PTR
GLint			T_IV
GLint*			T_PTR
float *			T_PTR
float			T_NV
GLfloat			T_NV
Sound_DecoderInfo *	T_PTR
const Sound_DecoderInfo *	T_PTR
Sound_Sample *		T_PTR
Sound_AudioInfo *	T_PTR
SDL_RWops*		O_OBJECT
SDL_svg_context*	T_PTR
int			T_IV
intArray		T_ARRAY

OUTPUT

O_OBJECT_NPGC
    sv_setref_pv( $arg, CLASS, (void*)$var );

O_OBJECT
    if ($var) {
        void** pointers  = malloc(3 * sizeof(void*));
        pointers[0]      = (void*)$var;
        pointers[1]      = (void*)PERL_GET_CONTEXT;
        Uint32 *threadid = (Uint32 *)safemalloc(sizeof(Uint32));
        *threadid        = SDL_ThreadID();
        pointers[2]      = (void*)threadid;
        sv_setref_pv( $arg, CLASS, (void*)pointers ); 
    } else {
        XSRETURN_UNDEF;
    }

INPUT

O_OBJECT_NPGC
    $var = INT2PTR($type, SvIV((SV *)SvRV( $arg )));

O_OBJECT
    if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) {
        void** pointers = (void**)INT2PTR(void *, SvIV((SV *)SvRV( $arg )));
        $var = ($type)(pointers[0]);
    } else if ($arg == 0) {
        XSRETURN(0);
    } else {
        XSRETURN_UNDEF;
    }