slint::platform::NativeWindowHandle Class
class NativeWindowHandle;#include <slint-platform.h>An opaque, low-level window handle that internalizes everything necessary to exchange messages with the windowing system. This includes the connection to the display server, if necessary.
Note that this class does not provide any kind of ownership. The caller is responsible for ensuring that the pointers supplied to the constructor are valid throughout the lifetime of the NativeWindowHandle.
Public Functions
Section titled “Public Functions” NativeWindowHandle
Section titled “ NativeWindowHandle”slint::platform::NativeWindowHandle::NativeWindowHandle()=delete
NativeWindowHandle
Section titled “ NativeWindowHandle”slint::platform::NativeWindowHandle::NativeWindowHandle(const NativeWindowHandle &)=delete
operator=
Section titled “ operator=”NativeWindowHandle & slint::platform::NativeWindowHandle::operator=(const NativeWindowHandle &)=delete
NativeWindowHandle
Section titled “ NativeWindowHandle”slint::platform::NativeWindowHandle::NativeWindowHandle(NativeWindowHandle &&other)
Creates a new NativeWindowHandle by moving the handle data from other into this NativeWindowHandle.
operator=
Section titled “ operator=”NativeWindowHandle & slint::platform::NativeWindowHandle::operator=(NativeWindowHandle &&other)
Creates a new NativeWindowHandle by moving the handle data from other into this NativeWindowHandle.
~NativeWindowHandle
Section titled “ ~NativeWindowHandle”slint::platform::NativeWindowHandle::~NativeWindowHandle()
Destroys the NativeWindowHandle.
Public Static Functions
Section titled “Public Static Functions” from_x11_xcb
Section titled “ from_x11_xcb”static NativeWindowHandle slint::platform::NativeWindowHandle::from_x11_xcb(uint32_t window, uint32_t visual_id, xcb_connection_t *connection, int screen)
Creates a new NativeWindowHandle from the given xcb_window_t window, xcb_visualid_t visual_id, XCB connection, and screen number.
from_x11_xlib
Section titled “ from_x11_xlib”static NativeWindowHandle slint::platform::NativeWindowHandle::from_x11_xlib(uint32_t window, unsigned long visual_id, void *display, int screen)
Creates a new NativeWindowHandle from the given XLib window, VisualID visual_id, Display display, and screen number.
from_wayland
Section titled “ from_wayland”static NativeWindowHandle slint::platform::NativeWindowHandle::from_wayland(wl_surface *surface, wl_display *display)
Creates a new NativeWindowHandle from the given wayland surface, and display.
from_appkit
Section titled “ from_appkit”static NativeWindowHandle slint::platform::NativeWindowHandle::from_appkit(NSView *nsview, NSWindow *nswindow)
Creates a new NativeWindowHandle from the given nsview, and nswindow.
from_win32
Section titled “ from_win32”static NativeWindowHandle slint::platform::NativeWindowHandle::from_win32(void *hwnd, void *hinstance)
Creates a new NativeWindowHandle from the given HWND hwnd, and HINSTANCE hinstance.
© 2026 SixtyFPS GmbH