-
Notifications
You must be signed in to change notification settings - Fork 0
Graphics
At the beginning of Unix world, a terminal was the best we could hope to interact with our computers. However nowadays even most conservative developers agree that you can't go without graphics support.
Even if Linux kernel is a good inspiration for the Kora kernel, I didn't want to get stuck with messy Tty code and complex graphics servers, like x11. Unstead of a tty, the default entry point for a user will be a desktop instance. So I decided of pushing on the kernel the basics of graphics support and remove non-userspace tty.
Linux already tried to create a device such as the framebuffer. Kora start with the same but frame-buffer is another kind of device with already predefined operations for double buffer switches or resizing.
Events are usually read from several devices (mouse, keyboard...) plus create by somemechanisms (like signal for timers) and then aggregate by the select()
method. This doesn't seems practical so we look at a way of getting all of those redirected to a single pipe instance as declared by the desktop configuration.
For regular application, looking at available monitors doesn't seems a good idea, but I still wanted to use some kind of file.
Graphical applications will create their own framebuffer like file but unstated of being backed up by a graphic driver, the new windows file will be linked to a desktop entity.
There's some kind of similitude here with network servers. When a process listen to a port it regroups sockets created by external programs. A desktop application must do the same with windows.
The window file is a combinaison of a fake framebuffer and an event pipe. The desktop read the frame-buffer and feed back events to the pipe, while the application read events on the pipe and draw on the frame-buffer.
At the system startup the first program to start is logon
this one create a desktop for the system user. Basically just provide interface for login.
Each time a user log-in the program must start a new task that will create a new desktop. And the first one will transfer monitors and input devices ownership to its child.
All documentation for KoraOS is licensed under creative commons (CC BY-NC 4.0)