// Generated API outline. Implementation bodies omitted.
#nullable enable
namespace Xui.GPU.Hardware.Metal
{
using NativeMetal = global::Xui.Runtime.MacOS.Metal;
using System;
///
/// Apple Metal hardware GPU device implementation.
/// Provides hardware-accelerated shader compilation and rendering on macOS and iOS.
///
///
/// This backend uses the Metal framework for rendering and the Metal shader compiler
/// for MSL shader compilation. Rendering is done off-screen to a texture that can be
/// read back to CPU memory for display via the 2D canvas pipeline.
///
public sealed partial class MacOSGpuDevice : IGpuResourceDevice
{
/// Gets the name of this GPU backend (e.g., "D3D11", "Metal").
public string BackendName { get; }
/// Gets whether this device has been disposed.
public bool IsDisposed { get; }
///
/// Creates a new Metal GPU device using the system default device.
///
/// Thrown if no Metal device is available.
public MacOSGpuDevice();
///
/// Compiles a vertex shader from native shader source code.
///
/// The shader source (HLSL for D3D11, MSL for Metal).
/// The name of the entry point function.
/// A compiled vertex shader.
public IGpuVertexShader CompileVertexShader(string source, string entryPoint);
///
/// Compiles a fragment (pixel) shader from native shader source code.
///
/// The shader source (HLSL for D3D11, MSL for Metal).
/// The name of the entry point function.
/// A compiled fragment shader.
public IGpuFragmentShader CompileFragmentShader(string source, string entryPoint);
///
/// Creates a render target texture.
///
/// Width in pixels.
/// Height in pixels.
/// A render target that can be used with a command list.
public IGpuRenderTarget CreateRenderTarget(int width, int height);
///
/// Creates a command list for recording rendering commands.
///
public IGpuCommandList CreateCommandList();
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose();
}
}
namespace Xui.GPU.Hardware.Metal
{
using NativeMetal = global::Xui.Runtime.MacOS.Metal;
using System.Collections.Generic;
using System;
using Xui.GPU.Shaders.Types;
///
/// Apple Metal hardware GPU device implementation.
/// Provides hardware-accelerated shader compilation and rendering on macOS and iOS.
///
///
/// This backend uses the Metal framework for rendering and the Metal shader compiler
/// for MSL shader compilation. Rendering is done off-screen to a texture that can be
/// read back to CPU memory for display via the 2D canvas pipeline.
///
public sealed partial class MacOSGpuDevice
{
/// Uploads premultiplied RGBA8 mip levels, largest first, with tightly packed rows.
public unsafe IGpuTexture CreateSampledTexture(int width, int height, IReadOnlyList mipLevels);
/// Uploads immutable vertices once. The caller owns the returned buffer.
public unsafe IGpuVertexBuffer CreateVertexBuffer(ReadOnlySpan vertices, int stride);
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public const string AppKitLib = "/System/Library/Frameworks/AppKit.framework/AppKit";
public static readonly nint Lib;
public static readonly Protocol NSApplicationDelegate;
[LibraryImport(AppKitLib)]
public static partial nint NSSelectorFromString(nint selector);
}
public static partial class CoreFoundation
{
public partial class CFArray : NSObject
{
public struct CallBacks
{
public nint Version;
public nint Retain;
public nint Release;
public nint CopyDescription;
public nint Equal;
}
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.Marshalling;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public class NSApplication : NSResponder
{
public static new readonly Class Class;
public static readonly Sel SharedApplicationSel;
public static readonly Sel SetActivationPolicySel;
public static readonly Sel SetDelegateSel;
public static readonly Sel ActivateSel;
public static readonly Sel ActivateIgnoringOtherAppsSel;
public static readonly Sel RunSel;
public static readonly Sel TerminateSel;
public static NSApplication? SharedApplication { get; }
///
/// An Objecitve-C instance implementing NSApplicationDelegate protocol
///
public Ref Delegate { set; }
public void Activate();
public void Run();
public void Terminate();
public override NSApplication Autorelease();
public bool SetActivationPolicy(NSApplicationActivationPolicy v);
}
}
}
namespace Xui.Runtime.MacOS
{
public partial class AppKit
{
public enum NSApplicationActivationPolicy : int
{
Regular = 0,
Accessory = 1,
Prohibited = 2
}
}
public partial class AppKit
{
public enum NSBackingStoreType : uint
{
Retained = 0,
Nonretained = 1,
Buffered = 2
}
}
public static partial class AppKit
{
/// The visual treatment used by an .
public enum NSGlassEffectViewStyle : int
{
Regular,
Clear,
}
}
public static partial class AppKit
{
public enum NSLayoutAttribute : int
{
Left = 1,
Right = 2,
Top = 3,
Bottom = 4,
Leading = 5,
Trailing = 6,
Width = 7,
Height = 8,
CenterX = 9,
CenterY = 10,
LastBaseline = 11,
FirstBaseline = 12,
LeftMargin = 13,
RightMarting = 14,
TopMargin = 15,
BottomMargin = 16,
LeadingMargin = 17,
TrailingMargin = 18,
CenterXWithinMargins = 19,
CenterYWithinMargins = 20,
NotAnAttribute = 0
}
}
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/objectivec/nsuinteger
/// NSUInteger - treat as nint
///
public enum NSVisualEffectBlendingMode : int
{
BehindWindow = 0,
WithinWindow = 1
}
}
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/objectivec/nsuinteger
/// NSUInteger - treat as nint
///
public enum NSVisualEffectMaterial : int
{
Titlebar = 3,
Selection = 4,
Menu = 5,
Popover = 6,
Sidebar = 7,
HeaderView = 10,
Sheet = 11,
WindowBackground = 12,
HUDWindow = 13,
FullScreenUI = 15,
ToolTip = 17,
ContentBackground = 18,
UnderWindowBackground = 21,
UnderPageBackground = 22
}
}
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/appkit/nsvisualeffectstate?language=objc
/// NSInteger - treat as nint
///
public enum NSVisualEffectState : int
{
FollowsWindowActiveState = 0,
Active = 1,
Inactive = 2
}
}
public static partial class AppKit
{
public enum NSWindowButton
{
CloseButton = 0,
MiniaturizeButton = 1,
ZoomButton = 2,
ToolbarButton = 3
}
}
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/objectivec/nsuinteger
/// NSUInteger - treat as nuint
///
public enum NSWindowStyleMask : uint
{
Borderless = 0,
Titled = 1 << 0,
Closable = 1 << 1,
Miniaturizable = 1 << 2,
Resizable = 1 << 3,
UtilityWindow = 1 << 4,
DocModalWindow = 1 << 6,
NonactivatingPanel = 1 << 7,
UnifiedTitleAndToolbar = 1 << 12,
HUDWindow = 1 << 13,
FullScreen = 1 << 14,
FullSizeContentView = 1 << 15,
}
}
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc
/// NSInteger - treat as nint.
///
public enum NSWindowToolbarStyle : int
{
Automatic = 0,
Expanded = 1,
Preference = 2,
Unified = 3,
UnifiedCompact = 4
}
}
public static unsafe partial class AppKit
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/AppKit.framework/AppKit", EntryPoint = "NSSelectorFromString", ExactSpelling = true)]
public static extern partial nint NSSelectorFromString(nint selector);
}
public static unsafe partial class AppKit
{
public unsafe ref partial struct NSColorRef
{
}
}
public static unsafe partial class AppKit
{
public unsafe ref partial struct NSEventRef
{
}
}
public static unsafe partial class AppKit
{
public unsafe ref partial struct NSEventRef
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSView
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSView
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSView
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSViewController
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSWindow
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSWindow
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSWindow
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSWindow
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSWindow
{
}
}
public static unsafe partial class AppKit
{
public unsafe partial class NSWindow
{
}
}
public static unsafe partial class CoreAnimation
{
///
/// https://developer.apple.com/documentation/quartzcore/cashapelayer?language=objc
///
public unsafe partial class CAGradientLayer
{
}
}
public static unsafe partial class CoreAnimation
{
///
/// https://developer.apple.com/documentation/quartzcore/cashapelayer?language=objc
///
public unsafe partial class CAGradientLayer
{
}
}
public static unsafe partial class CoreFoundation
{
public unsafe partial class CFDataRef
{
}
}
public static unsafe partial class CoreFoundation
{
public unsafe partial class CFDataRef
{
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFMutableArrayRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFArrayCreateMutable", ExactSpelling = true)]
public static extern partial nint CFArrayCreateMutable(nint allocator, nint capacity, nint callbacks);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFMutableArrayRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFArrayAppendValue", ExactSpelling = true)]
public static extern partial void CFArrayAppendValue(nint cfMutableArrayRef, nint value);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFMutableDictionaryRef
{
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFMutableDictionaryRef
{
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFNumberRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFNumberCreate", ExactSpelling = true)]
public static extern partial nint CFNumberCreate(nint allocator, global::Xui.Runtime.MacOS.CoreFoundation.CFNumberType theType, uint valuePtr);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFNumberRef
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint CFNumberCreate(nint allocator, global::Xui.Runtime.MacOS.CoreFoundation.CFNumberType theType, ref int valuePtr);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFNumberRef
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint CFNumberCreate(nint allocator, global::Xui.Runtime.MacOS.CoreFoundation.CFNumberType theType, ref global::System.Runtime.InteropServices.NFloat valuePtr);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFSetRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFSetGetCount", ExactSpelling = true)]
public static extern partial nint CFSetGetCount(nint cfSetRef);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFSetRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFSetGetValues", ExactSpelling = true)]
public static extern partial nint CFSetGetValues(global::Xui.Runtime.MacOS.CoreFoundation.CFSetRef theSet, nint arrayOfValuePtrs);
}
}
public static unsafe partial class CoreFoundation
{
public unsafe ref partial struct CFURLRef
{
}
}
public static unsafe partial class CoreFoundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFRelease", ExactSpelling = true)]
public static extern partial void CFRelease(nint obj);
}
public static unsafe partial class CoreFoundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFGetRetainCount", ExactSpelling = true)]
public static extern partial nint CFGetRetainCount(nint obj);
}
public static unsafe partial class CoreFoundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFHash", ExactSpelling = true)]
public static extern partial nuint CFHash(nint cf);
}
public static unsafe partial class CoreFoundation
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial bool CFEqual(nint cf1, nint cf2);
}
public static unsafe partial class CoreFoundation
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial string CFStringGetCStringPtr(nint obj);
}
public static unsafe partial class CoreFoundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFStringGetCString", ExactSpelling = true)]
public static extern partial nint CFStringGetCString(nint obj);
}
public static unsafe partial class CoreFoundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", EntryPoint = "CFRetain", ExactSpelling = true)]
public static extern partial nint CFRetain(nint obj);
}
public static unsafe partial class CoreFoundation
{
}
public static unsafe partial class CoreFoundation
{
}
public static partial class CoreGraphics
{
public enum CGBlendMode : int
{
Normal = 0,
SourceIn = 18,
}
}
public static partial class CoreGraphics
{
///
/// This is not 64 bit on 64 bit architecture, it is defined as int32_t.
///
public enum CGTextDrawingMode : int
{
Fill = 0,
Stroke = 1,
FillStroke = 2,
Invisible = 3,
FillClip = 4,
StrokeClip = 5,
FillStrokeClip = 6,
Clip = 7,
}
}
public static partial class CoreGraphics
{
///
/// This is not 64 bit on 64 bit architecture, it is defined as int32_t.
///
public enum CGLineCap : int
{
Butt = 0,
Round = 1,
Square = 2
}
}
public static partial class CoreGraphics
{
///
/// This is not 64 bit on 64 bit architecture, it is defined as int32_t.
///
public enum CGLineJoin : int
{
Miter = 0,
Round = 1,
Bevel = 2
}
}
public static unsafe partial class CoreGraphics
{
///
/// Affine transformation matrix in the form:
///
/// | A B 0 |
/// | C D 0 |
/// | Tx Ty 1 |
///
/// Transforming a vector:
///
/// | A B 0 |
/// [x' y' 1] = [x y 1] * | C D 0 |
/// | Tx Ty 1 |
///
public unsafe partial struct CGAffineTransform
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGAffineTransformInvert", ExactSpelling = true)]
public static extern partial global::Xui.Runtime.MacOS.CoreGraphics.CGAffineTransform CGAffineTransformInvert(global::Xui.Runtime.MacOS.CoreGraphics.CGAffineTransform t);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGColorRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGColorRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGColorSpaceRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGColorSpaceRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextRelease", ExactSpelling = true)]
public static extern partial void CGContextRelease(nint self);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetRGBFillColor", ExactSpelling = true)]
public static extern partial void CGContextSetRGBFillColor(nint cgContextRef, global::System.Runtime.InteropServices.NFloat red, global::System.Runtime.InteropServices.NFloat green, global::System.Runtime.InteropServices.NFloat blue, global::System.Runtime.InteropServices.NFloat alpha);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetRGBStrokeColor", ExactSpelling = true)]
public static extern partial void CGContextSetRGBStrokeColor(nint cgContextRef, global::System.Runtime.InteropServices.NFloat red, global::System.Runtime.InteropServices.NFloat green, global::System.Runtime.InteropServices.NFloat blue, global::System.Runtime.InteropServices.NFloat alpha);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetLineWidth", ExactSpelling = true)]
public static extern partial void CGContextSetLineWidth(nint cgContextRef, global::System.Runtime.InteropServices.NFloat width);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextFillRect", ExactSpelling = true)]
public static extern partial void CGContextFillRect(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGRect rect);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextStrokeRect", ExactSpelling = true)]
public static extern partial void CGContextStrokeRect(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGRect rect);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddPath", ExactSpelling = true)]
public static extern partial void CGContextAddPath(nint cgContextRef, nint cgPathRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextMoveToPoint", ExactSpelling = true)]
public static extern partial void CGContextMoveToPoint(nint cgContextRef, global::System.Runtime.InteropServices.NFloat x, global::System.Runtime.InteropServices.NFloat y);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddLineToPoint", ExactSpelling = true)]
public static extern partial void CGContextAddLineToPoint(nint cgContextRef, global::System.Runtime.InteropServices.NFloat x, global::System.Runtime.InteropServices.NFloat y);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddRect", ExactSpelling = true)]
public static extern partial void CGContextAddRect(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGRect cgRect);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddArc", ExactSpelling = true)]
public static extern partial void CGContextAddArc(nint cgContextRef, global::System.Runtime.InteropServices.NFloat x, global::System.Runtime.InteropServices.NFloat y, global::System.Runtime.InteropServices.NFloat radius, global::System.Runtime.InteropServices.NFloat startAngle, global::System.Runtime.InteropServices.NFloat endAngle, int clockwise);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddArcToPoint", ExactSpelling = true)]
public static extern partial void CGContextAddArcToPoint(nint cgContextRef, global::System.Runtime.InteropServices.NFloat x1, global::System.Runtime.InteropServices.NFloat y1, global::System.Runtime.InteropServices.NFloat x2, global::System.Runtime.InteropServices.NFloat y2, global::System.Runtime.InteropServices.NFloat radius);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddQuadCurveToPoint", ExactSpelling = true)]
public static extern partial void CGContextAddQuadCurveToPoint(nint c, global::System.Runtime.InteropServices.NFloat cpx, global::System.Runtime.InteropServices.NFloat cpy, global::System.Runtime.InteropServices.NFloat x, global::System.Runtime.InteropServices.NFloat y);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextAddCurveToPoint", ExactSpelling = true)]
public static extern partial void CGContextAddCurveToPoint(nint c, global::System.Runtime.InteropServices.NFloat cp1x, global::System.Runtime.InteropServices.NFloat cp1y, global::System.Runtime.InteropServices.NFloat cp2x, global::System.Runtime.InteropServices.NFloat cp2y, global::System.Runtime.InteropServices.NFloat x, global::System.Runtime.InteropServices.NFloat y);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextBeginPath", ExactSpelling = true)]
public static extern partial void CGContextBeginPath(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextClosePath", ExactSpelling = true)]
public static extern partial void CGContextClosePath(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextClip", ExactSpelling = true)]
public static extern partial void CGContextClip(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextClipToRect", ExactSpelling = true)]
public static extern partial void CGContextClipToRect(nint c, global::Xui.Runtime.MacOS.CoreGraphics.CGRect rect);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextEOClip", ExactSpelling = true)]
public static extern partial void CGContextEOClip(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetAlpha", ExactSpelling = true)]
public static extern partial void CGContextSetAlpha(nint cgContextRef, global::System.Runtime.InteropServices.NFloat alpha);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetLineCap", ExactSpelling = true)]
public static extern partial void CGContextSetLineCap(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGLineCap cap);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetLineJoin", ExactSpelling = true)]
public static extern partial void CGContextSetLineJoin(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGLineJoin join);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetMiterLimit", ExactSpelling = true)]
public static extern partial void CGContextSetMiterLimit(nint cgContextRef, global::System.Runtime.InteropServices.NFloat limit);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextFillPath", ExactSpelling = true)]
public static extern partial void CGContextFillPath(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextEOFillPath", ExactSpelling = true)]
public static extern partial void CGContextEOFillPath(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextStrokePath", ExactSpelling = true)]
public static extern partial void CGContextStrokePath(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextDrawLinearGradient", ExactSpelling = true)]
public static extern partial void CGContextDrawLinearGradient(nint cgContextRef, nint cgGradientRef, global::Xui.Runtime.MacOS.CoreGraphics.CGPoint startPoint, global::Xui.Runtime.MacOS.CoreGraphics.CGPoint endPoint, uint options);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextDrawRadialGradient", ExactSpelling = true)]
public static extern partial void CGContextDrawRadialGradient(nint cgContextRef, nint cgGradientRef, global::Xui.Runtime.MacOS.CoreGraphics.CGPoint startCenter, global::System.Runtime.InteropServices.NFloat startRadius, global::Xui.Runtime.MacOS.CoreGraphics.CGPoint endCenter, global::System.Runtime.InteropServices.NFloat endRadius, uint options);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextReplacePathWithStrokedPath", ExactSpelling = true)]
public static extern partial void CGContextReplacePathWithStrokedPath(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSaveGState", ExactSpelling = true)]
public static extern partial void CGContextSaveGState(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextRestoreGState", ExactSpelling = true)]
public static extern partial void CGContextRestoreGState(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextConcatCTM", ExactSpelling = true)]
public static extern partial void CGContextConcatCTM(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGAffineTransform transform);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial void CGContextSetLineDash(nint c, global::System.Runtime.InteropServices.NFloat phase, ref global::System.Runtime.InteropServices.NFloat cgFloatArrPtr, nint count);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetLineDash", ExactSpelling = true)]
public static extern partial void CGContextSetLineDash(nint c, global::System.Runtime.InteropServices.NFloat phase, nint cgFloatArrPtr, nint count);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextGetCTM", ExactSpelling = true)]
public static extern partial global::Xui.Runtime.MacOS.CoreGraphics.CGAffineTransform CGContextGetCTM(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextRotateCTM", ExactSpelling = true)]
public static extern partial void CGContextRotateCTM(nint cgContextRef, global::System.Runtime.InteropServices.NFloat angle);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextScaleCTM", ExactSpelling = true)]
public static extern partial void CGContextScaleCTM(nint cgContextRef, global::System.Runtime.InteropServices.NFloat sx, global::System.Runtime.InteropServices.NFloat sy);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextTranslateCTM", ExactSpelling = true)]
public static extern partial void CGContextTranslateCTM(nint cgContextRef, global::System.Runtime.InteropServices.NFloat tx, global::System.Runtime.InteropServices.NFloat ty);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetTextDrawingMode", ExactSpelling = true)]
public static extern partial void CGContextSetTextDrawingMode(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGTextDrawingMode mode);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextBeginTransparencyLayer", ExactSpelling = true)]
public static extern partial void CGContextBeginTransparencyLayer(nint cgContextRef, nint auxiliaryInfo);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextEndTransparencyLayer", ExactSpelling = true)]
public static extern partial void CGContextEndTransparencyLayer(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextSetBlendMode", ExactSpelling = true)]
public static extern partial void CGContextSetBlendMode(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGBlendMode blendMode);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextDrawImage", ExactSpelling = true)]
public static extern partial void CGContextDrawImage(nint cgContextRef, global::Xui.Runtime.MacOS.CoreGraphics.CGRect rect, nint image);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGContextGetClipBoundingBox", ExactSpelling = true)]
public static extern partial global::Xui.Runtime.MacOS.CoreGraphics.CGRect CGContextGetClipBoundingBox(nint cgContextRef);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGContextRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "UIGraphicsGetCurrentContext", ExactSpelling = true)]
public static extern partial nint UIGraphicsGetCurrentContext();
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGDataProviderRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGDataProviderRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGGradientRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGGradientRelease", ExactSpelling = true)]
public static extern partial void CGGradientRelease(nint self);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGGradientRef
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint CGGradientCreateWithColorComponents(nint cgColorSpaceRef, ref global::System.Runtime.InteropServices.NFloat componentsArrPtr, ref global::System.Runtime.InteropServices.NFloat locationsArrPtr, nint count);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGImageRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGImageRelease", ExactSpelling = true)]
public static extern partial void CGImageRelease(nint image);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGImageRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGImageRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGImageRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGImageRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGMutablePathRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGMutablePathRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGMutablePathRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGMutablePathRef
{
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGPathRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", EntryPoint = "CGPathCreateWithRoundedRect", ExactSpelling = true)]
public static extern partial nint CGPathCreateWithRoundedRect(global::Xui.Runtime.MacOS.CoreGraphics.CGRect rect, global::System.Runtime.InteropServices.NFloat cornerWidth, global::System.Runtime.InteropServices.NFloat cornerHeight, nint cgAffineTransformPtr);
}
}
public static unsafe partial class CoreGraphics
{
public unsafe ref partial struct CGPathRef
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint CGPathCreateWithRoundedRect(global::Xui.Runtime.MacOS.CoreGraphics.CGRect rect, global::System.Runtime.InteropServices.NFloat cornerWidth, global::System.Runtime.InteropServices.NFloat cornerHeight, ref global::Xui.Runtime.MacOS.CoreGraphics.CGAffineTransform transform);
}
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreGraphics
{
}
public static unsafe partial class CoreText
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreText.framework/CoreText", EntryPoint = "NSSelectorFromString", ExactSpelling = true)]
public static extern partial nint NSSelectorFromString(nint selector);
}
public static unsafe partial class CoreText
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial bool CTFontManagerRegisterFontsForURL(nint fontUrl, uint scope, out nint error);
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontDescriptorRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreText.framework/CoreText", EntryPoint = "CTFontDescriptorCreateWithAttributes", ExactSpelling = true)]
public static extern partial nint CTFontDescriptorCreateWithAttributes(nint cfDictionaryRefAttributes);
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontDescriptorRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreText.framework/CoreText", EntryPoint = "CTFontDescriptorCreateWithNameAndSize", ExactSpelling = true)]
public static extern partial nint CTFontDescriptorCreateWithNameAndSize(nint cfStringRefName, global::System.Runtime.InteropServices.NFloat size);
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint CTFontCreateWithFontDescriptorAndOptions(nint ctFontDescriptorRefDescriptor, global::System.Runtime.InteropServices.NFloat size, ref global::Xui.Runtime.MacOS.CoreGraphics.CGAffineTransform matrix, nint ctFontOptions);
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
[global::System.Runtime.InteropServices.DllImportAttribute("/System/Library/Frameworks/CoreText.framework/CoreText", EntryPoint = "CTFontCreateWithFontDescriptorAndOptions", ExactSpelling = true)]
public static extern partial nint CTFontCreateWithFontDescriptorAndOptions(nint ctFontDescriptorRefDescriptor, global::System.Runtime.InteropServices.NFloat size, nint matrixPtr, nint ctFontOptions);
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTFontRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTLineRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTLineRef
{
}
}
public static unsafe partial class CoreText
{
public unsafe ref partial struct CTLineRef
{
}
}
public static unsafe partial class Dispatch
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/system/libdispatch.dylib", EntryPoint = "dispatch_async", ExactSpelling = true)]
public static extern partial void DispatchAsync(nint queue, nint block);
}
public static unsafe partial class Dispatch
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial void DispatchAsync(nint queue, ref global::Xui.Runtime.MacOS.Block.BlockLiteral block);
}
public static unsafe partial class Dispatch
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/system/libdispatch.dylib", EntryPoint = "dispatch_async", ExactSpelling = true)]
public static extern partial void DispatchAsync(nint queue, global::Xui.Runtime.MacOS.Block.BlockRef block);
}
public static unsafe partial class Foundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, global::Xui.Runtime.MacOS.Foundation.NSRect rect);
}
public static unsafe partial class Foundation
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, global::Xui.Runtime.MacOS.Foundation.NSSize rect);
}
public static unsafe partial class Foundation
{
public unsafe partial class NSString
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint nsString, nint sel, global::Xui.Runtime.MacOS.CoreGraphics.CGPoint position, nint attributes);
}
}
public static unsafe partial class ImageIO
{
public unsafe ref partial struct CGImageSourceRef
{
}
}
public static unsafe partial class ImageIO
{
public unsafe ref partial struct CGImageSourceRef
{
}
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static unsafe partial class Metal
{
}
///
/// Defines the stacking level (Z-order) of an NSWindow.
///
///
/// NSInteger - treat as nint
///
public enum NSWindowLevel : int
{
///
/// Normal application window level.
///
Normal = 0,
///
/// Floating utility panels (inspectors, palettes).
///
Floating = 3,
///
/// Modal panels presented above normal and floating windows.
///
ModalPanel = 8,
///
/// Status bar and menu-related windows.
///
StatusBar = 25,
///
/// Windows shown during screen saver mode.
/// Use with extreme caution.
///
ScreenSaver = 1000,
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
///
/// Abstracts C# interactions with an Objective-C selector.
///
public struct Super
{
public nint receiver;
public nint super_class;
public Super(nint receiver, nint super_class);
}
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "object_getClass", ExactSpelling = true)]
public static extern partial nint object_getClass(nint instance);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint objc_getClass(string name);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial nint objc_msgSend_retIntPtr(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial nint objc_msgSend_retIntPtr(nint obj, nint sel, nint id1, nint id2);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial double objc_msgSend_retDouble(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial string objc_msgSend_retCStr(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial nuint objc_msgSend_retNUInt(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial global::System.Runtime.InteropServices.NFloat objc_msgSend_retNFloat(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial float objc_msgSend_retFloat(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial nint objc_msgSend_retIntPtr(nint obj, nint sel, nint id1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial nint objc_msgSend_retIntPtr(nint obj, nint sel, global::System.Runtime.InteropServices.NFloat value);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial int objc_msgSend_retInt(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static unsafe extern partial global::Xui.Runtime.MacOS.CoreGraphics.CGSize objc_msgSend_retCGSize(nint obj, nint sel, nint id1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static unsafe extern partial global::Xui.Runtime.MacOS.Foundation.NSRect objc_msgSend_retNSRect(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static unsafe extern partial global::Xui.Runtime.MacOS.Foundation.NSRect objc_msgSend_retNSRect(nint obj, nint sel, global::Xui.Runtime.MacOS.Foundation.NSRect rect);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, global::System.Runtime.InteropServices.NFloat v);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, nuint v);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, nint a1, uint v2);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, nint a1, nint v2);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial void objc_msgSend(nint obj, nint sel, bool v1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, nint id1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial void objc_msgSendSuper(ref global::Xui.Runtime.MacOS.ObjC.Super obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial void objc_msgSendSuper(ref global::Xui.Runtime.MacOS.ObjC.Super obj, nint sel, global::Xui.Runtime.MacOS.Foundation.NSRect rect);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial void objc_msgSendSuper(ref global::Xui.Runtime.MacOS.ObjC.Super obj, nint sel, nint id1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend", ExactSpelling = true)]
public static extern partial void objc_msgSend(nint obj, nint sel, int id1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint objc_getProtocol(string name);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial bool class_addProtocol(nint objcclass, nint name);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial string class_getName(nint objcclass);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial bool objc_msgSend_retBool(nint obj, nint sel);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial bool objc_msgSend_retBool(nint obj, nint sel, int int1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial bool objc_msgSend_retBool(nint obj, nint sel, nint int1);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_allocateClassPair", ExactSpelling = true)]
public static extern partial nint objc_allocateClassPair(nint superclass, nint name, nuint extrabytes);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.Runtime.InteropServices.DllImportAttribute("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_registerClassPair", ExactSpelling = true)]
public static extern partial void objc_registerClassPair(nint @class);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static partial nint sel_registerName(string cfstring);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSelId_Bool fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSelIdId_Bool fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSelIdNUInt_NUInt fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSel_Void fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSel_Id fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSelId_Void fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSelIdId_Void fun, string types);
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static unsafe partial class ObjC
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.15.3008")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, global::Xui.Runtime.MacOS.ObjC.IdSel_Bool fun, string types);
}
}
namespace Xui.Runtime.MacOS
{
using System;
public static partial class AppKit
{
[Flags]
public enum NSApplicationPresentationOptions : ulong
{
Default = 0,
AutoHideToolbar = 1 << 11,
}
}
public partial class Block
{
[Flags]
public enum BlockFlags : int
{
IsNoEscape = 1 << 23,
HasCopyDispose = 1 << 25,
HasCtor = 1 << 26,
IsGlobal = 1 << 28,
HasStret = 1 << 29,
HasSignature = 1 << 30,
};
}
public static partial class CoreFoundation
{
public ref struct CFStringRef : IDisposable
{
public readonly nint Self;
public CFStringRef(nint self);
public CFStringRef(string? str);
public CFStringRef(ReadOnlySpan str);
public void Dispose();
public static implicit operator nint(CFStringRef cfStringRef);
public static implicit operator string? (CFStringRef cfStringRef);
}
}
public static partial class CoreGraphics
{
///
/// Bitmap info flags for CGBitmapContext and CGImage creation.
///
[Flags]
public enum CGBitmapInfo : uint
{
None = 0,
AlphaInfoMask = 0x1F,
AlphaNone = 0,
AlphaPremultipliedLast = 1,
AlphaPremultipliedFirst = 2,
AlphaLast = 3,
AlphaFirst = 4,
AlphaNoneSkipLast = 5,
AlphaNoneSkipFirst = 6,
AlphaOnly = 7,
ByteOrderMask = 0x7000,
ByteOrderDefault = 0 << 12,
ByteOrder16Little = 1 << 12,
ByteOrder32Little = 2 << 12,
ByteOrder16Big = 3 << 12,
ByteOrder32Big = 4 << 12,
FloatComponents = 1 << 8,
FloatInfoMask = 0xF00,
}
}
public class ObjCException : Exception
{
public ObjCException(string? message);
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/appkit/nsautoresizingmaskoptions?language=objc
/// NSUInteger - treat as nuint.
///
[Flags]
public enum NSAutoresizingMaskOptions : uint
{
NotSizable = 0,
MinXMargin = 1,
WidthSizable = 2,
MaxXMargin = 4,
MinYMargin = 8,
HeightSizable = 16,
MaxYMargin = 32
}
}
public static partial class CoreFoundation
{
public const string CoreFoundationLib = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
public static readonly nint Lib;
public static readonly Sel UTF8StringSel;
[LibraryImport(CoreFoundationLib)]
public static partial void CFRelease(nint obj);
[LibraryImport(CoreFoundationLib)]
public static partial nint CFGetRetainCount(nint obj);
[LibraryImport(CoreFoundationLib)]
public static partial nuint CFHash(nint cf);
[LibraryImport(CoreFoundationLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static partial bool CFEqual(nint cf1, nint cf2);
[LibraryImport(CoreFoundationLib)]
[return: MarshalAs(UnmanagedType.LPUTF8Str)]
public static partial string CFStringGetCStringPtr(nint obj);
[LibraryImport(CoreFoundationLib)]
public static partial nint CFStringGetCString(nint obj);
[LibraryImport(CoreFoundationLib)]
public static partial nint CFRetain(nint obj);
///
/// Creates a CFStringRef from C# string.
/// You need to manually release after use.
///
///
public static nint CFString(string? str);
public static string? ToString(nint cfStringRef);
public static unsafe nint CFString(ReadOnlySpan str);
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using Xui.Core.Canvas;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public ref partial struct NSColorRef
{
public static readonly Class Class;
public readonly nint Self;
public NSColorRef(nint self);
///
/// Creates an NSColor from an sRGB color. The autoreleased object returned by
/// colorWithCalibratedRed:green:blue:alpha: is retained so that Dispose's
/// CFRelease produces a balanced release.
///
public NSColorRef(Color color);
///
/// Creates an NSColor from explicit RGBA components. Retained for balanced ownership.
///
public NSColorRef(NFloat red, NFloat green, NFloat blue, NFloat alpha);
public void Dispose();
public static implicit operator nint(NSColorRef nsColorRef);
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public class NSControl : NSView
{
public static new readonly Class Class;
public NSControl(nint id);
public NSControl();
public override NSControl Autorelease();
}
}
public static partial class AppKit
{
public class NSCursor : NSObject
{
public static new readonly Class Class;
public static void PopStatic();
public static readonly NSCursor ArrowCursor;
public static readonly NSCursor IBeamCursor;
public static readonly NSCursor CrosshairCursor;
public static readonly NSCursor ClosedHandCursor;
public static readonly NSCursor OpenHandCursor;
public static readonly NSCursor PointingHandCursor;
public static readonly NSCursor ResizeLeftCursor;
public static readonly NSCursor ResizeRightCursor;
public static readonly NSCursor ResizeLeftRightCursor;
public static readonly NSCursor ResizeUpCursor;
public static readonly NSCursor ResizeDownCursor;
public static readonly NSCursor ResizeUpDownCursor;
public static readonly NSCursor DisappearingItemCursor;
public static readonly NSCursor IBeamCursorForVerticalLayout;
public static readonly NSCursor OperationNotAllowedCursor;
public static readonly NSCursor DragLinkCursor;
public static readonly NSCursor DragCopyCursor;
public static readonly NSCursor ContextualMenuCursor;
public static readonly NSCursor _WindowResizeEastCursor;
public static readonly NSCursor _WindowResizeWestCursor;
public static readonly NSCursor _WindowResizeEastWestCursor;
public static readonly NSCursor _WindowResizeNorthCursor;
public static readonly NSCursor _WindowResizeSouthCursor;
public static readonly NSCursor _WindowResizeNorthSouthCursor;
public static readonly NSCursor _WindowResizeNorthEastCursor;
public static readonly NSCursor _WindowResizeNorthWestCursor;
public static readonly NSCursor _WindowResizeSouthEastCursor;
public static readonly NSCursor _WindowResizeSouthWestCursor;
public static readonly NSCursor _WindowResizeNorthEastSouthWestCursor;
public static readonly NSCursor _WindowResizeNorthWestSouthEastCursor;
public NSCursor(nint id);
public void Set();
public void Push();
public void Pop();
public override NSCursor Autorelease();
}
}
public static partial class AppKit
{
public class NSFont : NSObject
{
public static new readonly Class Class;
public NSFont(nint id);
public NSFont();
public override NSFont Autorelease();
}
}
public static partial class AppKit
{
}
public static partial class AppKit
{
public class NSResponder : NSObject
{
public static new readonly Class Class;
public NSResponder(nint id);
public override NSResponder Autorelease();
}
}
public static partial class AppKit
{
public class NSText : NSView
{
public static new readonly Class Class;
public NSText(nint id);
public NSText();
public override NSText Autorelease();
}
}
public static partial class AppKit
{
public class NSTextView : NSText
{
public static new readonly Class Class;
public NSTextView(nint id);
public NSTextView();
public override NSTextView Autorelease();
}
}
public static partial class AppKit
{
public class NSTitlebarAccessoryViewController : NSViewController
{
public static new readonly Class Class;
public static readonly Prop.NInt LayoutAttributeProp;
public NSTitlebarAccessoryViewController(nint id);
public NSTitlebarAccessoryViewController();
public NSLayoutAttribute LayoutAttribute { get; set; }
}
}
public static partial class AppKit
{
public class NSToolbar : NSObject
{
public static new readonly Class Class;
public NSToolbar(nint id);
public NSToolbar();
public bool ShowsBaselineSeparator { get; set; }
public bool Visible { get; set; }
}
}
public static partial class AppKit
{
public class NSVisualEffectView : NSView
{
public static new readonly Class Class;
public NSVisualEffectView();
public NSVisualEffectMaterial Material { get; set; }
public NSVisualEffectBlendingMode BlendingMode { get; set; }
public NSVisualEffectState State { get; set; }
public override NSView Autorelease();
}
}
public static partial class CoreFoundation
{
public partial class CFArray : NSObject
{
public static new readonly Class Class;
public CFArray(nint id);
}
}
public static partial class CoreFoundation
{
public partial class CFDictionary : NSObject
{
public struct ValueCallBacks
{
public nint Version;
public nint Retain;
public nint Release;
public nint CopyDescription;
public nint Equal;
}
}
}
public static partial class CoreFoundation
{
public partial class CFDictionary : NSObject
{
public static new readonly Class Class;
public CFDictionary(nint id);
}
}
public static partial class Foundation
{
public partial class NSAttributedString : NSObject
{
public static new readonly Class Class;
public static readonly Sel InitWithStringAttributesSel;
public NSAttributedString(nint self);
public NSAttributedString();
}
}
public static partial class Foundation
{
public sealed class NSAutoreleasePool : Ref
{
public static readonly Class Class;
public NSAutoreleasePool();
}
}
public static partial class Foundation
{
public class NSDictionary : NSObject
{
public static new readonly Class Class;
public NSDictionary(nint self);
public NSDictionary();
}
}
public static partial class Foundation
{
public class NSMutableAttributedString : NSAttributedString
{
public static new readonly Class Class;
public NSMutableAttributedString(nint self);
public NSMutableAttributedString();
}
}
public static partial class Foundation
{
public class NSMutableDictionary : NSDictionary
{
public static new readonly Class Class;
public NSMutableDictionary(nint self);
public NSMutableDictionary();
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public ref partial struct NSEventRef
{
public readonly nint Self;
public NSEventRef(nint self);
public NSEventType Type { get; }
public NSEventSubtype Subtype { get; }
public NSPoint LocationInWindow { get; }
public int ClickCount { get; }
public NSPoint ScrollingDelta { get; }
public ushort KeyCode { get; }
public NSEventPhase Phase { get; }
public NSEventPhase MomentumPhase { get; }
public bool HasPreciseScrollingDeltas { get; }
public NFloat Magnification { get; }
public string? Characters { get; }
public float Pressure { get; }
public nint Stage { get; }
/// NSEvent.modifierFlags — bit mask of active modifier keys.
public nuint ModifierFlags { get; }
/// NSEvent.isARepeat — true when the key is held down.
public bool IsARepeat { get; }
public void Dispose();
public static implicit operator nint(NSEventRef cfStringRef);
[System.Flags]
public enum NSEventPhase : ulong
{
None = 0,
Began = 1,
Stationary = 2,
Changed = 4,
Ended = 8,
Cancelled = 16,
MayBegin = 32
}
public enum NSEventType : long
{
LeftMouseDown = 1,
LeftMouseUp = 2,
RightMouseDown = 3,
RightMouseUp = 4,
MouseMoved = 5,
LeftMouseDragged = 6,
RightMouseDragged = 7,
MouseEntered = 8,
MouseExited = 9,
KeyDown = 10,
KeyUp = 11,
FlagsChanged = 12,
AppKitDefined = 13,
SystemDefined = 14,
ApplicationDefined = 15,
Periodic = 16,
CursorUpdate = 17,
ScrollWheel = 22,
TabletPoint = 23,
TabletProximity = 24,
OtherMouseDown = 25,
OtherMouseUp = 26,
OtherMouseDragged = 27,
Gesture = 29,
Magnify = 30,
Swipe = 31,
Rotate = 18,
BeginGesture = 19,
EndGesture = 20,
SmartMagnify = 32,
QuickLook = 33,
Pressure = 34,
DirectTouch = 37,
ChangeMode = 38,
}
public enum NSEventSubtype : short
{
WindowExposed = 0,
ApplicationActivated = 1,
ApplicationDeactivated = 2,
WindowMoved = 4,
ScreenChanged = 8,
PowerOff = 1,
MouseEvent = 0,
TabletPoint = 1,
TabletProximity = 2,
Touch = 3
}
}
}
public static partial class AppKit
{
///
/// https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc
/// NSInteger - treat as nint.
///
public enum NSWindowTitleVisibility : uint
{
Visible = 0,
Hidden = 1
}
}
}
namespace Xui.Runtime.MacOS
{
using NFloat = System.Runtime.InteropServices.NFloat;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
///
/// A view that embeds its content in the system's dynamic glass material.
/// Available on newer macOS releases only.
///
public class NSGlassEffectView : NSView
{
public static new readonly Class Class;
/// Whether this macOS release provides NSGlassEffectView.
public static bool IsAvailable { get; }
public NSGlassEffectView();
/// The view embedded in the glass material.
public NSView ContentView { get; set; }
/// The curvature applied to every glass corner.
public NFloat CornerRadius { get; set; }
/// Enables the system's interactive glass response.
public bool EffectIsInteractive { get; set; }
/// The glass visual treatment.
public NSGlassEffectViewStyle Style { get; set; }
/// The color used to tint the glass effect.
public NSColorRef TintColor { get; set; }
/// Clears any tint from the glass effect.
public void ClearTintColor();
public override NSView Autorelease();
}
}
public static partial class AppKit
{
///
/// Factories for AppKit's adaptive view corner configuration API.
/// Available on newer macOS releases only.
///
public static class NSViewCornerConfiguration
{
public static bool IsAvailable { get; }
///
/// Creates a uniform configuration whose radius follows the containing
/// view's corner geometry, while staying at least .
///
public static nint CreateContainerConcentric(NFloat minimumRadius);
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public class NSGraphicsContext : NSObject
{
public static new readonly Class Class;
protected static readonly Prop.NInt CurrentContextProp;
protected static readonly Sel CGContextSel;
///
/// The underlying implementation is rarely crated by you,
/// going through wrap and unwrap will raise questions about ownership.
///
/// Use the short-lived stack based instead.
///
public static NSGraphicsContext? CurrentContext { get; set; }
public static CGContextRef CurrentCGContext { get; }
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public class NSImage : NSControl
{
public static new readonly Class Class;
public NSImage(nint id);
public NSImage();
public static NSImage LoadImageFile(string path);
public override NSImage Autorelease();
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Dynamic;
using System;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public class NSImageView : NSControl
{
public static new readonly Class Class;
public NSImageView(nint id);
public NSImageView();
public NSImage Image { get; set; }
public override NSImageView Autorelease();
}
}
}
namespace Xui.Runtime.MacOS
{
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public class NSTextField : NSControl
{
public static new readonly Class Class;
public static readonly Sel SetStringValueSel;
public static readonly Sel StringValueSel;
public static readonly Sel SetIsBezeledSel;
public static readonly Sel IsBezeledSel;
public static readonly Sel SetIsEditableSel;
public static readonly Sel IsEditableSel;
public static readonly Sel SetDrawsBackgroundSel;
public static readonly Sel DrawsBackgroundSel;
public static readonly Sel TextColorSel;
public static readonly Sel SetTextColorSel;
public NSTextField(nint id);
public NSTextField();
public string? StringValue { get; set; }
public bool IsBezeled { get; set; }
public bool DrawsBackground { get; set; }
public bool IsEditable { get; set; }
public NSColorRef TextColor { get; set; }
public override NSTextField Autorelease();
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreAnimation;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public partial class NSView : NSResponder
{
public static new readonly Class Class;
public static readonly Sel FrameSel;
public static readonly Sel SetFrameSel;
public static readonly Sel AutoresizesSubviewsSel;
public static readonly Sel SetAutoresizesSubviewsSel;
public static readonly Sel NeedsDisplaySel;
public static readonly Sel SetNeedsDisplaySel;
public static readonly Sel AutoresizingMaskSel;
public static readonly Sel SetAutoresizingMaskSel;
public static readonly Sel TranslatesAutoresizingMaskIntoConstraintsSel;
public static readonly Sel SetTranslatesAutoresizingMaskIntoConstraintsSel;
public static readonly Sel AddSubviewSel;
public static readonly Sel FlippedSel;
public static readonly Sel SetFlippedSel;
public static readonly Sel ClipsToBoundsSel;
public static readonly Sel SetClipsToBoundsSel;
public static readonly Sel WantsLayerSel;
public static readonly Sel SetWantsLayerSel;
public static readonly Sel SizeThatFitsSel;
public static readonly Sel SetNeedsDisplayInRectSel;
public static readonly Sel ConvertPointFromViewSel;
public static readonly Sel LayerSel;
public static readonly Sel SetLayerSel;
/// Returns the parent view of a native view we don't own.
public static nint GetSuperview(nint viewPtr);
/// Gets the frame of a native view we don't own.
public static NSRect GetFrame(nint viewPtr);
/// Sets the frame of a native view we don't own.
public static void SetFrame(nint viewPtr, NSRect rect);
/// Sets the hidden flag of a native view we don't own.
public static void SetHidden(nint viewPtr, bool hidden);
public NSView(nint id);
public NSView();
public NSRect Frame { get; set; }
public bool AutoresizesSubviews { get; set; }
public NSAutoresizingMaskOptions AutoresizingMask { get; set; }
public bool TranslatesAutoresizingMaskIntoConstraints { get; set; }
public bool NeedsDisplay { get; set; }
public bool Flipped { get; set; }
/// Whether subviews are clipped to this view's bounds.
public bool ClipsToBounds { get; set; }
public bool WantsLayer { get; set; }
public CALayer Layer { get; set; }
public void AddSubview(NSView child);
public NSSize SizeThatFits(NSSize size);
public void SetNeedsDisplayInRect(NSRect rect);
public NSPoint ConvertPointFromView(NSPoint point, NSView? view);
public override NSView Autorelease();
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public partial class NSViewController : NSResponder
{
public static new readonly Class Class;
public NSViewController(nint id);
public NSViewController();
public NSView View { get; set; }
public NSSize PreferredContentSize { get; set; }
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class AppKit
{
public partial class NSWindow : NSResponder
{
public static new readonly Class Class;
public static readonly Sel InitWithContentRectStyleMaskBackingDeferSel;
protected static readonly Prop.Bool ReleasedWhenClosedProp;
protected static readonly Prop.Bool AcceptsMouseMovedEventsProp;
public static readonly Prop.String TitleProp;
public static readonly Sel FrameSel;
public static readonly Sel PerformWindowDragWithEventSel;
public static readonly Sel SetFrameDisplaySel;
public static readonly Sel PerformZoomSel;
public NSWindow(nint id);
public NSWindow(string title);
public NSWindowLevel Level { get; set; }
public bool IsReleasedWhenClosed { get; set; }
public bool AcceptsMouseMovedEvents { get; set; }
public NSView? ContentView { get; set; }
///
/// Gets the borrowed native handle for AppKit's current content view without
/// creating a C# wrapper. This is required for AppKit-owned views, which do
/// not participate in Xui's C#-to-Objective-C ownership map.
///
protected nint ContentViewHandle { get; }
///
/// Gets the portion of the content view not covered by AppKit title-bar or
/// toolbar chrome. The returned rectangle is borrowed native geometry and
/// does not require a managed view wrapper.
///
public NSRect ContentLayoutRect { get; }
public NSSize MinSize { set; }
protected static nint CreateNSWindowWithTitle(nint self, string title);
public string? Title { get; set; }
public bool Opaque { get; set; }
public NSRect Rect { get; }
public NSColorRef BackgroundColor { get; set; }
public NSWindowStyleMask StyleMask { get; set; }
public NSWindowTitleVisibility TitleVisibility { get; set; }
/// Whether AppKit has zoomed this window to its standard maximum frame.
public bool IsZoomed { get; }
public bool TitlebarAppearsTransparent { get; set; }
public NSToolbar Toolbar { get; set; }
public NSWindowToolbarStyle ToolbarStyle { get; set; }
///
/// NOTE: The Delegate property is of type:
/// @property(weak) id<NSWindowDelegate> delegate;
public nint Delegate { get; set; }
public void PerformDrag(NSEventRef e);
public void PerformZoom();
///
/// Returns the raw native pointer to one of the standard window chrome buttons.
/// The returned pointer is borrowed — do not retain or dispose it.
///
public nint StandardWindowButton(NSWindowButton button);
public void SetFrame(NSRect frame, bool display);
public void MakeKeyAndOrderFront(nint sender = 0);
public void OrderFrontRegardless();
public void AddTitlebarAccessoryViewController(NSTitlebarAccessoryViewController controller);
///
/// Adds a child window that moves with the parent and stays above it.
/// NSWindowOrderingMode: .above = 1
///
public void AddChildWindow(NSWindow child, nint ordered = 1);
/// Removes a previously added child window.
public void RemoveChildWindow(NSWindow child);
/// Hides the window without closing it.
public void OrderOut(nint sender = 0);
///
/// Converts a rect from the window's coordinate space to screen coordinates.
///
public NSRect ConvertRectToScreen(NSRect rect);
public bool HasShadow { get; set; }
protected static nint InitWithContentRectStyleMaskBackingDefer(nint id, NSRect rect, NSWindowStyleMask nswindowstylemask, NSBackingStoreType nsbackingstoretype, bool defer);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
public partial class Block
{
public const string SystemLib = "/usr/lib/libSystem.dylib";
public static readonly nint Lib;
public static readonly nint NSConcreteStackBlock;
public static readonly nint NSConcreteGlobalBlock;
public static readonly nint GlobalBlockDescriptor;
public static readonly nint StackBlockDescriptor;
public static readonly nint CopyFPtr;
public static readonly nint InvokeFPtr;
public static readonly nint DisposeFPtr;
public delegate void CopyDelegate(ref BlockLiteral dst, ref BlockLiteral src);
public delegate void DisposeDelegate(ref BlockLiteral blockRef);
public delegate void InvokeDelegate(ref BlockLiteral blockRef);
}
public partial class Block
{
[StructLayout(LayoutKind.Sequential)]
public ref struct BlockRef
{
public BlockRef(Action action);
}
}
public static partial class CoreFoundation
{
public partial class CFDataRef : IDisposable
{
public readonly nint Self;
public CFDataRef(nint self);
public CFDataRef(string? str);
public unsafe ReadOnlySpan AsSpan();
public void Dispose();
public static implicit operator nint(CFDataRef cfDataRef);
}
}
public static partial class CoreFoundation
{
public ref partial struct CFSetRef : IDisposable
{
[LibraryImport(CoreFoundationLib)]
public static partial nint CFSetGetCount(nint cfSetRef);
[LibraryImport(CoreFoundationLib)]
public static partial nint CFSetGetValues(CFSetRef theSet, nint arrayOfValuePtrs);
public readonly nint Self;
public CFSetRef(nint self);
public nint Count { get; }
public void Dispose();
public static implicit operator nint(CFSetRef cfSetRef);
}
}
public static partial class CoreFoundation
{
public ref partial struct CFURLRef : IDisposable
{
public readonly nint Self;
public CFURLRef(nint self);
///
/// Creates a CFURL from a POSIX file path string (CFStringRef).
///
public static CFURLRef CreateWithFileSystemPath(nint cfStringRef);
public void Dispose();
public static implicit operator nint(CFURLRef r);
}
}
public static partial class CoreGraphics
{
public ref partial struct CGColorSpaceRef : IDisposable
{
public readonly nint Self;
public static CGColorSpaceRef CreateDeviceRGB();
public CGColorSpaceRef(nint self);
public void Dispose();
public static implicit operator nint(CGColorSpaceRef cfColorRef);
}
}
public static partial class CoreGraphics
{
public ref partial struct CGDataProviderRef : IDisposable
{
public readonly nint Self;
public CGDataProviderRef(nint self);
///
/// Creates a data provider from a raw memory buffer.
/// The buffer must remain valid for the lifetime of the provider.
/// Use releaseCallback to free the buffer when the provider is destroyed.
///
public static CGDataProviderRef CreateWithData(nint data, nuint size, nint releaseCallback = 0);
public void Dispose();
public static implicit operator nint(CGDataProviderRef r);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
public partial class Block
{
[StructLayout(LayoutKind.Explicit)]
public unsafe struct BlockDescriptor
{
[FieldOffset(0)]
public uint Reserved;
[FieldOffset(8)]
public uint Size;
[FieldOffset(16)]
public nint CopyFPtr;
[FieldOffset(24)]
public nint DisposeFPtr;
[FieldOffset(32)]
public nint Signature;
}
}
public partial class Block
{
[StructLayout(LayoutKind.Sequential)]
public struct BlockLiteral
{
public nint Isa;
public int Flags;
public int Reserved;
public nint FunctionPtr;
public nint BlockDescriptor;
///
/// Extending the Objecitve-C literal with our custom field,
/// to hold reference to our C# instance that will perform.
///
public nint Handler;
}
}
public static partial class CoreAnimation
{
public sealed class CAGradientLayerType
{
public readonly nint Self;
public static readonly CAGradientLayerType Axial;
public static readonly CAGradientLayerType Conic;
public static readonly CAGradientLayerType Radial;
public static implicit operator nint(CAGradientLayerType type);
}
}
public static partial class CoreAnimation
{
public sealed class CAShapeLayerFillRule
{
public readonly nint Self;
public static readonly CAShapeLayerFillRule EvenOdd;
public static readonly CAShapeLayerFillRule NonZero;
public static implicit operator nint(CAShapeLayerFillRule fillRule);
}
}
public static partial class CoreAnimation
{
public sealed class CAShapeLayerLineCap
{
public readonly nint Self;
public static readonly CAShapeLayerLineCap Butt;
public static readonly CAShapeLayerLineCap Round;
public static readonly CAShapeLayerLineCap Square;
public static implicit operator nint(CAShapeLayerLineCap fillRule);
}
}
public static partial class CoreAnimation
{
public const string CoreAnimationLib = "/System/Library/Frameworks/QuartzCore.framework/QuartzCore";
public static readonly nint Lib;
}
public static partial class CoreFoundation
{
public enum CFNumberType : long
{
SInt8 = 1,
SInt16 = 2,
SInt32 = 3,
SInt64 = 4,
Float32 = 5,
Float64 = 6,
Char = 7,
Short = 8,
Int = 9,
Long = 10,
LongLong = 11,
Float = 12,
Double = 13,
CFIndex = 14,
NSInteger = 15,
CGFloat = 16,
Max = 16
}
}
public static partial class CoreGraphics
{
public ref partial struct CGColorRef
{
public readonly nint Self;
public CGColorRef(nint self);
public static CGColorRef RGBA(NFloat red, NFloat green, NFloat blue, NFloat alpha);
public void Dispose();
public static implicit operator nint(CGColorRef cfColorRef);
}
}
public static partial class CoreGraphics
{
public ref partial struct CGContextRef
{
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextRelease(nint self);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetRGBFillColor(nint cgContextRef, NFloat red, NFloat green, NFloat blue, NFloat alpha);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetRGBStrokeColor(nint cgContextRef, NFloat red, NFloat green, NFloat blue, NFloat alpha);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetLineWidth(nint cgContextRef, NFloat width);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextFillRect(nint cgContextRef, CGRect rect);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextStrokeRect(nint cgContextRef, CGRect rect);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddPath(nint cgContextRef, nint cgPathRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextMoveToPoint(nint cgContextRef, NFloat x, NFloat y);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddLineToPoint(nint cgContextRef, NFloat x, NFloat y);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddRect(nint cgContextRef, CGRect cgRect);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddArc(nint cgContextRef, NFloat x, NFloat y, NFloat radius, NFloat startAngle, NFloat endAngle, int clockwise);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddArcToPoint(nint cgContextRef, NFloat x1, NFloat y1, NFloat x2, NFloat y2, NFloat radius);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddQuadCurveToPoint(nint c, NFloat cpx, NFloat cpy, NFloat x, NFloat y);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextAddCurveToPoint(nint c, NFloat cp1x, NFloat cp1y, NFloat cp2x, NFloat cp2y, NFloat x, NFloat y);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextBeginPath(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextClosePath(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextClip(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextClipToRect(nint c, CGRect rect);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextEOClip(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetAlpha(nint cgContextRef, NFloat alpha);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetLineCap(nint cgContextRef, CGLineCap cap);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetLineJoin(nint cgContextRef, CGLineJoin join);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetMiterLimit(nint cgContextRef, NFloat limit);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextFillPath(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextEOFillPath(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextStrokePath(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextDrawLinearGradient(nint cgContextRef, nint cgGradientRef, CGPoint startPoint, CGPoint endPoint, uint options = 3);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextDrawRadialGradient(nint cgContextRef, nint cgGradientRef, CGPoint startCenter, NFloat startRadius, CGPoint endCenter, NFloat endRadius, uint options = 3);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextReplacePathWithStrokedPath(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSaveGState(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextRestoreGState(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextConcatCTM(nint cgContextRef, CGAffineTransform transform);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetLineDash(nint c, NFloat phase, ref NFloat cgFloatArrPtr, nint count);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetLineDash(nint c, NFloat phase, nint cgFloatArrPtr, nint count);
[LibraryImport(CoreGraphicsLib)]
public static partial CGAffineTransform CGContextGetCTM(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextRotateCTM(nint cgContextRef, NFloat angle);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextScaleCTM(nint cgContextRef, NFloat sx, NFloat sy);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextTranslateCTM(nint cgContextRef, NFloat tx, NFloat ty);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetTextDrawingMode(nint cgContextRef, CGTextDrawingMode mode);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextBeginTransparencyLayer(nint cgContextRef, nint auxiliaryInfo);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextEndTransparencyLayer(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextSetBlendMode(nint cgContextRef, CGBlendMode blendMode);
[LibraryImport(CoreGraphicsLib)]
public static partial void CGContextDrawImage(nint cgContextRef, CGRect rect, nint image);
[LibraryImport(CoreGraphicsLib)]
public static partial CGRect CGContextGetClipBoundingBox(nint cgContextRef);
[LibraryImport(CoreGraphicsLib)]
public static partial nint UIGraphicsGetCurrentContext();
public readonly nint Self;
public CGContextRef(nint self);
public CGAffineTransform Transform { get; }
public NFloat Alpha { set; }
public CGLineCap LineCap { set; }
public CGLineJoin LineJoin { set; }
public CGAffineTransform CTM { get; }
public void SetRGBFillColor(NFloat red, NFloat green, NFloat blue, NFloat alpha);
public void SetRGBStrokeColor(NFloat red, NFloat green, NFloat blue, NFloat alpha);
public void SetLineWidth(NFloat width);
public void SetMiterLimit(NFloat limit);
public void FillRect(CGRect rect);
public void StrokeRect(CGRect rect);
public void AddPath(CGPathRef path);
public void AddRect(CGRect rect);
public void MoveToPoint(NFloat x, NFloat y);
public void LineToPoint(NFloat x, NFloat y);
public void AddArc(NFloat x, NFloat y, NFloat radius, NFloat startAngle, NFloat endAngle, bool clockwise);
public void AddArcToPoint(NFloat x1, NFloat y1, NFloat x2, NFloat y2, NFloat radius);
public void CGContextAddQuadCurveToPoint(NFloat cpx, NFloat cpy, NFloat x, NFloat y);
public void CGContextAddCurveToPoint(NFloat cp1x, NFloat cp1y, NFloat cp2x, NFloat cp2y, NFloat x, NFloat y);
public void BeginPath();
public void ClosePath();
public void Clip();
public void EOClip();
public void EOFillPath();
public void FillPath();
public void StrokePath();
public void DrawLinearGradient(CGGradientRef gradient, CGPoint startPoint, CGPoint endPoint);
public void DrawRadialGradient(CGGradientRef gradient, CGPoint startCenter, NFloat startRadius, CGPoint endCenter, NFloat endRadius);
public void SaveGState();
public void RestoreGState();
public void ReplacePathWithStrokedPath();
public void ConcatCTM(CGAffineTransform transform);
///
/// Draws into in the current CGContext
/// coordinate space. In a flipped view the image will appear upside-down unless the
/// caller flips the CTM beforehand (see ).
///
public void DrawImage(CGRect rect, nint image);
///
/// Draws into , correcting the upside-down
/// rendering that occurs in a Y-down (isFlipped) view by temporarily flipping the CTM.
///
public void DrawImageFlipped(CGRect rect, nint image);
public void RotateCTM(NFloat angle);
public void ScaleCTM(NFloat sx, NFloat sy);
public void TranslateCTM(NFloat tx, NFloat ty);
public static implicit operator nint(CGContextRef path);
public void Dispose();
}
}
public static partial class CoreGraphics
{
public ref partial struct CGMutablePathRef
{
public readonly nint Self;
public CGMutablePathRef(nint self);
public CGMutablePathRef();
public void MoveTo(NFloat x, NFloat y);
public void LineTo(NFloat x, NFloat y);
public void Close();
public void Dispose();
public static implicit operator nint(CGMutablePathRef cfColorRef);
}
}
public static partial class CoreGraphics
{
public ref partial struct CGPathRef
{
public readonly nint Self;
[LibraryImport(CoreGraphicsLib)]
public static partial nint CGPathCreateWithRoundedRect(CGRect rect, NFloat cornerWidth, NFloat cornerHeight, nint cgAffineTransformPtr = 0);
[LibraryImport(CoreGraphicsLib)]
public static partial nint CGPathCreateWithRoundedRect(CGRect rect, NFloat cornerWidth, NFloat cornerHeight, ref CGAffineTransform transform);
public static CGPathRef CreateWithRoundedRect(CGRect rect, NFloat radius);
public CGPathRef(nint self);
public void Dispose();
public static implicit operator nint(CGPathRef cfColorRef);
}
}
public static partial class CoreGraphics
{
public const string CoreGraphicsLib = "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics";
public static readonly nint Lib;
}
public static partial class CoreText
{
public const string CoreTextLib = "/System/Library/Frameworks/CoreText.framework/CoreText";
public static readonly nint Lib;
[LibraryImport(CoreTextLib)]
public static partial nint NSSelectorFromString(nint selector);
[LibraryImport(CoreTextLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static partial bool CTFontManagerRegisterFontsForURL(nint fontUrl, uint scope, out nint error);
}
public static partial class Foundation
{
public const string FoundationLib = "/System/Library/Frameworks/Foundation.framework/Foundation";
public static readonly nint Lib;
[LibraryImport(ObjC.LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, NSRect rect);
[LibraryImport(ObjC.LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, NSSize rect);
}
public static partial class Foundation
{
public partial class NSAttributedString
{
public class Key : NSString
{
public static readonly Key BackgroundColor;
public static readonly Key BaselineOffset;
public static readonly Key Font;
public static readonly Key ForegroundColor;
public static readonly Key GlyphInfo;
public static readonly Key Kern;
public static readonly Key Ligature;
public static readonly Key ParagraphStyle;
public static readonly Key StrikethroughColor;
public static readonly Key StrikethroughStyle;
public static readonly Key StrokeColor;
public static readonly Key StrokeWidth;
public static readonly Key Superscript;
public static readonly Key Tracking;
public static readonly Key UnderlineColor;
public static readonly Key UnderlineStyle;
public static readonly Key WritingDirection;
}
}
}
public static partial class ImageIO
{
public const string ImageIOLib = "/System/Library/Frameworks/ImageIO.framework/ImageIO";
public static readonly nint Lib;
}
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static partial class Metal
{
}
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
public class NSObject : Ref
{
public static readonly Class Class;
public static readonly Sel AutoreleaseSel;
public NSObject(nint id);
public virtual NSObject Autorelease();
}
}
}
namespace Xui.Runtime.MacOS
{
using System;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class CoreAnimation
{
public class CADisplayLink : NSObject
{
public static new readonly Class Class;
public static readonly Sel TimestampSel;
public static readonly Sel TargetTimestampSel;
public static readonly Sel DisplayLinkWithTargetSelector;
public static readonly Sel AddToRunLoopForModeSel;
public static readonly Sel RemoveFromRunLoopForModeSel;
public CADisplayLink(nint id);
public TimeSpan Timestamp { get; }
public TimeSpan TargetTimestamp { get; }
public void AddToRunLoopForMode(NSRunLoop runloop, NSRunLoop.Mode mode);
public void RemoveToRunLoopForMode(NSRunLoop runloop, NSRunLoop.Mode mode);
public static CADisplayLink DisplayLink(nint target, nint selector);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.ObjC;
public static partial class CoreAnimation
{
///
/// https://developer.apple.com/documentation/quartzcore/cashapelayer?language=objc
///
public partial class CAGradientLayer : CALayer
{
public static new readonly Class Class;
public CAGradientLayer();
public CAGradientLayer(nint id);
public nint Colors { get; set; }
public nint Locations { get; set; }
public CGPoint StartPoint { get; set; }
public CGPoint EndPoint { get; set; }
public CAGradientLayerType Type { get; set; }
}
}
public static partial class CoreAnimation
{
///
/// https://developer.apple.com/documentation/quartzcore/cashapelayer?language=objc
///
public class CAShapeLayer : CALayer
{
public static new readonly Class Class;
public static readonly Sel PathSel;
public static readonly Sel SetPathSel;
public static readonly Sel SetFillColorSel;
public static readonly Prop FillColorProp;
public static readonly Prop StrokeColorProp;
public static readonly Prop LineWidthProp;
public static readonly Prop FillRuleProp;
public static readonly Prop LineCapProp;
public static readonly Prop LineJoinProp;
public static readonly Prop MiterLimitProp;
public CAShapeLayer();
public CAShapeLayer(nint id);
public nint Path { get; set; }
public CGColorRef FillColor { get; set; }
public CGColorRef StrokeColor { get; set; }
public NFloat LineWidth { get; set; }
public CAShapeLayerFillRule FillRule { get; set; }
public CAShapeLayerLineCap LineCap { get; set; }
public CAShapeLayerLineJoin LineJoin { get; set; }
public NFloat MiterLimit { get; set; }
}
}
}
namespace Xui.Runtime.MacOS
{
using System;
using static Xui.Runtime.MacOS.ObjC;
public static partial class CoreAnimation
{
public class CALayer : NSObject
{
public static new readonly Class Class;
public CALayer();
public CALayer(nint id);
public CALayer Mask { get; set; }
public void InsertAt(CALayer layer, uint index);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.ObjC;
public static partial class CoreAnimation
{
public sealed class CAShapeLayerLineJoin
{
public readonly nint Self;
public static readonly CAShapeLayerLineJoin Miter;
public static readonly CAShapeLayerLineJoin Round;
public static readonly CAShapeLayerLineJoin Bevel;
public static implicit operator nint(CAShapeLayerLineJoin fillRule);
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.CoreFoundation.CFDictionary;
using static Xui.Runtime.MacOS.ObjC;
public static partial class CoreFoundation
{
public partial class CFDictionary : NSObject
{
public struct KeyCallBacks
{
public nint Version;
public nint Retain;
public nint Release;
public nint CopyDescription;
public nint Equal;
public nint Hash;
}
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreFoundation.CFArray;
public static partial class CoreFoundation
{
public ref partial struct CFMutableArrayRef
{
[LibraryImport(CoreFoundationLib)]
public static partial nint CFArrayCreateMutable(nint allocator, nint capacity, nint callbacks);
[LibraryImport(CoreFoundationLib)]
public static partial void CFArrayAppendValue(nint cfMutableArrayRef, nint value);
public delegate void ReleaseCallBack(nint allocator, nint value);
public delegate void RetainCallBack(nint allocator, nint value);
public static readonly nint CallBacks;
public readonly nint Self;
public CFMutableArrayRef();
public void Add(nint value);
public void Dispose();
public static implicit operator nint(CFMutableArrayRef arr);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreFoundation.CFDictionary;
public static partial class CoreFoundation
{
public ref partial struct CFMutableDictionaryRef
{
public static readonly nint KeyCallBacks;
public static readonly nint ValueCallBacks;
public readonly nint Self;
public CFMutableDictionaryRef();
public void SetValue(nint key, nint value);
public void Dispose();
public static implicit operator nint(CFMutableDictionaryRef arr);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreFoundation;
public static partial class CoreFoundation
{
public ref partial struct CFNumberRef
{
[LibraryImport(CoreFoundationLib)]
public static partial nint CFNumberCreate(nint allocator, CFNumberType theType, uint valuePtr);
[LibraryImport(CoreFoundationLib)]
public static partial nint CFNumberCreate(nint allocator, CFNumberType theType, ref int valuePtr);
[LibraryImport(CoreFoundationLib)]
public static partial nint CFNumberCreate(nint allocator, CFNumberType theType, ref NFloat valuePtr);
public readonly nint Self;
public CFNumberRef(nint self);
public CFNumberRef(NFloat value);
public CFNumberRef(int value);
public void Dispose();
public static implicit operator nint(CFNumberRef cfColorRef);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using Xui.Core.Math2D;
public static partial class CoreGraphics
{
///
/// Affine transformation matrix in the form:
///
/// | A B 0 |
/// | C D 0 |
/// | Tx Ty 1 |
///
/// Transforming a vector:
///
/// | A B 0 |
/// [x' y' 1] = [x y 1] * | C D 0 |
/// | Tx Ty 1 |
///
public partial struct CGAffineTransform
{
[LibraryImport(CoreGraphicsLib)]
public static partial CGAffineTransform CGAffineTransformInvert(CGAffineTransform t);
public static readonly CGAffineTransform Identity;
public NFloat A, B, C, D, Tx, Ty;
public CGAffineTransform(NFloat a, NFloat b, NFloat c, NFloat d, NFloat tx, NFloat ty);
public CGAffineTransform Invert { get; }
public static implicit operator CGAffineTransform(AffineTransform t);
public static implicit operator AffineTransform(CGAffineTransform t);
}
}
public static partial class CoreGraphics
{
public struct CGPoint
{
public NFloat X;
public NFloat Y;
public CGPoint(NFloat x, NFloat y);
public static implicit operator CGPoint(Point point);
public static implicit operator Point(CGPoint point);
}
}
public static partial class CoreGraphics
{
public struct CGRect
{
public CGPoint Origin;
public CGSize Size;
public CGRect(NFloat x, NFloat y, NFloat width, NFloat height);
public CGRect(CGPoint origin, CGSize size);
public static implicit operator Rect(CGRect rect);
public static implicit operator CGRect(Rect rect);
}
}
public static partial class CoreGraphics
{
public struct CGSize
{
public NFloat Width;
public NFloat Height;
public CGSize(NFloat width, NFloat height);
public static implicit operator Vector(CGSize size);
}
}
public static partial class Foundation
{
[StructLayout(LayoutKind.Sequential)]
public struct NSPoint
{
public NFloat x;
public NFloat y;
public NSPoint(NFloat x, NFloat y);
public static implicit operator Point(NSPoint nsPoint);
public static implicit operator Vector(NSPoint nsPoint);
}
}
public static partial class Foundation
{
[StructLayout(LayoutKind.Sequential)]
public struct NSRect
{
public NSPoint Origin;
public NSSize Size;
public NSRect(NFloat x, NFloat y, NFloat width, NFloat height);
public static implicit operator Rect(NSRect rect);
public static implicit operator NSRect(Rect rect);
}
}
public static partial class Foundation
{
[StructLayout(LayoutKind.Sequential)]
public struct NSSize
{
public NFloat width;
public NFloat height;
public NSSize(NFloat width, NFloat height);
public static implicit operator NSSize(Size size);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using Xui.Core.Canvas.Filter;
using Xui.Core.Canvas;
public static partial class CoreGraphics
{
public ref partial struct CGGradientRef
{
[LibraryImport(CoreGraphicsLib)]
public static partial void CGGradientRelease(nint self);
[LibraryImport(CoreGraphicsLib)]
public static partial nint CGGradientCreateWithColorComponents(nint cgColorSpaceRef, ref NFloat componentsArrPtr, ref NFloat locationsArrPtr, nint count);
public readonly nint Self;
public CGGradientRef(nint self);
public CGGradientRef(ReadOnlySpan gradient);
public void Dispose();
public static implicit operator nint(CGGradientRef cfColorRef);
}
}
}
namespace Xui.Runtime.MacOS
{
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
public static partial class CoreGraphics
{
///
/// Long-lived CGImage wrapper for images that persist across multiple frames.
/// Wraps a native CGImageRef pointer and handles CoreFoundation reference counting.
/// This is the class equivalent to D2D1.Bitmap1 in the Windows runtime.
///
public class CGImage : IDisposable
{
public CGImage(nint ptr);
public uint Width { get; }
public uint Height { get; }
public static implicit operator nint(CGImage? image);
public void Dispose();
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
public static partial class CoreGraphics
{
public ref partial struct CGImageRef : IDisposable
{
[LibraryImport(CoreGraphicsLib)]
public static partial void CGImageRelease(nint image);
public readonly nint Self;
public CGImageRef(nint self);
public nuint Width { get; }
public nuint Height { get; }
///
/// Creates a new CGImage cropped to (in image pixel coordinates).
/// The caller owns the returned image and must dispose it.
///
public static CGImageRef CreateWithImageInRect(nint image, CGRect rect);
///
/// Creates a new CGImage from raw pixel data provided by a data provider.
/// The caller owns the returned image and must dispose it.
///
public static CGImageRef Create(nuint width, nuint height, nuint bitsPerComponent, nuint bitsPerPixel, nuint bytesPerRow, nint colorspace, CGBitmapInfo bitmapInfo, nint provider, bool shouldInterpolate = true);
public void Dispose();
public static implicit operator nint(CGImageRef r);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using Xui.Core.Canvas.Symbols;
using Xui.Core.Canvas;
public static partial class CoreGraphics
{
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.Foundation;
public static partial class CoreText
{
public partial class CTFontDescriptor
{
public class FontAttributes : NSString
{
public static readonly FontAttributes URL;
public static readonly FontAttributes Name;
public static readonly FontAttributes DisplayName;
public static readonly FontAttributes FamilyName;
public static readonly FontAttributes StyleName;
public static readonly FontAttributes Traits;
public static readonly FontAttributes Variant;
public static readonly FontAttributes Size;
public static readonly FontAttributes Matrix;
public static readonly FontAttributes CascadeList;
public static readonly FontAttributes CharacterSet;
public static readonly FontAttributes Languages;
public static readonly FontAttributes BaselineAdjust;
public static readonly FontAttributes MacintoshEncodings;
public static readonly FontAttributes Features;
public static readonly FontAttributes FeatureSettings;
public static readonly FontAttributes FixedAdvance;
public static readonly FontAttributes FontOrientation;
public static readonly FontAttributes FontFormat;
public static readonly FontAttributes RegistrationScope;
public static readonly FontAttributes Priority;
public static readonly FontAttributes Enabled;
public static readonly FontAttributes Downloadable;
public static readonly FontAttributes Downloaded;
}
}
}
public static partial class CoreText
{
public partial class CTFontDescriptor
{
public class FontTrait : NSString
{
///
/// CFNumberRef.
///
public static readonly FontTrait Symbolic;
///
/// Normalized font weight. CFNumberRef, from -1 to 1, where 0 is normal.
///
public static readonly FontTrait Weight;
///
/// CFNumberRef spacing, from -1.0 to 1.0 where -1 is condensed, 0 is regular.
///
public static readonly FontTrait Width;
///
/// CFNumberRef spacing, from -1.0 to 1.0 where -1 is condensed, 0 is regular. (like oblique)
///
public static readonly FontTrait Slant;
}
}
}
public static partial class CoreText
{
public partial class CTFontDescriptor
{
public enum SymbolicTrait : uint
{
Italic = (1 << 0),
Bold = (1 << 1),
Expanded = (1 << 5),
Condensed = (1 << 6),
MonoSpace = (1 << 10),
Vertical = (1 << 11),
UIOptimized = (1 << 12),
ColorGlyphs = (1 << 13),
Composite = (1 << 14),
}
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.CoreGraphics;
public static partial class CoreText
{
public ref partial struct CTFontDescriptorRef : IDisposable
{
public readonly nint Self;
[LibraryImport(CoreTextLib)]
public static partial nint CTFontDescriptorCreateWithAttributes(nint cfDictionaryRefAttributes);
[LibraryImport(CoreTextLib)]
public static partial nint CTFontDescriptorCreateWithNameAndSize(nint cfStringRefName, NFloat size);
public CTFontDescriptorRef(nint self);
public CTFontDescriptorRef(string name);
public static CTFontDescriptorRef WithAttributes(nint attributes);
public void Dispose();
public static implicit operator nint(CTFontDescriptorRef ctFontRef);
}
}
public static partial class CoreText
{
public ref partial struct CTLineRef : IDisposable
{
public readonly nint Self;
public CTLineRef(nint self);
public static CTLineRef Create(nint attributedString);
public void Dispose();
public static implicit operator nint(CTLineRef r);
public (NFloat Ascent, NFloat Descent, NFloat Leading) GetVerticalMetrics();
public CGRect GetBounds(BoundsOptions options = BoundsOptions.UseOpticalBounds);
public NFloat GetWidth();
///
/// Platform-safe flags controlling how CTLine bounds are calculated.
/// Matches CTLineBoundsOptions from CoreText.
/// (nuint)
///
[Flags]
public enum BoundsOptions : uint
{
ExcludeTypographicLeading = 1 << 0,
ExcludeTypographicShifts = 1 << 1,
UseHangingPunctuation = 1 << 2,
UseGlyphPathBounds = 1 << 3,
UseOpticalBounds = 1 << 4,
IncludeLanguageExtents = 1 << 5
}
}
}
public static partial class ImageIO
{
public ref partial struct CGImageSourceRef : IDisposable
{
public readonly nint Self;
public CGImageSourceRef(nint self);
///
/// Creates a CGImageSource from a CFURL. The source is retained; caller must dispose.
///
public static CGImageSourceRef CreateWithURL(nint cfUrlRef);
///
/// Decodes the image at (0 for the primary frame).
/// Returns a new CGImageRef that the caller owns and must dispose.
///
public CGImageRef CreateImageAtIndex(nuint index = 0);
public void Dispose();
public static implicit operator nint(CGImageSourceRef r);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Buffers.Binary;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System;
using Xui.Core.Canvas;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.ObjC;
public static partial class CoreText
{
public ref partial struct CTFontRef : IDisposable
{
[LibraryImport(CoreTextLib)]
public static partial nint CTFontCreateWithFontDescriptorAndOptions(nint ctFontDescriptorRefDescriptor, NFloat size, ref CGAffineTransform matrix, nint ctFontOptions);
[LibraryImport(CoreTextLib)]
public static partial nint CTFontCreateWithFontDescriptorAndOptions(nint ctFontDescriptorRefDescriptor, NFloat size, nint matrixPtr, nint ctFontOptions);
public readonly nint Self;
public CTFontRef(nint self);
public CTFontRef(nint ctFontDescriptorRefDescriptor, NFloat size, ref CGAffineTransform matrix, nint ctFontOptions);
public CTFontRef(nint ctFontDescriptorRefDescriptor, nint ctFontOptions);
public NFloat Ascent { get; }
public NFloat Descent { get; }
public NFloat Leading { get; }
public NFloat CapHeight { get; }
public NFloat XHeight { get; }
public uint UnitsPerEm { get; }
public NFloat PointSize { get; }
public CGRect BoundingBox { get; }
public FontMetrics FontMetrics { get; }
public bool TryGetBaselineFromBslnTable(out short hanging, out short ideographic);
public bool TryGetFontBoundingBox(out short yMin, out short yMax);
public bool TryGetEmAscentDescentFromHhea(out short ascent, out short descent);
public void Dispose();
public static implicit operator nint(CTFontRef ctFontRef);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using static Xui.Runtime.MacOS.Block;
public static partial class Dispatch
{
public const string DispatchLib = "/usr/lib/system/libdispatch.dylib";
public static readonly nint Lib;
///
/// An alternative for the dispatch_get_main_queue macro,
/// under the hood it reads _dispatch_main_q from libdispatch.dylib.
///
public static nint MainQueue { get; }
[LibraryImport(DispatchLib, EntryPoint = "dispatch_async")]
public static partial void DispatchAsync(nint queue, nint block);
[LibraryImport(DispatchLib, EntryPoint = "dispatch_async")]
public static partial void DispatchAsync(nint queue, ref BlockLiteral block);
[LibraryImport(DispatchLib, EntryPoint = "dispatch_async")]
public static partial void DispatchAsync(nint queue, BlockRef block);
}
}
namespace Xui.Runtime.MacOS
{
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.ObjC;
public static partial class Foundation
{
public ref struct NSAttributedStringRef : IDisposable
{
public readonly nint Self;
public NSAttributedStringRef(CFStringRef text, CFMutableDictionaryRef attributes);
public void Dispose();
public static implicit operator nint(NSAttributedStringRef str);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.ObjC;
public static partial class Foundation
{
public partial class NSRunLoop : NSObject
{
public class Mode : NSString
{
public static readonly Mode Common;
public static readonly Mode Default;
}
}
}
public static partial class Foundation
{
public partial class NSRunLoop : NSObject
{
public static new readonly Class Class;
public static readonly Prop.NInt MainRunLoopProp;
public NSRunLoop(nint id);
public static NSRunLoop MainRunLoop { get; }
}
}
public static partial class Foundation
{
public partial class NSString : NSObject
{
public static new readonly Class Class;
public static readonly Sel DrawAtPointWithAttributesSel;
public static readonly Sel SizeWithAttributesSel;
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint nsString, nint sel, CGPoint position, nint attributes);
public NSString(nint id);
public NSString(string text);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System;
public static class Marshalling
{
public static void Set(nint objCInstance, object cSharpInstance);
///
/// Used to get the C# instance responsible for an Objective-C instance.
///
public static T Get(nint objCInstance);
public static void Delete(nint id);
public static T? ObjCToCSharpNullable(nint objCInstance)
where T : class;
public static T ObjCToCSharp(nint objCInstance);
///
/// Registers a class wrapper for Objective-C instances.
/// It is recommended you construct the complete object graph in C#,
/// and have C# instances responsible for the Objecitve-C counterparts,
/// with complete ownership including lifespan.
///
/// In some cases, like dealing with singletons however, you will get Objective-C
/// instances constructed by the runtime, and the method here will allow registering factories.
///
/// However wrapped instances will often retain the native one,
/// and you will need to device an per-case plan how to deal with the lifetime of these.
///
public static void SetClassWrapper(nint objCClass, Func factory);
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using System;
using Xui.GPU.Shaders.Types;
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static partial class Metal
{
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using Xui.GPU.Shaders.Types;
///
/// Thin P/Invoke wrappers for the Apple Metal framework.
/// Uses Objective-C runtime and Metal API for hardware-accelerated rendering.
///
public static partial class Metal
{
}
}
namespace Xui.Runtime.MacOS
{
using System.Collections.Generic;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
///
/// Abstracts operations on Objective-C Class object.
///
public class Class
{
public static readonly Sel AllocSel;
public static readonly Sel InitSel;
public Class(nint lib, string name);
public Class(string name, nint id);
public string Name { get; }
public nint Id { get; }
public nint New();
public nint Alloc();
///
/// Creates a runtime derived class.
/// Under the hood calls into objc_allocateClassPair
/// https://developer.apple.com/documentation/objectivec/1418559-objc_allocateclasspair?language=objc
///
///
///
public Builder Extend(string name, nuint extraBytes = 0);
public static implicit operator nint(Class cls);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.Foundation;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public partial class ObjC
{
public class Builder
{
public Builder(Class super, string name, nuint extraBytes = 0);
public Builder AddProtocol(Protocol protocol);
public unsafe Builder AddMethod(string selector, ObjC.IdSel_Bool method);
public unsafe Builder AddMethod(string selector, ObjC.IdSelId_Void method);
public unsafe Builder AddMethod(string selector, ObjC.IdSelId_Bool method);
public unsafe Builder AddMethod(string selector, ObjC.IdSelIdId_Bool method);
public unsafe Builder AddMethod(string selector, ObjC.IdSelIdNUInt_NUInt method);
public unsafe Builder AddMethod(string selector, ObjC.IdSel_Void method);
public unsafe Builder AddMethod(string selector, ObjC.IdSel_Id method);
public unsafe Builder AddMethod(string selector, ObjC.IdSelIdId_Void method);
public unsafe Builder AddMethod(string selector, ObjC.IdSelNSRect_Void method);
public Class Register();
public static implicit operator nint(Builder cls);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.Foundation;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
public const string LibObjCLib = "/usr/lib/libobjc.A.dylib";
public static readonly nint Lib;
[LibraryImport(LibObjCLib, EntryPoint = "object_getClass")]
public static partial nint object_getClass(nint instance);
public static string? object_getClassName(nint instance);
[LibraryImport(LibObjCLib, EntryPoint = "objc_getClass")]
public static partial nint objc_getClass([MarshalAs(UnmanagedType.LPStr)] string name);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial nint objc_msgSend_retIntPtr(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial nint objc_msgSend_retIntPtr(nint obj, nint sel, nint id1, nint id2);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial double objc_msgSend_retDouble(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.LPStr)]
public static partial string objc_msgSend_retCStr(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial nuint objc_msgSend_retNUInt(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial NFloat objc_msgSend_retNFloat(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial float objc_msgSend_retFloat(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial nint objc_msgSend_retIntPtr(nint obj, nint sel, nint id1);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial nint objc_msgSend_retIntPtr(nint obj, nint sel, NFloat value);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial int objc_msgSend_retInt(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static unsafe partial CGSize objc_msgSend_retCGSize(nint obj, nint sel, nint id1);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static unsafe partial NSRect objc_msgSend_retNSRect(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static unsafe partial NSRect objc_msgSend_retNSRect(nint obj, nint sel, NSRect rect);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, NFloat v);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, nuint v);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, nint a1, uint v2);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, nint a1, nint v2);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, [MarshalAs(UnmanagedType.I1)] bool v1);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, nint id1);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSendSuper")]
public static partial void objc_msgSendSuper(ref Super obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSendSuper")]
public static partial void objc_msgSendSuper(ref Super obj, nint sel, NSRect rect);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSendSuper")]
public static partial void objc_msgSendSuper(ref Super obj, nint sel, nint id1);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
public static partial void objc_msgSend(nint obj, nint sel, int id1);
[LibraryImport(LibObjCLib)]
public static partial nint objc_getProtocol([MarshalAs(UnmanagedType.LPStr)] string name);
[LibraryImport(LibObjCLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static partial bool class_addProtocol(nint objcclass, nint name);
[LibraryImport(LibObjCLib)]
[return: MarshalAs(UnmanagedType.LPStr)]
public static partial string class_getName(nint objcclass);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static partial bool objc_msgSend_retBool(nint obj, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static partial bool objc_msgSend_retBool(nint obj, nint sel, int int1);
[LibraryImport(LibObjCLib, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static partial bool objc_msgSend_retBool(nint obj, nint sel, nint int1);
[LibraryImport(LibObjCLib)]
public static partial nint objc_allocateClassPair(nint superclass, nint name, nuint extrabytes);
[LibraryImport(LibObjCLib)]
public static partial void objc_registerClassPair(nint @class);
[LibraryImport(LibObjCLib)]
public static partial nint sel_registerName([MarshalAs(UnmanagedType.LPStr)] string cfstring);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSelId_Bool fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool IdSelId_Bool(nint self, nint sel, nint v1);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSelIdId_Bool fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool IdSelIdId_Bool(nint self, nint sel, nint v1, nint v2);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSelIdNUInt_NUInt fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate nuint IdSelIdNUInt_NUInt(nint self, nint sel, nint v1, nuint v2);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSel_Void fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void IdSel_Void(nint self, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSel_Id fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate nint IdSel_Id(nint self, nint sel);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSelId_Void fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void IdSelId_Void(nint self, nint sel, nint v1);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSelIdId_Void fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void IdSelIdId_Void(nint self, nint sel, nint v1, nint v2);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void IdSelNSRect_Void(nint self, nint sel, NSRect rect);
[LibraryImport(LibObjCLib, EntryPoint = "class_addMethod")]
[return: MarshalAs(UnmanagedType.I1)]
public static unsafe partial bool class_addMethod(nint objcclass, nint name, [MarshalAs(UnmanagedType.FunctionPtr)] IdSel_Bool fun, [MarshalAs(UnmanagedType.LPStr)] string types);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool IdSel_Bool(nint self, nint sel);
}
}
namespace Xui.Runtime.MacOS
{
using System.Dynamic;
using System.Runtime.InteropServices;
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.CoreFoundation;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
public struct Prop
{
public readonly Sel GetSel;
public readonly Sel SetSel;
public Prop(string get, string set);
public struct Bool
{
public Bool(string get, string set);
public bool Get(nint id);
public void Set(nint id, bool value);
}
public struct NInt
{
public NInt(string get, string set);
public nint Get(nint id);
public void Set(nint id, nint value);
}
public struct NUInt
{
public NUInt(string get, string set);
public nuint Get(nint id);
public void Set(nint id, nuint value);
}
public struct String
{
public String(string get, string set);
public string? Get(nint id);
public void Set(nint id, string? value);
}
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.CoreFoundation;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
///
/// Abstracts operations on Objective-C Class object.
///
public class Protocol
{
public Protocol(nint lib, string name);
public Protocol(string name, nint id);
public string Name { get; }
public nint Id { get; }
public static implicit operator nint(Protocol protocol);
}
}
}
namespace Xui.Runtime.MacOS
{
using System.Diagnostics;
using System;
using static Xui.Runtime.MacOS.CoreFoundation;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
///
/// Abstracts C# interactions with an Objective-C reference counted instance.
///
public abstract class Ref : IDisposable
{
protected nint Id { get; }
protected Ref(nint id);
public void Dispose();
public static implicit operator nint(Ref cls);
}
}
}
namespace Xui.Runtime.MacOS
{
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.CoreFoundation;
///
/// Objective-C Runtime.
/// Exposing functions from "/usr/lib/libobjc.A.dylib"
/// https://developer.apple.com/documentation/objectivec/objective-c_runtime
///
public static partial class ObjC
{
///
/// Abstracts C# interactions with an Objective-C selector.
///
public class Sel
{
public Sel(string name);
public Sel(string name, nint id);
public nint Selector { get; }
public static Sel RegisterName(string name);
public static implicit operator nint(Sel sel);
}
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Runtime.InteropServices;
using Xui.Core.Canvas;
using Xui.Core.Math2D;
using static Xui.Runtime.MacOS.CoreGraphics;
public partial class MacOSDrawingContext
{
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Runtime.CompilerServices;
using System;
using Xui.Core.Canvas.Symbols;
using Xui.Core.Canvas;
using static Xui.Runtime.MacOS.CoreGraphics;
public partial class MacOSDrawingContext
{
/// Compiles once to Quartz vector instructions and reuses them at any zoom.
public void DrawSymbol(SymbolContent content);
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System;
using Xui.Core.Canvas.Composition.Graphics;
using Xui.Core.Canvas.Filter;
using Xui.Core.Canvas;
using Xui.Core.Math2D;
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.CoreGraphics;
using static Xui.Runtime.MacOS.CoreText;
using static Xui.Runtime.MacOS.Foundation;
public partial class MacOSDrawingContext : IContext
{
public CompositionGroup Group(scoped in GroupOptions options);
public void EndGroup();
public void SetFilter();
public void SetFilter(Brightness brightness);
public MacOSDrawingContext(IFontSource? fontSource = null);
public TextAlign TextAlign { get; set; }
public TextBaseline TextBaseline { get; set; }
public MacOSDrawingContext Bind();
public void SetLineDash(ReadOnlySpan segments);
public void Dispose();
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Collections.Generic;
using System;
using Xui.Core.Actual;
using Xui.Core.Canvas;
public class MacOSPlatform : Xui.Core.Actual.IRuntime
{
public MacOSPlatform();
public IDispatcher MainDispatcher { get; }
public IRunLoop CreateRunloop(Xui.Core.Abstract.Application application);
public IWindow CreateWindow(Xui.Core.Abstract.IWindow window, IServiceProvider applicationServices);
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Threading;
using System;
using Xui.Runtime.MacOS;
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.Block;
public class MacOSRunLoop : Xui.Core.Actual.IRunLoop, Xui.Core.Actual.IDispatcher
{
protected Xui.Core.Abstract.Application Application { get; }
public MacOSRunLoop(Xui.Core.Abstract.Application application);
public int Run();
public void Quit();
public void Post(Action callback);
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Diagnostics;
using System.Threading;
using System;
public class MacOSSynchronizationContext : System.Threading.SynchronizationContext
{
public MacOSSynchronizationContext(MacOSRunLoop macOSRunLoop);
public override void OperationStarted();
public override void OperationCompleted();
public override void Post(SendOrPostCallback d, object? state);
public override void Send(SendOrPostCallback d, object? state);
public override int Wait(nint[] waitHandles, bool waitAll, int millisecondsTimeout);
public override System.Threading.SynchronizationContext CreateCopy();
}
}
namespace Xui.Runtime.MacOS.Actual
{
using Xui.Core.Abstract.Events;
using Xui.Core.Math2D;
using static Xui.Core.Abstract.IWindow.IDesktopStyle;
using static Xui.Runtime.MacOS.AppKit.NSEventRef;
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public partial class MacOSWindow
{
protected static void SendEvent(nint self, nint sel, nint e);
protected void SendEvent(nint sel, NSEventRef e);
}
}
namespace Xui.Runtime.MacOS.Actual
{
using AppKit = Xui.Runtime.MacOS.AppKit;
using Foundation = Xui.Runtime.MacOS.Foundation;
using System;
using Xui.Core.Abstract;
using Xui.Core.Math2D;
using Xui.Core.Middleware;
using static Xui.Core.Abstract.IWindow.IDesktopStyle;
using static Xui.Runtime.MacOS.AppKit;
public partial class MacOSWindow
{
}
}
namespace Xui.Runtime.MacOS.Actual
{
using Foundation = Xui.Runtime.MacOS.Foundation;
using System;
using Xui.Core.Abstract;
using Xui.Core.Math2D;
using Xui.Core.Middleware;
using static Xui.Runtime.MacOS.AppKit;
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
}
namespace Xui.Runtime.MacOS.Actual
{
using Xui.Core.Abstract;
using static Xui.Runtime.MacOS.AppKit;
public partial class MacOSWindow
{
}
}
namespace Xui.Runtime.MacOS.Actual
{
using Foundation = Xui.Runtime.MacOS.Foundation;
using Xui.Core.Math2D;
using Xui.Core.Middleware;
using static Xui.Runtime.MacOS.AppKit;
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
}
namespace Xui.Runtime.MacOS.Actual
{
using static Xui.Runtime.MacOS.AppKit;
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
public partial class MacOSWindow
{
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System;
using Xui.Core.Abstract.Events;
using Xui.Core.Abstract;
using Xui.Core.Canvas;
using Xui.Core.DI;
using Xui.Core.Math2D;
using Xui.Core.Middleware;
using Xui.Core.UI;
using static Xui.Core.Abstract.IWindow.IDesktopStyle;
using static Xui.Runtime.MacOS.AppKit.NSEventRef;
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.CoreAnimation;
using static Xui.Runtime.MacOS.CoreFoundation;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public partial class MacOSWindow : NSWindow, Xui.Core.Actual.IWindow
{
public static readonly Sel CloseSel;
public static Sel AnimationFrameSel;
public bool RequireKeyboard { get; set; }
protected static unsafe new readonly Class Class;
public static void AnimationFrame(nint self, nint sel, nint caDisplayLink);
protected static void Close(nint self, nint sel);
public ITextMeasureContext? TextMeasureContext { get; }
public IServiceProvider NextServiceProvider { get; }
public object? GetService(Type serviceType);
public static nint InitWithAbstract(Xui.Core.Abstract.IWindow @abstract);
public MacOSWindow(Xui.Core.Abstract.IWindow @abstract, IServiceProvider nextServiceProvider);
public Xui.Core.Abstract.IWindow Abstract { get; }
protected void Close();
public void Invalidate();
}
}
namespace Xui.Runtime.MacOS.Actual
{
using Xui.Core.Math2D;
using Xui.Runtime.MacOS;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public class MacOSWindowDelegate : NSObject
{
public static unsafe new readonly Class Class;
protected static bool WindowShouldClose(nint self, nint sel, nint window);
protected static nuint WindowWillUseFullScreenPresentationOptions(nint self, nint sel, nint window, nuint proposedOptions);
protected static void WindowWillEnterFullScreen(nint self, nint sel, nint notification);
protected static void WindowDidResize(nint self, nint sel, nint notification);
protected readonly MacOSWindow window;
public MacOSWindowDelegate(MacOSWindow window);
}
}
namespace Xui.Runtime.MacOS.Actual
{
using System.Runtime.InteropServices;
using Xui.Runtime.MacOS;
using static Xui.Runtime.MacOS.AppKit;
using static Xui.Runtime.MacOS.Foundation;
using static Xui.Runtime.MacOS.ObjC;
public class MacOSWindowRootView : NSView
{
protected static unsafe new readonly Class Class;
public static void DrawRect(nint self, nint sel, NSRect rect);
public static nint CornerConfiguration(nint self, nint sel);
public MacOSWindowRootView(MacOSWindow window);
}
}