FB Graphics
FBGraphics (FBG) : Simple C 16, 24, 32 bpp generic graphics library with parallelism support and custom backend.
Data Structures | Macros | Functions
fbg_fbdev.h File Reference
#include <linux/fb.h>
#include "fbgraphics.h"

Go to the source code of this file.

Data Structures

struct  _fbg_fbdev_context
 fbdev wrapper data structure More...
 

Macros

#define fbg_fbdevInit()   fbg_fbdevSetup(NULL, 0)
 initialize a FB Graphics context with '/dev/fb0' as framebuffer device and no page flipping More...
 

Functions

struct _fbgfbg_fbdevSetup (char *fb_device, int page_flipping)
 initialize a FB Graphics context (framebuffer) More...
 

Data Structure Documentation

◆ _fbg_fbdev_context

struct _fbg_fbdev_context

fbdev wrapper data structure

Definition at line 35 of file fbg_fbdev.h.

Data Fields
unsigned char * buffer Memory-mapped framebuffer.
int fd Framebuffer device file descriptor.
struct fb_fix_screeninfo finfo Framebuffer device fix. informations.
int page_flipping Flag indicating that page flipping is enabled.
struct fb_var_screeninfo vinfo Framebuffer device var. informations.

Macro Definition Documentation

◆ fbg_fbdevInit

#define fbg_fbdevInit ( )    fbg_fbdevSetup(NULL, 0)

initialize a FB Graphics context with '/dev/fb0' as framebuffer device and no page flipping

Definition at line 60 of file fbg_fbdev.h.

Function Documentation

◆ fbg_fbdevSetup()

struct _fbg* fbg_fbdevSetup ( char *  fb_device,
int  page_flipping 
)

initialize a FB Graphics context (framebuffer)

Parameters
fb_deviceframebuffer device (example : /dev/fb0)
page_flippingwether to use page flipping mechanism for double buffering (slow on some devices)
Returns
_fbg structure pointer to pass to any FBG library functions