From 6d7fcdd2b544fa4eb29988bd627af94aa8238d6c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 26 Jan 2014 20:40:36 +0000 Subject: OSX: Implement TaskbarManager for Mac OS X This implements count badge, progress bar, and icon overlay. It uses the NSDockTile API which is available since OS X 10.5. The code compiles and run on older system but without doing anything. --- backends/platform/sdl/macosx/macosx.cpp | 11 +++++++++++ backends/platform/sdl/macosx/macosx.h | 1 + 2 files changed, 12 insertions(+) (limited to 'backends/platform/sdl') diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 301dc44b7b..924e33b6e3 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -31,6 +31,7 @@ #include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h" #include "backends/platform/sdl/macosx/appmenu_osx.h" #include "backends/updates/macosx/macosx-updates.h" +#include "backends/taskbar/macosx/macosx-taskbar.h" #include "common/archive.h" #include "common/config-manager.h" @@ -45,6 +46,16 @@ OSystem_MacOSX::OSystem_MacOSX() OSystem_POSIX("Library/Preferences/ScummVM Preferences") { } +void OSystem_MacOSX::init() { +#if defined(USE_TASKBAR) + // Initialize taskbar manager + _taskbarManager = new MacOSXTaskbarManager(); +#endif + + // Invoke parent implementation of this method + OSystem_POSIX::init(); +} + void OSystem_MacOSX::initBackend() { // Create the mixer manager if (_mixer == 0) { diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h index e5a72bf393..50cef60353 100644 --- a/backends/platform/sdl/macosx/macosx.h +++ b/backends/platform/sdl/macosx/macosx.h @@ -35,6 +35,7 @@ public: virtual Common::String getSystemLanguage() const; + virtual void init(); virtual void initBackend(); virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); virtual void setupIcon(); -- cgit v1.2.3