Commit | Line | Data |
70fd0f8d |
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::Video PACKAGE = SDL::Video PREFIX = video_ |
12 | |
13 | =for documentation |
14 | |
15 | The Following are XS bindings to the Video category in the SDL API v2.1.13 |
16 | |
17 | Describe on the SDL API site. |
18 | |
19 | See: L<http://www.libsdl.org/cgi/docwiki.cgi/SDL_API#head-813f033ec44914f267f32195aba7d9aff8c410c0> |
20 | |
21 | =cut |
22 | |
23 | SDL_Surface * |
95f5be30 |
24 | video_get_video_surface() |
25 | PREINIT: |
26 | char* CLASS = "SDL::Surface"; |
70fd0f8d |
27 | CODE: |
28 | RETVAL = SDL_GetVideoSurface(); |
29 | OUTPUT: |
30 | RETVAL |
31 | |
32 | |
95f5be30 |
33 | HV * |
34 | video_get_video_info() |
35 | CODE: |
36 | HV *hv; |
37 | SDL_VideoInfo *info; |
38 | info = (SDL_VideoInfo *) safemalloc ( sizeof(SDL_VideoInfo)); |
39 | memcpy(info,SDL_GetVideoInfo(),sizeof(SDL_VideoInfo)); |
40 | hv = newHV(); |
41 | hv_store(hv,"hw_available",strlen("hw_available"), |
42 | newSViv(info->hw_available),0); |
43 | hv_store(hv,"wm_available",strlen("wm_available"), |
44 | newSViv(info->wm_available),0); |
45 | hv_store(hv,"blit_hw",strlen("blit_hw"), |
46 | newSViv(info->blit_hw),0); |
47 | hv_store(hv,"blit_hw_CC",strlen("blit_hw_CC"), |
48 | newSViv(info->blit_hw_CC),0); |
49 | hv_store(hv,"blit_hw_A",strlen("blit_hw_A"), |
50 | newSViv(info->blit_hw_A),0); |
51 | hv_store(hv,"blit_sw",strlen("blit_sw"), |
52 | newSViv(info->blit_sw),0); |
53 | hv_store(hv,"blit_sw_CC",strlen("blit_sw_CC"), |
54 | newSViv(info->blit_sw_CC),0); |
55 | hv_store(hv,"blit_sw_A",strlen("blit_sw_A"), |
56 | newSViv(info->blit_sw_A),0); |
57 | hv_store(hv,"blit_fill",strlen("blit_fill"), |
58 | newSViv(info->blit_fill),0); |
59 | hv_store(hv,"video_mem",strlen("video_mem"), |
60 | newSViv(info->video_mem),0); |
61 | RETVAL = hv; |
62 | OUTPUT: |
63 | RETVAL |