Permalink
Browse files

[osx] - get rid of carbon dependency in winsystemosx

  • Loading branch information...
1 parent 3dbd083 commit 637d3ea50b7441f9578114706ff3a5f74feb1e12 @Memphiz Memphiz committed May 12, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 xbmc/windowing/osx/WinSystemOSX.mm
@@ -47,8 +47,6 @@
#import <IOKit/pwr_mgt/IOPMLib.h>
#import <IOKit/graphics/IOGraphicsLib.h>
-#import <Carbon/Carbon.h> // ShowMenuBar, HideMenuBar
-
// turn off deprecated warning spew.
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -212,6 +210,19 @@ float GetDictionaryFloat(CFDictionaryRef theDict, const void* key)
}
//---------------------------------------------------------------------------------
+void HideMenuBar()
+{
+ [[NSApplication sharedApplication]
+ setPresentationOptions: NSApplicationPresentationHideMenuBar |
+ NSApplicationPresentationHideDock];
+}
+//---------------------------------------------------------------------------------
+void ShowMenuBar()
+{
+ [[NSApplication sharedApplication]
+ setPresentationOptions: NSApplicationPresentationDefault];
+}
+//---------------------------------------------------------------------------------
CGDirectDisplayID GetDisplayID(int screen_index)
{
CGDirectDisplayID displayArray[MAX_DISPLAYS];

0 comments on commit 637d3ea

Please sign in to comment.