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.
89CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
112CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(sfVideoMode mode, const sfUint32* title, sfUint32 style, const sfContextSettings* settings);
130CSFML_WINDOW_API sfWindow* sfWindow_createFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
294CSFML_WINDOW_API void sfWindow_setIcon(sfWindow* window, unsigned int width, unsigned int height, const sfUint8* pixels);
488CSFML_WINDOW_API sfBool sfWindow_createVulkanSurface(sfWindow* window, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
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.
void sfWindow_setMouseCursorGrabbed(sfWindow *window, sfBool grabbed)
Grab or release the mouse cursor.
void sfWindow_setMouseCursorVisible(sfWindow *window, sfBool visible)
Show or hide the mouse cursor.
sfContextSettings sfWindow_getSettings(const sfWindow *window)
Get the settings of the OpenGL context of a window.
void sfWindow_setJoystickThreshold(sfWindow *window, float threshold)
Change the joystick threshold.
void sfWindow_setVerticalSyncEnabled(sfWindow *window, sfBool enabled)
Enable or disable vertical synchronization.
sfVector2i sfWindow_getPosition(const sfWindow *window)
Get the position of a window.
sfBool sfWindow_waitEvent(sfWindow *window, sfEvent *event)
Wait for an event and return it.
sfBool sfWindow_pollEvent(sfWindow *window, sfEvent *event)
Pop the event on top of event queue, if any, and return it.
sfWindow * sfWindow_createFromHandle(sfWindowHandle handle, const sfContextSettings *settings)
Construct a window from an existing control.
@ sfContextDefault
Non-debug, compatibility context (this and the core attribute are mutually exclusive)
Definition Window/Window.h:46
void sfWindow_setKeyRepeatEnabled(sfWindow *window, sfBool enabled)
Enable or disable automatic key-repeat.
sfWindowHandle sfWindow_getSystemHandle(const sfWindow *window)
Get the OS-specific handle of the window.
sfWindow * sfWindow_createUnicode(sfVideoMode mode, const sfUint32 *title, sfUint32 style, const sfContextSettings *settings)
Construct a new window (with a UTF-32 title)
sfBool sfWindow_isOpen(const sfWindow *window)
Tell whether or not a window is opened.
sfBool sfWindow_hasFocus(const sfWindow *window)
Check whether the window has the input focus.
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_setIcon(sfWindow *window, unsigned int width, unsigned int height, const sfUint8 *pixels)
Change a window's icon.
void sfWindow_setMouseCursor(sfWindow *window, const sfCursor *cursor)
Set the displayed cursor to a native system cursor.
sfBool sfWindow_setActive(sfWindow *window, sfBool active)
Activate or deactivate a window as the current target for OpenGL rendering.
void sfWindow_display(sfWindow *window)
Display on screen what has been rendered to the window so far.
void sfWindow_setUnicodeTitle(sfWindow *window, const sfUint32 *title)
Change the title of a window (with a UTF-32 string)
void sfWindow_setSize(sfWindow *window, sfVector2u size)
Change the size of the rendering region of a window.
sfWindow * sfWindow_create(sfVideoMode mode, const char *title, sfUint32 style, const sfContextSettings *settings)
Construct a new window.
void sfWindow_close(sfWindow *window)
Close a window and destroy all the attached resources.
sfBool sfWindow_createVulkanSurface(sfWindow *window, const VkInstance *instance, VkSurfaceKHR *surface, const VkAllocationCallbacks *allocator)
Create a Vulkan rendering surface.
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:61
unsigned int minorVersion
Minor number of the context version to create.
Definition Window/Window.h:62
sfVideoMode defines a video mode (width, height, bpp, frequency) and provides functions for getting m...
Definition VideoMode.h:42