Table of Contents

Class Win32Window

Namespace
Xui.Runtime.Windows.Actual
Assembly
Xui.Runtime.Windows.dll
public class Win32Window : IWindow, IServiceProvider
Inheritance
Win32Window
Implements
Inherited Members
Extension Methods

Constructors

Win32Window(Win32Platform, IWindow)

public Win32Window(Win32Platform platform, IWindow @abstract)

Parameters

platform Win32Platform
abstract IWindow

Fields

WM_ANIMATION_FRAME_MSG

public const uint WM_ANIMATION_FRAME_MSG = 1025

Field Value

uint

Properties

Abstract

protected IWindow Abstract { get; }

Property Value

IWindow

CompositionFrameHandle

public nint CompositionFrameHandle { get; }

Property Value

nint

Hwnd

public User32.Types.HWND Hwnd { get; }

Property Value

User32.Types.HWND

NeedsFrame

public bool NeedsFrame { get; }

Property Value

bool

PrimaryMonitorDPIScale

public static float PrimaryMonitorDPIScale { get; }

Property Value

float

Renderer

public DirectXContext Renderer { get; }

Property Value

DirectXContext

RequireKeyboard

Gets or sets whether the window currently requires keyboard input focus. Platforms may use this to show or hide on-screen keyboards.

public bool RequireKeyboard { get; set; }

Property Value

bool

TextMeasureContext

Gets a lightweight text measure context for hit-testing text positions during pointer events. Returns null on platforms that do not support it.

public ITextMeasureContext? TextMeasureContext { get; }

Property Value

ITextMeasureContext

Title

Gets or sets the window title, where supported by the platform (e.g., desktop).

public string Title { get; set; }

Property Value

string

Methods

Close()

Closes and destroys the platform window. Called when the abstract window is disposed programmatically rather than through a user-initiated close gesture. The default implementation is a no-op for platforms that do not support imperative close.

public void Close()

GetService(Type)

Gets the service object of the specified type.

public object? GetService(Type serviceType)

Parameters

serviceType Type

An object that specifies the type of service object to get.

Returns

object

A service object of type serviceType.

-or-

null if there is no service object of type serviceType.

Invalidate()

Requests a redraw of the window surface. The platform should trigger a paint or render callback as soon as possible.

public virtual void Invalidate()

OnAnimationFrame(ref FrameEventRef)

public void OnAnimationFrame(ref FrameEventRef @event)

Parameters

event FrameEventRef

OnMessage(HWND, WindowMessage, WPARAM, LPARAM)

public int OnMessage(User32.Types.HWND hWnd, User32.WindowMessage uMsg, Types.WPARAM wParam, Types.LPARAM lParam)

Parameters

hWnd User32.Types.HWND
uMsg User32.WindowMessage
wParam Types.WPARAM
lParam Types.LPARAM

Returns

int

OnScrollWheel(ScrollWheelEventRef)

protected virtual void OnScrollWheel(ScrollWheelEventRef scrollWheelEventRef)

Parameters

scrollWheelEventRef ScrollWheelEventRef

Render()

public void Render()

Show()

Displays the window to the user. This may include making it visible, entering the main loop, or attaching it to the application's view hierarchy, depending on the platform.

public void Show()