cleaned up MANIFEST, Added it to .gitignore. Added lib/SDL/Video.pm with some prelim...
[sdlgit/SDL_perl.git] / src / Core / Video.xs
index bb1a619..4016420 100644 (file)
@@ -21,10 +21,43 @@ See: L<http://www.libsdl.org/cgi/docwiki.cgi/SDL_API#head-813f033ec44914f267f321
 =cut
 
 SDL_Surface *
-GetVideoSurface ()
+video_get_video_surface()
+       PREINIT:
+               char* CLASS = "SDL::Surface";
        CODE:
                RETVAL = SDL_GetVideoSurface();
        OUTPUT:
                RETVAL
 
 
+HV *
+video_get_video_info()
+       CODE:
+               HV *hv;
+               SDL_VideoInfo *info;
+               info = (SDL_VideoInfo *) safemalloc ( sizeof(SDL_VideoInfo));
+               memcpy(info,SDL_GetVideoInfo(),sizeof(SDL_VideoInfo));
+               hv = newHV();
+               hv_store(hv,"hw_available",strlen("hw_available"),
+                       newSViv(info->hw_available),0);
+               hv_store(hv,"wm_available",strlen("wm_available"),
+                       newSViv(info->wm_available),0);
+               hv_store(hv,"blit_hw",strlen("blit_hw"),
+                       newSViv(info->blit_hw),0);
+               hv_store(hv,"blit_hw_CC",strlen("blit_hw_CC"),
+                       newSViv(info->blit_hw_CC),0);
+               hv_store(hv,"blit_hw_A",strlen("blit_hw_A"),
+                       newSViv(info->blit_hw_A),0);
+               hv_store(hv,"blit_sw",strlen("blit_sw"),
+                       newSViv(info->blit_sw),0);
+               hv_store(hv,"blit_sw_CC",strlen("blit_sw_CC"),
+                       newSViv(info->blit_sw_CC),0);
+               hv_store(hv,"blit_sw_A",strlen("blit_sw_A"),
+                       newSViv(info->blit_sw_A),0);
+               hv_store(hv,"blit_fill",strlen("blit_fill"),
+                       newSViv(info->blit_fill),0);
+               hv_store(hv,"video_mem",strlen("video_mem"),
+                       newSViv(info->video_mem),0);
+               RETVAL = hv;
+               OUTPUT:
+               RETVAL