Added VideoInfo as an object with appropriate docs
[sdlgit/SDL_perl.git] / lib / SDL / VideoInfo.pm
1 package SDL::VideoInfo;
2 use strict;
3 use warnings;
4 require Exporter;
5 require DynaLoader;
6 our @ISA = qw(Exporter DynaLoader);
7 bootstrap SDL::VideoInfo;
8
9 1;
10
11 __END__
12
13 =pod
14
15 =head1 NAME
16
17 SDL::VideoInfo - Video Target Information 
18
19 =head1 SYNOPSIS
20
21         my $video_info = SDL::Video::get_video_info();
22
23 VideoInfo is only accessible C<SDL::Video::get_video_info>. This module only provides getters to the struct C<SDL_VideoInfo>.
24
25
26 =head1 DESCRIPTION
27
28 This object is a read-only structure and is returned by C<SDL::Video::get_video_info>. It contains information on either the best available mode if called before C<SDL::Video::set_video_mode> or the current video mode if called after C<SDL::Video::set_video_mode>. 
29
30 =head1 METHODS
31
32
33 =head2 hw_available
34
35         $video_info->hw_available() # 1 if Hardware Accelerated Surfaces available      
36
37 Is it possible to create hardware surfaces ?
38
39 =head2 wm_available
40
41         $video_info->wm_available() # 1 if Window Manager available     
42
43 Is there a window manager available ?
44
45 =head2 blit_hw
46         
47         $video_info->blit_hw() 
48
49 Are hardware to hardware blits accelerated ?
50
51 =head2 blit_hw_CC
52
53         $video_info->blit_hw_CC()       
54
55 Are hardware to hardware colorkey blits accelerated ?
56
57 =head2 blit_hw_A
58
59         $video_info->blit_hw_A()        
60
61 Are hardware to hardware alpha blits accelerated ?
62
63 =head2 blit_sw
64         
65         $video_info->blit_sw()
66
67 Are software to hardware blits accelerated ?
68
69 =head2 blit_sw_CC
70
71         $video_info->blit_sw_CC()
72         
73
74 Are software to hardware colorkey blits accelerated ?
75
76 =head2 blit_sw_A        
77
78         $video_info->blit_sw_A()
79
80 Are software to hardware alpha blits accelerated ?
81
82 =head2 blit_fill
83
84         $video_info->blit_fill()        
85
86 Are color fills accelerated ?
87
88 =head2 video_mem
89         
90         my $video_mem = $video_info->video_mem();
91
92 Total amount of video memory in Kilobytes, should be accessed only if hw_available == 1, otherwise it is equal to 0
93
94 =head2 vfmt
95
96         my $vd_pixel_format = $video_info->vfmt();
97                 
98
99 C<SDL::PixelFormat> of the video device
100
101 =head2 current_w, current_h
102
103         $video_info->current_w();
104         $video_info->current_h();       
105
106 Width and height of the current video mode, or of the desktop mode if C<SDL_GetVideoInfo> was called before C<SDL::Video::set_video_mode> (available since SDL 1.2.10)
107
108 =head1 SEE ALSO
109
110 L<SDL::Video>, L<SDL::PixelFormat>
111
112 =cut