Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

// TODO: turn NSAnimatablePropertyCOntainer into a system similar to UIAppearance

#nullable enable

using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down Expand Up @@ -26941,15 +26943,15 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions {

[Async]
[Export ("setDefaultApplicationAtURL:toOpenContentTypeOfFileAtURL:completionHandler:")]
void SetDefaultApplicationToOpenContentType (NSUrl applicationUrl, NSUrl url, [NullAllowed] Action<NSError> completionHandler);
void SetDefaultApplicationToOpenContentType (NSUrl applicationUrl, NSUrl url, [NullAllowed] Action<NSError?> completionHandler);
Copy link
Member

@rolfbjarne rolfbjarne Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is correct, it doesn't currently change anything in the generated code, because bgen doesn't understand nullability annotations in generic types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but rgen does, and I need to update the delegates before we migrate.


[Async]
[Export ("setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:")]
void SetDefaultApplicationToOpenUrls (NSUrl applicationUrl, string urlScheme, [NullAllowed] Action<NSError> completionHandler);
void SetDefaultApplicationToOpenUrls (NSUrl applicationUrl, string urlScheme, [NullAllowed] Action<NSError?> completionHandler);

[Async]
[Export ("setDefaultApplicationAtURL:toOpenFileAtURL:completionHandler:")]
void SetDefaultApplicationToOpenFile (NSUrl applicationUrl, NSUrl url, [NullAllowed] Action<NSError> completionHandler);
void SetDefaultApplicationToOpenFile (NSUrl applicationUrl, NSUrl url, [NullAllowed] Action<NSError?> completionHandler);

[Export ("URLForApplicationToOpenContentType:")]
[return: NullAllowed]
Expand All @@ -26960,7 +26962,7 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions {

[Async]
[Export ("setDefaultApplicationAtURL:toOpenContentType:completionHandler:")]
void SetDefaultApplicationToOpenContentType (NSUrl applicationUrl, UTType contentType, [NullAllowed] Action<NSError> completionHandler);
void SetDefaultApplicationToOpenContentType (NSUrl applicationUrl, UTType contentType, [NullAllowed] Action<NSError?> completionHandler);

[Export ("absolutePathForAppBundleWithIdentifier:"), ThreadSafe]
[Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the 'UrlForApplication' method instead.")]
Expand Down Expand Up @@ -27251,19 +27253,19 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions {
NSString DisplayOptionsDidChangeNotification { get; }

[Export ("requestAuthorizationOfType:completionHandler:")]
void RequestAuthorization (NSWorkspaceAuthorizationType type, Action<NSWorkspaceAuthorization, NSError> completionHandler);
void RequestAuthorization (NSWorkspaceAuthorizationType type, Action<NSWorkspaceAuthorization?, NSError?> completionHandler);

[Async]
[Export ("openApplicationAtURL:configuration:completionHandler:")]
void OpenApplication (NSUrl applicationUrl, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action<NSRunningApplication, NSError> completionHandler);
void OpenApplication (NSUrl applicationUrl, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action<NSRunningApplication?, NSError?> completionHandler);

[Async]
[Export ("openURL:configuration:completionHandler:")]
void OpenUrl (NSUrl url, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action<NSRunningApplication, NSError> completionHandler);
void OpenUrl (NSUrl url, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action<NSRunningApplication?, NSError?> completionHandler);

[Async]
[Export ("openURLs:withApplicationAtURL:configuration:completionHandler:")]
void OpenUrls (NSUrl [] urls, NSUrl applicationUrl, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action<NSRunningApplication, NSError> completionHandler);
void OpenUrls (NSUrl [] urls, NSUrl applicationUrl, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action<NSRunningApplication?, NSError?> completionHandler);

[Export ("iconForContentType:")]
NSImage GetIcon (UTType contentType);
Expand Down Expand Up @@ -28579,7 +28581,7 @@ partial interface NSWindow {
[Mac (13, 3), MacCatalyst (16, 4)]
[Async]
[Export ("transferWindowSharingToWindow:completionHandler:")]
void TransferWindowSharing (NSWindow window, Action<NSError> completionHandler);
void TransferWindowSharing (NSWindow window, Action<NSError?> completionHandler);

[Mac (13, 3), MacCatalyst (16, 4)]
[Export ("hasActiveWindowSharingSession")]
Expand All @@ -28588,12 +28590,12 @@ partial interface NSWindow {
[Async]
[Mac (15, 0), NoMacCatalyst]
[Export ("requestSharingOfWindow:completionHandler:")]
void RequestSharingOfWindow (NSWindow window, Action<NSError> completionHandler);
void RequestSharingOfWindow (NSWindow window, Action<NSError?> completionHandler);

[Async]
[Mac (15, 0), NoMacCatalyst]
[Export ("requestSharingOfWindowUsingPreview:title:completionHandler:")]
void RequestSharingOfWindow (NSImage previewImage, string title, Action<NSError> completionHandler);
void RequestSharingOfWindow (NSImage previewImage, string title, Action<NSError?> completionHandler);
}

partial interface NSPrintOperation {
Expand Down Expand Up @@ -32575,7 +32577,7 @@ interface NSFilePromiseProviderDelegate {

[Abstract]
[Export ("filePromiseProvider:writePromiseToURL:completionHandler:")]
void WritePromiseToUrl (NSFilePromiseProvider filePromiseProvider, NSUrl url, [NullAllowed] Action<NSError> completionHandler);
void WritePromiseToUrl (NSFilePromiseProvider filePromiseProvider, NSUrl url, [NullAllowed] Action<NSError?> completionHandler);

/// <param name="filePromiseProvider">To be added.</param>
/// <summary>To be added.</summary>
Expand All @@ -32599,7 +32601,7 @@ interface NSFilePromiseReceiver : NSPasteboardReading {
string [] FileNames { get; }

[Export ("receivePromisedFilesAtDestination:options:operationQueue:reader:")]
void ReceivePromisedFiles (NSUrl destinationDir, NSDictionary options, NSOperationQueue operationQueue, Action<NSUrl, NSError> reader);
void ReceivePromisedFiles (NSUrl destinationDir, NSDictionary options, NSOperationQueue operationQueue, Action<NSUrl?, NSError?> reader);
}

interface INSValidatedUserInterfaceItem { }
Expand Down