Main Page   File List   Globals  

FButil.c File Reference

Helper functions. More...

Go to the source code of this file.

Functions

FB_pixel FB_makecol (u_char r, u_char g, u_char b, u_char t)
int FB_getVisual ()
void FB_getres (int *x, int *y)
int FB_getxres ()
int FB_getyres ()
int FB_getXVres ()
int FB_getYVres ()
int FB_getbpp ()
int FB_setbpp (int bpp)


Detailed Description

Implementation of functions to get/set some framebuffer properties, and other ones that I had no other place for.
begin : Mon Nov 20 2000
copyright : (C) 2000 by Daniele Venzano
email : venza@users.sf.net

Definition in file FButil.c.


Function Documentation

FB_pixel FB_makecol u_char    r,
u_char    g,
u_char    b,
u_char    t
[inline]
 

Bit magic to create a framebuffer dependent representation of a 16/32 bit color. The bpp used is the one the fb is currently set at.

Parameters:
r  red component 0 - 255
g  green component 0 - 255
b  blue comoponent 0 - 255
t  transparency 0 - 255 (not supported on some kernel drivers)

Definition at line 17 of file FButil.c.

int FB_getVisual  
 

Returns one of the following values, they are all defined in linux/fb.h

Return values:
FB_VISUAL_MONO01  0 Monochr. 1=Black 0=White
FB_VISUAL_MONO10  1 Monochr. 1=White 0=Black
FB_VISUAL_TRUECOLOR  2 True color
FB_VISUAL_PSEUDOCOLOR  3 Pseudo color (like atari)
FB_VISUAL_DIRECTCOLOR  4 Direct color
FB_VISUAL_STATIC_PSEUDOCOLOR  5 Pseudo color readonly

Definition at line 34 of file FButil.c.

void FB_getres int *    x,
int *    y
 

Sets x and y respectively to the width and height of the visible screen

Definition at line 39 of file FButil.c.

int FB_getxres  
 

Returns the width of the visible screen

Definition at line 57 of file FButil.c.

Referenced by FB_clear_screen(), FB_hline(), FB_putpixel(), FB_rectfill(), and FB_vline().

int FB_getyres  
 

Returns the height of the visible screen

Definition at line 65 of file FButil.c.

Referenced by FB_clear_screen(), FB_hline(), FB_putpixel(), FB_rectfill(), and FB_vline().

int FB_getXVres  
 

Returns virtual screen width

Definition at line 73 of file FButil.c.

int FB_getYVres  
 

Returns virtual screen height

Definition at line 81 of file FButil.c.

int FB_getbpp  
 

Returns color depth the framebuffer is set to. It can be 16 or 32

Definition at line 89 of file FButil.c.

Referenced by FB_getpixel().

int FB_setbpp int    bpp
 

Change the color depth of the framebuffer, this function can fail, so check always the return value:

Return values:
OK  No error
PARAM_ERR  Color depth not supported
IOCTL_ERR  Probably the color depth is not supported by the graphic device

Definition at line 94 of file FButil.c.


Generated on Sat Jul 5 09:04:52 2003 for LibFB by doxygen1.2.18