//! Raw FFI bindings to Apple frameworks: Metal, CoreFoundation, libobjc
pub use *;
pub use *;
use ;
// โโ Type aliases โโ
pub type ObjcClass = *const c_void;
pub type ObjcSel = *const c_void;
pub type ObjcId = *mut c_void;
pub type CFTypeRef = *const c_void;
pub type CFStringRef = *const c_void;
pub type CFMutableDictionaryRef = *mut c_void;
pub type NSUInteger = usize;
// โโ MTLSize (used for dispatch) โโ
// โโ MTLRegion โโ
// โโ Metal resource options โโ
pub const MTLResourceStorageModeShared: NSUInteger = 0;
pub const MTLResourceStorageModeManaged: NSUInteger = 0x10;
pub const MTLResourceStorageModePrivate: NSUInteger = 0x20;
// โโ Metal pixel formats (common) โโ
pub const MTLPixelFormatR8Unorm: NSUInteger = 10;
pub const MTLPixelFormatR32Float: NSUInteger = 55;
pub const MTLPixelFormatRGBA8Unorm: NSUInteger = 70;
pub const MTLPixelFormatBGRA8Unorm: NSUInteger = 80;
pub const MTLPixelFormatRGBA16Float: NSUInteger = 115;
pub const MTLPixelFormatRGBA32Float: NSUInteger = 125;
pub const MTLPixelFormatDepth32Float: NSUInteger = 252;
pub const MTLPixelFormatStencil8: NSUInteger = 253;
pub const MTLPixelFormatDepth32Float_Stencil8: NSUInteger = 260;
// โโ Metal texture usage โโ
pub const MTLTextureUsageShaderRead: NSUInteger = 0x0001;
pub const MTLTextureUsageShaderWrite: NSUInteger = 0x0002;
pub const MTLTextureUsageRenderTarget: NSUInteger = 0x0004;
// โโ Metal texture types โโ
pub const MTLTextureType2D: NSUInteger = 2;
pub const MTLTextureType2DMultisample: NSUInteger = 4;
// โโ Render pass load/store actions โโ
pub const MTLLoadActionDontCare: NSUInteger = 0;
pub const MTLLoadActionLoad: NSUInteger = 1;
pub const MTLLoadActionClear: NSUInteger = 2;
pub const MTLStoreActionDontCare: NSUInteger = 0;
pub const MTLStoreActionStore: NSUInteger = 1;
pub const MTLStoreActionMultisampleResolve: NSUInteger = 2;
pub const MTLStoreActionStoreAndMultisampleResolve: NSUInteger = 3;
// โโ Primitive type โโ
pub const MTLPrimitiveTypePoint: NSUInteger = 0;
pub const MTLPrimitiveTypeLine: NSUInteger = 1;
pub const MTLPrimitiveTypeLineStrip: NSUInteger = 2;
pub const MTLPrimitiveTypeTriangle: NSUInteger = 3;
pub const MTLPrimitiveTypeTriangleStrip: NSUInteger = 4;
// โโ Index type โโ
pub const MTLIndexTypeUInt16: NSUInteger = 0;
pub const MTLIndexTypeUInt32: NSUInteger = 1;
// โโ Cull / winding / compare / blend โโ
pub const MTLCullModeNone: NSUInteger = 0;
pub const MTLCullModeFront: NSUInteger = 1;
pub const MTLCullModeBack: NSUInteger = 2;
pub const MTLWindingClockwise: NSUInteger = 0;
pub const MTLWindingCounterClockwise: NSUInteger = 1;
pub const MTLCompareFunctionNever: NSUInteger = 0;
pub const MTLCompareFunctionLess: NSUInteger = 1;
pub const MTLCompareFunctionEqual: NSUInteger = 2;
pub const MTLCompareFunctionLessEqual: NSUInteger = 3;
pub const MTLCompareFunctionGreater: NSUInteger = 4;
pub const MTLCompareFunctionNotEqual: NSUInteger = 5;
pub const MTLCompareFunctionGreaterEqual: NSUInteger = 6;
pub const MTLCompareFunctionAlways: NSUInteger = 7;
pub const MTLBlendFactorZero: NSUInteger = 0;
pub const MTLBlendFactorOne: NSUInteger = 1;
pub const MTLBlendFactorSourceColor: NSUInteger = 2;
pub const MTLBlendFactorOneMinusSourceColor: NSUInteger = 3;
pub const MTLBlendFactorSourceAlpha: NSUInteger = 4;
pub const MTLBlendFactorOneMinusSourceAlpha: NSUInteger = 5;
pub const MTLBlendFactorDestinationAlpha: NSUInteger = 6;
pub const MTLBlendFactorOneMinusDestinationAlpha: NSUInteger = 7;
pub const MTLBlendFactorDestinationColor: NSUInteger = 8;
pub const MTLBlendFactorOneMinusDestinationColor: NSUInteger = 9;
pub const MTLBlendOperationAdd: NSUInteger = 0;
pub const MTLBlendOperationSubtract: NSUInteger = 1;
pub const MTLBlendOperationReverseSubtract: NSUInteger = 2;
pub const MTLBlendOperationMin: NSUInteger = 3;
pub const MTLBlendOperationMax: NSUInteger = 4;
// โโ Vertex format / step โโ
pub const MTLVertexFormatFloat: NSUInteger = 28;
pub const MTLVertexFormatFloat2: NSUInteger = 29;
pub const MTLVertexFormatFloat3: NSUInteger = 30;
pub const MTLVertexFormatFloat4: NSUInteger = 31;
pub const MTLVertexFormatHalf2: NSUInteger = 25;
pub const MTLVertexFormatHalf4: NSUInteger = 27;
pub const MTLVertexFormatUChar4Normalized: NSUInteger = 11;
pub const MTLVertexFormatUInt: NSUInteger = 36;
pub const MTLVertexFormatInt: NSUInteger = 32;
pub const MTLVertexStepFunctionConstant: NSUInteger = 0;
pub const MTLVertexStepFunctionPerVertex: NSUInteger = 1;
pub const MTLVertexStepFunctionPerInstance: NSUInteger = 2;
// โโ Viewport / scissor (passed by value to encoder) โโ
// โโ CoreFoundation constants โโ
pub const kCFStringEncodingUTF8: u32 = 0x08000100;
// โโ Metal.framework โโ
extern "C"
// โโ CoreFoundation โโ
extern "C"
// โโ ObjC runtime โโ
extern "C"
// โโ String helpers โโ
// null err โ None โ mutant โ None passes on success path
/// Create NSString from &str. Zero-alloc: uses CFStringCreateWithBytes
/// directly on the Rust string's UTF-8 bytes, no CString intermediate.
// โโ Retain/release (hot path โ cached selectors) โโ
/// Retain via objc_retain (direct C call, not msg_send).
pub unsafe
/// Release via objc_release (direct C call, not msg_send).
pub unsafe
/// Retain a known-non-null object. No null check โ hot path only.
pub unsafe
/// Release a known-non-null object. No null check โ hot path only.
pub unsafe
Homonyms
cyb/evy/forks/naga/src/back/hlsl/mod.rs
struct Baz { m: mat3x2, } struct Baz { float2 m_0; float2 m_1; float2 m_2; }; float3x2 GetMatmOnBaz(Baz obj) { return float3x2(obj.m_0, obj.m_1, obj.m_2); }