From: Kartik Thakore Date: Wed, 21 Oct 2009 22:57:26 +0000 (-0400) Subject: Mare Overlay an object with new and DESTROY. Bootstrapper made to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fcd68a9037ae3d5260f6cc2c96dec31ca54fc662;p=sdlgit%2FSDL_perl.git Mare Overlay an object with new and DESTROY. Bootstrapper made to --- diff --git a/lib/SDL/Overlay.pm b/lib/SDL/Overlay.pm new file mode 100644 index 0000000..4da6f86 --- /dev/null +++ b/lib/SDL/Overlay.pm @@ -0,0 +1,12 @@ +package SDL::Overlay; +use strict; +use warnings; +require Exporter; +require DynaLoader; +our @ISA = qw(Exporter DynaLoader); +bootstrap SDL::Overlay; + +1; + +__END__ + diff --git a/src/Core/objects/Overlay.xs b/src/Core/objects/Overlay.xs index 0793345..e13c1bf 100644 --- a/src/Core/objects/Overlay.xs +++ b/src/Core/objects/Overlay.xs @@ -22,7 +22,26 @@ typedef struct{ Uint8 **pixels; Uint32 hw_overlay:1; } SDL_Overlay; -} + =cut +SDL_Overlay * +overlay_new(CLASS, width, height, Uint32 format, display) + char* CLASS + int width + int height + Uint32 format + SDL_Surface *display; + CODE: + RETVAL = SDL_CreateYUVOverlay(width, height, format, display); + OUTPUT: + RETVAL + +void +overlay_DESTROY(overlay) + SDL_Overlay *overlay + CODE: + SDL_FreeYUVOverlay(overlay); + + diff --git a/t/core_video.t b/t/core_video.t index 5f2b5b9..51aa077 100644 --- a/t/core_video.t +++ b/t/core_video.t @@ -52,10 +52,8 @@ can_ok ('SDL::Video', qw/ GL_set_attribute GL_swap_buffers GL_attr - create_YUV_overlay lock_YUV_overlay unlock_YUV_overlay display_YUV_overlay - free_YUV_overlay /); diff --git a/typemap b/typemap index c0e4469..146a6ae 100644 --- a/typemap +++ b/typemap @@ -43,7 +43,7 @@ UDPpacket ** T_PTR IPaddress* T_PTR SDLNet_GenericSocket T_PTR TTF_Font * O_OBJECT -SDL_Overlay * T_PTR +SDL_Overlay * O_OBJECT SMPEG_Info * T_PTR SMPEG * T_PTR SMPEGstatus T_IV