mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 11:11:28 +00:00
COMMON: Change TaskbarManager to the new module slot interface
This commit is contained in:
parent
5dff6c2c08
commit
599695bc4f
@ -35,9 +35,7 @@ ModularBackend::ModularBackend()
|
||||
_mutexManager(0),
|
||||
_graphicsManager(0),
|
||||
_mixer(0) {
|
||||
#if defined(USE_TASKBAR)
|
||||
_taskbarManager = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
ModularBackend::~ModularBackend() {
|
||||
@ -45,10 +43,6 @@ ModularBackend::~ModularBackend() {
|
||||
_graphicsManager = 0;
|
||||
delete _mixer;
|
||||
_mixer = 0;
|
||||
#if defined(USE_TASKBAR)
|
||||
delete _taskbarManager;
|
||||
_taskbarManager = 0;
|
||||
#endif
|
||||
delete _mutexManager;
|
||||
_mutexManager = 0;
|
||||
}
|
||||
@ -241,11 +235,3 @@ void ModularBackend::displayMessageOnOSD(const char *msg) {
|
||||
void ModularBackend::quit() {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#if defined(USE_TASKBAR)
|
||||
Common::TaskbarManager *ModularBackend::getTaskbarManager() {
|
||||
assert(_taskbarManager);
|
||||
return _taskbarManager;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -27,21 +27,20 @@
|
||||
|
||||
class GraphicsManager;
|
||||
class MutexManager;
|
||||
class TaskbarManager;
|
||||
|
||||
/**
|
||||
* Base class for modular backends.
|
||||
*
|
||||
*
|
||||
* It wraps most functions to their manager equivalent, but not
|
||||
* all OSystem functions are implemented here.
|
||||
*
|
||||
*
|
||||
* A backend derivated from this class, will need to implement
|
||||
* these functions on its own:
|
||||
* OSystem::pollEvent()
|
||||
* OSystem::getMillis()
|
||||
* OSystem::delayMillis()
|
||||
* OSystem::getTimeAndDate()
|
||||
*
|
||||
*
|
||||
* And, it should also initialize all the managers variables
|
||||
* declared in this class, or override their related functions.
|
||||
*/
|
||||
@ -112,7 +111,7 @@ public:
|
||||
virtual Common::HardwareKeySet *getHardwareKeySet() { return 0; }
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
/** @name Mutex handling */
|
||||
//@{
|
||||
|
||||
@ -134,9 +133,6 @@ public:
|
||||
//@{
|
||||
|
||||
virtual void quit();
|
||||
#if defined(USE_TASKBAR)
|
||||
virtual TaskbarManager *getTaskbarManager();
|
||||
#endif
|
||||
virtual void displayMessageOnOSD(const char *msg);
|
||||
|
||||
//@}
|
||||
@ -145,9 +141,6 @@ protected:
|
||||
/** @name Managers variables */
|
||||
//@{
|
||||
|
||||
#if defined(USE_TASKBAR)
|
||||
TaskbarManager *_taskbarManager;
|
||||
#endif
|
||||
MutexManager *_mutexManager;
|
||||
GraphicsManager *_graphicsManager;
|
||||
Audio::Mixer *_mixer;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "common/fs.h"
|
||||
#include "common/savefile.h"
|
||||
#include "common/str.h"
|
||||
#include "common/taskbar.h"
|
||||
#include "common/textconsole.h"
|
||||
|
||||
#include "backends/audiocd/default/default-audiocd.h"
|
||||
@ -45,6 +46,9 @@ OSystem::OSystem() {
|
||||
_eventManager = 0;
|
||||
_timerManager = 0;
|
||||
_savefileManager = 0;
|
||||
#if defined(USE_TASKBAR)
|
||||
_taskbarManager = 0;
|
||||
#endif
|
||||
_fsFactory = 0;
|
||||
}
|
||||
|
||||
@ -58,6 +62,11 @@ OSystem::~OSystem() {
|
||||
delete _timerManager;
|
||||
_timerManager = 0;
|
||||
|
||||
#if defined(USE_TASKBAR)
|
||||
delete _taskbarManager;
|
||||
_taskbarManager = 0;
|
||||
#endif
|
||||
|
||||
delete _savefileManager;
|
||||
_savefileManager = 0;
|
||||
|
||||
|
@ -43,7 +43,7 @@ class SaveFileManager;
|
||||
class SearchSet;
|
||||
class String;
|
||||
#if defined(USE_TASKBAR)
|
||||
class TaskbarManager;
|
||||
class TaskbarManager;
|
||||
#endif
|
||||
class TimerManager;
|
||||
class SeekableReadStream;
|
||||
@ -152,6 +152,15 @@ protected:
|
||||
*/
|
||||
Common::SaveFileManager *_savefileManager;
|
||||
|
||||
#if defined(USE_TASKBAR)
|
||||
/**
|
||||
* No default value is provided for _savefileManager by OSystem.
|
||||
*
|
||||
* @note _savefileManager is deleted by the OSystem destructor.
|
||||
*/
|
||||
Common::TaskbarManager *_taskbarManager;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* No default value is provided for _fsFactory by OSystem.
|
||||
*
|
||||
@ -1057,7 +1066,9 @@ public:
|
||||
*
|
||||
* @return the TaskbarManager for the current architecture
|
||||
*/
|
||||
virtual Common::TaskbarManager *getTaskbarManager() = 0;
|
||||
virtual Common::TaskbarManager *getTaskbarManager() {
|
||||
return _taskbarManager;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user