From 93311561aacfc4b4f8181bc8a9e1c50a16060976 Mon Sep 17 00:00:00 2001 From: Bryce Denney Date: Mon, 23 Sep 2002 16:57:45 +0000 Subject: [PATCH] - add get_notify_callback method --- bochs/gui/siminterface.cc | 11 ++++++++++- bochs/gui/siminterface.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bochs/gui/siminterface.cc b/bochs/gui/siminterface.cc index 13649d01e..4e630f133 100644 --- a/bochs/gui/siminterface.cc +++ b/bochs/gui/siminterface.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: siminterface.cc,v 1.65 2002-09-22 20:56:11 cbothamy Exp $ +// $Id: siminterface.cc,v 1.66 2002-09-23 16:57:45 bdenney Exp $ ///////////////////////////////////////////////////////////////////////// // // See siminterface.h for description of the siminterface concept. @@ -76,6 +76,7 @@ public: virtual int get_cdrom_options (int drive, bx_atadevice_options *out, int *device = NULL); virtual char *get_floppy_type_name (int type); virtual void set_notify_callback (sim_interface_callback_t func, void *arg); + virtual void get_notify_callback (sim_interface_callback_t *func, void **arg); virtual BxEvent* sim_to_ci_event (BxEvent *event); virtual int log_msg (const char *prefix, int level, const char *msg); virtual int ask_param (bx_id which); @@ -407,6 +408,14 @@ bx_real_sim_c::set_notify_callback (sim_interface_callback_t func, void *arg) callback_ptr = arg; } +void bx_real_sim_c::get_notify_callback ( + sim_interface_callback_t *func, + void **arg) +{ + *func = callback; + *arg = callback_ptr; +} + BxEvent * bx_real_sim_c::sim_to_ci_event (BxEvent *event) { diff --git a/bochs/gui/siminterface.h b/bochs/gui/siminterface.h index 12321464c..b4df253c6 100644 --- a/bochs/gui/siminterface.h +++ b/bochs/gui/siminterface.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: siminterface.h,v 1.70 2002-09-22 20:56:11 cbothamy Exp $ +// $Id: siminterface.h,v 1.71 2002-09-23 16:57:45 bdenney Exp $ ///////////////////////////////////////////////////////////////////////// // // Before I can describe what this file is for, I have to make the @@ -1142,6 +1142,7 @@ public: // the buttons. Some of these implementations call the siminterface. typedef BxEvent* (*sim_interface_callback_t)(void *theclass, BxEvent *event); virtual void set_notify_callback (sim_interface_callback_t func, void *arg) {} + virtual void get_notify_callback (sim_interface_callback_t *func, void **arg) {} // send an event from the simulator to the CI. virtual BxEvent* sim_to_ci_event (BxEvent *event) {return NULL;}