Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "std/window/handle"
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
This package has no source imports.
NativeHandle
Enum · Source
pub enum NativeHandle {
// Linux: an X11 window and a libxcb connection to the same X server,
// opened for GPU APIs on the first native_handle() call and closed with
// the window. Pass `connection` and `window` to vkCreateXcbSurfaceKHR, or
// to EGL's XCB platform with `screen`. `visual` is the window's visual
// id, for choosing a matching EGL or GLX configuration.
Xcb(connection: usize, window: u32, screen: u32, visual: u32),
// macOS: the NSWindow and its content NSView. Use them on the main
// thread only. Window.metal_layer() attaches a CAMetalLayer to the view
// for Metal and for Vulkan's VK_EXT_metal_surface.
AppKit(window: usize, view: usize),
// Windows: the window's HWND and the HINSTANCE of the program that
// created it, as vkCreateWin32SurfaceKHR takes them.
Win32(hwnd: usize, instance: usize)
}
kind_name
Function · Source
pub fn kind_name(handle: &NativeHandle) -> &str from(static)