Class Win32Window
public class Win32Window : IWindow, IServiceProvider
- Inheritance
-
Win32Window
- Implements
- Inherited Members
- Extension Methods
Constructors
Win32Window(Win32Platform, IWindow)
public Win32Window(Win32Platform platform, IWindow @abstract)
Parameters
platformWin32PlatformabstractIWindow
Fields
WM_ANIMATION_FRAME_MSG
public const uint WM_ANIMATION_FRAME_MSG = 1025
Field Value
Properties
Abstract
protected IWindow Abstract { get; }
Property Value
CompositionFrameHandle
public nint CompositionFrameHandle { get; }
Property Value
Hwnd
public User32.Types.HWND Hwnd { get; }
Property Value
NeedsFrame
public bool NeedsFrame { get; }
Property Value
PrimaryMonitorDPIScale
public static float PrimaryMonitorDPIScale { get; }
Property Value
Renderer
public DirectXContext Renderer { get; }
Property Value
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
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
Title
Gets or sets the window title, where supported by the platform (e.g., desktop).
public string Title { get; set; }
Property Value
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
serviceTypeTypeAn 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
eventFrameEventRef
OnMessage(HWND, WindowMessage, WPARAM, LPARAM)
public int OnMessage(User32.Types.HWND hWnd, User32.WindowMessage uMsg, Types.WPARAM wParam, Types.LPARAM lParam)
Parameters
Returns
OnScrollWheel(ScrollWheelEventRef)
protected virtual void OnScrollWheel(ScrollWheelEventRef scrollWheelEventRef)
Parameters
scrollWheelEventRefScrollWheelEventRef
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()