|
ginnOS
The reference: libc, the libraries and the kernel
|
framebuffer device uapi: screeninfo structs and FBIO* request codes. More...
#include "common/stdint.h"Go to the source code of this file.
Data Structures | |
| struct | fb_bitfield_t |
| struct | fb_fix_screeninfo_t |
| struct | fb_var_screeninfo_t |
| struct | fb_mode_t |
| FBIOGET_MODE: one video mode. More... | |
| struct | fb_rect_t |
| FBIO_FLUSH: arg is an fb_rect_t of pixels that changed. More... | |
| struct | fb_cursor_t |
| struct | fb_point_t |
| struct | fb_event_t |
| FBIOPUT_VSCREENINFO sets the mode to xres x yres at 32 bits per pixel when a display driver can (EINVAL if it cannot). More... | |
Macros | |
| #define | FB_TYPE_PACKED_PIXELS 0 |
| #define | FB_VISUAL_TRUECOLOR 2 |
| #define | FBIOGET_VSCREENINFO 0x4600 |
| #define | FBIOPUT_VSCREENINFO 0x4601 |
| #define | FBIOGET_FSCREENINFO 0x4602 |
| #define | FBIOGET_MODE 0x46F0 |
| #define | FBIO_GRAPHICS 0x46F1 |
| FBIO_GRAPHICS: int arg 1 takes the screen for this process, 0 gives it back. | |
| #define | FBIO_FLUSH 0x46F2 |
| #define | FB_CURSOR_SIZE 64 |
| FBIO_CURSOR: arg is an fb_cursor_t. | |
| #define | FBIO_CURSOR 0x46F3 |
| #define | FBIO_CURSOR_MOVE 0x46F4 |
| #define | FB_EVENT_MODE 1 |
| #define | FB_EVENT_PREFERRED 2 |
framebuffer device uapi: screeninfo structs and FBIO* request codes.
modelled on Linux's <linux/fb.h>, trimmed to what ginnOS supports: 32-bit truecolor modes, packed pixels, no colormap, no CRTC timings. these definitions are ABI and must match the libc mirror in src/libc/include/sys/fb.h exactly, since userspace passes them across the ioctl boundary.
| #define FB_TYPE_PACKED_PIXELS 0 |
| #define FB_VISUAL_TRUECOLOR 2 |
| #define FBIOGET_VSCREENINFO 0x4600 |
| #define FBIOPUT_VSCREENINFO 0x4601 |
| #define FBIOGET_FSCREENINFO 0x4602 |
| #define FBIOGET_MODE 0x46F0 |
| #define FBIO_GRAPHICS 0x46F1 |
FBIO_GRAPHICS: int arg 1 takes the screen for this process, 0 gives it back.
while a process has the screen, the text console does not draw on it (its text is kept, and comes back when the screen is given back). the screen comes back by itself when the process ends, and on a kernel panic. EBUSY if another live process has it.
| #define FBIO_FLUSH 0x46F2 |
| #define FB_CURSOR_SIZE 64 |
FBIO_CURSOR: arg is an fb_cursor_t.
a display that has a pointer of its own (virtio-gpu) shows pixels over the screen, with their top left corner at x, y; shown 0 hides it. only the owner of the screen (FBIO_GRAPHICS) can use it, and the pointer goes when the owner gives the screen back or ends. ENOTTY when the display has no pointer: draw it in the picture then.
FBIO_CURSOR_MOVE: arg is an fb_point_t, the new top left corner.
| #define FBIO_CURSOR 0x46F3 |
| #define FBIO_CURSOR_MOVE 0x46F4 |
| #define FB_EVENT_MODE 1 |
| #define FB_EVENT_PREFERRED 2 |