Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dwm/src/core/window.ts>DwmWindow

Deno Window Manager: Cross-platform window creation and management
Go to Latest
class DwmWindow
Abstract
import { DwmWindow } from "https://deno.land/x/dwm@0.2.0/src/core/window.ts";

Represents a Window

Constructors

new
DwmWindow(_options: CreateWindowOptions)

Properties

abstract
readonly
closed: boolean

Check if the window is closed

abstract
readonly
contentScale: Position

Window's content scale

abstract
focused: boolean

Check if the window is focused

abstract
readonly
framebufferSize: Size

Window's framebuffer size

abstract
readonly
frameSize: LTRB
abstract
fullScreen: boolean

Check if the window is fullscreen

id

Window's unique identifier

abstract
maximized: boolean

Change whether the window is maximized

abstract
minimized: boolean

Change whether the window is minimized

abstract
readonly
nativeHandle: Deno.PointerValue

The window's pointer

abstract
opacity: number

Opacity of the window

abstract
position: Position

Window's position

abstract
readonly
shouldClose: boolean

Whether the window should close

abstract
size: Size

Window's size

abstract
title: string

Title of the window

abstract
visible: boolean

Change whether the window is visible

Methods

abstract
close(): void

Close the window

Create a VkSurfaceKHR for this window (Only for Vulkan)

abstract
getMonitor(): DwmMonitor | undefined

Get the monitor that the window is on (undefined if not fullscreen)

abstract
makeContextCurrent(): void

Sets this window's context as the current context (Only for OpenGL)

abstract
requestUserAttention(): void

Requests the User's attention

abstract
setAspectRatio(numerator: number, denominator: number): void

Set the window's aspect ratio

abstract
setCursor(icon?: CursorIcon): void

Sets the cursor icon

abstract
setMonitor(
monitor: DwmMonitor | undefined,
xpos?: number,
ypos?: number,
width?: number,
height?: number,
refreshRate?: number,
): void

Set the monitor that the window is on

abstract
setSizeLimits(
minWidth: number,
minHeight: number,
maxWidth: number,
maxHeight: number,
): void

Set the window's size limits

abstract
swapBuffers(): void

Swaps the window's buffers (Only for OpenGL)