objc2-core-services 0.3.2

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

use crate::*;

extern "C-unwind" {
    /// # Safety
    ///
    /// `the_descriptor` must be a valid pointer.
    #[cfg(feature = "AEDataModel")]
    pub fn CreateOffsetDescriptor(the_offset: c_long, the_descriptor: *mut AEDesc) -> OSErr;
}

/// # Safety
///
/// - `operand1` must be a valid pointer.
/// - `operand2` must be a valid pointer.
/// - `the_descriptor` must be a valid pointer.
#[cfg(feature = "AEDataModel")]
#[inline]
pub unsafe extern "C-unwind" fn CreateCompDescriptor(
    comparison_operator: DescType,
    operand1: *mut AEDesc,
    operand2: *mut AEDesc,
    dispose_inputs: bool,
    the_descriptor: *mut AEDesc,
) -> OSErr {
    extern "C-unwind" {
        fn CreateCompDescriptor(
            comparison_operator: DescType,
            operand1: *mut AEDesc,
            operand2: *mut AEDesc,
            dispose_inputs: Boolean,
            the_descriptor: *mut AEDesc,
        ) -> OSErr;
    }
    unsafe {
        CreateCompDescriptor(
            comparison_operator,
            operand1,
            operand2,
            dispose_inputs as _,
            the_descriptor,
        )
    }
}

/// # Safety
///
/// - `the_logical_terms` must be a valid pointer.
/// - `the_descriptor` must be a valid pointer.
#[cfg(feature = "AEDataModel")]
#[inline]
pub unsafe extern "C-unwind" fn CreateLogicalDescriptor(
    the_logical_terms: *mut AEDescList,
    the_logic_operator: DescType,
    dispose_inputs: bool,
    the_descriptor: *mut AEDesc,
) -> OSErr {
    extern "C-unwind" {
        fn CreateLogicalDescriptor(
            the_logical_terms: *mut AEDescList,
            the_logic_operator: DescType,
            dispose_inputs: Boolean,
            the_descriptor: *mut AEDesc,
        ) -> OSErr;
    }
    unsafe {
        CreateLogicalDescriptor(
            the_logical_terms,
            the_logic_operator,
            dispose_inputs as _,
            the_descriptor,
        )
    }
}

/// # Safety
///
/// - `the_container` must be a valid pointer.
/// - `key_data` must be a valid pointer.
/// - `obj_specifier` must be a valid pointer.
#[cfg(feature = "AEDataModel")]
#[inline]
pub unsafe extern "C-unwind" fn CreateObjSpecifier(
    desired_class: DescType,
    the_container: *mut AEDesc,
    key_form: DescType,
    key_data: *mut AEDesc,
    dispose_inputs: bool,
    obj_specifier: *mut AEDesc,
) -> OSErr {
    extern "C-unwind" {
        fn CreateObjSpecifier(
            desired_class: DescType,
            the_container: *mut AEDesc,
            key_form: DescType,
            key_data: *mut AEDesc,
            dispose_inputs: Boolean,
            obj_specifier: *mut AEDesc,
        ) -> OSErr;
    }
    unsafe {
        CreateObjSpecifier(
            desired_class,
            the_container,
            key_form,
            key_data,
            dispose_inputs as _,
            obj_specifier,
        )
    }
}

/// # Safety
///
/// - `range_start` must be a valid pointer.
/// - `range_stop` must be a valid pointer.
/// - `the_descriptor` must be a valid pointer.
#[cfg(feature = "AEDataModel")]
#[inline]
pub unsafe extern "C-unwind" fn CreateRangeDescriptor(
    range_start: *mut AEDesc,
    range_stop: *mut AEDesc,
    dispose_inputs: bool,
    the_descriptor: *mut AEDesc,
) -> OSErr {
    extern "C-unwind" {
        fn CreateRangeDescriptor(
            range_start: *mut AEDesc,
            range_stop: *mut AEDesc,
            dispose_inputs: Boolean,
            the_descriptor: *mut AEDesc,
        ) -> OSErr;
    }
    unsafe { CreateRangeDescriptor(range_start, range_stop, dispose_inputs as _, the_descriptor) }
}