|
RADLib
RADical C++ application framework
|
RADDisplay reports display backend capabilities without requiring libdrm. It enumerates DRM connector sysfs entries, framebuffer nodes, backlight devices, Wayland/X11 environment availability, and simple orientation names.
The main entry point is RADDisplay::DisplayManager. It is constructed with an optional DisplayPaths, so real hardware, test fixtures, and custom embedded roots all share one code path. DisplayManager::capabilities() returns a DisplayCapabilities struct with the drm, framebuffer, wayland, x11, and backlight flags describing what the backend exposes.
DisplayManager::displays() lists DRM connectors and framebuffer nodes as DisplayInfo records (name, path, status, mode), for example a connector named card0-HDMI-A-1 or a framebuffer named fb0. DisplayManager::backlights() returns BacklightInfo records that include the current and maximum brightness values.
DisplayManager::setBacklightBrightness() writes only the selected backlight sysfs brightness file and reports failures through an optional error string. Orientation is expressed with the Orientation enum (Landscape0, Portrait90, Landscape180, Portrait270); the static DisplayManager::orientationName() converts a value into a compositor/backend-friendly string.
Core features:
DisplayPaths for tests and embedded roots.Example: