BRL-CAD
if_disk.c File Reference
#include "common.h"
#include "bu/color.h"
#include "bu/file.h"
#include "bu/log.h"
#include "bu/str.h"
#include "fb_private.h"
#include "fb.h"
Include dependency graph for if_disk.c:

Go to the source code of this file.

Macros

#define FILE_CMAP_ADDR
 
#define DISK_DMA_BYTES   ((size_t)16*(size_t)1024/sizeof(RGBpixel)*sizeof(RGBpixel))
 
#define DISK_DMA_PIXELS   (DISK_DMA_BYTES/sizeof(RGBpixel))
 
#define if_seekpos   u5.l /* stored seek position */
 

Functions

HIDDEN int dsk_open (fb *ifp, const char *file, int width, int height)
 
HIDDEN struct fb_platform_specificdsk_get_fbps (uint32_t magic)
 
HIDDEN void dsk_put_fbps (struct fb_platform_specific *fbps)
 
HIDDEN int dsk_open_existing (fb *ifp, int width, int height, struct fb_platform_specific *fb_p)
 
HIDDEN int dsk_close_existing (fb *ifp)
 
HIDDEN int dsk_configure_window (fb *ifp, int width, int height)
 
HIDDEN int dsk_refresh (fb *ifp, int x, int y, int w, int h)
 
HIDDEN int dsk_close (fb *ifp)
 
HIDDEN int dsk_free (fb *ifp)
 
HIDDEN int disk_color_clear (fb *ifp, register unsigned char *bpp)
 
HIDDEN int dsk_clear (fb *ifp, unsigned char *bgpp)
 
HIDDEN ssize_t dsk_read (fb *ifp, int x, int y, unsigned char *pixelp, size_t count)
 
HIDDEN ssize_t dsk_write (fb *ifp, int x, int y, const unsigned char *pixelp, size_t count)
 
HIDDEN int dsk_rmap (fb *ifp, ColorMap *cmap)
 
HIDDEN int dsk_wmap (fb *ifp, const ColorMap *cmap)
 
HIDDEN int dsk_help (fb *ifp)
 

Variables

fb disk_interface
 

Macro Definition Documentation

#define FILE_CMAP_ADDR
Value:
((off_t) ifp->if_width*ifp->if_height \
*sizeof(RGBpixel))
unsigned char RGBpixel[3]
Definition: fb.h:73

Definition at line 37 of file if_disk.c.

Referenced by dsk_rmap(), and dsk_wmap().

#define DISK_DMA_BYTES   ((size_t)16*(size_t)1024/sizeof(RGBpixel)*sizeof(RGBpixel))

Definition at line 41 of file if_disk.c.

Referenced by disk_color_clear().

#define DISK_DMA_PIXELS   (DISK_DMA_BYTES/sizeof(RGBpixel))

Definition at line 42 of file if_disk.c.

Referenced by disk_color_clear().

#define if_seekpos   u5.l /* stored seek position */

Definition at line 44 of file if_disk.c.

Function Documentation

HIDDEN int dsk_open ( fb ifp,
const char *  file,
int  width,
int  height 
)

Definition at line 48 of file if_disk.c.

References BU_STR_EQUAL, FB_CK_FB, fb_log(), fb_internal::if_fd, fb_internal::if_height, fb_internal::if_width, and OSL::Strings::width.

Here is the call graph for this function:

HIDDEN struct fb_platform_specific* dsk_get_fbps ( uint32_t  magic)

Definition at line 102 of file if_disk.c.

HIDDEN void dsk_put_fbps ( struct fb_platform_specific fbps)

Definition at line 109 of file if_disk.c.

HIDDEN int dsk_open_existing ( fb ifp,
int  width,
int  height,
struct fb_platform_specific fb_p 
)

Definition at line 115 of file if_disk.c.

HIDDEN int dsk_close_existing ( fb ifp)

Definition at line 121 of file if_disk.c.

HIDDEN int dsk_configure_window ( fb ifp,
int  width,
int  height 
)

Definition at line 127 of file if_disk.c.

HIDDEN int dsk_refresh ( fb ifp,
int  x,
int  y,
int  w,
int  h 
)

Definition at line 133 of file if_disk.c.

HIDDEN int dsk_close ( fb ifp)

Definition at line 139 of file if_disk.c.

References fb_internal::if_fd.

HIDDEN int dsk_free ( fb ifp)

Definition at line 146 of file if_disk.c.

References bu_file_delete(), fb_internal::if_fd, and fb_internal::if_name.

Here is the call graph for this function:

HIDDEN int disk_color_clear ( fb ifp,
register unsigned char *  bpp 
)

Definition at line 161 of file if_disk.c.

References COPYRGB, DISK_DMA_BYTES, DISK_DMA_PIXELS, fb_log(), fb_internal::if_fd, fb_internal::if_height, and fb_internal::if_width.

Referenced by dsk_clear().

Here is the call graph for this function:

HIDDEN int dsk_clear ( fb ifp,
unsigned char *  bgpp 
)

Definition at line 197 of file if_disk.c.

References black, and disk_color_clear().

Here is the call graph for this function:

HIDDEN ssize_t dsk_read ( fb ifp,
int  x,
int  y,
unsigned char *  pixelp,
size_t  count 
)

Definition at line 209 of file if_disk.c.

References fb_log(), fb_internal::if_fd, and fb_internal::if_width.

Here is the call graph for this function:

HIDDEN ssize_t dsk_write ( fb ifp,
int  x,
int  y,
const unsigned char *  pixelp,
size_t  count 
)

Definition at line 257 of file if_disk.c.

References fb_log(), fb_internal::if_fd, and fb_internal::if_width.

Here is the call graph for this function:

HIDDEN int dsk_rmap ( fb ifp,
ColorMap cmap 
)

Definition at line 288 of file if_disk.c.

References fb_log(), FILE_CMAP_ADDR, and fb_internal::if_fd.

Here is the call graph for this function:

HIDDEN int dsk_wmap ( fb ifp,
const ColorMap cmap 
)

Definition at line 313 of file if_disk.c.

References fb_is_linear_cmap(), fb_log(), FILE_CMAP_ADDR, and fb_internal::if_fd.

Here is the call graph for this function:

HIDDEN int dsk_help ( fb ifp)

Definition at line 335 of file if_disk.c.

References disk_interface, fb_log(), fb_internal::if_fd, fb_internal::if_height, fb_internal::if_max_height, fb_internal::if_max_width, fb_internal::if_name, fb_internal::if_type, and fb_internal::if_width.

Here is the call graph for this function:

Variable Documentation

fb disk_interface

Definition at line 356 of file if_disk.c.

Referenced by dsk_help(), fb_genhelp(), and fb_open().