[Cocoa] Replace deprecated macOS Window Style Mask constants#3216
Open
HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
Open
[Cocoa] Replace deprecated macOS Window Style Mask constants#3216HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
Contributor
The macOS AppKit framework deprecated the old-style window style mask constants in macOS 10.12 (Sierra) in favour of a new NSWindowStyleMask option set type. This change replaces all nine deprecated constants throughout the SWT macOS/Cocoa implementation with their modern equivalents, eliminating compiler deprecation warnings and improving forward compatibility with future macOS SDK versions. Replaced constants (values are unchanged): NSBorderlessWindowMask -> NSWindowStyleMaskBorderless (0) NSClosableWindowMask -> NSWindowStyleMaskClosable (2) NSDocModalWindowMask -> NSWindowStyleMaskDocModalWindow (64) NSFullScreenWindowMask -> NSWindowStyleMaskFullScreen (16384) NSMiniaturizableWindowMask -> NSWindowStyleMaskMiniaturizable (4) NSNonactivatingPanelMask -> NSWindowStyleMaskNonactivatingPanel(128) NSResizableWindowMask -> NSWindowStyleMaskResizable (8) NSTitledWindowMask -> NSWindowStyleMaskTitled (1) NSUtilityWindowMask -> NSWindowStyleMaskUtilityWindow (16) Contributes to eclipse-platform#3214
7374949 to
4241424
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS AppKit framework deprecated the old-style window style mask constants in macOS 10.12 (Sierra) in favour of a new NSWindowStyleMask option set type. This change replaces all nine deprecated constants throughout the SWT macOS/Cocoa implementation with their modern equivalents, eliminating compiler deprecation warnings and improving forward compatibility with future macOS SDK versions.
Affected files
OS.java— constant declarations updatedAppKitFull.bridgesupport/.extras— enum entries updated for code-generation consistencyShell.java,Display.java,Tracker.java,Printer.java— call sites updatedConstant mapping (values unchanged)
NSBorderlessWindowMaskNSWindowStyleMaskBorderlessNSClosableWindowMaskNSWindowStyleMaskClosableNSDocModalWindowMaskNSWindowStyleMaskDocModalWindowNSFullScreenWindowMaskNSWindowStyleMaskFullScreenNSMiniaturizableWindowMaskNSWindowStyleMaskMiniaturizableNSNonactivatingPanelMaskNSWindowStyleMaskNonactivatingPanelNSResizableWindowMaskNSWindowStyleMaskResizableNSTitledWindowMaskNSWindowStyleMaskTitledNSUtilityWindowMaskNSWindowStyleMaskUtilityWindowContributes to #3214
Created with the help of Copilot.