CC9B43AE13B29C79000205AE /* bottom-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottom-background.png"; path = "Resources/mainwindow/bottom-background.png"; sourceTree = "<group>"; };
CC9B43B013B29FCF000205AE /* bottom-background_dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottom-background_dark.png"; path = "Resources/mainwindow_dark/bottom-background_dark.png"; sourceTree = "<group>"; };
CC9E3E7913D1CFCF00429A71 /* qtcapture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = qtcapture.m; path = ../../../modules/access/qtcapture.m; sourceTree = "<group>"; };
+ CCB0BB3013FAC9F40095BD0A /* CompatibilityFixes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompatibilityFixes.h; path = ../../../modules/gui/macosx/CompatibilityFixes.h; sourceTree = "<group>"; };
CCB24D5D0D54BBAE004D780C /* simple_prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = simple_prefs.m; path = ../../../modules/gui/macosx/simple_prefs.m; sourceTree = SOURCE_ROOT; };
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_prefs.h; path = ../../../modules/gui/macosx/simple_prefs.h; sourceTree = SOURCE_ROOT; };
CCBE999E0F922C51000705F8 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
+ CCB0BB3013FAC9F40095BD0A /* CompatibilityFixes.h */,
8ED6C27E03E2EB1C0059A3A7 /* macosx.m */,
8ED6C27C03E2EB1C0059A3A7 /* intf.h */,
8ED6C27D03E2EB1C0059A3A7 /* intf.m */,
/* this was added by the VideoLAN team to ensure Leopard-compatibility and is VLC-only */
#import "intf.h"
+#import "CompatibilityFixes.h"
const char* AppleRemoteDeviceName = "AppleIRController";
const int REMOTE_SWITCH_COOKIE=19;
[cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"35_31_18_35_31_18_"];
[cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"];
}
- else if( NSAppKitVersionNumber >= 1115.2 )
+ else if( OSX_LION )
{
/* omg, keys from the future */
msg_Dbg( VLCIntf, "using future AR cookies" );
#import "intf.h"
#import "AudioEffects.h"
#import "../../audio_filter/equalizer_presets.h"
+#import "CompatibilityFixes.h"
#import <vlc_common.h>
#import <vlc_aout_intf.h>
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"filter"]] setLabel:_NS("Filter")];
[o_window setTitle:_NS("Audio Effects")];
[o_window setExcludedFromWindowsMenu:YES];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self setupEqualizer];
--- /dev/null
+/*****************************************************************************
+ * sdkfixes.h: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2011 VideoLAN
+ * $Id$
+ *
+ * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+#pragma mark -
+#pragma OS detection code
+#define OSX_LEOPARD (NSAppKitVersionNumber < 1038 && NSAppKitVersionNumber >= 949)
+#define OSX_SNOW_LEOPARD (NSAppKitVersionNumber < 1115 && NSAppKitVersionNumber >= 1038)
+#define OSX_LION NSAppKitVersionNumber >= 1115.2
+
+#pragma mark -
+#pragma Fixes for OS X Leopard (10.5)
+
+#ifndef MAC_OS_X_VERSION_10_6
+
+@protocol NSAnimationDelegate <NSObject> @end
+@protocol NSWindowDelegate <NSObject> @end
+@protocol NSComboBoxDataSource <NSObject> @end
+@protocol NSTextFieldDelegate <NSObject> @end
+@protocol NSTableViewDataSource <NSObject> @end
+@protocol NSOutlineViewDelegate <NSObject> @end
+@protocol NSOutlineViewDataSource <NSObject> @end
+@protocol NSToolbarDelegate <NSObject> @end
+
+enum {
+ NSApplicationPresentationDefault = 0,
+ NSApplicationPresentationAutoHideDock = (1 << 0),
+ NSApplicationPresentationHideDock = (1 << 1),
+ NSApplicationPresentationAutoHideMenuBar = (1 << 2),
+ NSApplicationPresentationHideMenuBar = (1 << 3),
+ NSApplicationPresentationDisableAppleMenu = (1 << 4),
+ NSApplicationPresentationDisableProcessSwitching = (1 << 5),
+ NSApplicationPresentationDisableForceQuit = (1 << 6),
+ NSApplicationPresentationDisableSessionTermination = (1 << 7),
+ NSApplicationPresentationDisableHideApplication = (1 << 8),
+ NSApplicationPresentationDisableMenuBarTransparency = (1 << 9)
+};
+#endif
+
+#pragma mark -
+#pragma Fixes for OS X Snow Leopard (10.6)
+
+#ifndef MAC_OS_X_VERSION_10_7
+
+enum {
+ NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7,
+ NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8
+};
+
+enum {
+ NSApplicationPresentationFullScreen = (1 << 10),
+ NSApplicationPresentationAutoHideToolbar = (1 << 11)
+};
+
+#endif
#import "misc.h"
#import "fspanel.h"
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSAnimationDelegate <NSObject> @end
-#endif
-
@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate> {
IBOutlet id o_play_btn;
IBOutlet id o_bwd_btn;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#import "CompatibilityFixes.h"
#import "MainWindow.h"
#import "intf.h"
#import "CoreInteraction.h"
o_temp_view = [[NSView alloc] init];
[o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[o_dropzone_view setFrame: [o_playlist_table frame]];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
/* create the sidebar */
- (void)resizeWindow
{
- if ( !b_fullscreen && !(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen) )
+ if ( !b_fullscreen && !(OSX_LION && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen) )
{
NSPoint topleftbase;
NSPoint topleftscreen;
if ([screen isMainScreen])
{
- if (NSAppKitVersionNumber < 1038) // Leopard
+ if (OSX_LEOPARD)
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
if ([screen isMainScreen])
{
- if (NSAppKitVersionNumber < 1038) // Leopard
+ if (OSX_LEOPARD)
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
}
[o_fspanel setNonActive: nil];
- if (NSAppKitVersionNumber < 1038) // Leopard
+ if (OSX_LEOPARD)
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
[[o_video_view window] orderFront: self];
[o_fspanel setNonActive: nil];
- if (NSAppKitVersionNumber < 1038) // Leopard
+ if (OSX_LEOPARD)
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
LIBTOOL=@LIBTOOL@ --tag=CC
SOURCES_macosx = \
+ CompatibilityFixes.h \
AppleRemote.h \
AppleRemote.m \
SPInvocationGrabbing.h \
#import "PXSourceListDelegate.h"
#import "PXSourceListDataSource.h"
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSOutlineViewDelegate <NSObject> @end
-@protocol NSOutlineViewDataSource <NSObject> @end
-#endif
-
@interface PXSourceList: NSOutlineView <NSOutlineViewDelegate, NSOutlineViewDataSource>
{
id <PXSourceListDelegate> _secondaryDelegate; //Used to store the publicly visible delegate
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#import "CompatibilityFixes.h"
#import "intf.h"
#import <vlc_common.h>
#import "TrackSynchronization.h"
[o_sv_speed_lbl setStringValue: _NS("Speed of the subtitles:")];
[[o_sv_speed_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("fps")]];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self resetValues:self];
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#import "CompatibilityFixes.h"
#import "intf.h"
#import <vlc_common.h>
#import "VideoEffects.h"
{
[o_window setTitle: _NS("Video Effects")];
[o_window setExcludedFromWindowsMenu:YES];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"basic"]] setLabel:_NS("Basic")];
#import "about.h"
#import <vlc_intf_strings.h>
#import <vlc_about.h>
+#import "CompatibilityFixes.h"
#ifdef __x86_64__
#define PLATFORM "Intel 64bit"
- (void)awakeFromNib
{
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_about_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
}
#import "bookmarks.h"
#import "wizard.h"
#import <vlc_interface.h>
-
-/*****************************************************************************
- * VLCExtended implementation
- *
- * implements the GUI functions for the window, the data source and the
- * delegate for o_tbl_dataTable
- *****************************************************************************/
+#import "CompatibilityFixes.h"
@implementation VLCBookmarks
- (void)awakeFromNib
{
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_bookmarks_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings];
#import "misc.h"
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSAnimationDelegate <NSObject> @end
-#endif
-
@interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate>
{
IBOutlet id o_btn_backward;
#import "MainWindow.h"
#import "misc.h"
#import "fspanel.h"
+#import "CompatibilityFixes.h"
@interface VLCFSPanel ()
- (void)hideMouse;
[win setOpaque:NO];
[win setHasShadow: NO];
[win setBackgroundColor:[NSColor clearColor]];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* let the window sit on top of everything else and start out completely transparent */
#include <vlc_vout_window.h>
#include <unistd.h> /* execl() */
+#import "CompatibilityFixes.h"
#import "intf.h"
#import "MainMenu.h"
#import "vout.h"
playlist_t * p_playlist = pl_Get( VLCIntf );
BOOL b_fullscreen = var_GetBool( p_playlist, "fullscreen" );
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
{
[o_mainwindow toggleFullScreen: self];
if(b_fullscreen)
#import <Cocoa/Cocoa.h>
#import <ApplicationServices/ApplicationServices.h>
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSWindowDelegate <NSObject> @end
-NSUInteger NSApplicationPresentationAutoHideDock;
-NSUInteger NSApplicationPresentationAutoHideMenuBar;
-NSUInteger NSApplicationPresentationDefault;
-#endif
-
/*****************************************************************************
* NSAnimation (VLCAddition)
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
+#import "CompatibilityFixes.h"
#import "intf.h" /* VLCApplication */
#import "MainWindow.h"
#import "misc.h"
{
if ([screen isMainScreen])
{
- if (NSAppKitVersionNumber < 1038) // Leopard
+ if (OSX_LEOPARD)
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
[blackoutWindow closeAndAnimate: YES];
}
- if (NSAppKitVersionNumber < 1038) // Leopard
+ if (OSX_LEOPARD)
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
#import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h>
+#import "CompatibilityFixes.h"
#import "intf.h"
#import "playlist.h"
#import "open.h"
- (void)awakeFromNib
{
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_panel setTitle: _NS("Open Source")];
* Preamble
*****************************************************************************/
-#include "intf.h"
-#include "playlistinfo.h"
-#include "playlist.h"
-#include <vlc_url.h>
+#import "CompatibilityFixes.h"
+#import "intf.h"
+#import "playlistinfo.h"
+#import "playlist.h"
+#import <vlc_url.h>
/*****************************************************************************
* VLCPlaylistInfo Implementation
{
[o_info_window setExcludedFromWindowsMenu: YES];
[o_info_window setFloatingPanel: NO];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_info_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_info_window setTitle: _NS("Media Information")];
#include <vlc_common.h>
#include <vlc_config_cat.h>
+#import "CompatibilityFixes.h"
#import "intf.h"
#import "prefs.h"
#import "simple_prefs.h"
{
p_intf = VLCIntf;
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_prefs_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings];
#define LEFTMARGIN 18
#define RIGHTMARGIN 18
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSComboBoxDataSource <NSObject> @end
-@protocol NSTextFieldDelegate <NSObject> @end
-@protocol NSTableViewDataSource <NSObject> @end
-#endif
-
static NSMenu *o_keys_menu = nil;
@interface VLCConfigControl : NSView
#import "intf.h"
#import <vlc_common.h>
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSToolbarDelegate <NSObject> @end
-#endif
-
@interface VLCSimplePrefs : NSObject <NSToolbarDelegate>
{
IBOutlet id o_audio_dolby_pop;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#import "CompatibilityFixes.h"
#import "simple_prefs.h"
#import "prefs.h"
#import <vlc_keys.h>
[o_sprefs_toolbar setDelegate: self];
[o_sprefs_win setToolbar: o_sprefs_toolbar];
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* setup useful stuff */
/*****************************************************************************
* Preamble
*****************************************************************************/
+#import "CompatibilityFixes.h"
#import "wizard.h"
#import "intf.h"
#import "playlist.h"
- (void)awakeFromNib
{
- if (NSAppKitVersionNumber >= 1115.2)
+ if (OSX_LION)
[o_wizard_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* some minor cleanup */