2013-06-19 17:25:19 +00:00
|
|
|
/*
|
2017-06-24 14:08:17 +00:00
|
|
|
* Application Event Handling
|
2013-06-19 17:25:19 +00:00
|
|
|
*
|
|
|
|
* This file is part of mpv.
|
|
|
|
*
|
2017-06-24 14:08:17 +00:00
|
|
|
* mpv is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2013-06-19 17:25:19 +00:00
|
|
|
*
|
|
|
|
* mpv 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
|
2017-06-24 14:08:17 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2013-06-19 17:25:19 +00:00
|
|
|
*
|
2017-06-24 14:08:17 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
2013-06-19 17:25:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef MPV_MACOSX_COMPAT
|
|
|
|
#define MPV_MACOSX_COMPAT
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2014-07-14 05:20:49 +00:00
|
|
|
#include "osdep/macosx_versions.h"
|
2013-06-19 17:25:19 +00:00
|
|
|
|
2016-09-20 21:30:54 +00:00
|
|
|
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12)
|
2017-08-19 13:19:23 +00:00
|
|
|
|
|
|
|
@interface NSWindow (macOS10_12_SDK)
|
|
|
|
+ (void)setAllowsAutomaticWindowTabbing:(BOOL)allow;
|
|
|
|
@end
|
|
|
|
|
2016-09-20 21:30:54 +00:00
|
|
|
typedef NSUInteger NSWindowStyleMask;
|
|
|
|
static const NSWindowStyleMask NSWindowStyleMaskClosable = NSClosableWindowMask;
|
|
|
|
static const NSWindowStyleMask NSWindowStyleMaskTitled = NSTitledWindowMask;
|
|
|
|
static const NSWindowStyleMask NSWindowStyleMaskMiniaturizable = NSMiniaturizableWindowMask;
|
|
|
|
static const NSWindowStyleMask NSWindowStyleMaskResizable = NSResizableWindowMask;
|
|
|
|
static const NSWindowStyleMask NSWindowStyleMaskBorderless = NSBorderlessWindowMask;
|
2016-12-04 21:52:14 +00:00
|
|
|
static const NSWindowStyleMask NSWindowStyleMaskFullScreen = NSFullScreenWindowMask;
|
2016-09-20 21:30:54 +00:00
|
|
|
|
|
|
|
static const NSEventType NSEventTypeSystemDefined = NSSystemDefined;
|
|
|
|
static const NSEventType NSEventTypeKeyDown = NSKeyDown;
|
|
|
|
static const NSEventType NSEventTypeKeyUp = NSKeyUp;
|
|
|
|
|
2017-02-21 17:04:30 +00:00
|
|
|
static const NSEventMask NSEventMaskLeftMouseUp = NSLeftMouseUpMask;
|
2016-09-20 21:30:54 +00:00
|
|
|
|
|
|
|
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10)
|
|
|
|
typedef NSUInteger NSEventModifierFlags;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static const NSEventModifierFlags NSEventModifierFlagShift = NSShiftKeyMask;
|
|
|
|
static const NSEventModifierFlags NSEventModifierFlagControl = NSControlKeyMask;
|
2017-03-26 19:46:28 +00:00
|
|
|
static const NSEventModifierFlags NSEventModifierFlagCommand = NSCommandKeyMask;
|
2016-09-20 21:30:54 +00:00
|
|
|
static const NSEventModifierFlags NSEventModifierFlagOption = NSAlternateKeyMask;
|
2018-01-20 14:40:18 +00:00
|
|
|
|
|
|
|
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9)
|
|
|
|
typedef NSUInteger NSModalResponse;
|
|
|
|
static const NSModalResponse NSModalResponseOK = NSFileHandlingPanelOKButton
|
|
|
|
#endif
|
|
|
|
|
2016-09-20 21:30:54 +00:00
|
|
|
#endif
|
|
|
|
|
2013-06-19 17:25:19 +00:00
|
|
|
#endif /* MPV_MACOSX_COMPAT */
|