display(
canvas,opts) ->display,err
Create a DRM console display for a canvas
opts shape:
| Name | Default | Description |
|---|---|---|
path | /dev/dri/card0 | DRM card node |
manage_console | true | raw mode + hidden cursor, restored on destroy |
Returns nil, err (console untouched) when the device can't be opened,
DRM master is unavailable (a compositor is running), no connected output
is found, or the mode is smaller than the canvas.
Methods (the term.gfx.display contract):
:show():update() -- both wait out the pending flip, blit, and flip:hide() -- present a black frame, keep the device open:destroy() -- close the device (restores the CRTC), restore the console:set_anchor() -- no-op (placement is fixed by the display mode)