Contents

remoteWindow(of:reply:)

Requests that the host application creates a window to display custom UI.

Declaration

func remoteWindow(of contentSize: CGSize, reply: ((NSView?, (any Error)?) -> Void)!)
func remoteWindow(of contentSize: CGSize) async throws -> NSView?

Parameters

  • contentSize:

    The desired size for the content rectangle of the window.

  • reply:

    Called when the window has been created.

Discussion

Call this method to request that the host creates a new window to display custom user-interface elements. The reply block returns the window for your custom view. If there are any problems creating the window, parentView is nil and error contains an NSError that describes the problem.

Each plug-in instance is limited to a single window. If a user doesn’t close the window that contains the custom user-interface elements, subsequent calls to this method return the same parent view.