From 11f3395f2dabbeaf5618f3e8ac611a765d2fd722 Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 27 Mar 2006 16:00:37 +0000 Subject: [PATCH] Added state change notification to OSystemMACOSX. Eventually, this will be used for (de)selecting certain menu items when in different modes. But somebody else will have to do that part, since I don't have enough experience in OSX :) git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1068 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/macosx/OSystemMACOSX.cxx | 37 ++++++++++++++++++++++++++++- stella/src/macosx/OSystemMACOSX.hxx | 14 +++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/stella/src/macosx/OSystemMACOSX.cxx b/stella/src/macosx/OSystemMACOSX.cxx index cfb66951b..093680a04 100644 --- a/stella/src/macosx/OSystemMACOSX.cxx +++ b/stella/src/macosx/OSystemMACOSX.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OSystemMACOSX.cxx,v 1.8 2006-03-17 19:44:19 stephena Exp $ +// $Id: OSystemMACOSX.cxx,v 1.9 2006-03-27 16:00:37 stephena Exp $ //============================================================================ #include @@ -175,3 +175,38 @@ void OSystemMACOSX::getScreenDimensions(int& width, int& height) width = (int)macOSXDisplayWidth(); height = (int)macOSXDisplayHeight(); } + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void OSystemMACOSX::stateChanged(EventHandler::State state) +{ + switch(state) + { + case EventHandler::S_EMULATE: + cerr << "emulation mode\n"; + break; + + case EventHandler::S_LAUNCHER: + cerr << "launcher mode\n"; + break; + + case EventHandler::S_MENU: + cerr << "options menu mode\n"; + break; + + case EventHandler::S_CMDMENU: + cerr << "command menu mode\n"; + break; + + case EventHandler::S_DEBUGGER: + cerr << "debugger mode\n"; + break; + + default: + break; + } +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void OSystemMACOSX::pauseChanged(bool status) +{ +} diff --git a/stella/src/macosx/OSystemMACOSX.hxx b/stella/src/macosx/OSystemMACOSX.hxx index e2dc120a9..769443b5b 100644 --- a/stella/src/macosx/OSystemMACOSX.hxx +++ b/stella/src/macosx/OSystemMACOSX.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OSystemMACOSX.hxx,v 1.3 2006-01-08 02:28:04 stephena Exp $ +// $Id: OSystemMACOSX.hxx,v 1.4 2006-03-27 16:00:37 stephena Exp $ //============================================================================ #ifndef OSYSTEM_MACOSX_HXX @@ -26,7 +26,7 @@ This class defines UNIX-like OS's (Linux) system specific settings. @author Mark Grebe - @version $Id: OSystemMACOSX.hxx,v 1.3 2006-01-08 02:28:04 stephena Exp $ + @version $Id: OSystemMACOSX.hxx,v 1.4 2006-03-27 16:00:37 stephena Exp $ */ class OSystemMACOSX : public OSystem { @@ -60,6 +60,16 @@ class OSystemMACOSX : public OSystem This method queries the dimensions of the screen for this hardware. */ virtual void getScreenDimensions(int& width, int& height); + + /** + Informs the OSystem of a change in EventHandler state. + */ + virtual void stateChanged(EventHandler::State state); + + /** + Informs the OSystem of a change in pause status. + */ + virtual void pauseChanged(bool status); }; #endif