projects
/
sdlgit/SDL_perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
ae2d159
)
Mare Overlay an object with new and DESTROY. Bootstrapper made to
Kartik Thakore [Wed, 21 Oct 2009 22:57:26 +0000 (18:57 -0400)]
lib/SDL/Overlay.pm
[new file with mode: 0644]
patch
|
blob
src/Core/objects/Overlay.xs
patch
|
blob
|
blame
|
history
t/core_video.t
patch
|
blob
|
blame
|
history
typemap
patch
|
blob
|
blame
|
history
diff --git a/lib/SDL/Overlay.pm
b/lib/SDL/Overlay.pm
new file mode 100644
(file)
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
(file)
--- 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
(file)
--- 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
(file)
--- 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