Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26655 lines (19358 sloc) 822 KB
// Copyright 2011-2012 Xamarin, Inc.
// Copyright 2010, 2011, Novell, Inc.
// Copyright 2010, Kenneth Pouncey
// Coprightt 2010, James Clancey
// Copyright 2011, Curtis Wensley
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//
// appkit.cs: Definitions for AppKit
//
// TODO: turn NSAnimatablePropertyCOntainer into a system similar to UIAppearance
using System;
using System.Diagnostics;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
using CoreGraphics;
using CoreImage;
using CoreAnimation;
using CoreData;
using OpenGL;
using CoreVideo;
using CloudKit;
using CGGlyph = System.UInt16;
namespace AppKit {
//[BaseType (typeof (NSObject))]
//interface CIImage {
// [Export ("drawInRect:fromRect:operation:fraction:")]
// void Draw (CGRect inRect, CGRect fromRect, NSCompositingOperation operation, float fractionDelta);
//
// [Export ("drawAtPoint:fromRect:operation:fraction:")]
// void DrawAtPoint (CGPoint atPoint, CGRect fromRect, NSCompositingOperation operation, float fractionDelta);
//}
[BaseType (typeof (NSCell))]
interface NSActionCell {
[Export ("initTextCell:")]
IntPtr Constructor (string aString);
[Export ("initImageCell:")]
IntPtr Constructor (NSImage image);
[Export ("target", ArgumentSemantic.Weak), NullAllowed]
NSObject Target { get; set; }
[Export ("action"), NullAllowed]
Selector Action { get; set; }
[Export ("tag")]
nint Tag { get; set; }
}
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface NSAlignmentFeedbackToken
{
}
interface INSAlignmentFeedbackToken { }
// @interface NSAlignmentFeedbackFilter : NSObject
[Mac (10,11)]
[BaseType (typeof(NSObject))]
interface NSAlignmentFeedbackFilter
{
[Static]
[Export ("inputEventMask")]
NSEventMask InputEventMask { get; }
[Export ("updateWithEvent:")]
void Update (NSEvent theEvent);
[Export ("updateWithPanRecognizer:")]
void Update (NSPanGestureRecognizer panRecognizer);
[Export ("alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:")]
[return: NullAllowed]
INSAlignmentFeedbackToken GetTokenForMovement ([NullAllowed] NSView view, CGPoint previousPoint, CGPoint alignedPoint, CGPoint defaultPoint);
[Export ("alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:")]
[return: NullAllowed]
INSAlignmentFeedbackToken GetTokenForHorizontalMovement ([NullAllowed] NSView view, nfloat previousX, nfloat alignedX, nfloat defaultX);
[Export ("alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:")]
[return: NullAllowed]
INSAlignmentFeedbackToken GetTokenForVerticalMovement ([NullAllowed] NSView view, nfloat previousY, nfloat alignedY, nfloat defaultY);
[Export ("performFeedback:performanceTime:")]
void PerformFeedback (INSAlignmentFeedbackToken[] tokens, NSHapticFeedbackPerformanceTime performanceTime);
}
//
// Inlined, not really an object implementation
//
interface NSAnimatablePropertyContainer {
[Export ("animator")]
NSObject Animator { [return: Proxy] get; }
[Export ("animations")]
NSDictionary Animations { get; set; }
[Export ("animationForKey:")]
NSObject AnimationFor (NSString key);
[Static, Export ("defaultAnimationForKey:")]
NSObject DefaultAnimationFor (NSString key);
}
interface NSAnimationProgressMarkEventArgs {
[Export ("NSAnimationProgressMark")]
float Progress { get; } /* float, not CGFloat */
}
[BaseType (typeof (NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSAnimationDelegate)})]
interface NSAnimation : NSCoding, NSCopying {
[Export ("initWithDuration:animationCurve:")]
[Sealed] // Just to avoid the duplicate selector error
IntPtr Constructor (double duration, NSAnimationCurve animationCurve);
#if !XAMCORE_4_0
[Obsolete ("Use the constructor instead.")]
[Export ("initWithDuration:animationCurve:")]
IntPtr Constant (double duration, NSAnimationCurve animationCurve);
#endif
[Export ("startAnimation")]
void StartAnimation ();
[Export ("stopAnimation")]
void StopAnimation ();
[Export ("isAnimating")]
bool IsAnimating ();
[Export ("currentProgress")]
float CurrentProgress { get; set; } /* NSAnimationProgress = float */
[Export ("duration")]
double Duration { get; set; }
[Export ("animationBlockingMode")]
NSAnimationBlockingMode AnimationBlockingMode { get; set; }
[Export ("frameRate")]
float FrameRate { get; set; } /* float, not CGFloat */
[Export ("animationCurve")]
NSAnimationCurve AnimationCurve { get; set; }
[Export ("currentValue")]
float CurrentValue { get; } /* float, not CGFloat */
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap ("WeakDelegate")]
[Protocolize]
NSAnimationDelegate Delegate { get; set; }
[Export ("progressMarks", ArgumentSemantic.Copy)]
NSNumber [] ProgressMarks { get; set; }
[Export ("addProgressMark:")]
void AddProgressMark (float /* NSAnimationProgress = float */ progressMark);
[Export ("removeProgressMark:")]
void RemoveProgressMark (float /* NSAnimationProgress = float */ progressMark);
[Export ("startWhenAnimation:reachesProgress:")]
void StartWhenAnimationReaches (NSAnimation animation, float /* NSAnimationProgress = float */ startProgress);
[Export ("stopWhenAnimation:reachesProgress:")]
void StopWhenAnimationReaches (NSAnimation animation, float /* NSAnimationProgress = float */ stopProgress);
[Export ("clearStartAnimation")]
void ClearStartAnimation ();
[Export ("clearStopAnimation")]
void ClearStopAnimation ();
[Export ("runLoopModesForAnimating")]
NSString [] RunLoopModesForAnimating { get; }
[Notification (typeof (NSAnimationProgressMarkEventArgs)), Field ("NSAnimationProgressMarkNotification")]
NSString ProgressMarkNotification { get; }
[Field ("NSAnimationProgressMark")]
NSString ProgressMark { get; }
[Field ("NSAnimationTriggerOrderIn")]
NSString TriggerOrderIn { get; }
[Field ("NSAnimationTriggerOrderOut")]
NSString TriggerOrderOut { get; }
}
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface NSAnimationDelegate {
[Export ("animationShouldStart:"), DelegateName ("NSAnimationPredicate"), DefaultValue (true)]
bool AnimationShouldStart (NSAnimation animation);
[Export ("animationDidStop:"), EventArgs ("NSAnimation")]
void AnimationDidStop (NSAnimation animation);
[Export ("animationDidEnd:"), EventArgs ("NSAnimation")]
void AnimationDidEnd (NSAnimation animation);
[Export ("animation:valueForProgress:"), DelegateName ("NSAnimationProgress"), DefaultValueFromArgumentAttribute ("progress")]
float /* float, not CGFloat */ ComputeAnimationCurve (NSAnimation animation, float /* NSAnimationProgress = float */ progress);
[Export ("animation:didReachProgressMark:"), EventArgs ("NSAnimation")]
void AnimationDidReachProgressMark (NSAnimation animation, float /* NSAnimationProgress = float */ progress);
}
[BaseType (typeof (NSObject))]
partial interface NSAnimationContext {
[Static]
[Export ("beginGrouping")]
void BeginGrouping ();
[Static]
[Export ("endGrouping")]
void EndGrouping ();
[Static]
[Export ("currentContext")]
NSAnimationContext CurrentContext { get; }
//Detected properties
[Export ("duration")]
double Duration { get; set; }
[Export ("completionHandler", ArgumentSemantic.Copy)]
Action CompletionHandler { get; set; }
[Static]
[Export ("runAnimationGroup:completionHandler:")]
void RunAnimation (Action<NSAnimationContext> changes, [NullAllowed] Action completionHandler);
[Static]
[Mac (10,12)]
[Export ("runAnimationGroup:")]
void RunAnimation (Action<NSAnimationContext> changes);
[Export ("timingFunction", ArgumentSemantic.Strong)]
CAMediaTimingFunction TimingFunction { get; set; }
[Export ("allowsImplicitAnimation")]
bool AllowsImplicitAnimation { get; set; }
}
[BaseType (typeof (NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSAlertDelegate)})]
interface NSAlert {
[Static, Export ("alertWithError:")]
NSAlert WithError (NSError error);
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use constructor instead.")]
[Static, Export ("alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:")]
NSAlert WithMessage([NullAllowed] string message, [NullAllowed] string defaultButton, [NullAllowed] string alternateButton, [NullAllowed] string otherButton, string full);
[Export ("messageText")]
string MessageText { get; set; }
[Export ("informativeText")]
string InformativeText { get; set; }
[Export ("icon", ArgumentSemantic.Retain)]
NSImage Icon { get; set; }
[Export ("addButtonWithTitle:")]
NSButton AddButton (string title);
[Export ("buttons")]
NSButton [] Buttons { get; }
[Export ("showsHelp")]
bool ShowsHelp { get; set; }
[Export ("helpAnchor")]
string HelpAnchor { get; set; }
[Export ("alertStyle")]
NSAlertStyle AlertStyle { get; set; }
[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap ("WeakDelegate")]
[Protocolize]
NSAlertDelegate Delegate { get; set; }
[Export ("showsSuppressionButton")]
bool ShowsSuppressionButton { get; set; }
[Export ("suppressionButton")]
NSButton SuppressionButton { get; }
[Export ("accessoryView", ArgumentSemantic.Retain), NullAllowed]
NSView AccessoryView { get; set; }
[Export ("layout")]
void Layout ();
[Export ("runModal")]
nint RunModal ();
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use BeginSheetModalForWindow (NSWindow sheetWindow, Action<nint> handler) instead.")]
[Export ("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:")]
void BeginSheet ([NullAllowed] NSWindow window, [NullAllowed] NSObject modalDelegate, [NullAllowed] Selector didEndSelector, IntPtr contextInfo);
#if XAMCORE_2_0 // This conflicts with a BeginSheet override in src/AppKit/NSAlert.cs and requires a cast if you pass in delegate {}.
[Mac (10,9)]
[Export ("beginSheetModalForWindow:completionHandler:")]
[Async]
void BeginSheet ([NullAllowed]NSWindow Window, [NullAllowed] Action<NSModalResponse> handler);
#endif
[Export ("window")]
NSPanel Window { get; }
}
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface NSAlertDelegate {
[Export ("alertShowHelp:"), DelegateName ("NSAlertPredicate"), DefaultValue (false)]
bool ShowHelp (NSAlert alert);
}
interface NSApplicationDidFinishLaunchingEventArgs {
[Export ("NSApplicationLaunchIsDefaultLaunchKey")]
bool IsLaunchDefault { get; }
[ProbePresence, Export ("NSApplicationLaunchUserNotificationKey")]
bool IsLaunchFromUserNotification { get; }
}
[Mac (10,9)]
[BaseType (typeof (NSObject))]
interface NSAppearance : NSSecureCoding {
[DesignatedInitializer]
[Export ("initWithAppearanceNamed:bundle:")]
IntPtr Constructor (string name, [NullAllowed] NSBundle bundle);
[Mac (10,9)]
[Export ("name")]
string Name { get; }
[Mac (10,10)]
[Export ("allowsVibrancy")]
bool AllowsVibrancy { get; }
[Static, Export ("currentAppearance")]
NSAppearance CurrentAppearance { get; [Bind("setCurrentAppearance:")] set; }
[Static, Export ("appearanceNamed:")]
NSAppearance GetAppearance (NSString name);
[Mac (10,9)]
[Field ("NSAppearanceNameAqua")]
NSString NameAqua { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("NSAppearanceNameDarkAqua")]
NSString NameDarkAqua { get; }
[Availability (Introduced = Platform.Mac_10_9, Deprecated = Platform.Mac_10_10)]
[Field ("NSAppearanceNameLightContent")]
NSString NameLightContent { get; }
[Mac (10,10)]
[Field ("NSAppearanceNameVibrantDark")]
NSString NameVibrantDark { get; }
[Mac (10,10)]
[Field ("NSAppearanceNameVibrantLight")]
NSString NameVibrantLight { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("NSAppearanceNameAccessibilityHighContrastAqua")]
NSString NameAccessibilityHighContrastAqua { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("NSAppearanceNameAccessibilityHighContrastDarkAqua")]
NSString NameAccessibilityHighContrastDarkAqua { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("NSAppearanceNameAccessibilityHighContrastVibrantLight")]
NSString NameAccessibilityHighContrastVibrantLight { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("NSAppearanceNameAccessibilityHighContrastVibrantDark")]
NSString NameAccessibilityHighContrastVibrantDark { get; }
[Mac (10,14, onlyOn64: true)]
[Export ("bestMatchFromAppearancesWithNames:")]
[return: NullAllowed]
string FindBestMatch (string[] appearances);
}
interface INSAppearanceCustomization {}
[Mac (10,9)]
[Protocol, Model]
[BaseType (typeof (NSObject))]
interface NSAppearanceCustomization {
[Mac (10,9)]
[NullAllowed]
[Export ("appearance", ArgumentSemantic.Strong)]
NSAppearance Appearance { get; set; }
[Mac (10,9)]
[Export ("effectiveAppearance", ArgumentSemantic.Strong)]
NSAppearance EffectiveAppearance { get; }
}
[BaseType (typeof (NSResponder), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSApplicationDelegate) })]
[DisableDefaultCtor] // An uncaught exception was raised: Creating more than one Application
interface NSApplication : NSAccessibilityElementProtocol, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibility, NSAppearanceCustomization {
[Export ("sharedApplication"), Static, ThreadSafe]
NSApplication SharedApplication { get; }
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap ("WeakDelegate")]
[Protocolize]
NSApplicationDelegate Delegate { get; set; }
[Export ("context")]
[Availability (Deprecated = Platform.Mac_10_12, Message = "This method always returns null. If you need access to the current drawing context, use NSGraphicsContext.CurrentContext inside of a draw operation.")]
NSGraphicsContext Context { get; }
[Export ("hide:")]
void Hide (NSObject sender);
[Export ("unhide:")]
void Unhide (NSObject sender);
[Export ("unhideWithoutActivation")]
void UnhideWithoutActivation ();
[Export ("windowWithWindowNumber:")]
NSWindow WindowWithWindowNumber (nint windowNum);
[Export ("mainWindow")]
NSWindow MainWindow { get; }
[Export ("keyWindow")]
NSWindow KeyWindow { get; }
[Export ("isActive")]
bool Active { get; }
[Export ("isHidden")]
bool Hidden { get; }
[Export ("isRunning")]
bool Running { get; }
[Export ("deactivate")]
void Deactivate ();
[Export ("activateIgnoringOtherApps:")]
void ActivateIgnoringOtherApps (bool flag);
[Export ("hideOtherApplications:")]
void HideOtherApplications (NSObject sender);
[Export ("unhideAllApplications:")]
void UnhideAllApplications (NSObject sender);
[Export ("finishLaunching")]
void FinishLaunching ();
[Export ("run")]
void Run ();
[Export ("runModalForWindow:")]
nint RunModalForWindow (NSWindow theWindow);
[Export ("stop:")]
void Stop (NSObject sender);
[Export ("stopModal")]
void StopModal ();
[Export ("stopModalWithCode:")]
void StopModalWithCode (nint returnCode);
[Export ("abortModal"), ThreadSafe]
void AbortModal ();
[Export ("modalWindow")]
NSWindow ModalWindow { get; }
[Export ("beginModalSessionForWindow:")]
IntPtr BeginModalSession (NSWindow theWindow);
[Export ("runModalSession:")]
nint RunModalSession (IntPtr session);
[Export ("endModalSession:")]
void EndModalSession (IntPtr session);
[Export ("terminate:")]
void Terminate ([NullAllowed] NSObject sender);
[Export ("requestUserAttention:")]
nint RequestUserAttention (NSRequestUserAttentionType requestType);
[Export ("cancelUserAttentionRequest:")]
void CancelUserAttentionRequest (nint request);
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use NSWindow.BeginSheet instead.")]
[Export ("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:")]
void BeginSheet (NSWindow sheet, NSWindow docWindow, [NullAllowed] NSObject modalDelegate, [NullAllowed] Selector didEndSelector, IntPtr contextInfo);
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use NSWindow.EndSheet instead.")]
[Export ("endSheet:")]
void EndSheet (NSWindow sheet);
[Availability (Deprecated = Platform.Mac_10_9)]
[Export ("endSheet:returnCode:")]
void EndSheet (NSWindow sheet, nint returnCode);
[Export ("nextEventMatchingMask:untilDate:inMode:dequeue:"), Protected]
NSEvent NextEvent (NSEventMask mask, [NullAllowed] NSDate expiration, NSString runLoopMode, bool deqFlag);
#if !XAMCORE_4_0
[Obsolete ("Use the 'NextEvent (NSEventMask, NSDate, [NSRunLoopMode|NSString], bool)' overloads instead.")]
[Wrap ("NextEvent ((NSEventMask) (ulong) mask, expiration, (NSString) mode, deqFlag)", IsVirtual = true), Protected]
NSEvent NextEvent (nuint mask, NSDate expiration, string mode, bool deqFlag);
// NSEventMask must be casted to nuint to preserve the NSEventMask.Any special value on 64 bit systems. NSEventMask is not [Native].
[Obsolete ("Use the 'NextEvent (NSEventMask, NSDate, [NSRunLoopMode|NSString], bool)' overloads instead.")]
[Wrap ("NextEvent (mask, expiration, (NSString) mode, deqFlag)")]
NSEvent NextEvent (NSEventMask mask, NSDate expiration, string mode, bool deqFlag);
#endif
// NSEventMask must be casted to nuint to preserve the NSEventMask.Any special value on 64 bit systems. NSEventMask is not [Native].
[Wrap ("NextEvent (mask, expiration, runLoopMode.GetConstant (), deqFlag)")]
NSEvent NextEvent (NSEventMask mask, NSDate expiration, NSRunLoopMode runLoopMode, bool deqFlag);
[Export ("discardEventsMatchingMask:beforeEvent:"), Protected]
void DiscardEvents (nuint mask, NSEvent lastEvent);
[ThreadSafe]
[Export ("postEvent:atStart:")]
void PostEvent (NSEvent theEvent, bool atStart);
[Export ("currentEvent")]
NSEvent CurrentEvent { get; }
[Export ("sendEvent:")]
void SendEvent (NSEvent theEvent);
[Export ("preventWindowOrdering")]
void PreventWindowOrdering ();
[Export ("makeWindowsPerform:inOrder:")]
[Availability (Deprecated = Platform.Mac_10_12, Message = "Use EnumerateWindows instead.")]
NSWindow MakeWindowsPerform (Selector aSelector, bool inOrder);
#if !XAMCORE_4_0
[Obsolete ("Remove usage or use 'DangerousWindows' instead.")]
[EditorBrowsable (EditorBrowsableState.Never)]
[Wrap ("DangerousWindows", IsVirtual = true)]
NSWindow [] Windows { get; }
#endif
[Advice ("Use of DangerousWindows can prevent windows from leaving memory.")]
[Export ("windows")]
NSArray<NSWindow> DangerousWindows { get; }
[Export ("setWindowsNeedUpdate:")]
void SetWindowsNeedUpdate (bool needUpdate);
[Export ("updateWindows")]
void UpdateWindows ();
#if !XAMCORE_2_0
[Export ("setMainMenu:")]
[Obsolete ("Use 'MainMenu' property.")]
[Sealed]
void SetMainMenu (NSMenu aMenu);
#endif
[Export ("mainMenu", ArgumentSemantic.Retain)]
NSMenu MainMenu { get; set; }
[Export ("helpMenu", ArgumentSemantic.Retain)]
[NullAllowed]
NSMenu HelpMenu { get; set; }
[Export ("applicationIconImage", ArgumentSemantic.Retain)]
NSImage ApplicationIconImage { get; set; }
[Export ("activationPolicy"), Protected]
NSApplicationActivationPolicy GetActivationPolicy ();
[Export ("setActivationPolicy:"), Protected]
bool SetActivationPolicy (NSApplicationActivationPolicy activationPolicy);
[Export ("dockTile")]
NSDockTile DockTile { get; }
[Export ("sendAction:to:from:")]
bool SendAction (Selector theAction, [NullAllowed] NSObject theTarget, [NullAllowed] NSObject sender);
[Export ("targetForAction:")]
NSObject TargetForAction (Selector theAction);
[Export ("targetForAction:to:from:")]
NSObject TargetForAction (Selector theAction, [NullAllowed] NSObject theTarget, [NullAllowed] NSObject sender);
[Export ("tryToPerform:with:")]
bool TryToPerform (Selector anAction, [NullAllowed] NSObject target);
[Export ("validRequestorForSendType:returnType:")]
[return: NullAllowed]
NSObject ValidRequestor (string sendType, string returnType);
[Export ("reportException:")]
void ReportException (NSException theException);
[Static]
[Export ("detachDrawingThread:toTarget:withObject:")]
void DetachDrawingThread (Selector selector, NSObject target, NSObject argument);
[Export ("replyToApplicationShouldTerminate:")]
void ReplyToApplicationShouldTerminate (bool shouldTerminate);
[Export ("replyToOpenOrPrint:")]
void ReplyToOpenOrPrint (NSApplicationDelegateReply reply);
[Export ("orderFrontCharacterPalette:")]
void OrderFrontCharacterPalette (NSObject sender);
[Export ("presentationOptions")]
NSApplicationPresentationOptions PresentationOptions { get; set; }
[Export ("currentSystemPresentationOptions")]
NSApplicationPresentationOptions CurrentSystemPresentationOptions { get; }
[Export ("windowsMenu")]
NSMenu WindowsMenu { get; set; }
[Export ("arrangeInFront:")]
void ArrangeInFront (NSObject sender);
[Export ("removeWindowsItem:")]
void RemoveWindowsItem (NSWindow win);
[Export ("addWindowsItem:title:filename:")]
void AddWindowsItem (NSWindow win, string title, bool isFilename);
[Export ("changeWindowsItem:title:filename:")]
void ChangeWindowsItem (NSWindow win, string title, bool isFilename);
[Export ("updateWindowsItem:")]
void UpdateWindowsItem (NSWindow win);
[Export ("miniaturizeAll:")]
void MiniaturizeAll (NSObject sender);
[Export ("isFullKeyboardAccessEnabled")]
bool FullKeyboardAccessEnabled { get; }
[Export ("servicesProvider")]
NSObject ServicesProvider { get; set; }
[Export ("userInterfaceLayoutDirection")]
#if !XAMCORE_4_0
NSApplicationLayoutDirection UserInterfaceLayoutDirection { get; }
#else
NSUserInterfaceLayoutDirection UserInterfaceLayoutDirection { get; }
#endif
[Export ("servicesMenu")]
NSMenu ServicesMenu { get; set; }
// From NSColorPanel
[Export ("orderFrontColorPanel:")]
void OrderFrontColorPanel (NSObject sender);
[Export ("disableRelaunchOnLogin"), ThreadSafe]
void DisableRelaunchOnLogin ();
[Export ("enableRelaunchOnLogin"), ThreadSafe]
void EnableRelaunchOnLogin ();
[Export ("enabledRemoteNotificationTypes")]
NSRemoteNotificationType EnabledRemoteNotificationTypes ();
[Export ("registerForRemoteNotificationTypes:")]
void RegisterForRemoteNotificationTypes (NSRemoteNotificationType types);
[Export ("unregisterForRemoteNotifications")]
void UnregisterForRemoteNotifications ();
[Mac (10,14, onlyOn64: true)]
[Export ("registerForRemoteNotifications")]
void RegisterForRemoteNotifications ();
[Mac (10, 14, onlyOn64: true)]
[Export ("registeredForRemoteNotifications")]
bool IsRegisteredForRemoteNotifications { [Bind ("isRegisteredForRemoteNotifications")] get; }
[Notification, Field ("NSApplicationDidBecomeActiveNotification")]
NSString DidBecomeActiveNotification { get; }
[Notification, Field ("NSApplicationDidHideNotification")]
NSString DidHideNotification { get; }
[Notification (typeof (NSApplicationDidFinishLaunchingEventArgs)), Field ("NSApplicationDidFinishLaunchingNotification")]
NSString DidFinishLaunchingNotification { get; }
[Notification, Field ("NSApplicationDidResignActiveNotification")]
NSString DidResignActiveNotification { get; }
[Notification, Field ("NSApplicationDidUnhideNotification")]
NSString DidUnhideNotification { get; }
[Notification, Field ("NSApplicationDidUpdateNotification")]
NSString DidUpdateNotification { get; }
[Notification, Field ("NSApplicationWillBecomeActiveNotification")]
NSString WillBecomeActiveNotification { get; }
[Notification, Field ("NSApplicationWillHideNotification")]
NSString WillHideNotification { get; }
[Notification, Field ("NSApplicationWillFinishLaunchingNotification")]
NSString WillFinishLaunchingNotification { get; }
[Notification, Field ("NSApplicationWillResignActiveNotification")]
NSString WillResignActiveNotification { get; }
[Notification, Field ("NSApplicationWillUnhideNotification")]
NSString WillUnhideNotification { get; }
[Notification, Field ("NSApplicationWillUpdateNotification")]
NSString WillUpdateNotification { get; }
[Notification, Field ("NSApplicationWillTerminateNotification")]
NSString WillTerminateNotification { get; }
[Notification, Field ("NSApplicationDidChangeScreenParametersNotification")]
NSString DidChangeScreenParametersNotification { get; }
[Field ("NSApplicationLaunchIsDefaultLaunchKey")]
NSString LaunchIsDefaultLaunchKey { get; }
[Field ("NSApplicationLaunchRemoteNotificationKey")]
NSString LaunchRemoteNotificationKey { get; }
[Field ("NSApplicationLaunchUserNotificationKey")]
NSString LaunchUserNotificationKey { get; }
[Notification, Field ("NSApplicationDidFinishRestoringWindowsNotification")]
NSString DidFinishRestoringWindowsNotification { get; }
[Export ("occlusionState")]
[Mac (10,9)]
NSApplicationOcclusionState OcclusionState { get; }
// This comes from the NSWindowRestoration category (defined on NSApplication: '@interface NSApplication (NSWindowRestoration)')
// Also can't call it 'RestoreWindow', because that's already in use.
[Export ("restoreWindowWithIdentifier:state:completionHandler:")]
bool RestoreWindowWithIdentifier (string identifier, NSCoder state, NSWindowCompletionHandler onCompletion);
// This one comes from the NSRestorableStateExtension category ('@interface NSApplication (NSRestorableStateExtension)')
[Export ("extendStateRestoration")]
void ExtendStateRestoration ();
// This one comes from the NSRestorableStateExtension category ('@interface NSApplication (NSRestorableStateExtension)')
[Export ("completeStateRestoration")]
void CompleteStateRestoration ();
#if XAMCORE_4_0
[Export ("registerServicesMenuSendTypes:returnTypes:"), EventArgs ("NSApplicationRegister")]
void RegisterServicesMenu (string [] sendTypes, string [] returnTypes);
[Export ("orderFrontStandardAboutPanel:")]
void OrderFrontStandardAboutPanel (NSObject sender);
[Export ("orderFrontStandardAboutPanelWithOptions:")]
void OrderFrontStandardAboutPanelWithOptions (NSDictionary optionsDictionary);
#else
[Export ("registerServicesMenuSendTypes:returnTypes:"), EventArgs ("NSApplicationRegister")]
void RegisterServicesMenu2 (string [] sendTypes, string [] returnTypes);
[Export ("orderFrontStandardAboutPanel:"), EventArgs ("NSObject")]
void OrderFrontStandardAboutPanel2 (NSObject sender);
[Export ("orderFrontStandardAboutPanelWithOptions:"), EventArgs ("NSDictionary")]
void OrderFrontStandardAboutPanelWithOptions2 (NSDictionary optionsDictionary);
#endif
[Mac (10,12)]
[Export ("enumerateWindowsWithOptions:usingBlock:")]
void EnumerateWindows (NSWindowListOptions options, NSApplicationEnumerateWindowsHandler block);
}
[Static]
interface NSAboutPanelOption {
[Mac (10, 13)]
[Field ("NSAboutPanelOptionCredits")]
NSString Credits { get; }
[Mac (10, 13)]
[Field ("NSAboutPanelOptionApplicationName")]
NSString ApplicationName { get; }
[Mac (10, 13)]
[Field ("NSAboutPanelOptionApplicationIcon")]
NSString ApplicationIcon { get; }
[Mac (10, 13)]
[Field ("NSAboutPanelOptionVersion")]
NSString Version { get; }
[Mac (10, 13)]
[Field ("NSAboutPanelOptionApplicationVersion")]
NSString ApplicationVersion { get; }
}
delegate void NSApplicationEnumerateWindowsHandler (NSWindow window, ref bool stop);
// radar://42781537
//#if XAMCORE_4_0
// delegate void ContinueUserActivityRestorationHandler (NSUserActivityRestoring [] restorableObjects);
//#else
delegate void ContinueUserActivityRestorationHandler (NSObject [] restorableObjects);
//#endif
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface NSApplicationDelegate {
[Export ("applicationShouldTerminate:"), DelegateName ("NSApplicationTermination"), DefaultValue (NSApplicationTerminateReply.Now)]
NSApplicationTerminateReply ApplicationShouldTerminate (NSApplication sender);
[Export ("application:openFile:"), DelegateName ("NSApplicationFile"), DefaultValue (false)]
bool OpenFile (NSApplication sender, string filename);
[Export ("application:openFiles:"), EventArgs ("NSApplicationFiles")]
void OpenFiles (NSApplication sender, string [] filenames);
[Export ("application:openTempFile:"), DelegateName ("NSApplicationFile"), DefaultValue (false)]
bool OpenTempFile (NSApplication sender, string filename);
[Export ("applicationShouldOpenUntitledFile:"), DelegateName ("NSApplicationPredicate"), DefaultValue (false)]
bool ApplicationShouldOpenUntitledFile (NSApplication sender);
[Export ("applicationOpenUntitledFile:"), DelegateName ("NSApplicationPredicate"), DefaultValue (false)]
bool ApplicationOpenUntitledFile (NSApplication sender);
[Export ("application:openFileWithoutUI:"), DelegateName ("NSApplicationFileCommand"), DefaultValue (false)]
bool OpenFileWithoutUI (NSObject sender, string filename);
[Export ("application:printFile:"), DelegateName ("NSApplicationFile"), DefaultValue (false)]
bool PrintFile (NSApplication sender, string filename);
[Export ("application:printFiles:withSettings:showPrintPanels:"), DelegateName ("NSApplicationPrint"), DefaultValue (NSApplicationPrintReply.Failure)]
NSApplicationPrintReply PrintFiles (NSApplication application, string [] fileNames, NSDictionary printSettings, bool showPrintPanels);
[Export ("applicationShouldTerminateAfterLastWindowClosed:"), DelegateName ("NSApplicationPredicate"), DefaultValue (false)]
bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender);
[Export ("applicationShouldHandleReopen:hasVisibleWindows:"), DelegateName ("NSApplicationReopen"), DefaultValue (false)]
bool ApplicationShouldHandleReopen (NSApplication sender, bool hasVisibleWindows);
[Export ("applicationDockMenu:"), DelegateName ("NSApplicationMenu"), DefaultValue (null)]
NSMenu ApplicationDockMenu (NSApplication sender);
[Export ("application:willPresentError:"), DelegateName ("NSApplicationError"), DefaultValue (null)]
NSError WillPresentError (NSApplication application, NSError error);
[Export ("applicationWillFinishLaunching:"), EventArgs ("NSNotification")]
void WillFinishLaunching (NSNotification notification);
[Export ("applicationDidFinishLaunching:"), EventArgs ("NSNotification")]
void DidFinishLaunching (NSNotification notification);
[Export ("applicationWillHide:"), EventArgs ("NSNotification")]
void WillHide (NSNotification notification);
[Export ("applicationDidHide:"), EventArgs ("NSNotification")]
void DidHide (NSNotification notification);
[Export ("applicationWillUnhide:"), EventArgs ("NSNotification")]
void WillUnhide (NSNotification notification);
[Export ("applicationDidUnhide:"), EventArgs ("NSNotification")]
void DidUnhide (NSNotification notification);
[Export ("applicationWillBecomeActive:"), EventArgs ("NSNotification")]
void WillBecomeActive (NSNotification notification);
[Export ("applicationDidBecomeActive:"), EventArgs ("NSNotification")]
void DidBecomeActive (NSNotification notification);
[Export ("applicationWillResignActive:"), EventArgs ("NSNotification")]
void WillResignActive (NSNotification notification);
[Export ("applicationDidResignActive:"), EventArgs ("NSNotification")]
void DidResignActive (NSNotification notification);
[Export ("applicationWillUpdate:"), EventArgs ("NSNotification")]
void WillUpdate (NSNotification notification);
[Export ("applicationDidUpdate:"), EventArgs ("NSNotification")]
void DidUpdate (NSNotification notification);
[Export ("applicationWillTerminate:"), EventArgs ("NSNotification")]
void WillTerminate (NSNotification notification);
[Export ("applicationDidChangeScreenParameters:"), EventArgs ("NSNotification")]
void ScreenParametersChanged (NSNotification notification);
#if !XAMCORE_4_0 // Needs to move from delegate in next API break
[Obsolete ("Use the 'RegisterServicesMenu2' on NSApplication.")]
[Export ("registerServicesMenuSendTypes:returnTypes:"), EventArgs ("NSApplicationRegister")]
void RegisterServicesMenu (string [] sendTypes, string [] returnTypes);
[Obsolete ("Use the 'INSServicesMenuRequestor' protocol.")]
[Export ("writeSelectionToPasteboard:types:"), DelegateName ("NSApplicationSelection"), DefaultValue (false)]
bool WriteSelectionToPasteboard (NSPasteboard board, string [] types);
[Obsolete ("Use the 'INSServicesMenuRequestor' protocol.")]
[Export ("readSelectionFromPasteboard:"), DelegateName ("NSPasteboardPredicate"), DefaultValue (false)]
bool ReadSelectionFromPasteboard (NSPasteboard pboard);
[Obsolete ("Use the 'OrderFrontStandardAboutPanel2' on NSApplication.")]
[Export ("orderFrontStandardAboutPanel:"), EventArgs ("NSObject")]
void OrderFrontStandardAboutPanel (NSObject sender);
[Obsolete ("Use the 'OrderFrontStandardAboutPanelWithOptions2' on NSApplication.")]
[Export ("orderFrontStandardAboutPanelWithOptions:"), EventArgs ("NSDictionary")]
void OrderFrontStandardAboutPanelWithOptions (NSDictionary optionsDictionary);
#endif
[Export ("application:didRegisterForRemoteNotificationsWithDeviceToken:"), EventArgs ("NSData")]
void RegisteredForRemoteNotifications (NSApplication application, NSData deviceToken);
[Export ("application:didFailToRegisterForRemoteNotificationsWithError:"), EventArgs ("NSError", true)]
void FailedToRegisterForRemoteNotifications (NSApplication application, NSError error);
[Export ("application:didReceiveRemoteNotification:"), EventArgs ("NSDictionary")]
void ReceivedRemoteNotification (NSApplication application, NSDictionary userInfo);
[Export ("application:willEncodeRestorableState:"), EventArgs ("NSCoder")]
void WillEncodeRestorableState (NSApplication app, NSCoder encoder);
[Export ("application:didDecodeRestorableState:"), EventArgs ("NSCoder")]
void DecodedRestorableState (NSApplication app, NSCoder state);
#if XAMCORE_2_0
[Mac (10,10, onlyOn64 : true)]
[Export ("application:willContinueUserActivityWithType:"), DelegateName ("NSApplicationUserActivityType"), DefaultValue (false)]
bool WillContinueUserActivity (NSApplication application, string userActivityType);
[Mac (10,10, onlyOn64 : true)]
[Export ("application:continueUserActivity:restorationHandler:"), DelegateName ("NSApplicationContinueUserActivity"), DefaultValue (false)]
bool ContinueUserActivity (NSApplication application, NSUserActivity userActivity, ContinueUserActivityRestorationHandler restorationHandler);
#endif
[Mac (10,10, onlyOn64 : true)]
[Export ("application:didFailToContinueUserActivityWithType:error:"), EventArgs ("NSApplicationFailed"), DefaultValue (false)]
void FailedToContinueUserActivity (NSApplication application, string userActivityType, NSError error);
#if XAMCORE_2_0
[Mac (10,10, onlyOn64 : true)]
[Export ("application:didUpdateUserActivity:"), EventArgs ("NSApplicationUpdatedUserActivity"), DefaultValue (false)]
void UpdatedUserActivity (NSApplication application, NSUserActivity userActivity);
[Mac (10,12, onlyOn64 : true)]
[Export ("application:userDidAcceptCloudKitShareWithMetadata:"), EventArgs ("NSApplicationUserAcceptedCloudKitShare")]
void UserDidAcceptCloudKitShare (NSApplication application, CKShareMetadata metadata);
#endif
[Mac (10,13), EventArgs ("NSApplicationOpenUrls")]
[Export ("application:openURLs:")]
void OpenUrls (NSApplication application, NSUrl[] urls);
[Export ("application:delegateHandlesKey:"), DelegateName ("NSApplicationHandlesKey"), NoDefaultValue]
bool HandlesKey (NSApplication sender, string key);
}
[Protocol]
interface NSServicesMenuRequestor
{
[Export ("writeSelectionToPasteboard:types:")]
bool WriteSelectionToPasteboard (NSPasteboard pboard, string[] types);
[Export ("readSelectionFromPasteboard:")]
bool ReadSelectionFromPasteboard (NSPasteboard pboard);
}
[Mac (10, 12, 2)]
[Category]
[BaseType (typeof(NSApplication))]
interface NSApplication_NSTouchBarCustomization
{
[Export ("isAutomaticCustomizeTouchBarMenuItemEnabled")]
bool GetAutomaticCustomizeTouchBarMenuItemEnabled ();
[Export ("setAutomaticCustomizeTouchBarMenuItemEnabled:")]
void SetAutomaticCustomizeTouchBarMenuItemEnabled (bool enabled);
[Export ("toggleTouchBarCustomizationPalette:")]
void ToggleTouchBarCustomizationPalette ([NullAllowed] NSObject sender);
}
[BaseType (typeof (NSObjectController))]
interface NSArrayController {
[Export ("rearrangeObjects")]
void RearrangeObjects ();
[Export ("automaticRearrangementKeyPaths")]
NSObject [] AutomaticRearrangementKeyPaths ();
[Export ("didChangeArrangementCriteria")]
void DidChangeArrangementCriteria ();
[Export ("arrangeObjects:")]
NSObject [] ArrangeObjects (NSObject [] objects);
[Export ("arrangedObjects")]
NSObject [] ArrangedObjects ();
[Export ("addSelectionIndexes:")]
bool AddSelectionIndexes (NSIndexSet indexes);
[Export ("removeSelectionIndexes:")]
bool RemoveSelectionIndexes (NSIndexSet indexes);
[Export ("addSelectedObjects:")]
bool AddSelectedObjects (NSObject [] objects);
[Export ("removeSelectedObjects:")]
bool RemoveSelectedObjects (NSObject [] objects);
[Export ("add:")]
void Add (NSObject sender);
[Export ("remove:")]
void RemoveOp (NSObject sender);
[Export ("insert:")]
void Insert (NSObject sender);
[Export ("canInsert")]
bool CanInsert ();
[Export ("selectNext:")]
void SelectNext (NSObject sender);
[Export ("selectPrevious:")]
void SelectPrevious (NSObject sender);
[Export ("canSelectNext")]
bool CanSelectNext ();
[Export ("canSelectPrevious")]
bool CanSelectPrevious ();
[Export ("addObject:")]
void AddObject (NSObject aObject);
[Export ("addObjects:")]
void AddObjects (NSArray objects);
[Export ("insertObject:atArrangedObjectIndex:")]
void Insert (NSObject aObject, nint index);
[Export ("insertObjects:atArrangedObjectIndexes:")]
void Insert (NSObject [] objects, NSIndexSet indexes);
[Export ("removeObjectAtArrangedObjectIndex:")]
void RemoveAt (nint index);
[Export ("removeObjectsAtArrangedObjectIndexes:")]
void Remove (NSIndexSet indexes);
[Export ("removeObject:")]
void Remove (NSObject aObject);
[Export ("removeObjects:")]
void Remove (NSObject [] objects);
//Detected properties
[Export ("automaticallyRearrangesObjects")]
bool AutomaticallyRearrangesObjects { get; set; }
[Export ("sortDescriptors", ArgumentSemantic.Copy)]
NSObject [] SortDescriptors { get; set; }
[Export ("filterPredicate", ArgumentSemantic.Retain)]
[NullAllowed]
NSPredicate FilterPredicate { get; set; }
[Export ("clearsFilterPredicateOnInsertion")]
bool ClearsFilterPredicateOnInsertion { get; set; }
[Export ("avoidsEmptySelection")]
bool AvoidsEmptySelection { get; set; }
[Export ("preservesSelection")]
bool PreservesSelection { get; set; }
[Export ("selectsInsertedObjects")]
bool SelectsInsertedObjects { get; set; }
[Export ("alwaysUsesMultipleValuesMarker")]
bool AlwaysUsesMultipleValuesMarker { get; set; }
[Export ("selectionIndexes"), Protected]
NSIndexSet GetSelectionIndexes ();
[Export ("setSelectionIndexes:"), Protected]
bool SetSelectionIndexes (NSIndexSet indexes);
[Export ("selectionIndex"), Protected]
nuint GetSelectionIndex ();
[Export ("setSelectionIndex:"), Protected]
bool SetSelectionIndex (nuint index);
[Export ("selectedObjects"), Protected]
NSObject [] GetSelectedObjects ();
[Export ("setSelectedObjects:"), Protected]
bool SetSelectedObjects (NSObject [] objects);
}
[ThreadSafe]
[BaseType (typeof (NSObject))]
interface NSBezierPath : NSSecureCoding, NSCopying {
[Static]
[Export ("bezierPathWithRect:")]
NSBezierPath FromRect (CGRect rect);
[Static]
[Export ("bezierPathWithOvalInRect:")]
NSBezierPath FromOvalInRect (CGRect rect);
[Static]
[Export ("bezierPathWithRoundedRect:xRadius:yRadius:")]
NSBezierPath FromRoundedRect (CGRect rect, nfloat xRadius, nfloat yRadius);
[Static]
[Export ("fillRect:")]
void FillRect (CGRect rect);
[Static]
[Export ("strokeRect:")]
void StrokeRect (CGRect rect);
[Static]
[Export ("clipRect:")]
void ClipRect (CGRect rect);
[Static]
[Export ("strokeLineFromPoint:toPoint:")]
void StrokeLine (CGPoint point1, CGPoint point2);
//IntPtr is exposed because the packedGlyphs should be treated as a "black box"
[Static]
[Export ("drawPackedGlyphs:atPoint:")]
void DrawPackedGlyphsAtPoint (IntPtr packedGlyphs, CGPoint point);
[Export ("moveToPoint:")]
void MoveTo (CGPoint point);
[Export ("lineToPoint:")]
void LineTo (CGPoint point);
[Export ("curveToPoint:controlPoint1:controlPoint2:")]
void CurveTo (CGPoint endPoint, CGPoint controlPoint1, CGPoint controlPoint2);
[Export ("closePath")]
void ClosePath ();
[Export ("removeAllPoints")]
void RemoveAllPoints ();
[Export ("relativeMoveToPoint:")]
void RelativeMoveTo (CGPoint point);
[Export ("relativeLineToPoint:")]
void RelativeLineTo (CGPoint point);
[Export ("relativeCurveToPoint:controlPoint1:controlPoint2:")]
void RelativeCurveTo (CGPoint endPoint, CGPoint controlPoint1, CGPoint controlPoint2);
[Export ("getLineDash:count:phase:"), Internal]
void _GetLineDash (IntPtr pattern, out nint count, out nfloat phase);
[Export ("setLineDash:count:phase:"), Internal]
void _SetLineDash (IntPtr pattern, nint count, nfloat phase);
[Export ("stroke")]
void Stroke ();
[Export ("fill")]
void Fill ();
[Export ("addClip")]
void AddClip ();
[Export ("setClip")]
void SetClip ();
[Export ("bezierPathByFlatteningPath")]
NSBezierPath BezierPathByFlatteningPath ();
[Export ("bezierPathByReversingPath")]
NSBezierPath BezierPathByReversingPath ();
[Export ("transformUsingAffineTransform:")]
void TransformUsingAffineTransform (NSAffineTransform transform);
[Export ("isEmpty")]
bool IsEmpty { get; }
[Export ("currentPoint")]
CGPoint CurrentPoint { get; }
[Export ("controlPointBounds")]
CGRect ControlPointBounds { get; }
[Export ("bounds")]
CGRect Bounds { get; }
[Export ("elementCount")]
nint ElementCount { get; }
[Export ("elementAtIndex:associatedPoints:"), Internal]
NSBezierPathElement _ElementAt (nint index, IntPtr points);
[Export ("elementAtIndex:")]
NSBezierPathElement ElementAt (nint index);
[Export ("setAssociatedPoints:atIndex:"), Internal]
void _SetAssociatedPointsAtIndex (IntPtr points, nint index);
[Export ("appendBezierPath:")]
void AppendPath (NSBezierPath path);
[Export ("appendBezierPathWithRect:")]
void AppendPathWithRect (CGRect rect);
[Export ("appendBezierPathWithPoints:count:"), Internal]
void _AppendPathWithPoints (IntPtr points, nint count);
[Export ("appendBezierPathWithOvalInRect:")]
void AppendPathWithOvalInRect (CGRect rect);
[Export ("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:")]
void AppendPathWithArc (CGPoint center, nfloat radius, nfloat startAngle, nfloat endAngle, bool clockwise);
[Export ("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:")]
void AppendPathWithArc (CGPoint center, nfloat radius, nfloat startAngle, nfloat endAngle);
[Export ("appendBezierPathWithArcFromPoint:toPoint:radius:")]
void AppendPathWithArc (CGPoint point1, CGPoint point2, nfloat radius);
[Availability (Obsoleted = Platform.Mac_10_13, Message = "Use 'AppendPathWithCGGlyph (CGGlyph, NSFont)' instead.")]
[Export ("appendBezierPathWithGlyph:inFont:")]
void AppendPathWithGlyph (uint /* NSGlyph = unsigned int */ glyph, NSFont font);
[Export ("appendBezierPathWithGlyphs:count:inFont:"), Internal]
void _AppendPathWithGlyphs (IntPtr glyphs, nint count, NSFont font);
//IntPtr is exposed because the packedGlyphs should be treated as a "black box"
[Availability (Obsoleted = Platform.Mac_10_13, Message = "Use 'Append (uint[], NSFont)' instead.")]
[Export ("appendBezierPathWithPackedGlyphs:")]
void AppendPathWithPackedGlyphs (IntPtr packedGlyphs);
[Export ("appendBezierPathWithRoundedRect:xRadius:yRadius:")]
void AppendPathWithRoundedRect (CGRect rect, nfloat xRadius, nfloat yRadius);
[Export ("containsPoint:")]
bool Contains (CGPoint point);
//Detected properties
[Static]
[Export ("defaultMiterLimit")]
nfloat DefaultMiterLimit { get; set; }
[Static]
[Export ("defaultFlatness")]
nfloat DefaultFlatness { get; set; }
[Static]
[Export ("defaultWindingRule")]
NSWindingRule DefaultWindingRule { get; set; }
[Static]
[Export ("defaultLineCapStyle")]
NSLineCapStyle DefaultLineCapStyle { get; set; }
[Static]
[Export ("defaultLineJoinStyle")]
NSLineJoinStyle DefaultLineJoinStyle { get; set; }
[Static]
[Export ("defaultLineWidth")]
nfloat DefaultLineWidth { get; set; }
[Export ("lineWidth")]
nfloat LineWidth { get; set; }
[Export ("lineCapStyle")]
NSLineCapStyle LineCapStyle { get; set; }
[Export ("lineJoinStyle")]
NSLineJoinStyle LineJoinStyle { get; set; }
[Export ("windingRule")]
NSWindingRule WindingRule { get; set; }
[Export ("miterLimit")]
nfloat MiterLimit { get; set; }
[Export ("flatness")]
nfloat Flatness { get; set; }
[Mac (10,13)]
[Export ("appendBezierPathWithCGGlyph:inFont:")]
void AppendPathWithCGGlyph (CGGlyph glyph, NSFont font);
[Mac (10,13)]
[Export ("appendBezierPathWithCGGlyphs:count:inFont:")]
[Internal]
void _AppendBezierPathWithCGGlyphs (IntPtr glyphs, nint count, NSFont font);
[Wrap ("AppendPath (path)")]
void Append (NSBezierPath path);
}
[BaseType (typeof (NSImageRep))]
[DisableDefaultCtor] // An uncaught exception was raised: -[NSBitmapImageRep init]: unrecognized selector sent to instance 0x686880
partial interface NSBitmapImageRep : NSSecureCoding {
[Export ("initWithFocusedViewRect:")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSView.CacheDisplay()' instead.")]
IntPtr Constructor (CGRect rect);
[Export ("initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:")]
IntPtr Constructor (IntPtr planes, nint width, nint height, nint bps, nint spp, bool alpha, bool isPlanar,
string colorSpaceName, nint rBytes, nint pBits);
[Export ("initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:")]
IntPtr Constructor (IntPtr planes, nint width, nint height, nint bps, nint spp, bool alpha, bool isPlanar, string colorSpaceName,
NSBitmapFormat bitmapFormat, nint rBytes, nint pBits);
[Export ("initWithCGImage:")]
IntPtr Constructor (CGImage cgImage);
[Export ("initWithCIImage:")]
IntPtr Constructor (CIImage ciImage);
[Static]
[Export ("imageRepsWithData:")]
NSImageRep [] ImageRepsWithData (NSData data);
[Static]
[Export ("imageRepWithData:")]
NSImageRep ImageRepFromData (NSData data);
[Export ("initWithData:")]
IntPtr Constructor (NSData data);
[Export ("bitmapData")]
IntPtr BitmapData { get; }
[Export ("getBitmapDataPlanes:")]
void GetBitmapDataPlanes (IntPtr data);
[Export ("isPlanar")]
bool IsPlanar { get; }
[Export ("samplesPerPixel")]
nint SamplesPerPixel { get; }
[Export ("bitsPerPixel")]
nint BitsPerPixel { get; }
[Export ("bytesPerRow")]
nint BytesPerRow { get; }
[Export ("bytesPerPlane")]
nint BytesPerPlane { get; }
[Export ("numberOfPlanes")]
nint Planes { get; }
[Export ("bitmapFormat")]
NSBitmapFormat BitmapFormat { get; }
[Export ("getCompression:factor:")]
void GetCompressionFactor (out NSTiffCompression compression, out float /* float, not CGFloat */ factor);
[Export ("setCompression:factor:")]
void SetCompressionFactor (NSTiffCompression compression, float /* float, not CGFloat */ factor);
[Export ("TIFFRepresentation")]
NSData TiffRepresentation { get; }
[Export ("TIFFRepresentationUsingCompression:factor:")]
NSData TiffRepresentationUsingCompressionFactor (NSTiffCompression comp, float /* float, not CGFloat */ factor);
[Static]
[Export ("TIFFRepresentationOfImageRepsInArray:")]
NSData ImagesAsTiff (NSImageRep [] imageReps);
[Static]
[Export ("TIFFRepresentationOfImageRepsInArray:usingCompression:factor:")]
NSData ImagesAsTiff (NSImageRep [] imageReps, NSTiffCompression comp, float /* float, not CGFloat */ factor);
// FIXME: binding
//[Static]
//[Export ("getTIFFCompressionTypes:count:")]
//void GetTiffCompressionTypes (const NSTIFFCompression list, int numTypes);
[Static]
[Export ("localizedNameForTIFFCompressionType:")]
string LocalizedNameForTiffCompressionType (NSTiffCompression compression);
[Export ("canBeCompressedUsing:")]
bool CanBeCompressedUsing (NSTiffCompression compression);
[Export ("colorizeByMappingGray:toColor:blackMapping:whiteMapping:")]
void Colorize (nfloat midPoint, NSColor midPointColor, NSColor shadowColor, NSColor lightColor);
[Export ("incrementalLoadFromData:complete:")]
nint IncrementalLoad (NSData data, bool complete);
[Export ("setColor:atX:y:")]
void SetColorAt (NSColor color, nint x, nint y);
[Export ("colorAtX:y:")]
NSColor ColorAt (nint x, nint y);
// FIXME: BINDING
//[Export ("getPixel:atX:y:")]
//void GetPixel (int[] p, int x, int y);
//[Export ("setPixel:atX:y:")]
//void SetPixel (int[] p, int x, int y);
[Export ("CGImage")]
CGImage CGImage { get; }
[Export ("colorSpace")]
NSColorSpace ColorSpace { get; }
[Export ("bitmapImageRepByConvertingToColorSpace:renderingIntent:")]
NSBitmapImageRep ConvertingToColorSpace (NSColorSpace targetSpace, NSColorRenderingIntent renderingIntent);
[Export ("bitmapImageRepByRetaggingWithColorSpace:")]
NSBitmapImageRep RetaggedWithColorSpace (NSColorSpace newSpace);
[Export ("representationUsingType:properties:")]
NSData RepresentationUsingTypeProperties(NSBitmapImageFileType storageType, [NullAllowed] NSDictionary properties);
[Field ("NSImageCompressionMethod")]
NSString CompressionMethod { get; }
[Field ("NSImageCompressionFactor")]
NSString CompressionFactor { get; }
[Field ("NSImageDitherTransparency")]
NSString DitherTransparency { get; }
[Field ("NSImageRGBColorTable")]
NSString RGBColorTable { get; }
[Field ("NSImageInterlaced")]
NSString Interlaced { get; }
[Field ("NSImageColorSyncProfileData")]
NSString ColorSyncProfileData { get; }
[Field ("NSImageFrameCount")]
NSString FrameCount { get; }
[Field ("NSImageCurrentFrame")]
NSString CurrentFrame { get; }
[Field ("NSImageCurrentFrameDuration")]
NSString CurrentFrameDuration { get; }
[Field ("NSImageLoopCount")]
NSString LoopCount { get; }
[Field ("NSImageGamma")]
NSString Gamma { get; }
[Field ("NSImageProgressive")]
NSString Progressive { get; }
[Field ("NSImageEXIFData")]
NSString EXIFData { get; }
[Field ("NSImageFallbackBackgroundColor")]
NSString FallbackBackgroundColor { get; }
}
[BaseType (typeof (NSView))]
interface NSBox {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frameRect);
[Export ("borderType")]
[Advice ("Only used with deprecated NSBoxOldStyle. Use 'Transparent' property for NSNoBorder.")]
NSBorderType BorderType { get; set; }
[Export ("titlePosition")]
NSTitlePosition TitlePosition { get; set; }
[Export ("boxType")]
NSBoxType BoxType { get; set; }
[Export ("title")]
string Title { get; set; }
[Export ("titleFont", ArgumentSemantic.Retain)]
NSFont TitleFont { get; set; }
[Export ("borderRect")]
CGRect BorderRect { get; }
[Export ("titleRect")]
CGRect TitleRect { get; }
[Export ("titleCell")]
NSObject TitleCell { get; }
[Export ("sizeToFit")]
void SizeToFit ();
[Export ("contentViewMargins")]
CGSize ContentViewMargins { get; set; }
[Export ("setFrameFromContentFrame:")]
void SetFrameFromContentFrame (CGRect contentFrame);
[Export ("contentView")]
NSObject ContentView { get; set; }
[Export ("transparent")]
bool Transparent { [Bind ("isTransparent")] get; set; }
[Export ("setTitleWithMnemonic:")]
[Availability (Deprecated = Platform.Mac_10_8, Message = "For compatability, this method still sets the Title with the ampersand stripped from it.")]
void SetTitleWithMnemonic (string stringWithMnemonic);
[Export ("borderWidth")]
nfloat BorderWidth { get; set; }
[Export ("cornerRadius")]
nfloat CornerRadius { get; set; }
[ThreadSafe] // Bug 22909 - This can be called from a non-ui thread <= OS X 10.9
[Export ("borderColor", ArgumentSemantic.Copy)]
NSColor BorderColor { get; set; }
[ThreadSafe] // Bug 22909 - This can be called from a non-ui thread <= OS X 10.9
[Export ("fillColor", ArgumentSemantic.Copy)]
NSColor FillColor { get; set; }
}
[BaseType (typeof (NSControl))]
// , Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSBrowserDelegate)})]
partial interface NSBrowser {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frameRect);
[Export ("loadColumnZero")]
void LoadColumnZero ();
[Export ("isLoaded")]
bool Loaded { get; }
[Export ("autohidesScroller")]
bool AutohidesScroller { get; set; }
[Export ("itemAtIndexPath:")]
NSObject ItemAtIndexPath (NSIndexPath indexPath);
[Export ("itemAtRow:inColumn:")]
NSObject GetItem (nint row, nint column);
[Export ("indexPathForColumn:")]
NSIndexPath IndexPathForColumn (nint column);
[Export ("isLeafItem:")]
bool IsLeafItem (NSObject item);
[Export ("reloadDataForRowIndexes:inColumn:")]
void ReloadData (NSIndexSet rowIndexes, nint column);
[Export ("parentForItemsInColumn:")]
NSObject ParentForItems (nint column);
[Export ("scrollRowToVisible:inColumn:")]
void ScrollRowToVisible (nint row, nint column);
[Export ("setTitle:ofColumn:")]
void SetTitle (string aString, nint column);
[Export ("titleOfColumn:")]
string ColumnTitle (nint column);
[Export ("pathToColumn:")]
string ColumnPath (nint column);
[Export ("clickedColumn")]
nint ClickedColumn ();
[Export ("clickedRow")]
nint ClickedRow ();
[Export ("selectedColumn")]
nint SelectedColumn ();
[Export ("selectedCell")]
NSObject SelectedCell ();
[Export ("selectedCellInColumn:")]
NSObject SelectedCellInColumn (nint column);
[Export ("selectedCells")]
NSCell [] SelectedCells ();
[Export ("selectRow:inColumn:")]
void Select (nint row, nint column);
[Export ("selectedRowInColumn:")]
nint SelectedRow (nint column);
[Export ("selectionIndexPath", ArgumentSemantic.Copy)]
[NullAllowed]
NSIndexPath SelectionIndexPath { get; set; }
[Export ("selectionIndexPaths", ArgumentSemantic.Copy)]
NSIndexPath [] SelectionIndexPaths { get; set; }
[Export ("selectRowIndexes:inColumn:")]
void SelectRowIndexes (NSIndexSet indexes, nint column);
[Export ("selectedRowIndexesInColumn:")]
NSIndexSet SelectedRowIndexes (nint column);
[Export ("reloadColumn:")]
void ReloadColumn (nint column);
[Export ("validateVisibleColumns")]
void ValidateVisibleColumns ();
[Export ("scrollColumnsRightBy:")]
void ScrollColumnsRightBy (nint shiftAmount);
[Export ("scrollColumnsLeftBy:")]
void ScrollColumnsLeftBy (nint shiftAmount);
[Export ("scrollColumnToVisible:")]
void ScrollColumnToVisible (nint column);
[Export ("addColumn")]
void AddColumn ();
[Export ("numberOfVisibleColumns")]
nint VisibleColumns { get; }
[Export ("firstVisibleColumn")]
nint FirstVisibleColumn { get; }
[Export ("lastVisibleColumn")]
nint LastVisibleColumn { get; }
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead.")]
[Export ("columnOfMatrix:")]
nint ColumnOfMatrix (NSMatrix matrix);
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead.")]
[Export ("matrixInColumn:")]
NSMatrix MatrixInColumn (nint column);
[Export ("loadedCellAtRow:column:")]
NSCell LoadedCell (nint row, nint col);
[Export ("selectAll:")]
void SelectAll (NSObject sender);
[Export ("tile")]
void Tile ();
[Export ("doClick:")]
void DoClick (NSObject sender);
[Export ("doDoubleClick:")]
void DoDoubleClick (NSObject sender);
[Export ("sendAction")]
bool SendAction ();
[Export ("titleFrameOfColumn:")]
CGRect TitleFrameOfColumn (nint column);
[Export ("drawTitleOfColumn:inRect:")]
void DrawTitle (nint column, CGRect aRect);
[Export ("titleHeight")]
nfloat TitleHeight { get; }
[Export ("frameOfColumn:")]
CGRect ColumnFrame (nint column);
[Export ("frameOfInsideOfColumn:")]
CGRect ColumnInsideFrame (nint column);
[Export ("frameOfRow:inColumn:")]
CGRect RowFrame (nint row, nint column);
[Export ("getRow:column:forPoint:")]
bool GetRowColumnForPoint (out nint row, out nint column, CGPoint point);
[Export ("columnWidthForColumnContentWidth:")]
nfloat ColumnWidthForColumnContentWidth (nfloat columnContentWidth);
[Export ("columnContentWidthForColumnWidth:")]
nfloat ColumnContentWidthForColumnWidth (nfloat columnWidth);
#if !XAMCORE_2_0
[Export ("setColumnResizingType:")]
[Obsolete ("Use the 'ColumnResizingType' property instead.")]
[Sealed]
void SetColumnResizingType (NSBrowserColumnResizingType columnResizingType);
#endif
[Export ("columnResizingType")]
NSBrowserColumnResizingType ColumnResizingType { get; set; }
[Export ("prefersAllColumnUserResizing")]
bool PrefersAllColumnUserResizing { get; set; }
[Export ("setWidth:ofColumn:")]
void SetColumnWidth (nfloat columnWidth, nint columnIndex);
[Export ("widthOfColumn:")]
nfloat GetColumnWidth (nint column);
[Export ("rowHeight")]
nfloat RowHeight { get; set; }
[Export ("noteHeightOfRowsWithIndexesChanged:inColumn:")]
void NoteHeightOfRows (NSIndexSet indexSet, nint columnIndex);
[Export ("defaultColumnWidth")]
nfloat DefaultColumnWidth { get; set; }
[Export ("columnsAutosaveName")]
string ColumnsAutosaveName { get; set; }
[Static]
[Export ("removeSavedColumnsWithAutosaveName:")]
void RemoveSavedColumnsWithAutosaveName (string name);
[Export ("canDragRowsWithIndexes:inColumn:withEvent:")]
bool CanDragRowsWithIndexes (NSIndexSet rowIndexes, nint column, NSEvent theEvent);
// FIXME: binding, NSPointPointer
//[Export ("draggingImageForRowsWithIndexes:inColumn:withEvent:offset:")]
//NSImage DraggingImageForRowsWithIndexes (NSIndexSet rowIndexes, int column, NSEvent theEvent, NSPointPointer dragImageOffset);
[Export ("setDraggingSourceOperationMask:forLocal:")]
void SetDraggingSourceOperationMask (NSDragOperation mask, bool isLocal);
[Export ("allowsTypeSelect")]
bool AllowsTypeSelect { get; set; }
[Export ("backgroundColor", ArgumentSemantic.Retain)]
NSColor BackgroundColor { get; set; }
[Export ("editItemAtIndexPath:withEvent:select:")]
void EditItemAtIndexPath (NSIndexPath indexPath, NSEvent theEvent, bool select);
//Detected properties
[Export ("doubleAction")]
Selector DoubleAction { get; set; }
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead.")]
[Export ("matrixClass")]
Class MatrixClass { get; [Bind ("setMatrixClass:")] set; }
[Static]
[Export ("cellClass")]
Class CellClass { get; }
[Export ("setCellClass:")]
void SetCellClass (Class factoryId);
[Export ("cellPrototype", ArgumentSemantic.Retain)]
NSObject CellPrototype { get; set; }
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap ("WeakDelegate")]
[Protocolize]
NSBrowserDelegate Delegate { get; set; }
[Export ("reusesColumns")]
bool ReusesColumns { get; set; }
[Export ("hasHorizontalScroller")]
bool HasHorizontalScroller { get; set; }
[Export ("separatesColumns")]
bool SeparatesColumns { get; set; }
[Export ("titled")]
bool Titled { [Bind ("isTitled")]get; set; }
[Export ("minColumnWidth")]
nfloat MinColumnWidth { get; set; }
[Export ("maxVisibleColumns")]
nint MaxVisibleColumns { get; set; }
[Export ("allowsMultipleSelection")]
bool AllowsMultipleSelection { get; set; }
[Export ("allowsBranchSelection")]
bool AllowsBranchSelection { get; set; }
[Export ("allowsEmptySelection")]
bool AllowsEmptySelection { get; set; }
[Export ("takesTitleFromPreviousColumn")]
bool TakesTitleFromPreviousColumn { get; set; }
[Export ("sendsActionOnArrowKeys")]
bool SendsActionOnArrowKeys { get; set; }
[Export ("pathSeparator")]
string PathSeparator { get; set; }
[Export ("path"), Protected]
string GetPath ();
[Export ("setPath:"), Protected]
bool SetPath (string path);
[Export ("lastColumn")]
nint LastColumn { get; set; }
}
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface NSBrowserDelegate {
[Export ("browser:numberOfRowsInColumn:"), EventArgs ("NSBrowserColumn")]
nint RowsInColumn (NSBrowser sender, nint column);
[Export ("browser:createRowsForColumn:inMatrix:")]
void CreateRowsForColumn (NSBrowser sender, nint column, NSMatrix matrix);
[Export ("browser:numberOfChildrenOfItem:")]
nint CountChildren (NSBrowser browser, NSObject item);
[Export ("browser:child:ofItem:")]
NSObject GetChild (NSBrowser browser, nint index, NSObject item);
[Export ("browser:isLeafItem:")]
bool IsLeafItem (NSBrowser browser, NSObject item);
[Export ("browser:objectValueForItem:")]
NSObject ObjectValueForItem (NSBrowser browser, NSObject item);
[Export ("browser:heightOfRow:inColumn:")]
nfloat RowHeight (NSBrowser browser, nint row, nint columnIndex);
[Export ("rootItemForBrowser:")]
NSObject RootItemForBrowser (NSBrowser browser);
[Export ("browser:setObjectValue:forItem:")]
void SetObjectValue (NSBrowser browser, NSObject obj, NSObject item);
[Export ("browser:shouldEditItem:")]
bool ShouldEditItem (NSBrowser browser, NSObject item);
[Export ("browser:willDisplayCell:atRow:column:")]
void WillDisplayCell (NSBrowser sender, NSObject cell, nint row, nint column);
[Export ("browser:titleOfColumn:")]
string ColumnTitle (NSBrowser sender, nint column);
[Export ("browser:selectCellWithString:inColumn:")]
bool SelectCellWithString (NSBrowser sender, string title, nint column);
[Export ("browser:selectRow:inColumn:")]
bool SelectRowInColumn (NSBrowser sender, nint row, nint column);
[Export ("browser:isColumnValid:")]
bool IsColumnValid (NSBrowser sender, nint column);
[Export ("browserWillScroll:")]
void WillScroll (NSBrowser sender);
[Export ("browserDidScroll:")]
void DidScroll (NSBrowser sender);
[Export ("browser:shouldSizeColumn:forUserResize:toWidth:")]
nfloat ShouldSizeColumn (NSBrowser browser, nint columnIndex, bool userResize, nfloat suggestedWidth);
[Export ("browser:sizeToFitWidthOfColumn:")]
nfloat SizeToFitWidth (NSBrowser browser, nint columnIndex);
[Export ("browserColumnConfigurationDidChange:")]
void ColumnConfigurationDidChange (NSNotification notification);
[Export ("browser:shouldShowCellExpansionForRow:column:")]
bool ShouldShowCellExpansion (NSBrowser browser, nint row, nint column);
[Export ("browser:writeRowsWithIndexes:inColumn:toPasteboard:")]
bool WriteRowsWithIndexesToPasteboard (NSBrowser browser, NSIndexSet rowIndexes, nint column, NSPasteboard pasteboard);
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")]
[Export ("browser:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:inColumn:")]
string [] PromisedFilesDroppedAtDestination (NSBrowser browser, NSUrl dropDestination, NSIndexSet rowIndexes, nint column);
[Export ("browser:canDragRowsWithIndexes:inColumn:withEvent:")]
bool CanDragRowsWithIndexes (NSBrowser browser, NSIndexSet rowIndexes, nint column, NSEvent theEvent);
// FIXME: NSPOintPointer is a pointer to a CGPoint, so we need to support refs
//[Export ("browser:draggingImageForRowsWithIndexes:inColumn:withEvent:offset:")]
//NSImage DraggingImageForRowsWithIndexes (NSBrowser browser, NSIndexSet rowIndexes, int column, NSEvent theEvent, NSPointPointer dragImageOffset);
[Export ("browser:validateDrop:proposedRow:column:dropOperation:")]
#if !XAMCORE_2_0
NSDragOperation ValidateDrop (NSBrowser browser, [Protocolize (4)] NSDraggingInfo info, ref nint row, ref nint column, NSBrowserDropOperation dropOperation);
#else
NSDragOperation ValidateDrop (NSBrowser browser, [Protocolize (4)] NSDraggingInfo info, ref nint row, ref nint column, ref NSBrowserDropOperation dropOperation);
#endif
[Export ("browser:acceptDrop:atRow:column:dropOperation:")]
bool AcceptDrop (NSBrowser browser, [Protocolize (4)] NSDraggingInfo info, nint row, nint column, NSBrowserDropOperation dropOperation);
[return: NullAllowed]
[Export ("browser:typeSelectStringForRow:inColumn:")]
string TypeSelectString (NSBrowser browser, nint row, nint column);
[Export ("browser:shouldTypeSelectForEvent:withCurrentSearchString:")]
bool ShouldTypeSelectForEvent (NSBrowser browser, NSEvent theEvent, string currentSearchString);
[Export ("browser:nextTypeSelectMatchFromRow:toRow:inColumn:forString:")]
nint NextTypeSelectMatch (NSBrowser browser, nint startRow, nint endRow, nint column, string searchString);
[Export ("browser:previewViewControllerForLeafItem:")]
NSViewController PreviewViewControllerForLeafItem (NSBrowser browser, NSObject item);
[Export ("browser:headerViewControllerForItem:")]
NSViewController HeaderViewControllerForItem (NSBrowser browser, NSObject item);
[Export ("browser:didChangeLastColumn:toColumn:")]
void DidChangeLastColumn (NSBrowser browser, nint oldLastColumn, nint toColumn);
[Export ("browser:selectionIndexesForProposedSelection:inColumn:")]
NSIndexSet SelectionIndexesForProposedSelection (NSBrowser browser, NSIndexSet proposedSelectionIndexes, nint inColumn);
}
[BaseType (typeof (NSCell))]
interface NSBrowserCell {
[Mac (10,12)]
[Export ("initTextCell:")]
[DesignatedInitializer]
IntPtr Constructor (string str);
[Mac (10,12)]
[Export ("initImageCell:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] NSImage image);
[Static]
[Export ("branchImage")]
NSImage BranchImage { get; }
[Static]
[Export ("highlightedBranchImage")]
NSImage HighlightedBranchImage { get; }
[Export ("highlightColorInView:")]
NSColor HighlightColorInView (NSView controlView);
[Export ("reset")]
void Reset ();
[Export ("set")]
void Set ();
//Detected properties
[Export ("leaf")]
bool Leaf { [Bind ("isLeaf")]get; set; }
[Export ("loaded")]
bool Loaded { [Bind ("isLoaded")]get; set; }
[Export ("image", ArgumentSemantic.Retain)]
NSImage Image { get; set; }
[Export ("alternateImage", ArgumentSemantic.Retain)]
NSImage AlternateImage { get; set; }
}
[BaseType (typeof (NSActionCell))]
interface NSButtonCell {
[DesignatedInitializer]
[Export ("initTextCell:")]
IntPtr Constructor (string aString);
[DesignatedInitializer]
[Export ("initImageCell:")]
IntPtr Constructor (NSImage image);
[Export ("title")]
string Title { get; set; }
[Export ("alternateTitle")]
string AlternateTitle { get; set; }
[Export ("alternateImage", ArgumentSemantic.Retain)]
NSImage AlternateImage { get; set; }
[Export ("imagePosition")]
NSCellImagePosition ImagePosition { get; set; }
[Export ("imageScaling")]
NSImageScale ImageScale { get; set; }
[Export ("highlightsBy")]
nint HighlightsBy { get; set; }
[Export ("showsStateBy")]
nint ShowsStateBy { get; set; }
#if !XAMCORE_2_0
[Export ("setShowsStateBy:")]
[Obsolete ("Use the 'ShowsStateBy' property instead.")]
[Sealed]
void SetShowsStateBy (nint aType);
#endif
[Export ("setButtonType:")]
void SetButtonType (NSButtonType aType);
[Export ("isOpaque")]
bool IsOpaque { get; }
[Export ("setFont:")]
void SetFont (NSFont fontObj);
[Export ("transparent")]
bool Transparent { [Bind ("isTransparent")] get; set; }
[Export ("setPeriodicDelay:interval:")]
void SetPeriodicDelay (float /* float, not CGFloat */ delay, float /* float, not CGFloat */ interval);
[Export ("getPeriodicDelay:interval:")]
void GetPeriodicDelay (out float /* float, not CGFloat */ delay, out float /* float, not CGFloat */ interval);
[Export ("keyEquivalent")]
string KeyEquivalent { get; set; }
[Export ("keyEquivalentModifierMask")]
NSEventModifierMask KeyEquivalentModifierMask { get; set; }
[Export ("keyEquivalentFont", ArgumentSemantic.Retain)]
NSFont KeyEquivalentFont { get; set; }
[Export ("setKeyEquivalentFont:size:")]
void SetKeyEquivalentFont (string fontName, nfloat fontSize);
[Export ("performClick:")]
void PerformClick (NSObject sender);
[Export ("drawImage:withFrame:inView:")]
void DrawImage (NSImage image, CGRect frame, NSView controlView);
[Export ("drawTitle:withFrame:inView:")]
CGRect DrawTitle (NSAttributedString title, CGRect frame, NSView controlView);
[Export ("drawBezelWithFrame:inView:")]
void DrawBezelWithFrame (CGRect frame, NSView controlView);
[Availability (Deprecated = Platform.Mac_10_8, Message = "This method no longer does anything and should not be called.")]
[Export ("alternateMnemonicLocation")]
nint AlternateMnemonicLocation { get; set; }
[Export ("alternateMnemonic")]
[Availability (Deprecated = Platform.Mac_10_8, Message = "This method still will set Title with the ampersand stripped from the value, but does nothing else. Set the Title directly.")]
string AlternateMnemonic { get; [Bind ("setAlternateTitleWithMnemonic:")] set; }
[Export ("setGradientType:")]
[Availability (Deprecated = Platform.Mac_10_12, Message = "The GradientType property is unused, and setting it has no effect.")]
void SetGradientType (NSGradientType type);
[Export ("imageDimsWhenDisabled")]
bool ImageDimsWhenDisabled { get; set; }
[Export ("showsBorderOnlyWhileMouseInside")]
bool ShowsBorderOnlyWhileMouseInside { get; set; }
[Export ("mouseEntered:")]
void MouseEntered (NSEvent theEvent);
[Export ("mouseExited:")]
void MouseExited (NSEvent theEvent);
[Export ("backgroundColor")]
NSColor BackgroundColor { get; set; }
[Export ("attributedTitle")]
NSAttributedString AttributedTitle { get; set; }
[Export ("attributedAlternateTitle")]
NSAttributedString AttributedAlternateTitle { get; set; }
[Export ("bezelStyle")]
NSBezelStyle BezelStyle { get; set; }
[Export ("sound")]
NSSound Sound { get; set; }
}
[BaseType (typeof (NSControl))]
interface NSButton : NSAccessibilityButton, NSUserInterfaceCompression, NSUserInterfaceValidations {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frameRect);
[Mac (10,12)]
[Static]
[Internal]
[Export ("buttonWithTitle:image:target:action:")]
NSButton _CreateButton (string title, NSImage image, [NullAllowed] NSObject target, [NullAllowed] Selector action);
[Mac (10,12)]
[Static]
[Internal]
[Export ("buttonWithTitle:target:action:")]
NSButton _CreateButton (string title, [NullAllowed] NSObject target, [NullAllowed] Selector action);
[Mac (10,12)]
[Static]
[Internal]
[Export ("buttonWithImage:target:action:")]
NSButton _CreateButton (NSImage image, [NullAllowed] NSObject target, [NullAllowed] Selector action);
[Mac (10,12)]
[Static]
[Internal]
[Export ("checkboxWithTitle:target:action:")]
NSButton _CreateCheckbox (string title, [NullAllowed] NSObject target, [NullAllowed] Selector action);
[Mac (10,12)]
[Static]
[Internal]
[Export ("radioButtonWithTitle:target:action:")]
NSButton _CreateRadioButton (string title, [NullAllowed] NSObject target, [NullAllowed] Selector action);
[Export ("title")]
string Title { get; set; }
[Export ("alternateTitle")]
string AlternateTitle { get; set; }
[Export ("image", ArgumentSemantic.Retain), NullAllowed]
NSImage Image { get; set; }
[Export ("alternateImage", ArgumentSemantic.Retain), NullAllowed]
NSImage AlternateImage { get; set; }
[Export ("imagePosition")]
NSCellImagePosition ImagePosition { get; set; }
[Export ("setButtonType:")]
void SetButtonType (NSButtonType aType);
[Export ("state")]
NSCellStateValue State { get; set; }
[Export ("bordered")]
bool Bordered { [Bind ("isBordered")] get; set; }
[Export ("transparent")]
bool Transparent { [Bind ("isTransparent")] get; set; }
[Export ("setPeriodicDelay:interval:")]
void SetPeriodicDelay (float /* float, not CGFloat */ delay, /* float, not CGFloat */ float interval);
[Export ("getPeriodicDelay:interval:")]
void GetPeriodicDelay (ref float /* float, not CGFloat */ delay, ref float /* float, not CGFloat */ interval);
[Export ("keyEquivalent")]
string KeyEquivalent { get; set; }
[Export ("keyEquivalentModifierMask")]
NSEventModifierMask KeyEquivalentModifierMask { get; set; }
[Export ("highlight:")]
void Highlight (bool flag);
[Export ("performKeyEquivalent:")]
bool PerformKeyEquivalent (NSEvent key);
[Availability (Deprecated = Platform.Mac_10_8, Message = "On 10.8, this method still will set the Title with the ampersand stripped from stringWithAmpersand, but does nothing else. Set the Title directly.")]
[Export ("setTitleWithMnemonic:")]
void SetTitleWithMnemonic (string mnemonic);
[Export ("attributedTitle")]
NSAttributedString AttributedTitle { get; set; }
[Export ("attributedAlternateTitle")]
NSAttributedString AttributedAlternateTitle { get; set; }
[Export ("bezelStyle")]
NSBezelStyle BezelStyle { get; set; }
[Export ("allowsMixedState")]
bool AllowsMixedState { get; set;}
[Export ("setNextState")]
void SetNextState ();
[Export ("showsBorderOnlyWhileMouseInside")]
#if XAMCORE_2_0
bool ShowsBorderOnlyWhileMouseInside { get; set; }
#else
bool ShowsBorderOnlyWhileMouseInside ();
[Export ("setShowsBorderOnlyWhileMouseInside:")]
void SetShowsBorderOnlyWhileMouseInside (bool showsBorder);
#endif
[Export ("sound")]
NSSound Sound { get; set; }
[Mac (10,10,3)]
[Export ("springLoaded")]
bool IsSpringLoaded { [Bind ("isSpringLoaded")] get; set; }
[Mac (10,10,3)]
[Export ("maxAcceleratorLevel")]
nint MaxAcceleratorLevel { get; set; }
[Mac (10,12)]
[Export ("imageHugsTitle")]
bool ImageHugsTitle { get; set; }
[Export ("imageScaling")]
NSImageScale ImageScaling { get; set; }
[Mac (10, 12, 2)]
[NullAllowed, Export ("bezelColor", ArgumentSemantic.Copy)]
NSColor BezelColor { get; set; }
[Mac (10, 14, onlyOn64: true)]
[NullAllowed, Export ("contentTintColor", ArgumentSemantic.Copy)]
NSColor ContentTintColor { get; set; }
}
[BaseType (typeof (NSImageRep))]
[DisableDefaultCtor] // An uncaught exception was raised: -[NSCachedImageRep init]: unrecognized selector sent to instance 0x14890e0
[Availability (Deprecated = Platform.Mac_10_6)]
interface NSCachedImageRep {
[Availability (Deprecated = Platform.Mac_10_6)]
[Export ("initWithWindow:rect:")]
IntPtr Constructor (NSWindow win, CGRect rect);
[Availability (Deprecated = Platform.Mac_10_6)]
[Export ("initWithSize:depth:separate:alpha:")]
IntPtr Constructor (CGSize size, NSWindowDepth depth, bool separate, bool alpha);
[Availability (Deprecated = Platform.Mac_10_6)]
[Export ("window")]
NSWindow Window { get; }
[Availability (Deprecated = Platform.Mac_10_6)]
[Export ("rect")]
CGRect Rectangle { get; }
}
[DesignatedDefaultCtor]
[BaseType (typeof (NSObject))]
interface NSCell : NSUserInterfaceItemIdentification, NSCoding, NSCopying, NSAccessibilityElementProtocol, NSAccessibility, NSObjectAccessibilityExtensions {
[Static, Export ("prefersTrackingUntilMouseUp")]
bool PrefersTrackingUntilMouseUp { get; }
[DesignatedInitializer]
[Export ("initTextCell:")]
IntPtr Constructor (string aString);
[DesignatedInitializer]
[Export ("initImageCell:")]
IntPtr Constructor (NSImage image);
[Export ("controlView")]
NSView ControlView { get; set; }
[Export ("type")]
NSCellType CellType { get; set; }
[Export ("state")]
NSCellStateValue State { get; set; }
[Export ("target", ArgumentSemantic.Weak), NullAllowed]
NSObject Target { get; set; }
[Export ("action"), NullAllowed]
Selector Action { get; set; }
[Export ("tag")]
nint Tag { get; set; }
[Export ("title")]
string Title { get; set; }
[Export ("isOpaque")]
bool IsOpaque { get; }
[Export ("enabled")]
bool Enabled { [Bind ("isEnabled")] get; set; }
[Export ("sendActionOn:")]
nint SendActionOn (NSEventType mask);
[Export ("continuous")]
bool IsContinuous { [Bind ("isContinuous")] get; set; }
[Export ("editable")]
bool Editable { [Bind ("isEditable")] get; set; }
[Export ("selectable")]
bool Selectable { [Bind ("isSelectable")] get; set; }
[Export ("bordered")]
bool Bordered { [Bind ("isBordered")] get; set; }
[Export ("bezeled")]
bool Bezeled { [Bind ("isBezeled")] get; set; }
[Export ("scrollable")]
bool Scrollable { [Bind ("isScrollable")] get; set; }
[Export ("highlighted")]
bool Highlighted { [Bind ("isHighlighted")] get; set; }
[Export ("alignment")]
NSTextAlignment Alignment { get; set; }
[Export ("wraps")]
bool Wraps { get; set; }
[Export ("font", ArgumentSemantic.Retain)]
NSFont Font { get; set; }
[Export ("isEntryAcceptable:")]
bool IsEntryAcceptable (string aString);
[Export ("keyEquivalent")]
string KeyEquivalent { get; }
[Export ("formatter", ArgumentSemantic.Retain)]
NSFormatter Formatter { get; set; }
[Export ("objectValue", ArgumentSemantic.Copy), NullAllowed]
NSObject ObjectValue { get; set; }
[Export ("hasValidObjectValue")]
bool HasValidObjectValue { get; }
[Export ("stringValue")]
string StringValue { get; set; }
[Export ("compare:")]
NSComparisonResult Compare (NSObject otherCell);
[Export ("intValue")]
int IntValue { get; set; } /* int, not NSInteger */
[Export ("floatValue")]
float FloatValue { get; set; } /* float, not CGFloat */
[Export ("doubleValue")]
double DoubleValue { get; set; }
[Export ("takeIntValueFrom:")]
void TakeIntValueFrom (NSObject sender);
[Export ("takeFloatValueFrom:")]
void TakeFloatValueFrom (NSObject sender);
[Export ("takeDoubleValueFrom:")]
void TakeDoubleValueFrom (NSObject sender);
[Export ("takeStringValueFrom:")]
void TakeStringValueFrom (NSObject sender);
[Export ("takeObjectValueFrom:")]
void TakeObjectValueFrom (NSObject sender);
[Export ("image", ArgumentSemantic.Retain)]
NSImage Image { get; set; }
[Deprecated (PlatformName.MacOSX, 10, 14, message: "'ControlTint' property not honored on 10.14. For custom cells, use 'NSColor.ControlAccentColor'.")]
[Export ("controlTint")]
NSControlTint ControlTint { get; set; }
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Implement 'ViewDidChangeEffectiveAppearance' on NSView or observe 'NSApplication.EffectiveAppearance'.")]
[Notification, Field ("NSControlTintDidChangeNotification")]
NSString ControlTintChangedNotification { get; }
[Export ("controlSize")]
NSControlSize ControlSize { get; set; }
[Export ("representedObject", ArgumentSemantic.Retain)]
NSObject RepresentedObject { get; set; }
[Export ("cellAttribute:")]
nint CellAttribute (NSCellAttribute aParameter);
[Export ("setCellAttribute:to:")]
void SetCellAttribute (NSCellAttribute aParameter, nint value);
[Export ("imageRectForBounds:")]
CGRect ImageRectForBounds (CGRect theRect);
[Export ("titleRectForBounds:")]
CGRect TitleRectForBounds (CGRect theRect);
[Export ("drawingRectForBounds:")]
CGRect DrawingRectForBounds (CGRect theRect);
[Export ("cellSize")]
CGSize CellSize { get; }
[Export ("cellSizeForBounds:")]
CGSize CellSizeForBounds (CGRect bounds);
[Export ("highlightColorWithFrame:inView:")]
[return: NullAllowed]
NSColor HighlightColor (CGRect cellFrame, NSView controlView);
[Export ("calcDrawInfo:")]
void CalcDrawInfo (CGRect aRect);
[Export ("setUpFieldEditorAttributes:")]
NSText SetUpFieldEditorAttributes (NSText textObj);
[Export ("drawInteriorWithFrame:inView:")]
void DrawInteriorWithFrame (CGRect cellFrame, NSView inView);
[Export ("drawWithFrame:inView:")]
void DrawWithFrame (CGRect cellFrame, NSView inView);
[Export ("highlight:withFrame:inView:")]
void Highlight (bool highlight, CGRect withFrame, NSView inView);
[Export ("mouseDownFlags")]
nint MouseDownFlags { get; }
[Export ("getPeriodicDelay:interval:")]
void GetPeriodicDelay (ref float /* float, not CGFloat */ delay, ref float /* float, not CGFloat */ interval);
[Export ("startTrackingAt:inView:")]
bool StartTracking (CGPoint startPoint, NSView inView);
[Export ("continueTracking:at:inView:")]
bool ContinueTracking (CGPoint lastPoint, CGPoint currentPoint, NSView inView);
[Export ("stopTracking:at:inView:mouseIsUp:")]
void StopTracking (CGPoint lastPoint, CGPoint stopPoint, NSView inView, bool mouseIsUp);
[Export ("trackMouse:inRect:ofView:untilMouseUp:")]
bool TrackMouse (NSEvent theEvent, CGRect cellFrame, NSView controlView, bool untilMouseUp);
[Export ("editWithFrame:inView:editor:delegate:event:")]
void EditWithFrame (CGRect aRect, [NullAllowed] NSView inView, [NullAllowed] NSText editor, [NullAllowed] NSObject delegateObject, NSEvent theEvent);
[Export ("selectWithFrame:inView:editor:delegate:start:length:")]
void SelectWithFrame (CGRect aRect, [NullAllowed] NSView inView, [NullAllowed] NSText editor, [NullAllowed] NSObject delegateObject, nint selStart, nint selLength);
[Export ("endEditing:")]
void EndEditing ([NullAllowed] NSText textObj);
[Export ("resetCursorRect:inView:")]
void ResetCursorRect (CGRect cellFrame, NSView inView);
[Export ("menu", ArgumentSemantic.Retain)]
[NullAllowed]
NSMenu Menu { get; set; }
[Export ("menuForEvent:inRect:ofView:")]
NSMenu MenuForEvent (NSEvent theEvent, CGRect cellFrame, NSView view);
[Static]
[Export ("defaultMenu")]
[NullAllowed]
NSMenu DefaultMenu { get; }
[Export ("setSendsActionOnEndEditing:")]
void SetSendsActionOnEndEditing (bool flag);
[Export ("sendsActionOnEndEditing")]
bool SendsActionOnEndEditing ();
[Export ("baseWritingDirection")]
NSWritingDirection BaseWritingDirection { get; set; }
[Export ("lineBreakMode")]
NSLineBreakMode LineBreakMode { get; set; }
[Export ("allowsUndo")]
bool AllowsUndo { get; set; }
[Export ("integerValue")]
nint IntegerValue { get; set; }
[Export ("takeIntegerValueFrom:")]
void TakeIntegerValueFrom (NSObject sender);
[Export ("truncatesLastVisibleLine")]
bool TruncatesLastVisibleLine { get; set; }
[Export ("userInterfaceLayoutDirection")]
NSUserInterfaceLayoutDirection UserInterfaceLayoutDirection { get; set; }
[Export ("fieldEditorForView:")]
NSTextView FieldEditorForView (NSView aControlView);
[Export ("usesSingleLineMode")]
bool UsesSingleLineMode { get; set; }
// NSCell(NSCellAttributedStringMethods)
[Export ("refusesFirstResponder")]
bool RefusesFirstResponder ();
[Export ("acceptsFirstResponder")]
bool AcceptsFirstResponder ();
[Export ("showsFirstResponder")]
bool ShowsFirstResponder { get; set; }
[Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonic methods have typically not been used.")]
[Export ("mnemonicLocation")]
nint MnemonicLocation { get; set; }
[Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonic methods have typically not been used.")]
[Export ("mnemonic")]
string Mnemonic { get; }
[Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonic methods have typically not been used.")]
[Export ("setTitleWithMnemonic:")]
void SetTitleWithMnemonic (string stringWithAmpersand);
[Export ("performClick:")]
void PerformClick (NSObject sender);
[Export ("focusRingType")]
NSFocusRingType FocusRingType { get; set; }
[Static, Export ("defaultFocusRingType")]
NSFocusRingType DefaultFocusRingType { get; }
[Export ("wantsNotificationForMarkedText")]
bool WantsNotificationForMarkedText { get; [NotImplemented] set; }
// NSCell(NSCellAttributedStringMethods)
[Export ("attributedStringValue")]
NSAttributedString AttributedStringValue { get; set; }
[Export ("allowsEditingTextAttributes")]
bool AllowsEditingTextAttributes { get; set; }
[Export ("importsGraphics")]
bool ImportsGraphics { get; set; }
// NSCell(NSCellMixedState) {
[Export ("allowsMixedState")]
bool AllowsMixedState { get; set; }
[Export ("nextState")]
nint NextState { get; }
[Export ("setNextState")]
void SetNextState ();
[Export ("hitTestForEvent:inRect:ofView:")]
NSCellHit HitTest (NSEvent forEvent, CGRect inRect, NSView ofView);
// NSCell(NSCellExpansion)
[Export ("expansionFrameWithFrame:inView:")]
CGRect ExpansionFrame (CGRect withFrame, NSView inView);
[Export ("drawWithExpansionFrame:inView:")]
void DrawWithExpansionFrame (CGRect cellFrame, NSView inView);
[Export ("backgroundStyle")]
NSBackgroundStyle BackgroundStyle { get; set; }
[Export ("interiorBackgroundStyle")]
NSBackgroundStyle InteriorBackgroundStyle { get; }
[Export ("draggingImageComponentsWithFrame:inView:")]
NSDraggingImageComponent [] GenerateDraggingImageComponents (CGRect frame, NSView view);
[Export ("drawFocusRingMaskWithFrame:inView:")]
void DrawFocusRing (CGRect cellFrameMask, NSView inControlView);
[Export ("focusRingMaskBoundsForFrame:inView:")]
CGRect GetFocusRingMaskBounds (CGRect cellFrame, NSView controlView);
}
[BaseType (typeof (NSImageRep))]
[DisableDefaultCtor] // An uncaught exception was raised: -[NSCIImageRep init]: unrecognized selector sent to instance 0x1b682a0
interface NSCIImageRep {
[Static]
[Export ("imageRepWithCIImage:")]
NSCIImageRep FromCIImage (CIImage image);
[Export ("initWithCIImage:")]
IntPtr Constructor (CIImage image);
[Export ("CIImage")]
CIImage CIImage { get; }
}
[Mac (10,10)]
[BaseType (typeof (NSGestureRecognizer))]
interface NSClickGestureRecognizer : NSCoding {
[Export ("initWithTarget:action:")]
IntPtr Constructor (NSObject target, Selector action);
[Export ("buttonMask")]
nuint ButtonMask { get; set; }
[Export ("numberOfClicksRequired")]
nint NumberOfClicksRequired { get; set; }
[Mac (10, 12, 2)]
[Export ("numberOfTouchesRequired")]
nint NumberOfTouchesRequired { get; set; }
}
[BaseType (typeof (NSView))]
interface NSClipView {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frameRect);
[Export ("backgroundColor", ArgumentSemantic.Copy)]
NSColor BackgroundColor { get; set; }
[Export ("drawsBackground")]
bool DrawsBackground { get; set; }
[Export ("documentView")]
NSView DocumentView { get; set; }
[Export ("documentRect")]
CGRect DocumentRect { get; }
[Export ("documentCursor", ArgumentSemantic.Retain)]
NSCursor DocumentCursor { get; set; }
[Export ("documentVisibleRect")]
CGRect DocumentVisibleRect ();
[Export ("viewFrameChanged:")]
void ViewFrameChanged (NSNotification notification);
[Export ("viewBoundsChanged:")]
void ViewBoundsChanged (NSNotification notification);
[Export ("copiesOnScroll")]
bool CopiesOnScroll { get; set; }
[Export ("autoscroll:")]
bool Autoscroll (NSEvent theEvent);
[Availability (Deprecated = Platform.Mac_10_10, Message = "Use ConstrainBoundsRect instead.")]
[Export ("constrainScrollPoint:")]
CGPoint ConstrainScrollPoint (CGPoint newOrigin);
[Mac (10,9)]
[Export ("constrainBoundsRect:")]
CGRect ConstrainBoundsRect (CGRect proposedBounds);
[Export ("scrollToPoint:")]
void ScrollToPoint (CGPoint newOrigin);
[Export ("scrollClipView:toPoint:")]
void ScrollClipView (NSClipView aClipView, CGPoint aPoint);
[Mac (10,10)]
[Export ("contentInsets")]
NSEdgeInsets ContentInsets { get; set; }
[Mac (10,10)]
[Export ("automaticallyAdjustsContentInsets")]
bool AutomaticallyAdjustsContentInsets { get; set; }
}
[Category, BaseType (typeof (NSCoder))]
partial interface NSCoderAppKitAddons {
[Availability (Deprecated = Platform.Mac_10_9)]
[Export ("decodeNXColor")]
NSColor DecodeNXColor ();
}
[BaseType (typeof (NSViewController))]
interface NSCollectionViewItem : NSCopying {
[Export ("initWithNibName:bundle:")]
IntPtr Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull);
[Export ("collectionView")]
[NullAllowed]
NSCollectionView CollectionView { get; }
[Export ("selected")]
bool Selected { [Bind ("isSelected")]get; set; }
[Export ("imageView", ArgumentSemantic.Assign)]
NSImageView ImageView { get; set; }
[Export ("textField", ArgumentSemantic.Assign)]
NSTextField TextField { get; set; }
[Export ("draggingImageComponents")]
NSDraggingImageComponent [] DraggingImageComponents { get; }
[Mac (10,11)]
[Export ("highlightState", ArgumentSemantic.Assign)]
NSCollectionViewItemHighlightState HighlightState { get; set; }
}
[BaseType (typeof (NSView))]
interface NSCollectionView : NSDraggingSource, NSDraggingDestination {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frameRect);
[Export ("isFirstResponder")]
bool IsFirstResponder { get; }
[Export ("newItemForRepresentedObject:")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSCollectionViewDataSource.GetItem()' instead.")]
[return: Release ()]
NSCollectionViewItem NewItemForRepresentedObject (NSObject obj);
[Export ("itemAtIndex:")]
NSCollectionViewItem ItemAtIndex (nint index);
[Export ("frameForItemAtIndex:")]
CGRect FrameForItemAtIndex (nint index);
[Export ("setDraggingSourceOperationMask:forLocal:")]
void SetDraggingSource (NSDragOperation dragOperationMask, bool localDestination);
//[Export ("draggingImageForItemsAtIndexes:withEvent:offset:")]
//NSImage DraggingImage (NSIndexSet itemIndexes, NSEvent evt, NSPointPointer dragImageOffset);
//Detected properties
[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap ("WeakDelegate")]
[Protocolize]
NSCollectionViewDelegate Delegate { get; set; }
[Export ("content", ArgumentSemantic.Copy)]
NSObject [] Content { get; set; }
[Export ("selectable")]
bool Selectable { [Bind ("isSelectable")]get; set; }
[Export ("allowsMultipleSelection")]
bool AllowsMultipleSelection { get; set; }
[Export ("selectionIndexes", ArgumentSemantic.Copy)]
NSIndexSet SelectionIndexes { get; set; }
[Export ("itemPrototype", ArgumentSemantic.Retain)]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'RegisterNib' or 'RegisterClassForItem' instead.")]
NSCollectionViewItem ItemPrototype { get; set; }
[Export ("maxNumberOfRows")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Set a NSCollectionViewGridLayout on CollectionViewLayout and set its 'MaximumNumberOfRows' instead.")]
nint MaxNumberOfRows { get; set; }
[Export ("maxNumberOfColumns")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Set a NSCollectionViewGridLayout on CollectionViewLayout and set its 'MaximumNumberOfColumns' instead.")]
nint MaxNumberOfColumns { get; set; }
[Export ("minItemSize")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Set a NSCollectionViewGridLayout on CollectionViewLayout and set its 'MinimumItemSize' instead.")]
CGSize MinItemSize { get; set; }
[Export ("maxItemSize")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Set a NSCollectionViewGridLayout on CollectionViewLayout and set its 'MaximumItemSize' instead.")]
CGSize MaxItemSize { get; set; }
[Export ("backgroundColors", ArgumentSemantic.Copy), NullAllowed]
NSColor [] BackgroundColors { get; set; }
[Export ("frameForItemAtIndex:withNumberOfItems:")]
CGRect FrameForItemAtIndex (nint index, nint numberOfItems);
[Mac (10,11)]
[Protocolize]
[NullAllowed, Export ("dataSource", ArgumentSemantic.Weak)]
NSCollectionViewDataSource DataSource { get; set; }
[Mac (10,11)]
[Export ("reloadData")]
void ReloadData ();
[Mac (10,11)]
[NullAllowed, Export ("backgroundView", ArgumentSemantic.Strong)]
NSView BackgroundView { get; set; }
[Mac (10,11)]
[NullAllowed, Export ("collectionViewLayout", ArgumentSemantic.Strong)]
NSCollectionViewLayout CollectionViewLayout { get; set; }
[Mac (10,11)]
[Export ("layoutAttributesForItemAtIndexPath:")]
[return: NullAllowed]
NSCollectionViewLayoutAttributes GetLayoutAttributes (NSIndexPath indexPath);
[Mac (10,11)]
[Export ("layoutAttributesForSupplementaryElementOfKind:atIndexPath:")]
[return: NullAllowed]
NSCollectionViewLayoutAttributes GetLayoutAttributes (string kind, NSIndexPath indexPath);
// -(NSInteger)numberOfSections __attribute__((availability(macosx, introduced=10.11)));
[Mac (10,11)]
[Export ("numberOfSections")]
// [Verify (MethodToProperty)]
nint NumberOfSections { get; }
[Mac (10,11)]
[Export ("numberOfItemsInSection:")]
nint GetNumberOfItems (nint section);
[Mac (10,11)]
[Export ("allowsEmptySelection")]
bool AllowsEmptySelection { get; set; }
[Mac (10,11)]
[Export ("selectionIndexPaths", ArgumentSemantic.Copy)]
NSSet SelectionIndexPaths { get; set; }
[Mac (10,11)]
[Export ("selectItemsAtIndexPaths:scrollPosition:")]
void SelectItems (NSSet indexPaths, NSCollectionViewScrollPosition scrollPosition);
[Mac (10,11)]
[Export ("deselectItemsAtIndexPaths:")]
void DeselectItems (NSSet indexPaths);
[Mac (10,11)]
[Export ("registerClass:forItemWithIdentifier:"), Internal]
void _RegisterClassForItem ([NullAllowed] IntPtr itemClass, string identifier);
[Mac (10,11)]
[Export ("registerNib:forItemWithIdentifier:")]
void RegisterNib ([NullAllowed] NSNib nib, string identifier);
[Mac (10,11)]
[Export ("registerClass:forSupplementaryViewOfKind:withIdentifier:"), Internal]
void _RegisterClassForSupplementaryView ([NullAllowed] IntPtr viewClass, NSString kind, string identifier);
[Mac (10,11)]
[Export ("registerNib:forSupplementaryViewOfKind:withIdentifier:")]
void RegisterNib ([NullAllowed] NSNib nib, NSString kind, string identifier);
[Mac (10,11)]
[Export ("makeItemWithIdentifier:forIndexPath:")]
NSCollectionViewItem MakeItem (string identifier, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("makeSupplementaryViewOfKind:withIdentifier:forIndexPath:")]
NSView MakeSupplementaryView (NSString elementKind, string identifier, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("itemAtIndexPath:")]
[return: NullAllowed]
NSCollectionViewItem GetItem (NSIndexPath indexPath);
[Mac (10,11)]
[Export ("visibleItems")]
// [Verify (MethodToProperty)]
NSCollectionViewItem[] VisibleItems { get; }
[Mac (10,11)]
[Export ("indexPathsForVisibleItems")]
// [Verify (MethodToProperty)]
NSSet<NSIndexPath> IndexPathsForVisibleItems { get; }
[Mac (10,11)]
[Export ("indexPathForItem:")]
[return: NullAllowed]
NSIndexPath GetIndexPath (NSCollectionViewItem item);
[Mac (10,11)]
[Export ("indexPathForItemAtPoint:")]
[return: NullAllowed]
NSIndexPath GetIndexPath (CGPoint point);
// -(NSView<NSCollectionViewElement> * __nullable)supplementaryViewForElementKind:(NSString * __nonnull)elementKind atIndexPath:(NSIndexPath * __nonnull)indexPath __attribute__((availability(macosx, introduced=10.11)));
[Mac (10,11)]
[Export ("supplementaryViewForElementKind:atIndexPath:")]
[return: NullAllowed]
INSCollectionViewElement GetSupplementaryView (NSString elementKind, NSIndexPath indexPath);
// -(NSArray<NSView<NSCollectionViewElement> * __nonnull> * __nonnull)visibleSupplementaryViewsOfKind:(NSString * __nonnull)elementKind __attribute__((availability(macosx, introduced=10.11)));
[Mac (10,11)]
[Export ("visibleSupplementaryViewsOfKind:")]
INSCollectionViewElement[] GetVisibleSupplementaryViews (NSString elementKind);
[Mac (10,11)]
[Export ("indexPathsForVisibleSupplementaryElementsOfKind:")]
NSSet GetIndexPaths (string elementKind);
[Mac (10,11)]
[Export ("insertSections:")]
void InsertSections (NSIndexSet sections);
[Mac (10,11)]
[Export ("deleteSections:")]
void DeleteSections (NSIndexSet sections);
[Mac (10,11)]
[Export ("reloadSections:")]
void ReloadSections (NSIndexSet sections);
[Mac (10,11)]
[Export ("moveSection:toSection:")]
void MoveSection (nint section, nint newSection);
[Mac (10,11)]
[Export ("insertItemsAtIndexPaths:")]
void InsertItems (NSSet<NSIndexPath> indexPaths);
[Mac (10,11)]
[Export ("deleteItemsAtIndexPaths:")]
void DeleteItems (NSSet<NSIndexPath> indexPaths);
[Mac (10,11)]
[Export ("reloadItemsAtIndexPaths:")]
void ReloadItems (NSSet<NSIndexPath> indexPaths);
[Mac (10,11)]
[Export ("moveItemAtIndexPath:toIndexPath:")]
void MoveItem (NSIndexPath indexPath, NSIndexPath newIndexPath);
[Mac (10,11)]
[Export ("performBatchUpdates:completionHandler:")]
void PerformBatchUpdates (Action updates, Action<bool> completionHandler);
[Mac (10,11)]
[Export ("scrollToItemsAtIndexPaths:scrollPosition:")]
void ScrollToItems (NSSet<NSIndexPath> indexPaths, NSCollectionViewScrollPosition scrollPosition);
[Mac (10,11)]
[Export ("draggingImageForItemsAtIndexPaths:withEvent:offset:")]
NSImage GetDraggingImage (NSSet<NSIndexPath> indexPaths, NSEvent theEvent, ref CGPoint dragImageOffset);
[Mac (10,11)] // Not marked as 10.11 in the header files, but didn't exist previously
[Export ("selectAll:")]
void SelectAll ([NullAllowed] NSObject sender);
[Mac (10,11)] // Not marked as 10.11 in the header files, but didn't exist previously
[Export ("deselectAll:")]
void DeselectAll ([NullAllowed] NSObject sender);
[Mac (10, 12)]
[Export ("backgroundViewScrollsWithContent")]
bool BackgroundViewScrollsWithContent { get; set; }
[Mac (10,12)]
[Export ("toggleSectionCollapse:")]
void ToggleSectionCollapse (NSObject sender);
[Mac (10, 13)]
[NullAllowed, Export ("prefetchDataSource", ArgumentSemantic.Weak)]
INSCollectionViewPrefetching PrefetchDataSource { get; set; }
}
// @protocol NSCollectionViewDataSource <NSObject>
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface NSCollectionViewDataSource
{
[Mac (10,11)]
[Abstract]
[Export ("collectionView:numberOfItemsInSection:")]
nint GetNumberofItems (NSCollectionView collectionView, nint section);
[Mac (10,11)]
[Abstract]
[Export ("collectionView:itemForRepresentedObjectAtIndexPath:")]
NSCollectionViewItem GetItem (NSCollectionView collectionView, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("numberOfSectionsInCollectionView:")]
nint GetNumberOfSections (NSCollectionView collectionView);
[Export ("collectionView:viewForSupplementaryElementOfKind:atIndexPath:")]
NSView GetView (NSCollectionView collectionView, NSString kind, NSIndexPath indexPath);
}
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
partial interface NSCollectionViewDelegate {
[Export ("collectionView:canDragItemsAtIndexes:withEvent:")]
bool CanDragItems (NSCollectionView collectionView, NSIndexSet indexes, NSEvent evt);
[Export ("collectionView:writeItemsAtIndexes:toPasteboard:")]
bool WriteItems (NSCollectionView collectionView, NSIndexSet indexes, NSPasteboard toPasteboard);
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")]
[Export ("collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:")]
string [] NamesOfPromisedFilesDroppedAtDestination (NSCollectionView collectionView, NSUrl dropUrl, NSIndexSet indexes);
//[Export ("collectionView:draggingImageForItemsAtIndexes:withEvent:offset:")]
//NSImage DraggingImageForItems (NSCollectionView collectionView, NSIndexSet indexes, NSEvent evg, NSPointPointer dragImageOffset);
[Export ("collectionView:validateDrop:proposedIndex:dropOperation:")]
#if !XAMCORE_2_0
NSDragOperation ValidateDrop (NSCollectionView collectionView, [Protocolize (4)] NSDraggingInfo draggingInfo, ref nint dropIndex, NSCollectionViewDropOperation dropOperation);
#else
NSDragOperation ValidateDrop (NSCollectionView collectionView, [Protocolize (4)] NSDraggingInfo draggingInfo, ref nint dropIndex, ref NSCollectionViewDropOperation dropOperation);
#endif
[Export ("collectionView:acceptDrop:index:dropOperation:")]
bool AcceptDrop (NSCollectionView collectionView, [Protocolize (4)] NSDraggingInfo draggingInfo, nint index, NSCollectionViewDropOperation dropOperation);
[Mac (10,11)]
[Export ("collectionView:canDragItemsAtIndexPaths:withEvent:")]
bool CanDragItems (NSCollectionView collectionView, NSSet indexPaths, NSEvent theEvent);
[Mac (10,11)]
[Export ("collectionView:writeItemsAtIndexPaths:toPasteboard:")]
bool WriteItems (NSCollectionView collectionView, NSSet indexPaths, NSPasteboard pasteboard);
[Mac (10,11)]
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")]
[Export ("collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexPaths:")]
string[] GetNamesOfPromisedFiles (NSCollectionView collectionView, NSUrl dropURL, NSSet indexPaths);
[Mac (10,11)]
[Export ("collectionView:draggingImageForItemsAtIndexPaths:withEvent:offset:")]
NSImage GetDraggingImage (NSCollectionView collectionView, NSSet indexPaths, NSEvent theEvent, ref CGPoint dragImageOffset);
#if !XAMCORE_4_0
[Mac (10,11)]
[Export ("collectionView:validateDrop:proposedIndexPath:dropOperation:")]
NSDragOperation ValidateDropOperation (NSCollectionView collectionView, [Protocolize (4)] NSDraggingInfo draggingInfo, ref NSIndexPath proposedDropIndexPath, ref NSCollectionViewDropOperation proposedDropOperation);
#else
[Mac (10,11)]
[Export ("collectionView:validateDrop:proposedIndexPath:dropOperation:")]
NSDragOperation ValidateDrop (NSCollectionView collectionView, INSDraggingInfo draggingInfo, ref NSIndexPath proposedDropIndexPath, ref NSCollectionViewDropOperation proposedDropOperation);
#endif
[Mac (10,11)]
[Export ("collectionView:acceptDrop:indexPath:dropOperation:")]
bool AcceptDrop (NSCollectionView collectionView, [Protocolize (4)] NSDraggingInfo draggingInfo, NSIndexPath indexPath, NSCollectionViewDropOperation dropOperation);
[Mac (10,11)]
[Export ("collectionView:pasteboardWriterForItemAtIndexPath:")]
[return: NullAllowed]
INSPasteboardWriting GetPasteboardWriter (NSCollectionView collectionView, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("collectionView:draggingSession:willBeginAtPoint:forItemsAtIndexPaths:")]
void DraggingSessionWillBegin (NSCollectionView collectionView, NSDraggingSession session, CGPoint screenPoint, NSSet indexPaths);
[Mac (10,11)]
[Export ("collectionView:shouldChangeItemsAtIndexPaths:toHighlightState:")]
NSSet ShouldChangeItems (NSCollectionView collectionView, NSSet indexPaths, NSCollectionViewItemHighlightState highlightState);
[Mac (10,11)]
[Export ("collectionView:didChangeItemsAtIndexPaths:toHighlightState:")]
void ItemsChanged (NSCollectionView collectionView, NSSet indexPaths, NSCollectionViewItemHighlightState highlightState);
[Mac (10,11)]
[Export ("collectionView:shouldSelectItemsAtIndexPaths:")]
NSSet ShouldSelectItems (NSCollectionView collectionView, NSSet indexPaths);
[Mac (10,11)]
[Export ("collectionView:shouldDeselectItemsAtIndexPaths:")]
NSSet ShouldDeselectItems (NSCollectionView collectionView, NSSet indexPaths);
[Mac (10,11)]
[Export ("collectionView:didSelectItemsAtIndexPaths:")]
void ItemsSelected (NSCollectionView collectionView, NSSet indexPaths);
[Mac (10,11)]
[Export ("collectionView:didDeselectItemsAtIndexPaths:")]
void ItemsDeselected (NSCollectionView collectionView, NSSet indexPaths);
[Mac (10,11)]
[Export ("collectionView:willDisplayItem:forRepresentedObjectAtIndexPath:")]
void WillDisplayItem (NSCollectionView collectionView, NSCollectionViewItem item, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("collectionView:willDisplaySupplementaryView:forElementKind:atIndexPath:")]
void WillDisplaySupplementaryView (NSCollectionView collectionView, NSView view, NSString elementKind, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("collectionView:didEndDisplayingItem:forRepresentedObjectAtIndexPath:")]
void DisplayingItemEnded (NSCollectionView collectionView, NSCollectionViewItem item, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:")]
void DisplayingSupplementaryViewEnded (NSCollectionView collectionView, NSView view, string elementKind, NSIndexPath indexPath);
[Mac (10,11)]
[Export ("collectionView:transitionLayoutForOldLayout:newLayout:")]
NSCollectionViewTransitionLayout TransitionLayout (NSCollectionView collectionView, NSCollectionViewLayout fromLayout, NSCollectionViewLayout toLayout);
}
interface INSCollectionViewElement {}
[Mac (10,11)]
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface NSCollectionViewElement : NSUserInterfaceItemIdentification
{
[Export ("prepareForReuse")]
void PrepareForReuse ();
[Export ("applyLayoutAttributes:")]
void ApplyLayoutAttributes (NSCollectionViewLayoutAttributes layoutAttributes);
[Export ("willTransitionFromLayout:toLayout:")]
void WillTransition (NSCollectionViewLayout oldLayout, NSCollectionViewLayout newLayout);
[Export ("didTransitionFromLayout:toLayout:")]
void DidTransition (NSCollectionViewLayout oldLayout, NSCollectionViewLayout newLayout);
[Export ("preferredLayoutAttributesFittingAttributes:")]
NSCollectionViewLayoutAttributes GetPreferredLayoutAttributes (NSCollectionViewLayoutAttributes layoutAttributes);
}
[Static]
interface NSCollectionElementKind
{
[Mac (10,11)]
[Field ("NSCollectionElementKindInterItemGapIndicator")]
NSString InterItemGapIndicator { get; }
[Mac (10,11)]
[Field ("NSCollectionElementKindSectionHeader")]
NSString SectionHeader { get; }
[Mac (10,11)]
[Field ("NSCollectionElementKindSectionFooter")]
NSString SectionFooter { get; }
}
[Mac (10,11)]
[BaseType (typeof(NSObject))]
interface NSCollectionViewLayoutAttributes : NSCopying
{
[Export ("frame", ArgumentSemantic.Assign)]
CGRect Frame { get; set; }
[Export ("size", ArgumentSemantic.Assign)]
CGSize Size { get; set; }
[Export ("alpha", ArgumentSemantic.Assign)]
nfloat Alpha { get; set; }
[Export ("zIndex", ArgumentSemantic.Assign)]
nint ZIndex { get; set; }
[Export ("hidden")]
bool Hidden { [Bind ("isHidden")] get; set; }
[NullAllowed, Export ("indexPath", ArgumentSemantic.Strong)]
NSIndexPath IndexPath { get; set; }
[Export ("representedElementCategory")]
NSCollectionElementCategory RepresentedElementCategory { get; }
[NullAllowed, Export ("representedElementKind")]
string RepresentedElementKind { get; }
[Static]
[Export ("layoutAttributesForItemWithIndexPath:")]
NSCollectionViewLayoutAttributes CreateForItem (NSIndexPath indexPath);
[Static]
[Export ("layoutAttributesForInterItemGapBeforeIndexPath:")]
NSCollectionViewLayoutAttributes CreateForInterItemGap (NSIndexPath indexPath);
[Static]
[Export ("layoutAttributesForSupplementaryViewOfKind:withIndexPath:")]
NSCollectionViewLayoutAttributes CreateForSupplementaryView (NSString elementKind, NSIndexPath indexPath);
[Static]
[Export ("layoutAttributesForDecorationViewOfKind:withIndexPath:")]
NSCollectionViewLayoutAttributes CreateForDecorationView (NSString decorationViewKind, NSIndexPath indexPath);
}
[Mac (10,11)]
[BaseType (typeof(NSObject))]
interface NSCollectionViewUpdateItem
{
[NullAllowed, Export ("indexPathBeforeUpdate")]
NSIndexPath IndexPathBeforeUpdate { get; }
[NullAllowed, Export ("indexPathAfterUpdate")]
NSIndexPath IndexPathAfterUpdate { get; }
[Export ("updateAction")]
NSCollectionUpdateAction UpdateAction { get; }
}
[Mac (10,11)]
[BaseType (typeof(NSObject))]
interface NSCollectionViewLayoutInvalidationContext
{
[Export ("invalidateEverything")]
bool InvalidateEverything { get; }
[Export ("invalidateDataSourceCounts")]
bool InvalidateDataSourceCounts { get; }
[Export ("invalidateItemsAtIndexPaths:")]
void InvalidateItems (NSSet indexPaths);
[Export ("invalidateSupplementaryElementsOfKind:atIndexPaths:")]
void InvalidateSupplementaryElements (NSString elementKind, NSSet indexPaths);
[Export ("invalidateDecorationElementsOfKind:atIndexPaths:")]
void InvalidateDecorationElements (NSString elementKind, NSSet indexPaths);
[Export ("invalidatedItemIndexPaths")]
NSSet InvalidatedItemIndexPaths { get; }
[Export ("invalidatedSupplementaryIndexPaths")]
NSDictionary InvalidatedSupplementaryIndexPaths { get; }
[Export ("invalidatedDecorationIndexPaths")]
NSDictionary InvalidatedDecorationIndexPaths { get; }
[Export ("contentOffsetAdjustment", ArgumentSemantic.Assign)]
CGPoint ContentOffsetAdjustment { get; set; }
[Export ("contentSizeAdjustment", ArgumentSemantic.Assign)]
CGSize ContentSizeAdjustment { get; set; }
}
[Mac (10,11)]
[BaseType (typeof(NSObject))]
interface NSCollectionViewLayout : NSCoding
{
[NullAllowed, Export ("collectionView", ArgumentSemantic.Weak)]
NSCollectionView CollectionView { get; }
[Export ("invalidateLayout")]
void InvalidateLayout ();
[Export ("invalidateLayoutWithContext:")]
void In