objc2-virtualization 0.3.2

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

use crate::*;

extern_class!(
    /// Boot loader configuration for booting macOS on Apple Silicon.
    ///
    /// You must use a VZMacPlatformConfiguration in conjunction with the macOS boot loader.
    /// It is invalid to use it with any other platform configuration.
    ///
    /// See: VZMacPlatformConfiguration
    ///
    /// See: VZVirtualMachineConfiguration.platform.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzmacosbootloader?language=objc)
    #[unsafe(super(VZBootLoader, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "VZBootLoader")]
    pub struct VZMacOSBootLoader;
);

#[cfg(feature = "VZBootLoader")]
extern_conformance!(
    unsafe impl NSCopying for VZMacOSBootLoader {}
);

#[cfg(feature = "VZBootLoader")]
unsafe impl CopyingHelper for VZMacOSBootLoader {
    type Result = Self;
}

#[cfg(feature = "VZBootLoader")]
extern_conformance!(
    unsafe impl NSObjectProtocol for VZMacOSBootLoader {}
);

#[cfg(feature = "VZBootLoader")]
impl VZMacOSBootLoader {
    extern_methods!(
        /// Create a VZMacOSBootLoader.
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `VZBootLoader`.
#[cfg(feature = "VZBootLoader")]
impl VZMacOSBootLoader {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}