/*****************************************************************************
* VideoView.m: MacOS X video output module
*****************************************************************************
- * Copyright (C) 2002-2013 VLC authors and VideoLAN
+ * Copyright (C) 2002-2014 VLC authors and VideoLAN
* $Id$
*
* Authors: Derk-Jan Hartman <hartman at videolan dot org>
* Preamble
*****************************************************************************/
#import <stdlib.h> /* free() */
-#import <string.h>
+#import "CompatibilityFixes.h"
#import "intf.h"
#import "VideoView.h"
#import "CoreInteraction.h"
#import "MainMenu.h"
-#import "MainWindow.h"
-#import <vlc_common.h>
#import <vlc_keys.h>
-(id)initWithFrame:(NSRect)frameRect
{
if (self = [super initWithFrame:frameRect]) {
- [self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]];
+ [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
}
i_lastScrollWheelDirection = 0;
else if (key == 'f' && i_pressed_modifiers & NSControlKeyMask && i_pressed_modifiers & NSCommandKeyMask)
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
else if (p_vout) {
- if (key == ' ')
- [[VLCCoreInteraction sharedInstance] play];
- else {
- val.i_int |= (int)CocoaKeyToVLC(key);
- var_Set(p_vout->p_libvlc, "key-pressed", val);
- }
+ val.i_int |= (int)CocoaKeyToVLC(key);
+ var_Set(p_vout->p_libvlc, "key-pressed", val);
}
else
msg_Dbg(VLCIntf, "could not send keyevent to VLC core");
- (void)mouseDown:(NSEvent *)o_event
{
if (([o_event type] == NSLeftMouseDown) && (! ([o_event modifierFlags] & NSControlKeyMask))) {
- if ([o_event clickCount] > 1)
+ if ([o_event clickCount] == 2)
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
+
} else if (([o_event type] == NSRightMouseDown) ||
(([o_event type] == NSLeftMouseDown) &&
([o_event modifierFlags] & NSControlKeyMask)))