#include <SFML/Config.h>
#include <SFML/Window/Event.h>
#include <SFML/Window/Input.h>
#include <SFML/Window/VideoMode.h>
#include <SFML/Window/WindowHandle.h>
Go to the source code of this file.
Data Structures | |
struct | sfWindowSettings |
Structure defining the window's creation settings. More... | |
Typedefs | |
typedef sfWindow | sfWindow |
sfWindow is a rendering window ; it can create a new window or connect to an existing one | |
Enumerations | |
enum | { sfNone = 0, sfTitlebar = 1 << 0, sfResize = 1 << 1, sfClose = 1 << 2, sfFullscreen = 1 << 3 } |
Enumeration of window creation styles. More... | |
Functions | |
CSFML_API sfWindow * | sfWindow_Create (sfVideoMode Mode, const char *Title, unsigned long Style, sfWindowSettings Params) |
Construct a new window. | |
CSFML_API sfWindow * | sfWindow_CreateFromHandle (sfWindowHandle Handle, sfWindowSettings Params) |
Construct a window from an existing control. | |
CSFML_API void | sfWindow_Destroy (sfWindow *Window) |
Destroy an existing window. | |
CSFML_API void | sfWindow_Close (sfWindow *Window) |
Close a window (but doesn't destroy the internal data). | |
CSFML_API sfBool | sfWindow_IsOpened (sfWindow *Window) |
Tell whether or not a window is opened. | |
CSFML_API unsigned int | sfWindow_GetWidth (sfWindow *Window) |
Get the width of the rendering region of a window. | |
CSFML_API unsigned int | sfWindow_GetHeight (sfWindow *Window) |
Get the height of the rendering region of a window. | |
CSFML_API sfWindowSettings | sfWindow_GetSettings (sfWindow *Window) |
Get the creation settings of a window. | |
CSFML_API sfBool | sfWindow_GetEvent (sfWindow *Window, sfEvent *Event) |
Get the event on top of events stack of a window, if any, and pop it. | |
CSFML_API void | sfWindow_UseVerticalSync (sfWindow *Window, sfBool Enabled) |
Enable / disable vertical synchronization on a window. | |
CSFML_API void | sfWindow_ShowMouseCursor (sfWindow *Window, sfBool Show) |
Show or hide the mouse cursor on a window. | |
CSFML_API void | sfWindow_SetCursorPosition (sfWindow *Window, unsigned int Left, unsigned int Top) |
Change the position of the mouse cursor on a window. | |
CSFML_API void | sfWindow_SetPosition (sfWindow *Window, int Left, int Top) |
Change the position of a window on screen. | |
CSFML_API void | sfWindow_Show (sfWindow *Window, sfBool State) |
Show or hide a window. | |
CSFML_API void | sfWindow_EnableKeyRepeat (sfWindow *Window, sfBool Enabled) |
Enable or disable automatic key-repeat for keydown events. | |
CSFML_API sfBool | sfWindow_SetActive (sfWindow *Window, sfBool Active) |
Activate or deactivate a window as the current target for rendering. | |
CSFML_API void | sfWindow_Display (sfWindow *Window) |
Display a window on screen. | |
CSFML_API sfInput * | sfWindow_GetInput (sfWindow *Window) |
Get the input manager of a window. | |
CSFML_API void | sfWindow_SetFramerateLimit (sfWindow *Window, unsigned int Limit) |
Limit the framerate to a maximum fixed frequency for a window. | |
CSFML_API float | sfWindow_GetFrameTime (sfWindow *Window) |
Get time elapsed since last frame of a window. | |
CSFML_API void | sfWindow_SetJoystickThreshold (sfWindow *Window, float Threshold) |
Change the joystick threshold, ie. |
sfWindow is a rendering window ; it can create a new window or connect to an existing one
Definition at line 42 of file Window/Window.h.
anonymous enum |
Enumeration of window creation styles.
Definition at line 49 of file Window/Window.h.
CSFML_API void sfWindow_Close | ( | sfWindow * | Window | ) |
Close a window (but doesn't destroy the internal data).
Window | : Window to close |
CSFML_API sfWindow* sfWindow_Create | ( | sfVideoMode | Mode, | |
const char * | Title, | |||
unsigned long | Style, | |||
sfWindowSettings | Params | |||
) |
Construct a new window.
Mode | : Video mode to use | |
Title | : Title of the window | |
Style | : Window style | |
Params | : Creation settings |
CSFML_API sfWindow* sfWindow_CreateFromHandle | ( | sfWindowHandle | Handle, | |
sfWindowSettings | Params | |||
) |
Construct a window from an existing control.
Handle | : Platform-specific handle of the control | |
Params | : Creation settings |
CSFML_API void sfWindow_Destroy | ( | sfWindow * | Window | ) |
Destroy an existing window.
Window | : Window to destroy |
CSFML_API void sfWindow_Display | ( | sfWindow * | Window | ) |
Display a window on screen.
Window | : Window object |
Enable or disable automatic key-repeat for keydown events.
Automatic key-repeat is enabled by default
Window | : Window object | |
Enabled | : sfTrue to enable, sfFalse to disable |
Get the event on top of events stack of a window, if any, and pop it.
Window | : Window object | |
Event | : Event to fill, if any |
CSFML_API float sfWindow_GetFrameTime | ( | sfWindow * | Window | ) |
Get time elapsed since last frame of a window.
Window | : Window object |
CSFML_API unsigned int sfWindow_GetHeight | ( | sfWindow * | Window | ) |
Get the height of the rendering region of a window.
Window | : Window object |
Get the input manager of a window.
Window | : Window object |
CSFML_API sfWindowSettings sfWindow_GetSettings | ( | sfWindow * | Window | ) |
Get the creation settings of a window.
Window | : Window object |
CSFML_API unsigned int sfWindow_GetWidth | ( | sfWindow * | Window | ) |
Get the width of the rendering region of a window.
Window | : Window object |
Tell whether or not a window is opened.
Window | : Window object |
Activate or deactivate a window as the current target for rendering.
Window | : Window object | |
Active | : sfTrue to activate, sfFalse to deactivate |
CSFML_API void sfWindow_SetCursorPosition | ( | sfWindow * | Window, | |
unsigned int | Left, | |||
unsigned int | Top | |||
) |
Change the position of the mouse cursor on a window.
Window | : Window object | |
Left | : Left coordinate of the cursor, relative to the window | |
Top | : Top coordinate of the cursor, relative to the window |
CSFML_API void sfWindow_SetFramerateLimit | ( | sfWindow * | Window, | |
unsigned int | Limit | |||
) |
Limit the framerate to a maximum fixed frequency for a window.
Window | : Window object | |
Limit | : Framerate limit, in frames per seconds (use 0 to disable limit) |
CSFML_API void sfWindow_SetJoystickThreshold | ( | sfWindow * | Window, | |
float | Threshold | |||
) |
Change the joystick threshold, ie.
the value below which no move event will be generated
Window | : Window object | |
Threshold | : New threshold, in range [0, 100] |
CSFML_API void sfWindow_SetPosition | ( | sfWindow * | Window, | |
int | Left, | |||
int | Top | |||
) |
Change the position of a window on screen.
Only works for top-level windows
Window | : Window object | |
Left | : Left position | |
Top | : Top position |
Show or hide a window.
Window | : Window object | |
State | : sfTrue to show, sfFalse to hide |
Show or hide the mouse cursor on a window.
Window | : Window object | |
Show | : sfTrue to show, sfFalse to hide |
Enable / disable vertical synchronization on a window.
Window | : Window object | |
Enabled | : sfTrue to enable v-sync, sfFalse to deactivate |