KiCad PCB EDA Suite
Loading...
Searching...
No Matches
RHI_NATIVE_WINDOW_HANDLE Struct Reference

Platform-agnostic wrapper for a native window handle. More...

#include <rhi_surface.h>

Public Member Functions

bool IsValid () const
 A handle is usable only once the window is realized.
 

Public Attributes

void * nativeHandle = nullptr
 
void * nativeDisplay = nullptr
 
RHI_DISPLAY_TYPE displayType = RHI_DISPLAY_TYPE::UNKNOWN
 

Detailed Description

Platform-agnostic wrapper for a native window handle.

nativeHandle is the HWND on Windows, the Metal host NSView on macOS, the X11 Window cast to a pointer, or the wl_surface. nativeDisplay is the CAMetalLayer, the X11 Display or the wl_display, and is unused on Windows.

Definition at line 44 of file rhi_surface.h.

Member Function Documentation

◆ IsValid()

bool RHI_NATIVE_WINDOW_HANDLE::IsValid ( ) const
inline

A handle is usable only once the window is realized.

X11 and Wayland also need the display connection and Cocoa needs the attached Metal layer.

Definition at line 54 of file rhi_surface.h.

References COCOA, displayType, nativeDisplay, nativeHandle, UNKNOWN, WAYLAND, and X11.

Referenced by EDA_DRAW_PANEL_GAL::presentFrame().

Member Data Documentation

◆ displayType

RHI_DISPLAY_TYPE RHI_NATIVE_WINDOW_HANDLE::displayType = RHI_DISPLAY_TYPE::UNKNOWN

Definition at line 48 of file rhi_surface.h.

Referenced by RHI_VULKAN_DEVICE::CreateSurface(), GetNativeWindowHandle(), and IsValid().

◆ nativeDisplay

void* RHI_NATIVE_WINDOW_HANDLE::nativeDisplay = nullptr

Definition at line 47 of file rhi_surface.h.

Referenced by RHI_VULKAN_DEVICE::CreateSurface(), GetNativeWindowHandle(), and IsValid().

◆ nativeHandle


The documentation for this struct was generated from the following file: