#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.
Typedefs | |
typedef sfWindow | sfWindow |
sfWindow is a rendering window ; it can create a new window or connect to an existing one | |
Enumerations | |
enum | { sfNoStyle = 0, sfResize = 1 << 0, sfClose = 1 << 1, sfFullscreen = 1 << 2 } |
Enumeration of window creation styles. More... | |
Functions | |
CSFML_API sfWindow * | sfWindow_Create (sfVideoMode Mode, const char *Title, unsigned long Style, int AntialiasingLevel) |
Construct a new window. | |
CSFML_API sfWindow * | sfWindow_CreateFromHandle (sfWindowHandle Handle, int AntialiasingLevel) |
Construct a window from an existing control. | |
CSFML_API void | sfWindow_Destroy (sfWindow *Window) |
Destroy an existing window. | |
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 unsigned int | sfWindow_GetDepthBits (sfWindow *Window) |
Get the depth buffer bits of a window. | |
CSFML_API unsigned int | sfWindow_GetStencilBits (sfWindow *Window) |
Get the stencil buffer bits 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 sfBool | sfWindow_SetCurrent (sfWindow *Window) |
Set 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 sfWindow* sfWindow_Create | ( | sfVideoMode | Mode, | |
const char * | Title, | |||
unsigned long | Style, | |||
int | AntialiasingLevel | |||
) |
Construct a new window.
Mode | : Video mode to use | |
Title | : Title of the window | |
Style | : Window style | |
AntialiasingLevel | : Level of antialiasing |
CSFML_API sfWindow* sfWindow_CreateFromHandle | ( | sfWindowHandle | Handle, | |
int | AntialiasingLevel | |||
) |
Construct a window from an existing control.
Handle | : Platform-specific handle of the control | |
AntialiasingLevel | : Level of antialiasing |
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 |
CSFML_API unsigned int sfWindow_GetDepthBits | ( | sfWindow * | Window | ) |
Get the depth buffer bits of a window.
Window | : Window object |
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 unsigned int sfWindow_GetStencilBits | ( | sfWindow * | Window | ) |
Get the stencil buffer bits 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 |
Set a window as the current target for rendering.
Window | : Window object |
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 |