BRL-CAD
fb_generic.c File Reference
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include "bsocket.h"
#include "bio.h"
#include "bu/color.h"
#include "bu/log.h"
#include "bu/malloc.h"
#include "bu/str.h"
#include "fb_private.h"
#include "fb.h"
Include dependency graph for fb_generic.c:

Go to the source code of this file.

Macros

#define Malloc_Bomb(_bytes_)
 

Functions

fbfb_get ()
 
void fb_put (fb *ifp)
 
void fb_set_interface (fb *ifp, const char *interface_type)
 
struct fb_platform_specificfb_get_platform_specific (uint32_t magic)
 
void fb_put_platform_specific (struct fb_platform_specific *fb_p)
 
fbfb_open_existing (const char *file, int width, int height, struct fb_platform_specific *fb_p)
 
int fb_refresh (fb *ifp, int x, int y, int w, int h)
 
int fb_configure_window (fb *ifp, int width, int height)
 
void fb_set_name (fb *ifp, const char *name)
 
char * fb_get_name (fb *ifp)
 
long fb_get_pagebuffer_pixel_size (fb *ifp)
 
int fb_is_set_fd (fb *ifp, fd_set *infds)
 
int fb_set_fd (fb *ifp, fd_set *select_list)
 
int fb_clear_fd (fb *ifp, fd_set *list)
 
void fb_set_magic (fb *ifp, uint32_t magic)
 
char * fb_gettype (fb *ifp)
 
int fb_getwidth (fb *ifp)
 
int fb_getheight (fb *ifp)
 
int fb_get_max_width (fb *ifp)
 
int fb_get_max_height (fb *ifp)
 
int fb_poll (fb *ifp)
 
long fb_poll_rate (fb *ifp)
 
int fb_help (fb *ifp)
 
int fb_free (fb *ifp)
 
int fb_clear (fb *ifp, unsigned char *pp)
 
ssize_t fb_read (fb *ifp, int x, int y, unsigned char *pp, size_t count)
 
ssize_t fb_write (fb *ifp, int x, int y, const unsigned char *pp, size_t count)
 
int fb_rmap (fb *ifp, ColorMap *cmap)
 
int fb_wmap (fb *ifp, const ColorMap *cmap)
 
int fb_view (fb *ifp, int xcenter, int ycenter, int xzoom, int yzoom)
 
int fb_getview (fb *ifp, int *xcenter, int *ycenter, int *xzoom, int *yzoom)
 
int fb_setcursor (fb *ifp, const unsigned char *bits, int xb, int yb, int xo, int yo)
 
int fb_cursor (fb *ifp, int mode, int x, int y)
 
int fb_getcursor (fb *ifp, int *mode, int *x, int *y)
 
int fb_readrect (fb *ifp, int xmin, int ymin, int width, int height, unsigned char *pp)
 
int fb_writerect (fb *ifp, int xmin, int ymin, int width, int height, const unsigned char *pp)
 
int fb_bwreadrect (fb *ifp, int xmin, int ymin, int width, int height, unsigned char *pp)
 
int fb_bwwriterect (fb *ifp, int xmin, int ymin, int width, int height, const unsigned char *pp)
 
int fb_null (fb *ifp)
 
int fb_null_setcursor (fb *ifp, const unsigned char *bits, int xbits, int ybits, int xorig, int yorig)
 
fbfb_open (const char *file, int width, int height)
 
int fb_close (fb *ifp)
 
int fb_close_existing (fb *ifp)
 
int fb_genhelp (void)
 
int fb_is_linear_cmap (register const ColorMap *cmap)
 
void fb_make_linear_cmap (register ColorMap *cmap)
 
int fb_write_fp (fb *ifp, FILE *fp, int req_width, int req_height, int crunch, int inverse, struct bu_vls *result)
 
int fb_read_fd (fb *ifp, int fd, int file_width, int file_height, int file_xoff, int file_yoff, int scr_width, int scr_height, int scr_xoff, int scr_yoff, int fileinput, char *file_name, int one_line_only, int multiple_lines, int autosize, int inverse, int clear, int zoom, struct bu_vls *result)
 

Variables

int _fb_disk_enable = 1
 

Detailed Description

The main table where framebuffers are initialized and prioritized for run-time access.

Definition in file fb_generic.c.

Macro Definition Documentation

#define Malloc_Bomb (   _bytes_)
Value:
fb_log("\"%s\"(%d) : allocation of %lu bytes failed.\n", \
__FILE__, __LINE__, _bytes_)
void fb_log(const char *fmt,...) _BU_ATTR_PRINTF12
Definition: fb_log.c:42

Definition at line 326 of file fb_generic.c.

Referenced by fb_open().

Function Documentation

int fb_is_linear_cmap ( register const ColorMap cmap)

Check for a color map being linear in the upper 8 bits of R, G, and B. Returns 1 for linear map, 0 for non-linear map (i.e., non-identity map).

Definition at line 560 of file fb_generic.c.

References ColorMap::cm_blue, ColorMap::cm_green, and ColorMap::cm_red.

Referenced by fb_write_fp().

void fb_make_linear_cmap ( register ColorMap cmap)

Definition at line 574 of file fb_generic.c.

References ColorMap::cm_blue, ColorMap::cm_green, and ColorMap::cm_red.

Variable Documentation

int _fb_disk_enable = 1

Disk interface enable flag. Used so the remote daemon can turn off the disk interface.

Definition at line 353 of file fb_generic.c.