X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=typemap;h=146a6ae1940f4215a36bd565618f0a6628e94b67;hb=fcd68a9037ae3d5260f6cc2c96dec31ca54fc662;hp=18d0bd5f960587b7ef7592d2eb066db38baeb102;hpb=faad43be293c8de28169e2ee12ab99a881c50bf4;p=sdlgit%2FSDL_perl.git diff --git a/typemap b/typemap index 18d0bd5..146a6ae 100644 --- a/typemap +++ b/typemap @@ -2,6 +2,7 @@ TYPEMAP const Uint16 * T_PTR Uint8 T_U_CHAR Uint8 * T_PTR +const Uint8* T_PTR Uint8 ** T_PTR Uint16 T_UV Uint16 * T_PTR @@ -13,15 +14,15 @@ Sint16 * T_PTR Sint32 T_IV Sint32 * T_PTR SDL_Event * T_PTR -SDL_Surface * T_PTR +SDL_Surface * O_OBJECT SDL_SysWMmsg * T_PTR SDL_CD * T_PTR SDL_CDtrack * T_PTR SDL_TimerCallback T_PTR -SDL_Rect * T_PTR -SDL_Color * T_PTR +SDL_Rect * O_OBJECT +SDL_Color * O_OBJECT SDL_Palette * T_PTR -SDL_PixelFormat * T_PTR +SDL_PixelFormat * O_OBJECT SDL_Cursor * T_PTR SDL_AudioSpec * T_PTR SDL_AudioCVT * T_PTR @@ -41,8 +42,8 @@ UDPpacket * T_PTR UDPpacket ** T_PTR IPaddress* T_PTR SDLNet_GenericSocket T_PTR -TTF_Font * T_PTR -SDL_Overlay * T_PTR +TTF_Font * O_OBJECT +SDL_Overlay * O_OBJECT SMPEG_Info * T_PTR SMPEG * T_PTR SMPEGstatus T_IV @@ -51,18 +52,40 @@ 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 -GLUquadric * T_PTR -GLdouble T_NV Sound_DecoderInfo * T_PTR const Sound_DecoderInfo * T_PTR Sound_Sample * T_PTR Sound_AudioInfo * T_PTR -Font T_IV +SDL_RWops* T_PTR +SDL_svg_context* T_PTR + +OUTPUT + +# The Perl object is blessed into 'CLASS', which should be a +# char* having the name of the package for the blessing. +O_OBJECT + sv_setref_pv( $arg, CLASS, (void*)$var ); + + +INPUT + +O_OBJECT + if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) + $var = ($type)SvIV((SV*)SvRV( $arg )); + else{ + warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); + XSRETURN_UNDEF; + } + +