Skip to main content

Crate ferroui_linuxframebuffer

Crate ferroui_linuxframebuffer 

Source
Expand description

The Linux framebuffer platform of FerroUI: an application without a window system, as one full-screen top-level drawn into a framebuffer device (/dev/fb0) or onto a KMS output, with input read from the kernel’s input devices.

An application starts on it with one of the functions of LinuxFramebufferPlatformExtensions on its builder, after choosing a renderer:

ⓘ
let code = AppBuilder::configure::<App>().use_skia().start_linux_fb_dev(&args, None, 1.0, None)?;

Without an input backend the input is read through libinput from every event device (touch, absolute pointers, buttons and the wheel, as the reference: no keys and no relative motion), or, with FERROUI_USE_EVDEV=1, from the devices the environment names: one variable FERROUI_EVDEV_DEVICE_{name} per device, (path):type=(touchscreen|multitouch|keyboard|mouse), with an optional :calibration=m11,m12,m21,m22,m31,m32 for the touch screens. The keys of a keyboard are those of a US layout.

The design, what is built and what was verified where: docs/porting/linux-framebuffer-platform.md. Built: the framebuffer device output with software rendering, the DRM output (a KMS connector drawn with OpenGL through EGL on a GBM surface; libdrm, libgbm and libEGL are opened at run time), the evdev input backend and the libinput backend (the default; the library is opened at run time).

The parts that are functions of values compile on every Unix system (their tests run on a development machine that is not Linux); what makes Linux system calls is compiled for Linux only. The crate is empty elsewhere.

Modules§

input
The input backends of the platform.
native_unsafe_methods
The kernel’s structures, request numbers and codes of the framebuffer and input interfaces (the port of NativeUnsafeMethods.cs), and the system calls on files as safe functions.
output
The outputs of the platform: what the one top-level is drawn onto.
raw_event_grouping
The input queue of a backend that handles input asynchronously (the port of Shared/RawEventGrouping.cs, a source file the reference compiles into every backend that uses it).

Structs§

DrmConnectorType
specific the type of connector is HDMI-A, DVI, DisplayPort, etc.
DrmOutputOptions
DRM Output Options
EpollDispatcherImpl
The dispatcher implementation of the framebuffer platform.
FramebufferToplevelImpl
LinuxFramebufferLifetime
The lifetime of an application on the platform: one top-level that shows the main view.
LinuxFramebufferPlatform
LinuxFramebufferPlatformOptions
Platform-specific options which apply to the Linux framebuffer.

Traits§

LinuxFramebufferPlatformExtensions
The functions that start an application on the platform.