| 1 | # https://github.com/libsdl-org/SDL/blob/main/include/SDL_video.h | ||
| 2 | package SDL2::DisplayMode { | ||
| 3 | use SDL2::Utils; | ||
| 4 | has | ||
| 5 | format => 'uint32', | ||
| 6 | w => 'int', | ||
| 7 | h => 'int', | ||
| 8 | refresh_rate => 'int', | ||
| 9 | driverdata => 'opaque'; | ||
| 10 | |||
| 11 | =encoding utf-8 | ||
| 12 | |||
| 13 | =head1 NAME | ||
| 14 | |||
| 15 | SDL2::DisplayMode - Structure that Defines a Display Mode | ||
| 16 | |||
| 17 | =head1 SYNOPSIS | ||
| 18 | |||
| 19 | use SDL2 qw[:all]; | ||
| 20 | SDL_Init(SDL_INIT_VIDEO); | ||
| 21 | my $mode = SDL2::GetDisplayMode( 0, 0 ); | ||
| 22 | printf 'Display res %dx%d @ %dHz', $mode->w, $mode->h, $mode->refresh_rate; | ||
| 23 | SDL_Quit(); | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | SDL2::DisplayMode | ||
| 28 | |||
| 29 | =head1 Fields | ||
| 30 | |||
| 31 | =over | ||
| 32 | |||
| 33 | =item C<format> - pixel format | ||
| 34 | |||
| 35 | =item C<w> - width, in screen coordinates | ||
| 36 | |||
| 37 | =item C<h> - height, in screen coordinates | ||
| 38 | |||
| 39 | =item C<refresh_rate> - refresh rate (or C<0> for unspecified) | ||
| 40 | |||
| 41 | =item C<driverdata> - opaque, driver-specific data | ||
| 42 | |||
| 43 | =back | ||
| 44 | |||
| 45 | =head1 AUTHOR | ||
| 46 | |||
| 47 | Sanko Robinson E<lt>sanko@cpan.orgE<gt> | ||
| 48 | |||
| 49 | =begin stopwords | ||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | =end stopwords | ||
| 54 | |||
| 55 | =cut | ||
| 56 | |||
| 57 | }; | ||
| 58 | 1; |