annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/tkMacOSXConstants.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /*
jpayne@69 2 * tkMacOSXConstants.h --
jpayne@69 3 *
jpayne@69 4 * Macros which map the names of NS constants used in the Tk code to
jpayne@69 5 * the new name that Apple came up with for subsequent versions of the
jpayne@69 6 * operating system. (Each new OS release seems to come with a new
jpayne@69 7 * naming convention for the same old constants.)
jpayne@69 8 *
jpayne@69 9 * Copyright (c) 2017 Marc Culler
jpayne@69 10 *
jpayne@69 11 * See the file "license.terms" for information on usage and redistribution
jpayne@69 12 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
jpayne@69 13 */
jpayne@69 14
jpayne@69 15 #ifndef _TKMACCONSTANTS
jpayne@69 16 #define _TKMACCONSTANTS
jpayne@69 17
jpayne@69 18 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
jpayne@69 19 #define NSFullScreenWindowMask (1 << 14)
jpayne@69 20 #endif
jpayne@69 21
jpayne@69 22 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
jpayne@69 23 typedef NSInteger NSModalResponse;
jpayne@69 24 #endif
jpayne@69 25
jpayne@69 26 /*
jpayne@69 27 * Let's raise a glass for the project manager who improves our lives by
jpayne@69 28 * generating deprecation warnings about pointless changes of the names
jpayne@69 29 * of constants.
jpayne@69 30 */
jpayne@69 31
jpayne@69 32 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
jpayne@69 33 #define kCTFontDefaultOrientation kCTFontOrientationDefault
jpayne@69 34 #define kCTFontVerticalOrientation kCTFontOrientationVertical
jpayne@69 35 #endif
jpayne@69 36
jpayne@69 37 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
jpayne@69 38 #define NSOKButton NSModalResponseOK
jpayne@69 39 #endif
jpayne@69 40
jpayne@69 41 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
jpayne@69 42 #define kCTFontUserFixedPitchFontType kCTFontUIFontUserFixedPitch
jpayne@69 43 #endif
jpayne@69 44
jpayne@69 45 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
jpayne@69 46 #define NSAppKitDefined NSEventTypeAppKitDefined
jpayne@69 47 #define NSApplicationDefined NSEventTypeApplicationDefined
jpayne@69 48 #define NSApplicationActivatedEventType NSEventSubtypeApplicationActivated
jpayne@69 49 #define NSApplicationDeactivatedEventType NSEventSubtypeApplicationDeactivated
jpayne@69 50 #define NSWindowExposedEventType NSEventSubtypeWindowExposed
jpayne@69 51 #define NSScreenChangedEventType NSEventSubtypeScreenChanged
jpayne@69 52 #define NSWindowMovedEventType NSEventSubtypeWindowMoved
jpayne@69 53 #define NSKeyUp NSEventTypeKeyUp
jpayne@69 54 #define NSKeyDown NSEventTypeKeyDown
jpayne@69 55 #define NSFlagsChanged NSEventTypeFlagsChanged
jpayne@69 56 #define NSLeftMouseDown NSEventTypeLeftMouseDown
jpayne@69 57 #define NSLeftMouseUp NSEventTypeLeftMouseUp
jpayne@69 58 #define NSRightMouseDown NSEventTypeRightMouseDown
jpayne@69 59 #define NSRightMouseUp NSEventTypeRightMouseUp
jpayne@69 60 #define NSLeftMouseDragged NSEventTypeLeftMouseDragged
jpayne@69 61 #define NSRightMouseDragged NSEventTypeRightMouseDragged
jpayne@69 62 #define NSMouseMoved NSEventTypeMouseMoved
jpayne@69 63 #define NSMouseEntered NSEventTypeMouseEntered
jpayne@69 64 #define NSMouseExited NSEventTypeMouseExited
jpayne@69 65 #define NSScrollWheel NSEventTypeScrollWheel
jpayne@69 66 #define NSOtherMouseDown NSEventTypeOtherMouseDown
jpayne@69 67 #define NSOtherMouseUp NSEventTypeOtherMouseUp
jpayne@69 68 #define NSOtherMouseDragged NSEventTypeOtherMouseDragged
jpayne@69 69 #define NSTabletPoint NSEventTypeTabletPoint
jpayne@69 70 #define NSTabletProximity NSEventTypeTabletProximity
jpayne@69 71 #define NSDeviceIndependentModifierFlagsMask NSEventModifierFlagDeviceIndependentFlagsMask
jpayne@69 72 #define NSCommandKeyMask NSEventModifierFlagCommand
jpayne@69 73 #define NSShiftKeyMask NSEventModifierFlagShift
jpayne@69 74 #define NSAlphaShiftKeyMask NSEventModifierFlagCapsLock
jpayne@69 75 #define NSAlternateKeyMask NSEventModifierFlagOption
jpayne@69 76 #define NSControlKeyMask NSEventModifierFlagControl
jpayne@69 77 #define NSNumericPadKeyMask NSEventModifierFlagNumericPad
jpayne@69 78 #define NSFunctionKeyMask NSEventModifierFlagFunction
jpayne@69 79 #define NSCursorUpdate NSEventTypeCursorUpdate
jpayne@69 80 #define NSTexturedBackgroundWindowMask NSWindowStyleMaskTexturedBackground
jpayne@69 81 #define NSCompositeCopy NSCompositingOperationCopy
jpayne@69 82 #define NSWarningAlertStyle NSAlertStyleWarning
jpayne@69 83 #define NSInformationalAlertStyle NSAlertStyleInformational
jpayne@69 84 #define NSCriticalAlertStyle NSAlertStyleCritical
jpayne@69 85 #define NSCenterTextAlignment NSTextAlignmentCenter
jpayne@69 86 #define NSApplicationDefinedMask NSEventMaskApplicationDefined
jpayne@69 87 #define NSUtilityWindowMask NSWindowStyleMaskUtilityWindow
jpayne@69 88 #define NSNonactivatingPanelMask NSWindowStyleMaskNonactivatingPanel
jpayne@69 89 #define NSDocModalWindowMask NSWindowStyleMaskDocModalWindow
jpayne@69 90 #define NSHUDWindowMask NSWindowStyleMaskHUDWindow
jpayne@69 91 #define NSTitledWindowMask NSWindowStyleMaskTitled
jpayne@69 92 #define NSClosableWindowMask NSWindowStyleMaskClosable
jpayne@69 93 #define NSResizableWindowMask NSWindowStyleMaskResizable
jpayne@69 94 #define NSUnifiedTitleAndToolbarWindowMask NSWindowStyleMaskUnifiedTitleAndToolbar
jpayne@69 95 #define NSMiniaturizableWindowMask NSWindowStyleMaskMiniaturizable
jpayne@69 96 #define NSBorderlessWindowMask NSWindowStyleMaskBorderless
jpayne@69 97 #define NSFullScreenWindowMask NSWindowStyleMaskFullScreen
jpayne@69 98 #define NSAlphaFirstBitmapFormat NSBitmapFormatAlphaFirst
jpayne@69 99 #define NSAnyEventMask NSEventMaskAny
jpayne@69 100 #define NSLeftMouseDownMask NSEventMaskLeftMouseDown
jpayne@69 101 #define NSMouseMovedMask NSEventMaskMouseMoved
jpayne@69 102 #define NSLeftMouseDraggedMask NSEventMaskLeftMouseDragged
jpayne@69 103 #endif
jpayne@69 104
jpayne@69 105 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
jpayne@69 106 #define NSStringPboardType NSPasteboardTypeString
jpayne@69 107 #define NSOnState NSControlStateValueOn
jpayne@69 108 #define NSOffState NSControlStateValueOff
jpayne@69 109 #endif
jpayne@69 110
jpayne@69 111 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
jpayne@69 112 #define NSWindowStyleMaskTexturedBackground 0
jpayne@69 113 #endif
jpayne@69 114
jpayne@69 115 #if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
jpayne@69 116 #define GET_NSCONTEXT(context, flip) [NSGraphicsContext \
jpayne@69 117 graphicsContextWithGraphicsPort:context flipped:flip]
jpayne@69 118 #else
jpayne@69 119 #define GET_NSCONTEXT(context, flip) [NSGraphicsContext \
jpayne@69 120 graphicsContextWithCGContext:context flipped:NO]
jpayne@69 121 #endif
jpayne@69 122
jpayne@69 123 #endif