Graphical interface and input
System integration
Before discussing from the C++ developer's point of view, let's see what Genode "building blocks" are availble to the system integrator in the first place.Window manager
Genode-based OSes can be built so as to have multiple workspaces (virtual desktop/screens) and to remember window positions in "spatial mode" across reboots (similarly to BeOS/Haiku). This article shows how the latter is done in SculptOS : http://genodians.org/nfeske/2020-03-27-window-management.
C++ APIs
Basics
Example
More/Tutorial
Run file: Framebuffer
One may use...
- intel extreme driver...
- fb_drv for VESA framebuffer
- fb_boot_drv for UEFI(?) framebuffer, via GRUB
The fb_drv driver can be set up with a safe-bet resolution like 1024x768.
The latter will take advantage of EDID to dynamically find an optimal resolution, works on both bare metal and qemu:
>In this case your resolution will be set based on whatever > GRUB decides to set as the resolution, as I understand it. This can be > quite large if the correct options are passed to qemu and you use the > right firmware If you boot in UEFI mode (no bios legacy support) by using qemu --bios option Sculpt will use automatically the fb_boot_drv component, which will take the resolution as Grub setup. If you boot the old BIOS legacy way, Sculpt will use the fb_drv with a fixed pre-defined resolution.
(MList 23apr20)
Run file: Input
For keyboard and mouse input, one may use..
- direct connection to ps2_drv or usb_hid or even usb_drv itself
- input_filter, connected either to ps2_drv or usb (couldn't get it to work with both ps/2 and USB at the same time tho.. how does Sculpt pull that off ?). If migrating from input_merger, see this for an equivalent input_filter config : https://github.com/genodelabs/genode/issues/3736
- input_merger : retired early 2020, see above.
See repos/os/src/test/nitpicker/test.cc for a more complex example.