1 /* Copyright (C) 2010-2021 The RetroArch team 2 * 3 * --------------------------------------------------------------------------------------- 4 * The following license statement only applies to this file (cocoa_defines.h). 5 * --------------------------------------------------------------------------------------- 6 * 7 * Permission is hereby granted, free of charge, 8 * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 * to deal in the Software without restriction, including without limitation the rights to 10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 */ 22 23 #ifndef __COCOA_COMMON_DEFINES_H 24 #define __COCOA_COMMON_DEFINES_H 25 26 #include <AvailabilityMacros.h> 27 28 #ifndef MAC_OS_X_VERSION_10_12 29 #define MAC_OS_X_VERSION_10_12 101200 30 #endif 31 32 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 33 #define NSEventModifierFlagCommand NSCommandKeyMask 34 #define NSEventModifierFlagControl NSControlKeyMask 35 #define NSEventModifierFlagHelp NSHelpKeyMask 36 #define NSEventModifierFlagNumericPad NSNumericPadKeyMask 37 #define NSEventModifierFlagOption NSAlternateKeyMask 38 #define NSEventModifierFlagShift NSShiftKeyMask 39 #define NSCompositingOperationSourceOver NSCompositeSourceOver 40 #define NSEventMaskApplicationDefined NSApplicationDefinedMask 41 #define NSEventTypeApplicationDefined NSApplicationDefined 42 #define NSEventTypeCursorUpdate NSCursorUpdate 43 #define NSEventTypeMouseMoved NSMouseMoved 44 #define NSEventTypeMouseEntered NSMouseEntered 45 #define NSEventTypeMouseExited NSMouseExited 46 #define NSEventTypeLeftMouseDown NSLeftMouseDown 47 #define NSEventTypeRightMouseDown NSRightMouseDown 48 #define NSEventTypeOtherMouseDown NSOtherMouseDown 49 #define NSEventTypeLeftMouseUp NSLeftMouseUp 50 #define NSEventTypeRightMouseUp NSRightMouseUp 51 #define NSEventTypeOtherMouseUp NSOtherMouseUp 52 #define NSEventTypeLeftMouseDragged NSLeftMouseDragged 53 #define NSEventTypeRightMouseDragged NSRightMouseDragged 54 #define NSEventTypeOtherMouseDragged NSOtherMouseDragged 55 #define NSEventTypeScrollWheel NSScrollWheel 56 #define NSEventTypeKeyDown NSKeyDown 57 #define NSEventTypeKeyUp NSKeyUp 58 #define NSEventTypeFlagsChanged NSFlagsChanged 59 #define NSEventMaskAny NSAnyEventMask 60 #define NSWindowStyleMaskBorderless NSBorderlessWindowMask 61 #define NSWindowStyleMaskClosable NSClosableWindowMask 62 #define NSWindowStyleMaskFullScreen NSFullScreenWindowMask 63 #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask 64 #define NSWindowStyleMaskResizable NSResizableWindowMask 65 #define NSWindowStyleMaskTitled NSTitledWindowMask 66 #define NSAlertStyleCritical NSCriticalAlertStyle 67 #define NSAlertStyleInformational NSInformationalAlertStyle 68 #define NSAlertStyleWarning NSWarningAlertStyle 69 #define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask 70 #define NSControlSizeRegular NSRegularControlSize 71 #endif 72 73 #endif 74