BRL-CAD
fb_obj.c File Reference
#include "common.h"
#include <stdlib.h>
#include "tcl.h"
#include "bu/cmd.h"
#include "bu/color.h"
#include "bu/getopt.h"
#include "bu/malloc.h"
#include "bu/str.h"
#include "fb_private.h"
#include "fb.h"
#include "fbserv_obj.h"
Include dependency graph for fb_obj.c:

Go to the source code of this file.

Data Structures

struct  fb_obj
 

Macros

#define FBO_CONSTRAIN(_v, _a, _b)   ((_v > _a) ? (_v < _b ? _v : _b) : _a)
 

Functions

int fb_refresh (fb *ifp, int x, int y, int w, int h)
 
HIDDEN int fbo_coords_ok (fb *fbp, int x, int y)
 
HIDDEN void fbo_deleteProc (void *clientData)
 
HIDDEN int fbo_close_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_tcllist2color (const char *str, unsigned char *pixel)
 
HIDDEN int fbo_clear_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_cursor_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_getcursor_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_refresh_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_listen_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_pixel_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_cell_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_flush_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_getheight_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_getwidth_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_getsize_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_rect_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_configure_tcl (void *clientData, int argc, const char **argv)
 
HIDDEN int fbo_cmd (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv)
 
HIDDEN int fbo_open_tcl (void *clientData, Tcl_Interp *interp, int argc, const char **argv)
 
int Fbo_Init (Tcl_Interp *interp)
 

Detailed Description

A framebuffer object contains the attributes and methods for controlling framebuffers.

Definition in file fb_obj.c.

Macro Definition Documentation

#define FBO_CONSTRAIN (   _v,
  _a,
  _b 
)    ((_v > _a) ? (_v < _b ? _v : _b) : _a)

Definition at line 53 of file fb_obj.c.

Referenced by fbo_tcllist2color().

Function Documentation

HIDDEN int fbo_coords_ok ( fb fbp,
int  x,
int  y 
)

Definition at line 68 of file fb_obj.c.

References bu_log(), fb_getheight(), fb_getwidth(), and OSL::Strings::width.

Referenced by fbo_cell_tcl(), fbo_pixel_tcl(), and fbo_rect_tcl().

Here is the call graph for this function:

HIDDEN void fbo_deleteProc ( void *  clientData)

Definition at line 110 of file fb_obj.c.

References bu_free(), BU_LIST_DEQUEUE, bu_vls_free(), fb_close(), fb_obj::fbo_fbs, fb_obj::fbo_name, and fb_obj::l.

Referenced by fbo_open_tcl().

Here is the call graph for this function:

HIDDEN int fbo_close_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 130 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), bu_vls_addr(), fb_obj::fbo_interp, and fb_obj::fbo_name.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_tcllist2color ( const char *  str,
unsigned char *  pixel 
)

Definition at line 147 of file fb_obj.c.

References BLU, BRLCAD_ERROR, BRLCAD_OK, bu_log(), FBO_CONSTRAIN, GRN, and RED.

Referenced by fbo_cell_tcl(), fbo_clear_tcl(), fbo_pixel_tcl(), and fbo_rect_tcl().

Here is the call graph for this function:

HIDDEN int fbo_clear_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 172 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), fb_clear(), fb_obj::fbo_fbs, fbo_tcllist2color(), and RGBPIXEL_NULL.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_cursor_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 214 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), fb_cursor(), and fb_obj::fbo_fbs.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_getcursor_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 255 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), BU_STR_EQUIV, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), fb_getcursor(), fb_obj::fbo_fbs, and fb_obj::fbo_interp.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_refresh_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 290 of file fb_obj.c.

References BRLCAD_ERROR, bu_log(), fb_refresh(), and fb_obj::fbo_fbs.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_listen_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 325 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), FB_NULL, fb_obj::fbo_fbs, fb_obj::fbo_interp, fbs_close(), and fbs_open().

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_pixel_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 377 of file fb_obj.c.

References BLU, BRLCAD_ERROR, BRLCAD_OK, bu_log(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), fb_rpixel(), fb_write(), fbo_coords_ok(), fb_obj::fbo_fbs, fb_obj::fbo_interp, fbo_tcllist2color(), GRN, and RED.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_cell_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 439 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_calloc(), bu_free(), bu_log(), fb_writerect(), fbo_coords_ok(), fb_obj::fbo_fbs, fbo_tcllist2color(), and OSL::Strings::width.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_flush_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 516 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), BU_STR_EQUIV, fb_flush(), and fb_obj::fbo_fbs.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_getheight_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 539 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), BU_STR_EQUIV, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), fb_getheight(), fb_obj::fbo_fbs, and fb_obj::fbo_interp.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_getwidth_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 565 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), BU_STR_EQUIV, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), fb_getwidth(), fb_obj::fbo_fbs, and fb_obj::fbo_interp.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_getsize_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 591 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), BU_STR_EQUIV, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), fb_getheight(), fb_getwidth(), fb_obj::fbo_fbs, and fb_obj::fbo_interp.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_rect_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 619 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), fb_write(), fbo_coords_ok(), fb_obj::fbo_fbs, fbo_tcllist2color(), and OSL::Strings::width.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_configure_tcl ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 706 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_log(), fb_configure_window(), FB_NULL, fb_obj::fbo_fbs, and OSL::Strings::width.

Referenced by fbo_cmd().

Here is the call graph for this function:

HIDDEN int fbo_cmd ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
const char **  argv 
)

Definition at line 742 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_cmd(), BU_CMD_NULL, bu_log(), fbo_cell_tcl(), fbo_clear_tcl(), fbo_close_tcl(), fbo_configure_tcl(), fbo_cursor_tcl(), fbo_flush_tcl(), fbo_getcursor_tcl(), fbo_getheight_tcl(), fbo_getsize_tcl(), fbo_getwidth_tcl(), fbo_listen_tcl(), fbo_pixel_tcl(), fbo_rect_tcl(), fbo_refresh_tcl(), and HIDDEN.

Referenced by fbo_open_tcl().

Here is the call graph for this function:

HIDDEN int fbo_open_tcl ( void *  clientData,
Tcl_Interp *  interp,
int  argc,
const char **  argv 
)

Definition at line 779 of file fb_obj.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_ALLOC, bu_getopt(), BU_LIST_APPEND, BU_LIST_FOR, bu_log(), bu_optarg, bu_opterr, bu_optind, bu_vls_addr(), bu_vls_free(), bu_vls_init(), BU_VLS_INIT_ZERO, bu_vls_printf(), bu_vls_strcpy(), fb_ioinit(), FB_NULL, fb_open(), fbo_cmd(), fbo_deleteProc(), fb_obj::fbo_fbs, fb_obj::fbo_interp, fb_obj::fbo_name, OSL::Strings::interp, fb_obj::l, and OSL::Strings::width.

Referenced by Fbo_Init().

Here is the call graph for this function:

int Fbo_Init ( Tcl_Interp *  interp)

Definition at line 864 of file fb_obj.c.

References BRLCAD_OK, BU_LIST_INIT, fbo_open_tcl(), and fb_obj::l.

Referenced by Fb_Init().

Here is the call graph for this function: