-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add xtro test for [Deprecated] attributes and fix up usages #4966
Changes from all commits
d3325d4
e0e5327
76ebdb9
0694b6a
9f34663
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3731,6 +3731,7 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea | |
NSColor SelectedControl { get; } | ||
|
||
[Static] | ||
[Deprecated (PlatformName.MacOSX, message: "Use 'SelectedContentBackgroundColor' instead.")] | ||
[Export ("secondarySelectedControlColor")] | ||
NSColor SecondarySelectedControl { get; } | ||
|
||
|
@@ -3821,6 +3822,7 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea | |
NSColor HeaderText { get; } | ||
|
||
[Static] | ||
[Deprecated (PlatformName.MacOSX, message : "Use 'SelectedContentBackgroundColor' instead.")] | ||
[Export ("alternateSelectedControlColor")] | ||
NSColor AlternateSelectedControl { get; } | ||
|
||
|
@@ -3829,6 +3831,7 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea | |
NSColor AlternateSelectedControlText { get; } | ||
|
||
[Static] | ||
[Advice ("Use 'AlternatingContentBackgroundColors' instead.")] | ||
[Export ("controlAlternatingRowBackgroundColors")] | ||
NSColor [] ControlAlternatingRowBackgroundColors (); | ||
|
||
|
@@ -5757,6 +5760,7 @@ partial interface NSDocumentController : NSWindowRestoration, NSCoding { | |
[Export ("runModalOpenPanel:forTypes:")] | ||
nint RunModalOpenPanel (NSOpenPanel openPanel, string [] types); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 7, message: "Use 'OpenDocument (NSUrl, bool, OpenDocumentCompletionHandler)' instead.")] | ||
[Export ("openDocumentWithContentsOfURL:display:error:")] | ||
NSObject OpenDocument (NSUrl url, bool displayDocument, out NSError outError); | ||
|
||
|
@@ -5767,6 +5771,7 @@ partial interface NSDocumentController : NSWindowRestoration, NSCoding { | |
[Export ("makeDocumentWithContentsOfURL:ofType:error:")] | ||
NSObject MakeDocument (NSUrl url, string typeName, out NSError outError); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 7, message: "Use 'NSDocumentController.ReopenDocumentForUrl (NSUrl, NSUrl, bool, OpenDocumentCompletionHandler)' instead.")] | ||
[Export ("reopenDocumentForURL:withContentsOfURL:error:")] | ||
bool ReopenDocument (NSUrl url, NSUrl contentsUrl, out NSError outError); | ||
|
||
|
@@ -6790,6 +6795,7 @@ interface NSFontManager : NSMenuItemValidation { | |
[Export ("sendAction")] | ||
bool SendAction { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("delegate", ArgumentSemantic.Assign)][NullAllowed] | ||
NSObject WeakDelegate { get; set; } | ||
|
||
|
@@ -6802,24 +6808,31 @@ interface NSFontManager : NSMenuItemValidation { | |
[Export ("convertAttributes:")] | ||
NSDictionary ConvertAttributes (NSDictionary attributes); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSFontDescriptor.MatchingFontDescriptors' instead.")] | ||
[Export ("availableFontNamesMatchingFontDescriptor:")] | ||
string [] AvailableFontNamesMatchingFontDescriptor (NSFontDescriptor descriptor); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSFontCollection.AllFontCollectionNames' instead.")] | ||
[Export ("collectionNames")] | ||
string [] CollectionNames { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSFontCollection.GetMatchingDescriptors ()' instead.")] | ||
[Export ("fontDescriptorsInCollection:")] | ||
NSArray FontDescriptorsInCollection (string collectionNames); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSFontCollection.ShowFontCollection (NSFontCollection, string, NSFontCollectionVisibility, out NSError)' instead.")] | ||
[Export ("addCollection:options:")] | ||
bool AddCollection (string collectionName, NSFontCollectionOptions collectionOptions); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'HideFontCollection (string, NSFontCollectionVisibility, out NSError)' instead.")] | ||
[Export ("removeCollection:")] | ||
bool RemoveCollection (string collectionName); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSMutableFontCollection.AddQueryForDescriptors' instead.")] | ||
[Export ("addFontDescriptors:toCollection:")] | ||
void AddFontDescriptors (NSFontDescriptor [] descriptors, string collectionName); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSMutableFontCollection.RemoveQueryForDescriptors' instead.")] | ||
[Export ("removeFontDescriptor:fromCollection:")] | ||
void RemoveFontDescriptor (NSFontDescriptor descriptor, string collection); | ||
|
||
|
@@ -7998,13 +8011,16 @@ partial interface NSMenu : NSCoding, NSCopying, NSAccessibility, NSAccessibility | |
[Export ("size")] | ||
CGSize Size { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Static] | ||
[Export ("menuZone")] | ||
NSZone MenuZone { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("helpRequested:")] | ||
void HelpRequested (NSEvent eventPtr); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("isTornOff")] | ||
bool IsTornOff { get; } | ||
|
||
|
@@ -8042,6 +8058,7 @@ partial interface NSMenu : NSCoding, NSCopying, NSAccessibility, NSAccessibility | |
[Export ("showsStateColumn")] | ||
bool ShowsStateColumn { get; set; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("menuChangedMessagesEnabled")] | ||
bool MenuChangedMessagesEnabled { get; set; } | ||
|
||
|
@@ -11919,30 +11936,39 @@ interface NSPrinter : NSCoding, NSCopying { | |
[Export ("pageSizeForPaper:")] | ||
CGSize PageSizeForPaper (string paperName); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("statusForTable:")] | ||
NSPrinterTableStatus StatusForTable (string tableName); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("isKey:inTable:")] | ||
bool IsKeyInTable (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("booleanForKey:inTable:")] | ||
bool BooleanForKey (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("floatForKey:inTable:")] | ||
float /* float, not CGFloat */ FloatForKey (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("intForKey:inTable:")] | ||
int /* int, not NSInteger */ IntForKey (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("rectForKey:inTable:")] | ||
CGRect RectForKey (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("sizeForKey:inTable:")] | ||
CGSize SizeForKey (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("stringForKey:inTable:")] | ||
string StringForKey (string key, string table); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("stringListForKey:inTable:")] | ||
string [] StringListForKey (string key, string table); | ||
|
||
|
@@ -14314,7 +14340,7 @@ partial interface NSSound : NSSecureCoding, NSCopying, NSPasteboardReading, NSPa | |
[Export ("playbackDeviceIdentifier")] | ||
string PlaybackDeviceID { get; set; } | ||
|
||
// FIXME: Poor docs, no type defined for the array elements | ||
[Deprecated (PlatformName.MacOSX, 10, 9)] | ||
[Export ("channelMapping")] | ||
NSObject ChannelMapping { get; set; } | ||
} | ||
|
@@ -15941,6 +15967,7 @@ partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer, | |
[Export ("drawPageBorderWithSize:")] | ||
void DrawPageBorder (CGSize borderSize); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Never called.")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean never called? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The note from apple said this method is never called. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not a callback (hence it doesn't mean never called by the OS) so I assume it means calling the method has no effect anymore. So something like: "Calling this method won't have any effects anymore." would be slightly clearer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not exactly true, you can implement NSView subclass and override various Draw functions and AppKit will call them. I could say something like "This method is never called and does nothing", but that feels like a mouthful. |
||
[Export ("drawSheetBorderWithSize:")] | ||
void DrawSheetBorder (CGSize borderSize); | ||
|
||
|
@@ -17146,6 +17173,7 @@ interface NSTableViewDataSource { | |
[Export ("tableView:acceptDrop:row:dropOperation:")] | ||
bool AcceptDrop (NSTableView tableView, [Protocolize (4)] NSDraggingInfo info, nint row, NSTableViewDropOperation dropOperation); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' instead.")] | ||
[Export ("tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:")] | ||
string [] FilesDropped (NSTableView tableView, NSUrl dropDestination, NSIndexSet indexSet ); | ||
|
||
|
@@ -18491,6 +18519,7 @@ partial interface NSTextContainer : NSCoding { | |
[Export ("isSimpleRectangularTextContainer")] | ||
bool IsSimpleRectangularTextContainer { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("containsPoint:")] | ||
bool ContainsPoint (CGPoint point); | ||
|
||
|
@@ -18640,6 +18669,7 @@ interface NSTextTab : NSSecureCoding, NSCopying { | |
interface NSTextInput | ||
{ | ||
[Abstract] | ||
[Deprecated (PlatformName.MacOSX, 10, 6)] | ||
[Export ("insertText:")] | ||
void InsertText (NSObject insertString); | ||
|
||
|
@@ -18755,6 +18785,7 @@ partial interface NSTextView : NSTextInputClient, NSTextLayoutOrientationProvide | |
[Export ("lowerBaseline:")] | ||
void LowerBaseline (NSObject sender); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use unicode characters via the character palette.")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mmh the character palette? Can we be more specific? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. character palette (emojis) often bound as control + command + space. (; |
||
[Export ("toggleTraditionalCharacterShape:")] | ||
void ToggleTraditionalCharacterShape (NSObject sender); | ||
|
||
|
@@ -20339,6 +20370,7 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI | |
[Export ("gState")] | ||
nint GState (); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 14)] | ||
[Export ("setOneShot:")] | ||
void SetOneShot (bool flag); | ||
|
||
|
@@ -20414,9 +20446,11 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI | |
[Export ("sharingType")] | ||
NSWindowSharingType SharingType { get; set; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 14)] | ||
[Export ("preferredBackingLocation")] | ||
NSWindowBackingLocation PreferredBackingLocation { get; set; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 14)] | ||
[Export ("backingLocation")] | ||
NSWindowBackingLocation BackingLocation { get; } | ||
|
||
|
@@ -21241,6 +21275,7 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { | |
[Export ("openFile:withApplication:andDeactivate:"), ThreadSafe] | ||
bool OpenFile (string fullPath, [NullAllowed] string appName, bool deactivate); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSWorkspace.OpenUrl' instead.")] | ||
[Export ("openFile:fromImage:at:inView:"), ThreadSafe] | ||
bool OpenFile (string fullPath, NSImage anImage, CGPoint point, NSView aView); | ||
|
||
|
@@ -21304,6 +21339,7 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { | |
[Export ("getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:"), ThreadSafe] | ||
bool GetFileSystemInfo (string fullPath, out bool removableFlag, out bool writableFlag, out bool unmountableFlag, out string description, out string fileSystemType); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("performFileOperation:source:destination:files:tag:"), ThreadSafe] | ||
bool PerformFileOperation (NSString workspaceOperation, string source, string destination, string[] files, out nint tag); | ||
|
||
|
@@ -21319,9 +21355,11 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { | |
[Export ("hideOtherApplications")] | ||
void HideOtherApplications (); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("mountedLocalVolumePaths")] | ||
string[] MountedLocalVolumePaths { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11)] | ||
[Export ("mountedRemovableMedia")] | ||
string[] MountedRemovableMedia { get; } | ||
|
||
|
@@ -21341,9 +21379,11 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { | |
[Export ("openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:"), ThreadSafe] | ||
bool _OpenUrls (NSUrl[] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor, [NullAllowed] string[] identifiers); | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 7, message: "Use 'NSWorkspace.RunningApplications' instead.")] | ||
[Export ("launchedApplications")] | ||
NSDictionary [] LaunchedApplications { get; } | ||
|
||
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSWorkspace.FrontmostApplication' instead.")] | ||
[Export ("activeApplication")] | ||
NSDictionary ActiveApplication { get; } | ||
|
||
|
@@ -22262,6 +22302,7 @@ partial interface NSTypesetter { | |
NSRange GlyphRangeForCharacterRange (NSRange charRange, out NSRange actualCharRange); | ||
|
||
// TODO: could use a higher level API | ||
[Deprecated (PlatformName.MacOSX, 10, 13)] | ||
[Export ("getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:")] | ||
nuint GetGlyphsInRange (NSRange glyphsRange, IntPtr glyphBuffer, IntPtr charIndexBuffer, IntPtr inscribeBuffer, IntPtr elasticBuffer, IntPtr bidiLevelBuffer); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth removing the fixme if it's now deprecated.