IWindowBackend interface
Platform-specific window backend responsible for native window lifetime, invalidation and input integration.
public interface IWindowBackend : IDisposableMembers
Section titled “Members”| name | description |
|---|---|
| ChromeCapabilities { get; } | Gets the native window chrome capabilities supported by this platform. |
| Handle { get; } | Gets the native window handle. |
| NativeChromeButtonInset { get; } | Gets the reserved area (in DIPs) for native chrome buttons when NativeChromeButtons is supported. Content should avoid overlapping this area. Returns Zero if not applicable. |
| Activate() | Attempts to activate the window (bring to front / focus), platform dependent. |
| BeginDragMove() | Initiates a window drag move operation using the platform’s native mechanism. |
| BeginDragResize(…) | Initiates a window resize operation from the specified edge using the platform’s native mechanism. |
| CancelImeComposition() | Cancels the current IME composition without committing. |
| CaptureMouse() | Captures mouse input at the native window level so the window continues to receive mouse events, even when the pointer leaves the client area (platform dependent). |
| CenterOnOwner() | Centers the window on its owner window (platform-specific coordinate handling). |
| ClientToScreen(…) | Converts a point from window client coordinates (DIPs) to screen coordinates (device pixels). |
| Close() | Requests the native window to close. |
| CreateSurface() | Creates the native window in a hidden (unmapped) state. After this returns Handle is valid and DPI is resolved; the window is not on screen and nothing has been painted. No-op if the surface already exists (a hide/show cycle reuses it). |
| EnsureTheme(…) | Applies platform theme-related settings for the window. |
| GetPosition() | Gets the window position in DIPs (screen coordinates). |
| Hide() | Hides the native window. |
| Invalidate(…) | Invalidates the window so it will be repainted. |
| PresentSurface() | Paints the first frame while the window is still hidden, then reveals the already-painted window (map / order front). Called by the framework after layout and the Loaded event so the first on-screen frame reflects Loaded-time changes with no flash. |
| ReleaseMouseCapture() | Releases any active mouse capture. |
| ScreenToClient(…) | Converts a point from screen coordinates (device pixels) to window client coordinates (DIPs). |
| SetAllowDrop(…) | Enables or disables the platform drag-and-drop drop-target registration for this window. Mirrors AllowDrop semantics of WinForms/WPF: a window only acts as a drop target when allow is true. |
| SetAllowsTransparency(…) | Enables or disables per-pixel transparency for the window (platform dependent). |
| SetBorderless(…) | Removes (or restores) the entire native non-client area (title bar and border). Independent of SetWindowState; the value is preserved across fullscreen transitions. |
| SetCanClose(…) | Enables or disables the close button in the native chrome. |
| SetCanMaximize(…) | Enables or disables the maximize button in the native chrome. |
| SetCanMinimize(…) | Enables or disables the minimize button in the native chrome. |
| SetClientSize(…) | Sets the window client size in DIPs. |
| SetCursor(…) | Sets the mouse cursor for the window. |
| SetEnabled(…) | Enables or disables the window for input (used for modal dialogs). |
| SetExtendClientAreaToTitleBar(…) | Extends the client area into the title bar, hiding the default title bar while preserving the native frame (rounded corners, shadow, system buttons). |
| SetIcon(…) | Sets the native window icon. |
| SetImeMode(…) | Sets the IME mode for the window. |
| SetOpacity(…) | Sets the window opacity (0..1). |
| SetOwner(…) | Sets the owner window for this window (modal / transient relationship), platform dependent. |
| SetPlatformOptions(…) | Sets the platform-specific window options. Throws InvalidOperationException if the options type does not match the platform. |
| SetPosition(…) | Sets the window position in DIPs (screen coordinates). |
| SetPositionPx(…) | Sets the window position in screen device pixels. |
| SetResizable(…) | Enables or disables window resizing. |
| SetShowInTaskbar(…) | Sets whether the window appears in the taskbar. |
| SetTitle(…) | Sets the native window title. |
| SetTopmost(…) | Sets whether the window stays on top of other windows. |
| SetWindowBorderColor(…) | Sets the native window border color where the platform supports it (see NativeBorderColor); null restores the default. |
| SetWindowState(…) | Sets the window display state (Normal, Minimized, Maximized). |
Remarks
Section titled “Remarks”Screen pixels form a shared virtual-desktop coordinate space, independent of the consuming window. On macOS the reference screen’s backing scale defines these units across all displays; they are not the local backing pixels of each display. Use the surface DPI only for rasterization, never to rescale an absolute screen position before passing it to another window.
See Also
Section titled “See Also”- namespace Aprillz.MewUI.Platform