BRL-CAD
fb_internal Struct Reference

A frame-buffer IO structure. More...

#include <fb_private.h>

Collaboration diagram for fb_internal:
[legend]

Data Fields

uint32_t if_magic
 
uint32_t type_magic
 
int(* if_open )(struct fb_internal *ifp, const char *file, int _width, int _height)
 open device More...
 
int(* if_open_existing )(struct fb_internal *ifp, int width, int height, struct fb_platform_specific *fb_p)
 open device More...
 
int(* if_close_existing )(struct fb_internal *ifp)
 close embedded fb More...
 
struct fb_platform_specific *(* if_existing_get )(uint32_t magic)
 allocate memory for platform specific container More...
 
void(* if_existing_put )(struct fb_platform_specific *fb_p)
 free memory for platform specific container More...
 
int(* if_close )(struct fb_internal *ifp)
 close device More...
 
int(* if_clear )(struct fb_internal *ifp, unsigned char *pp)
 clear device More...
 
ssize_t(* if_read )(struct fb_internal *ifp, int x, int y, unsigned char *pp, size_t count)
 read pixels More...
 
ssize_t(* if_write )(struct fb_internal *ifp, int x, int y, const unsigned char *pp, size_t count)
 write pixels More...
 
int(* if_rmap )(struct fb_internal *ifp, ColorMap *cmap)
 read colormap More...
 
int(* if_wmap )(struct fb_internal *ifp, const ColorMap *cmap)
 write colormap More...
 
int(* if_view )(struct fb_internal *ifp, int xcent, int ycent, int xzoom, int yzoom)
 set view More...
 
int(* if_getview )(struct fb_internal *ifp, int *xcent, int *ycent, int *xzoom, int *yzoom)
 get view More...
 
int(* if_setcursor )(struct fb_internal *ifp, const unsigned char *bits, int xb, int yb, int xo, int yo)
 define cursor More...
 
int(* if_cursor )(struct fb_internal *ifp, int mode, int x, int y)
 set cursor More...
 
int(* if_getcursor )(struct fb_internal *ifp, int *mode, int *x, int *y)
 get cursor More...
 
int(* if_readrect )(struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, unsigned char *pp)
 read rectangle More...
 
int(* if_writerect )(struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, const unsigned char *pp)
 write rectangle More...
 
int(* if_bwreadrect )(struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, unsigned char *pp)
 read monochrome rectangle More...
 
int(* if_bwwriterect )(struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, const unsigned char *pp)
 write rectangle More...
 
int(* if_configure_window )(struct fb_internal *ifp, int width, int height)
 configure window More...
 
int(* if_refresh )(struct fb_internal *ifp, int x, int y, int w, int h)
 refresh window More...
 
int(* if_poll )(struct fb_internal *ifp)
 handle events More...
 
int(* if_flush )(struct fb_internal *ifp)
 flush output More...
 
int(* if_free )(struct fb_internal *ifp)
 free resources More...
 
int(* if_help )(struct fb_internal *ifp)
 print useful info More...
 
char * if_type
 what "open" calls it More...
 
int if_max_width
 max device width More...
 
int if_max_height
 max device height More...
 
char * if_name
 what the user called it More...
 
int if_width
 current values More...
 
int if_height
 
int if_selfd
 select(fd) for input events if >= 0 More...
 
int if_fd
 internal file descriptor More...
 
int if_xzoom
 zoom factors More...
 
int if_yzoom
 
int if_xcenter
 pan position More...
 
int if_ycenter
 
int if_cursmode
 cursor on/off More...
 
int if_xcurs
 cursor position More...
 
int if_ycurs
 
unsigned char * if_pbase
 Address of malloc()ed page buffer. More...
 
unsigned char * if_pcurp
 Current pointer into page buffer. More...
 
unsigned char * if_pendp
 End of page buffer. More...
 
int if_pno
 Current "page" in memory. More...
 
int if_pdirty
 Page modified flag. More...
 
long if_pixcur
 Current pixel number in framebuffer. More...
 
long if_ppixels
 Sizeof page buffer (pixels). More...
 
int if_debug
 Buffered IO debug flag. More...
 
long if_poll_refresh_rate
 Recommended polling rate for interactive framebuffers in microseconds. More...
 
union {
   char *   p
 
   size_t   l
 
u1
 
union {
   char *   p
 
   size_t   l
 
u2
 
union {
   char *   p
 
   size_t   l
 
u3
 
union {
   char *   p
 
   size_t   l
 
u4
 
union {
   char *   p
 
   size_t   l
 
u5
 
union {
   char *   p
 
   size_t   l
 
u6
 

Detailed Description

A frame-buffer IO structure.

One of these is allocated for each active framebuffer. A pointer to this structure is the first argument to all the library routines. The details of the structure are hidden behind function calls in the fb.h API - no code external to libfb should work directly with structure members.

Definition at line 80 of file fb_private.h.

Field Documentation

uint32_t if_magic

Definition at line 81 of file fb_private.h.

Referenced by fb_open(), and fb_set_magic().

uint32_t type_magic

Definition at line 82 of file fb_private.h.

Referenced by fb_put_platform_specific().

int(* if_open) (struct fb_internal *ifp, const char *file, int _width, int _height)

open device

Definition at line 84 of file fb_private.h.

Referenced by fb_open().

int(* if_open_existing) (struct fb_internal *ifp, int width, int height, struct fb_platform_specific *fb_p)

open device

Definition at line 85 of file fb_private.h.

Referenced by fb_open_existing().

int(* if_close_existing) (struct fb_internal *ifp)

close embedded fb

Definition at line 86 of file fb_private.h.

Referenced by fb_close_existing().

struct fb_platform_specific*(* if_existing_get) (uint32_t magic)

allocate memory for platform specific container

Definition at line 87 of file fb_private.h.

void(* if_existing_put) (struct fb_platform_specific *fb_p)

free memory for platform specific container

Definition at line 88 of file fb_private.h.

int(* if_close) (struct fb_internal *ifp)

close device

Definition at line 89 of file fb_private.h.

Referenced by fb_close().

int(* if_clear) (struct fb_internal *ifp, unsigned char *pp)

clear device

Definition at line 90 of file fb_private.h.

Referenced by fb_clear().

ssize_t(* if_read) (struct fb_internal *ifp, int x, int y, unsigned char *pp, size_t count)

read pixels

Definition at line 91 of file fb_private.h.

Referenced by fb_read().

ssize_t(* if_write) (struct fb_internal *ifp, int x, int y, const unsigned char *pp, size_t count)

write pixels

Definition at line 92 of file fb_private.h.

Referenced by fb_write().

int(* if_rmap) (struct fb_internal *ifp, ColorMap *cmap)

read colormap

Definition at line 93 of file fb_private.h.

Referenced by fb_rmap().

int(* if_wmap) (struct fb_internal *ifp, const ColorMap *cmap)

write colormap

Definition at line 94 of file fb_private.h.

Referenced by fb_wmap().

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

set view

Definition at line 95 of file fb_private.h.

Referenced by fb_view().

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

get view

Definition at line 96 of file fb_private.h.

Referenced by fb_getview().

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

define cursor

Definition at line 97 of file fb_private.h.

Referenced by fb_setcursor().

int(* if_cursor) (struct fb_internal *ifp, int mode, int x, int y)

set cursor

Definition at line 98 of file fb_private.h.

Referenced by fb_cursor().

int(* if_getcursor) (struct fb_internal *ifp, int *mode, int *x, int *y)

get cursor

Definition at line 99 of file fb_private.h.

Referenced by fb_getcursor().

int(* if_readrect) (struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, unsigned char *pp)

read rectangle

Definition at line 100 of file fb_private.h.

Referenced by fb_readrect().

int(* if_writerect) (struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, const unsigned char *pp)

write rectangle

Definition at line 101 of file fb_private.h.

Referenced by fb_writerect().

int(* if_bwreadrect) (struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, unsigned char *pp)

read monochrome rectangle

Definition at line 102 of file fb_private.h.

Referenced by fb_bwreadrect().

int(* if_bwwriterect) (struct fb_internal *ifp, int xmin, int ymin, int _width, int _height, const unsigned char *pp)

write rectangle

Definition at line 103 of file fb_private.h.

Referenced by fb_bwwriterect().

int(* if_configure_window) (struct fb_internal *ifp, int width, int height)

configure window

Definition at line 104 of file fb_private.h.

Referenced by fb_configure_window().

int(* if_refresh) (struct fb_internal *ifp, int x, int y, int w, int h)

refresh window

Definition at line 105 of file fb_private.h.

Referenced by fb_refresh().

int(* if_poll) (struct fb_internal *ifp)

handle events

Definition at line 106 of file fb_private.h.

Referenced by fb_poll().

int(* if_flush) (struct fb_internal *ifp)

flush output

Definition at line 107 of file fb_private.h.

Referenced by fb_flush().

int(* if_free) (struct fb_internal *ifp)

free resources

Definition at line 108 of file fb_private.h.

Referenced by fb_free().

int(* if_help) (struct fb_internal *ifp)

print useful info

Definition at line 109 of file fb_private.h.

Referenced by fb_help().

char* if_type

what "open" calls it

Definition at line 110 of file fb_private.h.

Referenced by deb_help(), DEVNAME_help(), dsk_help(), fb_genhelp(), fb_gettype(), mem_help(), null_help(), and qt_help().

int if_max_width
int if_max_height
int if_selfd

select(fd) for input events if >= 0

Definition at line 117 of file fb_private.h.

Referenced by fb_clear_fd(), fb_is_set_fd(), fb_set_fd(), and mem_open().

int if_fd

internal file descriptor

Definition at line 119 of file fb_private.h.

Referenced by disk_color_clear(), dsk_close(), dsk_free(), dsk_help(), dsk_open(), dsk_read(), dsk_rmap(), dsk_wmap(), dsk_write(), and rem_open().

int if_xzoom
int if_xcenter
int if_cursmode

cursor on/off

Definition at line 124 of file fb_private.h.

Referenced by fb_sim_cursor(), and fb_sim_getcursor().

int if_xcurs

cursor position

Definition at line 125 of file fb_private.h.

Referenced by fb_sim_cursor(), and fb_sim_getcursor().

int if_ycurs

Definition at line 126 of file fb_private.h.

Referenced by fb_sim_cursor(), and fb_sim_getcursor().

unsigned char* if_pbase

Address of malloc()ed page buffer.

Definition at line 127 of file fb_private.h.

Referenced by fb_close(), fb_ioinit(), and fb_seek().

unsigned char* if_pcurp

Current pointer into page buffer.

Definition at line 128 of file fb_private.h.

Referenced by fb_ioinit(), fb_rpixel(), fb_seek(), and fb_wpixel().

unsigned char* if_pendp

End of page buffer.

Definition at line 129 of file fb_private.h.

Referenced by fb_ioinit(), fb_rpixel(), and fb_wpixel().

int if_pno

Current "page" in memory.

Definition at line 130 of file fb_private.h.

Referenced by fb_ioinit(), fb_rpixel(), fb_seek(), and fb_wpixel().

int if_pdirty

Page modified flag.

Definition at line 131 of file fb_private.h.

Referenced by fb_seek(), and fb_wpixel().

long if_pixcur

Current pixel number in framebuffer.

Definition at line 132 of file fb_private.h.

Referenced by fb_ioinit(), fb_rpixel(), fb_seek(), fb_tell(), and fb_wpixel().

long if_ppixels

Sizeof page buffer (pixels).

Definition at line 133 of file fb_private.h.

Referenced by fb_get_pagebuffer_pixel_size(), fb_ioinit(), fb_rpixel(), fb_seek(), and fb_wpixel().

int if_debug

Buffered IO debug flag.

Definition at line 134 of file fb_private.h.

Referenced by deb_open(), deb_wmap(), deb_write(), fb_ioinit(), fb_seek(), and fb_tell().

long if_poll_refresh_rate

Recommended polling rate for interactive framebuffers in microseconds.

Definition at line 135 of file fb_private.h.

Referenced by fb_poll_rate().

char* p

Definition at line 138 of file fb_private.h.

size_t l

Definition at line 139 of file fb_private.h.

union { ... } u1
union { ... } u2
union { ... } u3
union { ... } u4
union { ... } u5
union { ... } u6

The documentation for this struct was generated from the following file: