CSFML - C binding of the Simple and Fast Multimedia Library

CSFML
Functions
Context.h File Reference
`#include <SFML/Window/Export.h>`
`#include <SFML/Window/Types.h>`
`#include <SFML/Window/Window.h>`

Go to the source code of this file.

## Functions
CSFML_WINDOW_API sfContext * | sfContext_create (void)
| Create a new context. More...
CSFML_WINDOW_API void | sfContext_destroy (sfContext *context)
| Destroy a context. More...
CSFML_WINDOW_API sfBool | sfContext_setActive (sfContext *context, sfBool active)
| Activate or deactivate explicitely a context. More...
CSFML_WINDOW_API sfContextSettings | sfContext_getSettings (const sfContext *context)
| Get the settings of the context. More...

## Function Documentation

## ◆ sfContext_create()

CSFML_WINDOW_API sfContext* sfContext_create | ( | void |  | ) |

Create a new context.

This function activates the new context.

Returns
  New sfContext object

## ◆ sfContext_destroy()

CSFML_WINDOW_API void sfContext_destroy | ( | sfContext * | context | ) |

Destroy a context.

Parameters

  context | Context to destroy

## ◆ sfContext_getSettings()

CSFML_WINDOW_API sfContextSettings sfContext_getSettings | ( | const sfContext * | context | ) |

Get the settings of the context.

Note that these settings may be different than the ones passed to the constructor; they are indeed adjusted if the original settings are not directly supported by the system.

Returns
  Structure containing the settings

## ◆ sfContext_setActive()

CSFML_WINDOW_API sfBool sfContext_setActive | ( | sfContext * | context,
|  | sfBool | active
| ) |  |

Activate or deactivate explicitely a context.

Parameters

  context | Context object
  active | sfTrue to activate, sfFalse to deactivate

Returns
  sfTrue on success, sfFalse on failure