objc2-sprite-kit 0.3.2

Bindings to the SpriteKit 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-foundation")]
use objc2_core_foundation::*;

use crate::*;

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

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

impl SKPhysicsContact {
    extern_methods!(
        #[cfg(feature = "SKPhysicsBody")]
        #[unsafe(method(bodyA))]
        #[unsafe(method_family = none)]
        pub unsafe fn bodyA(&self) -> Retained<SKPhysicsBody>;

        #[cfg(feature = "SKPhysicsBody")]
        #[unsafe(method(bodyB))]
        #[unsafe(method_family = none)]
        pub unsafe fn bodyB(&self) -> Retained<SKPhysicsBody>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(contactPoint))]
        #[unsafe(method_family = none)]
        pub unsafe fn contactPoint(&self) -> CGPoint;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(contactNormal))]
        #[unsafe(method_family = none)]
        pub unsafe fn contactNormal(&self) -> CGVector;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(collisionImpulse))]
        #[unsafe(method_family = none)]
        pub unsafe fn collisionImpulse(&self) -> CGFloat;
    );
}

/// Methods declared on superclass `NSObject`.
impl SKPhysicsContact {
    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>;
    );
}