CSFML

- Main Page
- Data Structures
- Files

- File List
- Globals

Data Structures | Functions
VideoMode.h File Reference
`#include <SFML/Window/Export.h>`
`#include <stddef.h>`

Go to the source code of this file.

## Data Structures

struct | sfVideoMode
| sfVideoMode defines a video mode (width, height, bpp, frequency) and provides functions for getting modes supported by the display device More...

## Functions

CSFML_WINDOW_API sfVideoMode | sfVideoMode_getDesktopMode (void)
| Get the current desktop video mode. More...
CSFML_WINDOW_API const sfVideoMode * | sfVideoMode_getFullscreenModes (size_t *Count)
| Retrieve all the video modes supported in fullscreen mode. More...
CSFML_WINDOW_API sfBool | sfVideoMode_isValid (sfVideoMode mode)
| Tell whether or not a video mode is valid. More...

## Function Documentation

CSFML_WINDOW_API sfVideoMode sfVideoMode_getDesktopMode | ( | void |  | ) |

Get the current desktop video mode.

Returns
  Current desktop video mode

CSFML_WINDOW_API const sfVideoMode* sfVideoMode_getFullscreenModes | ( | size_t * | Count | ) |

Retrieve all the video modes supported in fullscreen mode.

When creating a fullscreen window, the video mode is restricted to be compatible with what the graphics driver and monitor support. This function returns the complete list of all video modes that can be used in fullscreen mode. The returned array is sorted from best to worst, so that the first element will always give the best mode (higher width, height and bits-per-pixel).

Parameters

  count | Pointer to a variable that will be filled with the number of modes in the array

Returns
  Pointer to an array containing all the supported fullscreen modes

CSFML_WINDOW_API sfBool sfVideoMode_isValid | ( | sfVideoMode | mode | ) |

Tell whether or not a video mode is valid.

The validity of video modes is only relevant when using fullscreen windows; otherwise any video mode can be used with no restriction.

Parameters

  mode | Video mode

Returns
  sfTrue if the video mode is valid for fullscreen mode