objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inspatialeventtrigger?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INSpatialEventTrigger;
);

extern_conformance!(
    unsafe impl NSCoding for INSpatialEventTrigger {}
);

extern_conformance!(
    unsafe impl NSCopying for INSpatialEventTrigger {}
);

unsafe impl CopyingHelper for INSpatialEventTrigger {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for INSpatialEventTrigger {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for INSpatialEventTrigger {}
);

impl INSpatialEventTrigger {
    extern_methods!(
        #[cfg(all(feature = "INSpatialEvent", feature = "objc2-core-location"))]
        #[unsafe(method(initWithPlacemark:event:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPlacemark_event(
            this: Allocated<Self>,
            placemark: &CLPlacemark,
            event: INSpatialEvent,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(placemark))]
        #[unsafe(method_family = none)]
        pub unsafe fn placemark(&self) -> Retained<CLPlacemark>;

        #[cfg(feature = "INSpatialEvent")]
        #[unsafe(method(event))]
        #[unsafe(method_family = none)]
        pub unsafe fn event(&self) -> INSpatialEvent;
    );
}

/// Methods declared on superclass `NSObject`.
impl INSpatialEventTrigger {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}