Mare Overlay an object with new and DESTROY. Bootstrapper made to
[sdlgit/SDL_perl.git] / src / Core / objects / Overlay.xs
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4
5 #ifndef aTHX_
6 #define aTHX_
7 #endif
8
9 #include <SDL.h>
10
11 MODULE = SDL::Overlay   PACKAGE = SDL::Overlay    PREFIX = overlay_
12
13 =for documentation
14
15 SDL_Overlay -- YUV video overlay
16
17 typedef struct{
18   Uint32 format;
19   int w, h;
20   int planes;
21   Uint16 *pitches;
22   Uint8 **pixels;
23   Uint32 hw_overlay:1;
24 } SDL_Overlay;
25
26
27 =cut
28
29 SDL_Overlay *
30 overlay_new(CLASS, width, height, Uint32 format, display)
31         char* CLASS
32         int width
33         int height
34         Uint32 format
35         SDL_Surface *display;
36         CODE:
37                 RETVAL = SDL_CreateYUVOverlay(width, height, format, display);
38         OUTPUT:
39                 RETVAL
40
41 void
42 overlay_DESTROY(overlay)
43         SDL_Overlay *overlay
44         CODE:
45                 SDL_FreeYUVOverlay(overlay);
46
47