libfb (framebuffer)


Files

file  fb.h
 BRL "Generic" Framebuffer Library Interface Defines.
file  fbio.h
 BRL-CAD Framebuffer Library I/O Interfaces.
file  fbmsg.h
file  fbserv_obj.h

Data Structures

struct  ColorMap
struct  FBIO_
 A frame-buffer IO structure. More...
struct  fbserv_listener
struct  fbserv_client
struct  fbserv_obj

Defines

#define FB_H   seen
#define fb_gettype(_ifp)   (_ifp->if_type)
#define fb_getwidth(_ifp)   (_ifp->if_width)
#define fb_getheight(_ifp)   (_ifp->if_height)
#define fb_poll(_ifp)   (*_ifp->if_poll)(_ifp)
#define fb_help(_ifp)   (*_ifp->if_help)(_ifp)
#define fb_free(_ifp)   (*_ifp->if_free)(_ifp)
#define fb_clear(_ifp, _pp)   (*_ifp->if_clear)(_ifp,_pp)
#define fb_read(_ifp, _x, _y, _pp, _ct)   (*_ifp->if_read)(_ifp,_x,_y,_pp,_ct)
#define fb_write(_ifp, _x, _y, _pp, _ct)   (*_ifp->if_write)(_ifp,_x,_y,_pp,_ct)
#define fb_rmap(_ifp, _cmap)   (*_ifp->if_rmap)(_ifp,_cmap)
#define fb_wmap(_ifp, _cmap)   (*_ifp->if_wmap)(_ifp,_cmap)
#define fb_view(_ifp, _xc, _yc, _xz, _yz)   (*_ifp->if_view)(_ifp,_xc,_yc,_xz,_yz)
#define fb_getview(_ifp, _xcp, _ycp, _xzp, _yzp)   (*_ifp->if_getview)(_ifp,_xcp,_ycp,_xzp,_yzp)
#define fb_setcursor(_ifp, _bits, _xb, _yb, _xo, _yo)   (*_ifp->if_setcursor)(_ifp,_bits,_xb,_yb,_xo,_yo)
#define fb_cursor(_ifp, _mode, _x, _y)   (*_ifp->if_cursor)(_ifp,_mode,_x,_y)
#define fb_getcursor(_ifp, _modep, _xp, _yp)   (*_ifp->if_getcursor)(_ifp,_modep,_xp,_yp)
#define fb_readrect(_ifp, _xmin, _ymin, _width, _height, _pp)   (*_ifp->if_readrect)(_ifp,_xmin,_ymin,_width,_height,_pp)
#define fb_writerect(_ifp, _xmin, _ymin, _width, _height, _pp)   (*_ifp->if_writerect)(_ifp,_xmin,_ymin,_width,_height,_pp)
#define fb_bwreadrect(_ifp, _xmin, _ymin, _width, _height, _pp)   (*_ifp->if_bwreadrect)(_ifp,_xmin,_ymin,_width,_height,_pp)
#define fb_bwwriterect(_ifp, _xmin, _ymin, _width, _height, _pp)   (*_ifp->if_bwwriterect)(_ifp,_xmin,_ymin,_width,_height,_pp)
#define COPYRGB(to, from)
#define FB_WPIXEL(ifp, pp)
#define FB_DEBUG_BIO   1
#define FB_DEBUG_CMAP   2
#define FB_DEBUG_RW   4
#define FB_DEBUG_BRW   8
#define FB_CKMAG(_ptr, _magic, _str)
#define FB_ARGS(args)   ()
#define RED   0
#define GRN   1
#define BLU   2
#define PIXEL_NULL   (unsigned char *) 0
#define RGBPIXEL_NULL   (unsigned char *) 0
#define COLORMAP_NULL   (ColorMap *) 0
#define FBIO_NULL   (FBIO *) 0
#define FB_MAGIC   0xfbfb00fb
#define FB_CK_FBIO(_p)   FB_CKMAG(_p, FB_MAGIC, "FBIO" )
#define NET_LONG_LEN   4
 # bytes to network long
#define MAX_CLIENTS   32
#define MAX_PORT_TRIES   100
#define FBS_CALLBACK_NULL   (void (*)())NULL

Typedefs

typedef unsigned char RGBpixel [3]
typedef FBIO_ FBIO
 A frame-buffer IO structure.

Functions

FBIOfb_open ()
int fb_close ()
int fb_genhelp ()
int fb_ioinit ()
int fb_seek ()
int fb_tell ()
int fb_rpixel ()
int fb_wpixel ()
int fb_flush ()
void fb_log ()
int fb_null ()
int fb_null_setcursor ()
int fb_common_file_size ()
int fb_common_image_size ()
int fb_common_name_size ()
int fb_is_linear_cmap ()
void fb_make_linear_cmap ()
int fb_reset ()
int fb_viewport ()
int fb_window ()
int fb_zoom ()
int fb_scursor ()
int _fb_pgin ()
int _fb_pgout ()
int _fb_pgflush ()
int fb_sim_readrect ()
int fb_sim_writerect ()
int fb_sim_bwreadrect ()
int fb_sim_bwwriterect ()
int fb_sim_view ()
int fb_sim_getview ()
int fb_sim_cursor ()
int fb_sim_getcursor ()
void fb_tcl_setup ()
int Fb_Init ()
int fb_refresh (FBIO *ifp, int x, int y, int w, int h)
int fbs_open ()
int fbs_close ()

Variables

int _fb_disk_enable
char fb_version []
FBIO debug_interface
FBIO disk_interface
FBIO stk_interface
FBIO memory_interface
FBIO null_interface

Define Documentation

#define FB_H   seen
 

Definition at line 38 of file fb.h.

#define fb_gettype _ifp   )     (_ifp->if_type)
 

Definition at line 65 of file fb.h.

#define fb_getwidth _ifp   )     (_ifp->if_width)
 

Definition at line 66 of file fb.h.

#define fb_getheight _ifp   )     (_ifp->if_height)
 

Definition at line 67 of file fb.h.

#define fb_poll _ifp   )     (*_ifp->if_poll)(_ifp)
 

Definition at line 68 of file fb.h.

#define fb_help _ifp   )     (*_ifp->if_help)(_ifp)
 

Definition at line 69 of file fb.h.

#define fb_free _ifp   )     (*_ifp->if_free)(_ifp)
 

Definition at line 70 of file fb.h.

#define fb_clear _ifp,
_pp   )     (*_ifp->if_clear)(_ifp,_pp)
 

Definition at line 71 of file fb.h.

#define fb_read _ifp,
_x,
_y,
_pp,
_ct   )     (*_ifp->if_read)(_ifp,_x,_y,_pp,_ct)
 

Definition at line 72 of file fb.h.

#define fb_write _ifp,
_x,
_y,
_pp,
_ct   )     (*_ifp->if_write)(_ifp,_x,_y,_pp,_ct)
 

Definition at line 73 of file fb.h.

#define fb_rmap _ifp,
_cmap   )     (*_ifp->if_rmap)(_ifp,_cmap)
 

Definition at line 74 of file fb.h.

#define fb_wmap _ifp,
_cmap   )     (*_ifp->if_wmap)(_ifp,_cmap)
 

Definition at line 75 of file fb.h.

#define fb_view _ifp,
_xc,
_yc,
_xz,
_yz   )     (*_ifp->if_view)(_ifp,_xc,_yc,_xz,_yz)
 

Definition at line 76 of file fb.h.

#define fb_getview _ifp,
_xcp,
_ycp,
_xzp,
_yzp   )     (*_ifp->if_getview)(_ifp,_xcp,_ycp,_xzp,_yzp)
 

Definition at line 77 of file fb.h.

#define fb_setcursor _ifp,
_bits,
_xb,
_yb,
_xo,
_yo   )     (*_ifp->if_setcursor)(_ifp,_bits,_xb,_yb,_xo,_yo)
 

Definition at line 79 of file fb.h.

#define fb_cursor _ifp,
_mode,
_x,
_y   )     (*_ifp->if_cursor)(_ifp,_mode,_x,_y)
 

Definition at line 81 of file fb.h.

#define fb_getcursor _ifp,
_modep,
_xp,
_yp   )     (*_ifp->if_getcursor)(_ifp,_modep,_xp,_yp)
 

Definition at line 82 of file fb.h.

#define fb_readrect _ifp,
_xmin,
_ymin,
_width,
_height,
_pp   )     (*_ifp->if_readrect)(_ifp,_xmin,_ymin,_width,_height,_pp)
 

Definition at line 84 of file fb.h.

#define fb_writerect _ifp,
_xmin,
_ymin,
_width,
_height,
_pp   )     (*_ifp->if_writerect)(_ifp,_xmin,_ymin,_width,_height,_pp)
 

Definition at line 86 of file fb.h.

#define fb_bwreadrect _ifp,
_xmin,
_ymin,
_width,
_height,
_pp   )     (*_ifp->if_bwreadrect)(_ifp,_xmin,_ymin,_width,_height,_pp)
 

Definition at line 88 of file fb.h.

#define fb_bwwriterect _ifp,
_xmin,
_ymin,
_width,
_height,
_pp   )     (*_ifp->if_bwwriterect)(_ifp,_xmin,_ymin,_width,_height,_pp)
 

Definition at line 90 of file fb.h.

#define COPYRGB to,
from   ) 
 

Value:

{ (to)[RED]=(from)[RED];\
                           (to)[GRN]=(from)[GRN];\
                           (to)[BLU]=(from)[BLU]; }

Definition at line 206 of file fb.h.

#define FB_WPIXEL ifp,
pp   ) 
 

Value:

{if((ifp)->if_pno==-1)_fb_pgin((ifp),(ifp)->if_pixcur/(ifp)->if_ppixels);\
        (*((ifp)->if_pcurp+0))=(pp)[0];(*((ifp)->if_pcurp+1))=(pp)[1];(*((ifp)->if_pcurp+2))=(pp)[2];\
        (ifp)->if_pcurp+=3;(ifp)->if_pixcur++;(ifp)->if_pdirty=1;\
        if((ifp)->if_pcurp>=(ifp)->if_pendp){_fb_pgout((ifp));(ifp)->if_pno= -1;}}
A fast inline version of fb_wpixel. This one does NOT check for errors, nor "return" a value. For reasons of C syntax it needs the basename of an RGBpixel rather than a pointer to one.

Definition at line 215 of file fb.h.

#define FB_DEBUG_BIO   1
 

Definition at line 221 of file fb.h.

#define FB_DEBUG_CMAP   2
 

Definition at line 222 of file fb.h.

#define FB_DEBUG_RW   4
 

Definition at line 223 of file fb.h.

#define FB_DEBUG_BRW   8
 

Definition at line 224 of file fb.h.

#define FB_CKMAG _ptr,
_magic,
_str   ) 
 

Value:

if( !(_ptr) )  { \
                fb_log("ERROR: null %s ptr, file %s, line %d\n", \
                        _str, __FILE__, __LINE__ ); \
                abort(); \
        } else if( *((long *)(_ptr)) != (_magic) )  { \
                fb_log("ERROR: bad %s ptr x%x, s/b x%x, was x%x, file %s, line %d\n", \
                        _str, _ptr, _magic, \
                        *((long *)(_ptr)), __FILE__, __LINE__ ); \
                abort(); \
        }

Definition at line 226 of file fb.h.

#define FB_ARGS args   )     ()
 

Definition at line 39 of file fbio.h.

#define RED   0
 

Definition at line 68 of file fbio.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define GRN   1
 

Definition at line 69 of file fbio.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define BLU   2
 

Definition at line 70 of file fbio.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define PIXEL_NULL   (unsigned char *) 0
 

Definition at line 86 of file fbio.h.

#define RGBPIXEL_NULL   (unsigned char *) 0
 

Definition at line 87 of file fbio.h.

#define COLORMAP_NULL   (ColorMap *) 0
 

Definition at line 88 of file fbio.h.

#define FBIO_NULL   (FBIO *) 0
 

Definition at line 89 of file fbio.h.

#define FB_MAGIC   0xfbfb00fb
 

Definition at line 91 of file fbio.h.

#define FB_CK_FBIO _p   )     FB_CKMAG(_p, FB_MAGIC, "FBIO" )
 

Definition at line 92 of file fbio.h.

#define NET_LONG_LEN   4
 

# bytes to network long

Definition at line 32 of file fbserv_obj.h.

#define MAX_CLIENTS   32
 

Definition at line 33 of file fbserv_obj.h.

#define MAX_PORT_TRIES   100
 

Definition at line 34 of file fbserv_obj.h.

#define FBS_CALLBACK_NULL   (void (*)())NULL
 

Definition at line 35 of file fbserv_obj.h.


Typedef Documentation

typedef unsigned char RGBpixel[3]
 

R G B p i x e l

Format of disk pixels is .pix raw image files. Formerly used as arguments to many of the library routines, but has fallen into disuse due to the difficulties with ANSI function prototypes, and the fact that arrays are not real types in C. The most notable problem is that of passing a pointer to an array of RGBpixel. It looks doubly dimensioned, but isn't.

Definition at line 66 of file fbio.h.

typedef struct FBIO_ FBIO
 

A frame-buffer IO structure.

F B I O

One of these is allocated for each active framebuffer. A pointer to this structure is the first argument to all the library routines.


Function Documentation

FBIO* fb_open  ) 
 

int fb_close  ) 
 

int fb_genhelp  ) 
 

int fb_ioinit  ) 
 

int fb_seek  ) 
 

int fb_tell  ) 
 

int fb_rpixel  ) 
 

int fb_wpixel  ) 
 

int fb_flush  ) 
 

void fb_log  ) 
 

int fb_null  ) 
 

int fb_null_setcursor  ) 
 

int fb_common_file_size  ) 
 

int fb_common_image_size  ) 
 

int fb_common_name_size  ) 
 

int fb_is_linear_cmap  ) 
 

void fb_make_linear_cmap  ) 
 

int fb_reset  ) 
 

int fb_viewport  ) 
 

int fb_window  ) 
 

int fb_zoom  ) 
 

int fb_scursor  ) 
 

int _fb_pgin  ) 
 

int _fb_pgout  ) 
 

int _fb_pgflush  ) 
 

int fb_sim_readrect  ) 
 

int fb_sim_writerect  ) 
 

int fb_sim_bwreadrect  ) 
 

int fb_sim_bwwriterect  ) 
 

int fb_sim_view  ) 
 

int fb_sim_getview  ) 
 

int fb_sim_cursor  ) 
 

int fb_sim_getcursor  ) 
 

void fb_tcl_setup  ) 
 

int Fb_Init  ) 
 

int fb_refresh FBIO ifp,
int  x,
int  y,
int  w,
int  h
 

int fbs_open  ) 
 

int fbs_close  ) 
 


Variable Documentation

int _fb_disk_enable
 

char fb_version[]
 

FBIO debug_interface
 

FBIO disk_interface
 

FBIO stk_interface
 

FBIO memory_interface
 

FBIO null_interface
 


Generated on Mon Sep 18 01:25:24 2006 for BRL-CAD by  doxygen 1.4.6