|
ginnOS
The reference: libc, the libraries and the kernel
|
userspace access to the linear framebuffer. More...
#include <sys/types.h>Go to the source code of this file.
Data Structures | |
| struct | fb_info_t |
| framebuffer geometry and pixel format, filled by fbinfo(). More... | |
Typedefs | |
| typedef unsigned int | uint32_t |
| typedef unsigned char | uint8_t |
Functions | |
| int | fbinfo (fb_info_t *info) |
| query the framebuffer geometry and pixel format. | |
| void * | fbmap (void) |
| map the framebuffer into this process's address space. | |
| int | pollkey (void) |
| non-blocking keyboard poll for interactive graphics programs. | |
userspace access to the linear framebuffer.
linear framebuffer driver.
a program calls fbinfo() to learn the framebuffer geometry and pixel format, then fbmap() to map it into its address space and draw pixels directly. these are convenience wrappers over the /dev/fb0 fbdev (open + ioctl + mmap, see <sys/fb.h>); a program can use that interface directly instead. this is still a single-client path (no compositor yet): whoever maps it owns the whole screen until it exits.
a pixel-pushing driver for the VBE linear framebuffer described in boot_info_t (see the FB0 bootloader work). it is the framebuffer equivalent of the raw VGA text driver: it knows nothing about fonts, terminals, or ANSI only pixels and rectangles. higher layers (the font renderer, the tty backend) build on top of it.
pixels are composed from the channel masks the boot protocol reported, so the driver works for whatever RGB packing the mode uses (24- or 32-bpp) rather than assuming a fixed 0x00RRGGBB layout.
| typedef unsigned int uint32_t |
| typedef unsigned char uint8_t |
| int fbinfo | ( | fb_info_t * | info | ) |
query the framebuffer geometry and pixel format.
| info | output struct. |
| void * fbmap | ( | void | ) |
map the framebuffer into this process's address space.
| int pollkey | ( | void | ) |
non-blocking keyboard poll for interactive graphics programs.