Loading...
Searching...
No Matches
Window/Window.h
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
142CSFML_WINDOW_API sfWindow* sfWindow_createFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
312CSFML_WINDOW_API void sfWindow_setIcon(sfWindow* window, sfVector2u size, const uint8_t* pixels);
bool sfWindow_hasFocus(const sfWindow *window)
Check whether the window has the input focus.
void sfWindow_setFramerateLimit(sfWindow *window, unsigned int limit)
Limit the framerate to a maximum fixed frequency.
void sfWindow_requestFocus(sfWindow *window)
Request the current window to be made the active foreground window.
bool sfWindow_setActive(sfWindow *window, bool active)
Activate or deactivate a window as the current target for OpenGL rendering.
sfContextSettings sfWindow_getSettings(const sfWindow *window)
Get the settings of the OpenGL context of a window.
bool sfWindow_waitEvent(sfWindow *window, sfTime timeout, sfEvent *event)
Wait for an event and return it.
void sfWindow_setJoystickThreshold(sfWindow *window, float threshold)
Change the joystick threshold.
sfVector2i sfWindow_getPosition(const sfWindow *window)
Get the position of a window.
bool sfWindow_pollEvent(sfWindow *window, sfEvent *event)
Pop the event on top of event queue, if any, and return it.
void sfWindow_setKeyRepeatEnabled(sfWindow *window, bool enabled)
Enable or disable automatic key-repeat.
sfWindow * sfWindow_createFromHandle(sfWindowHandle handle, const sfContextSettings *settings)
Construct a window from an existing control.
void sfWindow_setUnicodeTitle(sfWindow *window, const sfChar32 *title)
Change the title of a window (with a UTF-32 string)
@ sfContextDefault
Non-debug, compatibility context (this and the core attribute are mutually exclusive)
Definition Window/Window.h:47
void sfWindow_setVerticalSyncEnabled(sfWindow *window, bool enabled)
Enable or disable vertical synchronization.
void sfWindow_setMouseCursorGrabbed(sfWindow *window, bool grabbed)
Grab or release the mouse cursor.
void sfWindow_setMouseCursorVisible(sfWindow *window, bool visible)
Show or hide the mouse cursor.
sfWindowHandle sfWindow_getNativeHandle(const sfWindow *window)
Get the OS-specific handle of the window.
bool sfWindow_createVulkanSurface(sfWindow *window, const VkInstance *instance, VkSurfaceKHR *surface, const VkAllocationCallbacks *allocator)
Create a Vulkan rendering surface.
sfVector2u sfWindow_getSize(const sfWindow *window)
Get the size of the rendering region of a window.
void sfWindow_setTitle(sfWindow *window, const char *title)
Change the title of a window.
void sfWindow_setMouseCursor(sfWindow *window, const sfCursor *cursor)
Set the displayed cursor to a native system cursor.
void sfWindow_display(sfWindow *window)
Display on screen what has been rendered to the window so far.
sfWindow * sfWindow_create(sfVideoMode mode, const char *title, uint32_t style, sfWindowState state, const sfContextSettings *settings)
Construct a new window.
void sfWindow_setSize(sfWindow *window, sfVector2u size)
Change the size of the rendering region of a window.
void sfWindow_setIcon(sfWindow *window, sfVector2u size, const uint8_t *pixels)
Change a window's icon.
void sfWindow_close(sfWindow *window)
Close a window and destroy all the attached resources.
sfWindow * sfWindow_createUnicode(sfVideoMode mode, const sfChar32 *title, uint32_t style, sfWindowState state, const sfContextSettings *settings)
Construct a new window (with a UTF-32 title)
void sfWindow_setPosition(sfWindow *window, sfVector2i position)
Change the position of a window on screen.
unsigned int majorVersion
Major number of the context version to create.
Definition Window/Window.h:62
unsigned int minorVersion
Minor number of the context version to create.
Definition Window/Window.h:63
sfVideoMode defines a video mode (width, height, bpp, frequency) and provides functions for getting m...
Definition VideoMode.h:44