API reference
Preparing search index…

An OS window with an OpenGL context, usable by Texture.update().

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory34

Constructors

Properties

Methods

Constructors

Methods

  • Close the window; the object remains and create can be called again.

    Returns

    void
    Source & inheritance
  • Returns the created VkSurfaceKHR, or undefined when creation fails.

    Parameters

    instance
    bigint
    allocator
    bigint = 0n

    Returns

    undefined | bigint
    Source & inheritance
  • Swap the OpenGL front and back buffers; vertical sync and frame-rate limits may block the current thread.

    Returns

    void
    Source & inheritance
  • Return the platform-native window handle as bigint to preserve pointer precision.

    Returns

    bigint
    Source & inheritance
  • Return whether the window currently has input focus.

    Returns

    boolean
    Source & inheritance
  • Return whether the system window is still open.

    Returns

    boolean
    Source & inheritance
  • Called synchronously after an explicit create succeeds; derived hooks are not called during base construction with arguments.

    Returns

    void
    Source & inheritance
  • Called synchronously after SFML actually reports a size change, without consuming the corresponding Resized event.

    Returns

    void
    Source & inheritance
  • Request window focus from the system; the window manager decides whether to grant it.

    Returns

    void
    Source & inheritance
  • Activate or deactivate the window's OpenGL context on the current thread, returning whether it succeeded.

    Parameters

    active
    boolean = true

    Returns

    boolean
    Source & inheritance
  • Set the maximum display calls per second; 0 removes the frame-rate limit, and waiting occurs inside display.

    Parameters

    limit
    number

    Returns

    void
    Source & inheritance
  • Set the RGBA8 window icon; pixel data must contain at least size.x×size.y×4 bytes.

    Parameters

    size
    Readonly<Vector2u>
    pixels
    Uint8Array

    Returns

    void
    Source & inheritance
  • Set the axis-change threshold for joystick movement events, from 0 to 100.

    Parameters

    threshold
    number

    Returns

    void
    Source & inheritance
  • Set whether holding a key repeatedly generates KeyPressed events.

    Parameters

    enabled
    boolean

    Returns

    void
    Source & inheritance
  • Set the client area's maximum pixel dimensions; undefined removes the limit.

    Parameters

    size
    undefined | Readonly<Vector2u>

    Returns

    void
    Source & inheritance
  • Set the client area's minimum pixel dimensions; undefined removes the limit.

    Parameters

    size
    undefined | Readonly<Vector2u>

    Returns

    void
    Source & inheritance
  • Set whether to confine the mouse to the window, usually only effective while the window has focus.

    Parameters

    grabbed
    boolean

    Returns

    void
    Source & inheritance
  • Set whether the mouse cursor is visible in the client area.

    Parameters

    visible
    boolean

    Returns

    void
    Source & inheritance
  • Set the client area's pixel dimensions; width and height must be positive.

    Parameters

    size
    Readonly<Vector2u>

    Returns

    void
    Source & inheritance
  • Set the window title.

    Parameters

    title
    string

    Returns

    void
    Source & inheritance
  • Set whether buffer swaps synchronize with the display refresh.

    Parameters

    enabled
    boolean

    Returns

    void
    Source & inheritance
  • Show or hide the window.

    Parameters

    visible
    boolean

    Returns

    void
    Source & inheritance

Symbol members

"[graphicsNative]": NativeGraphicsHandle<"window">
Source & inheritance
  • Parameters

    value
    unknown

    Returns

    boolean
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0