bx_gui_c Class Reference

#include <gui.h>

Inheritance diagram for bx_gui_c:

Inheritance graph
[legend]
Collaboration diagram for bx_gui_c:

Collaboration graph
[legend]

Detailed Description

Abstract base class for GUI implementations.

Definition at line 106 of file gui.h.


Public Member Functions

 bx_gui_c (void)
virtual ~bx_gui_c ()
virtual void specific_init (unsigned x_tilesize, unsigned y_tilesize)=0
virtual void text_update (u8 *old_text, u8 *new_text, unsigned long cursor_x, unsigned long cursor_y, bx_vga_tminfo_t tm_info, unsigned rows)=0
virtual void graphics_tile_update (u8 *snapshot, unsigned x, unsigned y)=0
virtual bx_svga_tileinfo_tgraphics_tile_info (bx_svga_tileinfo_t *info)
virtual u8graphics_tile_get (unsigned x, unsigned y, unsigned *w, unsigned *h)
virtual void graphics_tile_update_in_place (unsigned x, unsigned y, unsigned w, unsigned h)
virtual void handle_events (void)=0
virtual void flush (void)=0
virtual void clear_screen (void)=0
virtual bool palette_change (unsigned index, unsigned red, unsigned green, unsigned blue)=0
virtual void dimension_update (unsigned x, unsigned y, unsigned fheight=0, unsigned fwidth=0, unsigned bpp=8)=0
virtual void mouse_enabled_changed_specific (bool val)=0
virtual void exit (void)=0
virtual u32 get_sighandler_mask ()
virtual void sighandler (int sig)
virtual void beep_on (float frequency)
virtual void beep_off ()
virtual void get_capabilities (u16 *xres, u16 *yres, u16 *bpp)
void init (unsigned x_tilesize, unsigned y_tilesize)
void cleanup (void)
void lock ()
void unlock ()

Static Public Member Functions

static void key_event (u32 key)
static void set_text_charmap (u8 *fbuffer)
static void set_text_charbyte (u16 address, u8 data)
static void mouse_enabled_changed (bool val)
static void init_signal_handlers ()

Static Protected Member Functions

static s32 make_text_snapshot (char **snapshot, u32 *length)

Protected Attributes

CMutexguiMutex
unsigned char vga_charmap [0x2000]
bool charmap_updated
bool char_changed [256]
bool new_gfx_api
u16 host_xres
u16 host_yres
u16 host_pitch
u8 host_bpp
u8framebuffer

Constructor & Destructor Documentation

bx_gui_c::bx_gui_c ( void   ) 

Definition at line 129 of file gui.cpp.

References framebuffer, and guiMutex.

bx_gui_c::~bx_gui_c (  )  [virtual]

Definition at line 135 of file gui.cpp.

References framebuffer.


Member Function Documentation

virtual void bx_gui_c::specific_init ( unsigned  x_tilesize,
unsigned  y_tilesize 
) [pure virtual]

Implemented in bx_win32_gui_c, bx_x11_gui_c, and bx_sdl_gui_c.

Referenced by init().

virtual void bx_gui_c::text_update ( u8 old_text,
u8 new_text,
unsigned long  cursor_x,
unsigned long  cursor_y,
bx_vga_tminfo_t  tm_info,
unsigned  rows 
) [pure virtual]

virtual void bx_gui_c::graphics_tile_update ( u8 snapshot,
unsigned  x,
unsigned  y 
) [pure virtual]

bx_svga_tileinfo_t * bx_gui_c::graphics_tile_info ( bx_svga_tileinfo_t info  )  [virtual]

u8 * bx_gui_c::graphics_tile_get ( unsigned  x,
unsigned  y,
unsigned *  w,
unsigned *  h 
) [virtual]

Reimplemented in bx_x11_gui_c, and bx_sdl_gui_c.

Definition at line 287 of file gui.cpp.

References framebuffer, host_bpp, host_pitch, host_xres, host_yres, X_TILESIZE, and Y_TILESIZE.

void bx_gui_c::graphics_tile_update_in_place ( unsigned  x,
unsigned  y,
unsigned  w,
unsigned  h 
) [virtual]

Reimplemented in bx_x11_gui_c, and bx_sdl_gui_c.

Definition at line 311 of file gui.cpp.

References framebuffer, graphics_tile_update(), host_bpp, host_pitch, X_TILESIZE, and Y_TILESIZE.

virtual void bx_gui_c::handle_events ( void   )  [pure virtual]

Implemented in bx_win32_gui_c, bx_x11_gui_c, and bx_sdl_gui_c.

Referenced by CS3Trio64::run(), and CCirrus::run().

virtual void bx_gui_c::flush ( void   )  [pure virtual]

Implemented in bx_win32_gui_c, bx_x11_gui_c, and bx_sdl_gui_c.

Referenced by CS3Trio64::run(), and CCirrus::run().

virtual void bx_gui_c::clear_screen ( void   )  [pure virtual]

Implemented in bx_win32_gui_c, bx_x11_gui_c, and bx_sdl_gui_c.

Referenced by UIThread().

virtual bool bx_gui_c::palette_change ( unsigned  index,
unsigned  red,
unsigned  green,
unsigned  blue 
) [pure virtual]

virtual void bx_gui_c::dimension_update ( unsigned  x,
unsigned  y,
unsigned  fheight = 0,
unsigned  fwidth = 0,
unsigned  bpp = 8 
) [pure virtual]

virtual void bx_gui_c::mouse_enabled_changed_specific ( bool  val  )  [pure virtual]

Implemented in bx_win32_gui_c, bx_x11_gui_c, and bx_sdl_gui_c.

Referenced by mouse_enabled_changed().

virtual void bx_gui_c::exit ( void   )  [pure virtual]

Implemented in bx_win32_gui_c, bx_x11_gui_c, and bx_sdl_gui_c.

virtual u32 bx_gui_c::get_sighandler_mask (  )  [inline, virtual]

Definition at line 139 of file gui.h.

Referenced by init_signal_handlers().

virtual void bx_gui_c::sighandler ( int  sig  )  [inline, virtual]

Definition at line 140 of file gui.h.

void bx_gui_c::beep_on ( float  frequency  )  [virtual]

Definition at line 215 of file gui.cpp.

References BX_INFO.

void bx_gui_c::beep_off (  )  [virtual]

Definition at line 220 of file gui.cpp.

References BX_INFO.

void bx_gui_c::get_capabilities ( u16 xres,
u16 yres,
u16 bpp 
) [virtual]

Reimplemented in bx_win32_gui_c, and bx_x11_gui_c.

Definition at line 225 of file gui.cpp.

static void bx_gui_c::key_event ( u32  key  )  [static]

void bx_gui_c::set_text_charmap ( u8 fbuffer  )  [static]

Definition at line 200 of file gui.cpp.

References char_changed, charmap_updated, and vga_charmap.

Referenced by CS3Trio64::write_b_3c5(), and CCirrus::write_b_3c5().

void bx_gui_c::set_text_charbyte ( u16  address,
u8  data 
) [static]

Definition at line 208 of file gui.cpp.

References char_changed, charmap_updated, and vga_charmap.

Referenced by CS3Trio64::vga_mem_write(), and CCirrus::vga_mem_write().

void bx_gui_c::init ( unsigned  x_tilesize,
unsigned  y_tilesize 
)

void bx_gui_c::cleanup ( void   ) 

Definition at line 160 of file gui.cpp.

void bx_gui_c::mouse_enabled_changed ( bool  val  )  [static]

Definition at line 176 of file gui.cpp.

References mouse_enabled_changed_specific().

void bx_gui_c::init_signal_handlers (  )  [static]

Definition at line 185 of file gui.cpp.

References get_sighandler_mask().

void bx_gui_c::lock (  ) 

void bx_gui_c::unlock (  ) 

static s32 bx_gui_c::make_text_snapshot ( char **  snapshot,
u32 length 
) [static, protected]


Field Documentation

CMutex* bx_gui_c::guiMutex [protected]

Definition at line 158 of file gui.h.

Referenced by bx_gui_c(), lock(), and unlock().

unsigned char bx_gui_c::vga_charmap[0x2000] [protected]

bool bx_gui_c::charmap_updated [protected]

bool bx_gui_c::char_changed[256] [protected]

bool bx_gui_c::new_gfx_api [protected]

Definition at line 165 of file gui.h.

Referenced by init(), bx_sdl_gui_c::specific_init(), and bx_x11_gui_c::specific_init().

u16 bx_gui_c::host_xres [protected]

u16 bx_gui_c::host_yres [protected]

Definition at line 167 of file gui.h.

Referenced by bx_win32_gui_c::dimension_update(), graphics_tile_get(), and init().

Definition at line 168 of file gui.h.

Referenced by graphics_tile_get(), graphics_tile_info(), and graphics_tile_update_in_place().

u8 bx_gui_c::host_bpp [protected]

u8* bx_gui_c::framebuffer [protected]

Definition at line 170 of file gui.h.

Referenced by bx_gui_c(), graphics_tile_get(), graphics_tile_update_in_place(), init(), and ~bx_gui_c().


The documentation for this class was generated from the following files:

SourceForge.net Logo
Project space on SourceForge.net