Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::NativeSurfaceHandle Struct Reference

The platform object a surface presents to. More...

#include "donner/gpu/Descriptors.h"

Public Attributes

NativeSurfaceKind kind = NativeSurfaceKind::MetalLayer
 Which platform object this names.
void * display = nullptr
 MetalLayer: the layer. XlibWindow: the display. WaylandSurface: the display. Null for CanvasSelector.
uint64_t window = 0
 XlibWindow: the window id. WaylandSurface: the surface. Zero for MetalLayer and CanvasSelector.
RcString selector
 CanvasSelector: the selector naming the canvas. Empty for every other kind.

Detailed Description

The platform object a surface presents to.

A discriminant plus the payload slots every kind needs. Which fields carry meaning depends on kind; the rest stay empty. Backends validate the fields their kind requires and fail closed on a handle that does not carry them.

Member Data Documentation

◆ display

void* donner::gpu::NativeSurfaceHandle::display = nullptr

MetalLayer: the layer. XlibWindow: the display. WaylandSurface: the display. Null for CanvasSelector.

◆ kind

NativeSurfaceKind donner::gpu::NativeSurfaceHandle::kind = NativeSurfaceKind::MetalLayer

Which platform object this names.

◆ selector

RcString donner::gpu::NativeSurfaceHandle::selector

CanvasSelector: the selector naming the canvas. Empty for every other kind.

◆ window

uint64_t donner::gpu::NativeSurfaceHandle::window = 0

XlibWindow: the window id. WaylandSurface: the surface. Zero for MetalLayer and CanvasSelector.


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