Expand description

Interoperability library for Rust Windowing applications.

This library provides standard types for accessing a window’s platform-specific raw window handle and platforms display handle. This does not provide any utilities for creating and managing windows; instead, it provides a common interface that window creation libraries (e.g. Winit, SDL) can use to easily talk with graphics libraries (e.g. gfx-hal).

Safety guarantees

Please see the docs of HasRawWindowHandle and HasRawDisplayHandle.

Platform handle initialization

Each platform handle struct is purposefully non-exhaustive, so that additional fields may be added without breaking backwards compatibility. Each struct provides an empty method that may be used along with the struct update syntax to construct it. See each specific struct for examples.

Display Handles

Some windowing systems use a separate display handle for some operations. The display usually represents a connection to some display server, but it is not necessarily tied to a particular window. See RawDisplayHandle for more details.

Modules

android 🔒
appkit 🔒
borrowed 🔒
Borrowable window handles based on the ones in this crate.
haiku 🔒
redox 🔒
uikit 🔒
unix 🔒
web 🔒
windows 🔒

Macros

from_impl 🔒

Structs

Keeps track of whether the application is currently active.
Represents a live window handle.
Raw display handle for Android.
Raw window handle for Android NDK.
Raw display handle for AppKit.
Raw window handle for AppKit.
The handle to the display controller of the windowing system.
Raw display handle for the Linux Kernel Mode Set/Direct Rendering Manager.
Raw window handle for the Linux Kernel Mode Set/Direct Rendering Manager.
Raw display handle for the Linux Generic Buffer Manager.
Raw window handle for the Linux Generic Buffer Manager.
Raw display handle for Haiku.
Raw window handle for Haiku.
Raw display handle for the Redox operating system.
Raw window handle for the Redox operating system.
Raw display handle for UIKit.
Raw window handle for UIKit.
Raw display handle for Wayland.
Raw window handle for Wayland.
Raw display handle for the Web.
Raw window handle for the Web.
Raw window handle for Win32.
Raw window handle for WinRT.
The handle to a window.
Raw display handle for Windows.
Raw display handle for Xcb.
Raw window handle for Xcb.
Raw display handle for Xlib.
Raw window handle for Xlib.

Enums

The error type returned when a handle cannot be obtained.
A display server handle for a particular windowing system.
A window handle for a particular windowing system.

Traits

A display that acts as a wrapper around a display handle.
Display that wraps around a raw display handle.
Window that wraps around a raw window handle.
A handle to a window.