SFML 3.0.2
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations
Window module

Provides OpenGL-based windows, and abstractions for events and input handling. More...

## Namespaces

namespace | sf::Clipboard
| Give access to the system clipboard.
namespace | sf::Joystick
| Give access to the real-time state of the joysticks.
namespace | sf::Keyboard
| Give access to the real-time state of the keyboard.
namespace | sf::Mouse
| Give access to the real-time state of the mouse.
namespace | sf::Sensor
| Give access to the real-time state of the sensors.
namespace | sf::Touch
| Give access to the real-time state of the touches.
namespace | sf::Vulkan
| Vulkan helper functions.

## Classes

class | sf::Context
| Class holding a valid drawing context. More...
class | sf::ContextSettings
| Structure defining the settings of the OpenGL context attached to a window. More...
class | sf::Cursor
| Cursor defines the appearance of a system cursor. More...
class | sf::Event
| Defines a system event and its parameters. More...
class | sf::GlResource
| Base class for classes that require an OpenGL context. More...
class | sf::VideoMode
| VideoMode defines a video mode (size, bpp). More...
class | sf::Window
| Window that serves as a target for OpenGL rendering. More...
class | sf::WindowBase
| Window that serves as a base for other windows. More...

## Typedefs

using | sf::WindowHandle = "platform-specific"
| Low-level window handle type, specific to each platform.

## Enumerations

enum | { sf::Style::None = 0 , sf::Style::Titlebar = 1 << 0 , sf::Style::Resize = 1 << 1 , sf::Style::Close = 1 << 2 , sf::Style::Default = Titlebar | Resize | Close }
| Enumeration of the window styles. More...
enum class | sf::State { sf::State::Windowed , sf::State::Fullscreen }
| Enumeration of the window states. More...

## Detailed Description

Provides OpenGL-based windows, and abstractions for events and input handling.

## Typedef Documentation

## ◆ WindowHandle

using sf::WindowHandle = "platform-specific"

Low-level window handle type, specific to each platform.

Platform | Type
--- | ---
Windows | `HWND`
Linux/FreeBSD | `Window`
macOS | either `NSWindow*` or `NSView*`, disguised as `void*`
iOS | `UIWindow*`
Android | `ANativeWindow*`

macOS Specification

On macOS, a sf::Window can be created either from an existing `NSWindow*` or an `NSView*`. When the window is created from a window, SFML will use its content view as the OpenGL area. sf::Window::getNativeHandle() will return the handle that was used to create the window, which is a `NSWindow*` by default.

Definition at line 68 of file WindowHandle.hpp.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumeration of the window styles.

Enumerator
None | No border / title bar (this flag and all others are mutually exclusive).
Titlebar | Title bar + fixed border.
Resize | Title bar + resizable border + maximize button.
Close | Title bar + close button.
Default | Default window style.

Definition at line 37 of file WindowEnums.hpp.

## ◆ State

enum class sf::State

strong

Enumeration of the window states.

Enumerator
Windowed | Floating window.
Fullscreen | Fullscreen window.

Definition at line 54 of file WindowEnums.hpp.