objc2-foundation 0.2.2

Bindings to the Foundation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

extern "C" {
    pub fn NSDefaultMallocZone() -> NonNull<NSZone>;
}

extern "C" {
    pub fn NSCreateZone(
        start_size: NSUInteger,
        granularity: NSUInteger,
        can_free: Bool,
    ) -> NonNull<NSZone>;
}

extern "C" {
    pub fn NSRecycleZone(zone: NonNull<NSZone>);
}

extern "C" {
    #[cfg(feature = "NSString")]
    pub fn NSSetZoneName(zone: *mut NSZone, name: &NSString);
}

extern "C" {
    #[cfg(feature = "NSString")]
    pub fn NSZoneName(zone: *mut NSZone) -> NonNull<NSString>;
}

extern "C" {
    pub fn NSZoneFromPointer(ptr: NonNull<c_void>) -> *mut NSZone;
}

extern "C" {
    pub fn NSZoneMalloc(zone: *mut NSZone, size: NSUInteger) -> NonNull<c_void>;
}

extern "C" {
    pub fn NSZoneCalloc(
        zone: *mut NSZone,
        num_elems: NSUInteger,
        byte_size: NSUInteger,
    ) -> NonNull<c_void>;
}

extern "C" {
    pub fn NSZoneRealloc(zone: *mut NSZone, ptr: *mut c_void, size: NSUInteger) -> NonNull<c_void>;
}

extern "C" {
    pub fn NSZoneFree(zone: *mut NSZone, ptr: NonNull<c_void>);
}

pub const NSScannedOption: NSUInteger = 1 << 0;
pub const NSCollectorDisabledOption: NSUInteger = 1 << 1;

extern "C" {
    pub fn NSAllocateCollectable(size: NSUInteger, options: NSUInteger) -> NonNull<c_void>;
}

extern "C" {
    pub fn NSReallocateCollectable(
        ptr: *mut c_void,
        size: NSUInteger,
        options: NSUInteger,
    ) -> NonNull<c_void>;
}

extern "C" {
    pub fn NSPageSize() -> NSUInteger;
}

extern "C" {
    pub fn NSLogPageSize() -> NSUInteger;
}

extern "C" {
    pub fn NSRoundUpToMultipleOfPageSize(bytes: NSUInteger) -> NSUInteger;
}

extern "C" {
    pub fn NSRoundDownToMultipleOfPageSize(bytes: NSUInteger) -> NSUInteger;
}

extern "C" {
    pub fn NSAllocateMemoryPages(bytes: NSUInteger) -> NonNull<c_void>;
}

extern "C" {
    pub fn NSDeallocateMemoryPages(ptr: NonNull<c_void>, bytes: NSUInteger);
}

extern "C" {
    pub fn NSCopyMemoryPages(source: NonNull<c_void>, dest: NonNull<c_void>, bytes: NSUInteger);
}

extern "C" {
    #[deprecated = "Use NSProcessInfo instead"]
    pub fn NSRealMemoryAvailable() -> NSUInteger;
}