- fix obvious bug in macintosh gui code caused by search and replace

gone wrong.  It said "bx_amigaos_gui_c" instead of "bx_macintosh_gui_c".
  I wish somebody would test this!
This commit is contained in:
Bryce Denney 2002-11-18 16:42:57 +00:00
parent 4a23c1b464
commit c07684021c

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: macintosh.cc,v 1.15 2002-10-25 11:44:37 bdenney Exp $ // $Id: macintosh.cc,v 1.16 2002-11-18 16:42:57 bdenney Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2001 MandrakeSoft S.A. // Copyright (C) 2001 MandrakeSoft S.A.
@ -91,15 +91,15 @@ const RGBColor white = {0xFFFF, 0xFFFF, 0xFFFF};
const RGBColor medGrey = {0xCCCC, 0xCCCC, 0xCCCC}; const RGBColor medGrey = {0xCCCC, 0xCCCC, 0xCCCC};
const RGBColor ltGrey = {0xEEEE, 0xEEEE, 0xEEEE}; const RGBColor ltGrey = {0xEEEE, 0xEEEE, 0xEEEE};
class bx_mac_gui_c : public bx_gui_c { class bx_macintosh_gui_c : public bx_gui_c {
public: public:
bx_mac_gui_c (void) {} bx_macintosh_gui_c (void) {}
DECLARE_GUI_VIRTUAL_METHODS() DECLARE_GUI_VIRTUAL_METHODS()
}; };
// declare one instance of the gui object and call macro to insert the // declare one instance of the gui object and call macro to insert the
// plugin code // plugin code
static bx_mac_gui_c *theGui = NULL; static bx_macintosh_gui_c *theGui = NULL;
IMPLEMENT_GUI_PLUGIN_CODE(macintosh) IMPLEMENT_GUI_PLUGIN_CODE(macintosh)
// GLOBALS // GLOBALS
@ -338,7 +338,7 @@ void CreateWindows(void)
// always assumes the width of the current VGA mode width, but // always assumes the width of the current VGA mode width, but
// it's height is defined by this parameter. // it's height is defined by this parameter.
void bx_amigaos_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned tileheight, void bx_macintosh_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned tileheight,
unsigned headerbar_y) unsigned headerbar_y)
{ {
put("MGUI"); put("MGUI");
@ -669,7 +669,7 @@ void UpdateWindow(WindowPtr window)
// the gui code can poll for keyboard, mouse, and other // the gui code can poll for keyboard, mouse, and other
// relevant events. // relevant events.
void bx_amigaos_gui_c::handle_events(void) void bx_macintosh_gui_c::handle_events(void)
{ {
EventRecord event; EventRecord event;
Point mousePt; Point mousePt;
@ -758,7 +758,7 @@ void bx_amigaos_gui_c::handle_events(void)
// Called periodically, requesting that the gui code flush all pending // Called periodically, requesting that the gui code flush all pending
// screen update requests. // screen update requests.
void bx_amigaos_gui_c::flush(void) void bx_macintosh_gui_c::flush(void)
{ {
// an opportunity to make the Window Manager happy. // an opportunity to make the Window Manager happy.
// not needed on the macintosh.... // not needed on the macintosh....
@ -770,7 +770,7 @@ void bx_amigaos_gui_c::flush(void)
// Called to request that the VGA region is cleared. Don't // Called to request that the VGA region is cleared. Don't
// clear the area that defines the headerbar. // clear the area that defines the headerbar.
void bx_amigaos_gui_c::clear_screen(void) void bx_macintosh_gui_c::clear_screen(void)
{ {
SetPort(win); SetPort(win);
@ -801,7 +801,7 @@ void bx_amigaos_gui_c::clear_screen(void)
// cursor_x: new x location of cursor // cursor_x: new x location of cursor
// cursor_y: new y location of cursor // cursor_y: new y location of cursor
void bx_amigaos_gui_c::text_update(Bit8u *old_text, Bit8u *new_text, void bx_macintosh_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
unsigned long cursor_x, unsigned long cursor_y, unsigned long cursor_x, unsigned long cursor_y,
Bit16u cursor_state, unsigned nrows) Bit16u cursor_state, unsigned nrows)
{ {
@ -877,13 +877,13 @@ void bx_amigaos_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
} }
int int
bx_amigaos_gui_c::get_clipboard_text(Bit8u **bytes, Bit32s *nbytes) bx_macintosh_gui_c::get_clipboard_text(Bit8u **bytes, Bit32s *nbytes)
{ {
return 0; return 0;
} }
int int
bx_amigaos_gui_c::set_clipboard_text(char *text_snapshot, Bit32u len) bx_macintosh_gui_c::set_clipboard_text(char *text_snapshot, Bit32u len)
{ {
return 0; return 0;
} }
@ -896,7 +896,7 @@ bx_amigaos_gui_c::set_clipboard_text(char *text_snapshot, Bit32u len)
// returns: 0=no screen update needed (color map change has direct effect) // returns: 0=no screen update needed (color map change has direct effect)
// 1=screen updated needed (redraw using current colormap) // 1=screen updated needed (redraw using current colormap)
bx_bool bx_amigaos_gui_c::palette_change(unsigned index, unsigned red, unsigned green, unsigned blue) bx_bool bx_macintosh_gui_c::palette_change(unsigned index, unsigned red, unsigned green, unsigned blue)
{ {
PaletteHandle thePal, oldpal; PaletteHandle thePal, oldpal;
GDHandle saveDevice; GDHandle saveDevice;
@ -949,7 +949,7 @@ bx_bool bx_amigaos_gui_c::palette_change(unsigned index, unsigned red, unsigned
// note: origin of tile and of window based on (0,0) being in the upper // note: origin of tile and of window based on (0,0) being in the upper
// left of the window. // left of the window.
void bx_amigaos_gui_c::graphics_tile_update(Bit8u *tile, unsigned x0, unsigned y0) void bx_macintosh_gui_c::graphics_tile_update(Bit8u *tile, unsigned x0, unsigned y0)
{ {
Rect destRect; Rect destRect;
/* GDHandle saveDevice; /* GDHandle saveDevice;
@ -981,7 +981,7 @@ void bx_amigaos_gui_c::graphics_tile_update(Bit8u *tile, unsigned x0, unsigned y
// x: new VGA x size // x: new VGA x size
// y: new VGA y size (add headerbar_y parameter from ::specific_init(). // y: new VGA y size (add headerbar_y parameter from ::specific_init().
void bx_amigaos_gui_c::dimension_update(unsigned x, unsigned y, unsigned fheight) void bx_macintosh_gui_c::dimension_update(unsigned x, unsigned y, unsigned fheight)
{ {
if (fheight > 0) { if (fheight > 0) {
if (fheight != 16) { if (fheight != 16) {
@ -1012,7 +1012,7 @@ void bx_amigaos_gui_c::dimension_update(unsigned x, unsigned y, unsigned fheight
// rewritten by tim senecal to use the cicn (color icon) resources instead // rewritten by tim senecal to use the cicn (color icon) resources instead
unsigned bx_amigaos_gui_c::create_bitmap(const unsigned char *bmap, unsigned xdim, unsigned ydim) unsigned bx_macintosh_gui_c::create_bitmap(const unsigned char *bmap, unsigned xdim, unsigned ydim)
{ {
unsigned i; unsigned i;
unsigned char *data; unsigned char *data;
@ -1037,7 +1037,7 @@ unsigned bx_amigaos_gui_c::create_bitmap(const unsigned char *bmap, unsigned xdi
// f: a 'C' function pointer to callback when the mouse is clicked in // f: a 'C' function pointer to callback when the mouse is clicked in
// the boundaries of this bitmap. // the boundaries of this bitmap.
unsigned bx_amigaos_gui_c::headerbar_bitmap(unsigned bmap_id, unsigned alignment, void (*f)(void)) unsigned bx_macintosh_gui_c::headerbar_bitmap(unsigned bmap_id, unsigned alignment, void (*f)(void))
{ {
unsigned hb_index; unsigned hb_index;
@ -1071,7 +1071,7 @@ unsigned bx_amigaos_gui_c::headerbar_bitmap(unsigned bmap_id, unsigned alignment
// Show (redraw) the current headerbar, which is composed of // Show (redraw) the current headerbar, which is composed of
// currently installed bitmaps. // currently installed bitmaps.
void bx_amigaos_gui_c::show_headerbar(void) void bx_macintosh_gui_c::show_headerbar(void)
{ {
Rect destRect; Rect destRect;
int i, xorigin; int i, xorigin;
@ -1109,7 +1109,7 @@ void bx_amigaos_gui_c::show_headerbar(void)
// hbar_id: headerbar slot ID // hbar_id: headerbar slot ID
// bmap_id: bitmap ID // bmap_id: bitmap ID
void bx_amigaos_gui_c::replace_bitmap(unsigned hbar_id, unsigned bmap_id) void bx_macintosh_gui_c::replace_bitmap(unsigned hbar_id, unsigned bmap_id)
{ {
// bx_tool_pixmap[hbar_id].pm = bx_pixmap[bmap_id]; // bx_tool_pixmap[hbar_id].pm = bx_pixmap[bmap_id];
bx_tool_pixmap[hbar_id].cicn = bx_cicn[bmap_id]; bx_tool_pixmap[hbar_id].cicn = bx_cicn[bmap_id];
@ -1122,7 +1122,7 @@ void bx_amigaos_gui_c::replace_bitmap(unsigned hbar_id, unsigned bmap_id)
// Called before bochs terminates, to allow for a graceful // Called before bochs terminates, to allow for a graceful
// exit from the native GUI mechanism. // exit from the native GUI mechanism.
void bx_amigaos_gui_c::exit(void) void bx_macintosh_gui_c::exit(void)
{ {
if (!menubarVisible) if (!menubarVisible)
ShowMenubar(); // Make the menubar visible again ShowMenubar(); // Make the menubar visible again
@ -1130,7 +1130,7 @@ void bx_amigaos_gui_c::exit(void)
} }
#if 0 #if 0
void bx_amigaos_gui_c::snapshot_handler(void) void bx_macintosh_gui_c::snapshot_handler(void)
{ {
PicHandle ScreenShot; PicHandle ScreenShot;
long val; long val;
@ -1561,6 +1561,6 @@ unsigned char reverse_bitorder(unsigned char b)
} }
void void
bx_amigaos_gui_c::mouse_enabled_changed_specific (bx_bool val) bx_macintosh_gui_c::mouse_enabled_changed_specific (bx_bool val)
{ {
} }