FBIO_ Struct Reference
[libfb (framebuffer)]

A frame-buffer IO structure. More...

#include <fbio.h>


Public Member Functions

int if_open FB_ARGS ((struct FBIO_ *ifp, char *file, int width, int height))
 open device
int if_close FB_ARGS ((struct FBIO_ *ifp))
 close device
int if_clear FB_ARGS ((struct FBIO_ *ifp, unsigned char *pp))
 clear device
int if_read FB_ARGS ((struct FBIO_ *ifp, int x, int y, unsigned char *pp, int count))
 read pixels
int if_write FB_ARGS ((struct FBIO_ *ifp, int x, int y, const unsigned char *pp, int count))
 write pixels
int if_rmap FB_ARGS ((struct FBIO_ *ifp, ColorMap *cmap))
 read colormap
int if_wmap FB_ARGS ((struct FBIO_ *ifp, const ColorMap *cmap))
 write colormap
int if_view FB_ARGS ((struct FBIO_ *ifp, int xcent, int ycent, int xzoom, int yzoom))
 set view
int if_getview FB_ARGS ((struct FBIO_ *ifp, int *xcent, int *ycent, int *xzoom, int *yzoom))
 get view
int if_setcursor FB_ARGS ((struct FBIO_ *ifp, const unsigned char *bits, int xb, int yb, int xo, int yo))
 define cursor
int if_cursor FB_ARGS ((struct FBIO_ *ifp, int mode, int x, int y))
 set cursor
int if_getcursor FB_ARGS ((struct FBIO_ *ifp, int *mode, int *x, int *y))
 get cursor
int if_readrect FB_ARGS ((struct FBIO_ *ifp, int xmin, int ymin, int width, int height, unsigned char *pp))
 read rectangle
int if_writerect FB_ARGS ((struct FBIO_ *ifp, int xmin, int ymin, int width, int height, const unsigned char *pp))
 write rectangle
int if_bwreadrect FB_ARGS ((struct FBIO_ *ifp, int xmin, int ymin, int width, int height, unsigned char *pp))
 read monochrome rectangle
int if_bwwriterect FB_ARGS ((struct FBIO_ *ifp, int xmin, int ymin, int width, int height, const unsigned char *pp))
 write rectangle
int if_poll FB_ARGS ((struct FBIO_ *ifp))
 handle events
int if_flush FB_ARGS ((struct FBIO_ *ifp))
 flush output
int if_free FB_ARGS ((struct FBIO_ *ifp))
 free resources
int if_help FB_ARGS ((struct FBIO_ *ifp))
 print useful info

Data Fields

long if_magic
char * if_type
 what "open" calls it
int if_max_width
 max device width
int if_max_height
 max device height
char * if_name
 what the user called it
int if_width
 current values
int if_height
int if_selfd
 select(fd) for input events if >= 0
int if_fd
 internal file descriptor
int if_xzoom
 zoom factors
int if_yzoom
int if_xcenter
 pan position
int if_ycenter
int if_cursmode
 cursor on/off
int if_xcurs
 cursor position
int if_ycurs
unsigned char * if_pbase
 Address of malloc()ed page buffer.
unsigned char * if_pcurp
 Current pointer into page buffer.
unsigned char * if_pendp
 End of page buffer.
int if_pno
 Current "page" in memory.
int if_pdirty
 Page modified flag.
long if_pixcur
 Current pixel number in framebuffer.
long if_ppixels
 Sizeof page buffer (pixels).
int if_debug
 Buffered IO debug flag.
union {
   char *   p
   long   l
u1
union {
   char *   p
   long   l
u2
union {
   char *   p
   long   l
u3
union {
   char *   p
   long   l
u4
union {
   char *   p
   long   l
u5
union {
   char *   p
   long   l
u6


Detailed Description

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.

Definition at line 104 of file fbio.h.


Member Function Documentation

int if_open FB_ARGS (struct FBIO_ *ifp, char *file, int width, int height  ) 
 

open device

int if_close FB_ARGS (struct FBIO_ *ifp)   ) 
 

close device

int if_clear FB_ARGS (struct FBIO_ *ifp, unsigned char *pp)   ) 
 

clear device

int if_read FB_ARGS (struct FBIO_ *ifp, int x, int y, unsigned char *pp, int count)   ) 
 

read pixels

int if_write FB_ARGS (struct FBIO_ *ifp, int x, int y, const unsigned char *pp, int count)   ) 
 

write pixels

int if_rmap FB_ARGS (struct FBIO_ *ifp, ColorMap *cmap)   ) 
 

read colormap

int if_wmap FB_ARGS (struct FBIO_ *ifp, const ColorMap *cmap)   ) 
 

write colormap

int if_view FB_ARGS (struct FBIO_ *ifp, int xcent, int ycent, int xzoom, int yzoom)   ) 
 

set view

int if_getview FB_ARGS (struct FBIO_ *ifp, int *xcent, int *ycent, int *xzoom, int *yzoom)   ) 
 

get view

int if_setcursor FB_ARGS (struct FBIO_ *ifp, const unsigned char *bits, int xb, int yb, int xo, int yo)   ) 
 

define cursor

int if_cursor FB_ARGS (struct FBIO_ *ifp, int mode, int x, int y  ) 
 

set cursor

int if_getcursor FB_ARGS (struct FBIO_ *ifp, int *mode, int *x, int *y  ) 
 

get cursor

int if_readrect FB_ARGS (struct FBIO_ *ifp, int xmin, int ymin, int width, int height, unsigned char *pp)   ) 
 

read rectangle

int if_writerect FB_ARGS (struct FBIO_ *ifp, int xmin, int ymin, int width, int height, const unsigned char *pp)   ) 
 

write rectangle

int if_bwreadrect FB_ARGS (struct FBIO_ *ifp, int xmin, int ymin, int width, int height, unsigned char *pp)   ) 
 

read monochrome rectangle

int if_bwwriterect FB_ARGS (struct FBIO_ *ifp, int xmin, int ymin, int width, int height, const unsigned char *pp)   ) 
 

write rectangle

int if_poll FB_ARGS (struct FBIO_ *ifp)   ) 
 

handle events

int if_flush FB_ARGS (struct FBIO_ *ifp)   ) 
 

flush output

int if_free FB_ARGS (struct FBIO_ *ifp)   ) 
 

free resources

int if_help FB_ARGS (struct FBIO_ *ifp)   ) 
 

print useful info


Field Documentation

long if_magic
 

Definition at line 105 of file fbio.h.

char* if_type
 

what "open" calls it

Definition at line 127 of file fbio.h.

int if_max_width
 

max device width

Definition at line 128 of file fbio.h.

int if_max_height
 

max device height

Definition at line 129 of file fbio.h.

char* if_name
 

what the user called it

Definition at line 131 of file fbio.h.

int if_width
 

current values

Definition at line 132 of file fbio.h.

int if_height
 

Definition at line 133 of file fbio.h.

int if_selfd
 

select(fd) for input events if >= 0

Definition at line 134 of file fbio.h.

int if_fd
 

internal file descriptor

Definition at line 136 of file fbio.h.

int if_xzoom
 

zoom factors

Definition at line 137 of file fbio.h.

int if_yzoom
 

Definition at line 138 of file fbio.h.

int if_xcenter
 

pan position

Definition at line 139 of file fbio.h.

int if_ycenter
 

Definition at line 140 of file fbio.h.

int if_cursmode
 

cursor on/off

Definition at line 141 of file fbio.h.

int if_xcurs
 

cursor position

Definition at line 142 of file fbio.h.

int if_ycurs
 

Definition at line 143 of file fbio.h.

unsigned char* if_pbase
 

Address of malloc()ed page buffer.

Definition at line 144 of file fbio.h.

unsigned char* if_pcurp
 

Current pointer into page buffer.

Definition at line 145 of file fbio.h.

unsigned char* if_pendp
 

End of page buffer.

Definition at line 146 of file fbio.h.

int if_pno
 

Current "page" in memory.

Definition at line 147 of file fbio.h.

int if_pdirty
 

Page modified flag.

Definition at line 148 of file fbio.h.

long if_pixcur
 

Current pixel number in framebuffer.

Definition at line 149 of file fbio.h.

long if_ppixels
 

Sizeof page buffer (pixels).

Definition at line 150 of file fbio.h.

int if_debug
 

Buffered IO debug flag.

Definition at line 151 of file fbio.h.

char* p
 

Definition at line 154 of file fbio.h.

long l
 

Definition at line 155 of file fbio.h.

union { ... } u1
 

union { ... } u2
 

union { ... } u3
 

union { ... } u4
 

union { ... } u5
 

union { ... } u6
 


The documentation for this struct was generated from the following file:
Generated on Mon Sep 18 01:25:12 2006 for BRL-CAD by  doxygen 1.4.6