Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
static class NSOpenPanelPatch
{
static readonly IntPtr selIsAccessoryViewDisclosedHandle = Selector.GetHandle ("isAccessoryViewDisclosed");
static readonly IntPtr selSetAccessoryViewDisclosed_Handle = Selector.GetHandle ("setAccessoryViewDisclosed:");
[DllImport ("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
public extern static bool bool_objc_msgSend (IntPtr receiver, IntPtr selector);
[DllImport ("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
public extern static void void_objc_msgSend_bool (IntPtr receiver, IntPtr selector, bool arg1);
public static bool GetAccessoryViewDisclosed (this NSOpenPanel p)
{
global::AppKit.NSApplication.EnsureUIThread ();
return bool_objc_msgSend (p.Handle, selIsAccessoryViewDisclosedHandle);
}
public static void SetAccessoryViewDisclosed (this NSOpenPanel p, bool v)
{
void_objc_msgSend_bool (p.Handle, selSetAccessoryViewDisclosed_Handle, v);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.