Skip to main content

Module screen

Module screen 

Source
Expand description

Screen device control contract (device::kind::SCREEN).

Screen devices expose resolution queries, resize notifications, drawing-area selection before pixel writes, optional screenshot capture and optional backlight brightness control via File::control.

§Brightness

GET_BRIGHTNESS and SET_BRIGHTNESS read and set the backlight level, from BRIGHTNESS_OFF (backlight off) to BRIGHTNESS_FULL. The level is proportional to the backlight drive. A screen without brightness control answers both commands with Unsupported; a screen that has fewer steps rounds to the nearest one it can show and GET_BRIGHTNESS reports the level that was asked for. Screens start at BRIGHTNESS_FULL.

The contract allows turning the backlight off; user interfaces that let people pick a level should keep a visible minimum so that the screen cannot go dark by accident.

Structs§

Area
Inclusive rectangular drawing area defined by two corner Points.
GET_BRIGHTNESS
GET_RESOLUTION
Point
A 2D coordinate or resolution (x, y) in screen pixels.
SET_BRIGHTNESS
SET_DRAWING_AREA
ScreenshotDimensions
ScreenshotRequest
WAS_RESIZED
WRITE_SCREENSHOT_TO_PATH

Constants§

BRIGHTNESS_FULL
Full backlight brightness, the level of every screen at start-up.
BRIGHTNESS_OFF
Brightness level that turns the backlight off.
SCREENSHOT_PATH_MAX_BYTES