GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Enumerations | Functions
gp_linux_fb.h File Reference

A Linux framebuffer backend. More...

#include <backends/gp_backend.h>

Go to the source code of this file.

Enumerations

enum  gp_linux_fb_flags { GP_FB_INPUT_KBD = 0x01 , GP_FB_SHADOW = 0x02 , GP_FB_ALLOC_CON = 0x04 , GP_FB_INPUT_LINUX = 0x08 }
 Linux framebuffer init flags. More...
 

Functions

gp_backendgp_linux_fb_init (const char *path, enum gp_linux_fb_flags flags)
 Linux framebuffer backend initialization.
 

Detailed Description

A Linux framebuffer backend.

Definition in file gp_linux_fb.h.

Enumeration Type Documentation

◆ gp_linux_fb_flags

Linux framebuffer init flags.

Enumerator
GP_FB_INPUT_KBD 

Use KBD to get input events.

Does not support anything but very basic keyboard use GP_FB_INPUT_LINUX instead.

GP_FB_SHADOW 

Use shadow framebuffer for drawing.

Should be enabled unless you are on a very memory constrained hardware.

GP_FB_ALLOC_CON 

Allocate new console, if not set current is used.

GP_FB_INPUT_LINUX 

Use Linux input for keyboards and mouse.

This is the modern alternative to KBD.

Definition at line 16 of file gp_linux_fb.h.

Function Documentation

◆ gp_linux_fb_init()

gp_backend * gp_linux_fb_init ( const char *  path,
enum gp_linux_fb_flags  flags 
)

Linux framebuffer backend initialization.

Parameters
pathA path to a framebuffer device, e.g. "/dev/fb0" for first framebuffer.
flagsA bitwise combination of framebuffer init flags.
Returns
A newly allocated and initialized backend or NULL in a case of a failure.