use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKPhysicsJoint;
);
extern_conformance!(
unsafe impl NSCoding for SKPhysicsJoint {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKPhysicsJoint {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKPhysicsJoint {}
);
impl SKPhysicsJoint {
extern_methods!(
#[cfg(feature = "SKPhysicsBody")]
#[unsafe(method(bodyA))]
#[unsafe(method_family = none)]
pub unsafe fn bodyA(&self) -> Retained<SKPhysicsBody>;
#[cfg(feature = "SKPhysicsBody")]
#[unsafe(method(setBodyA:))]
#[unsafe(method_family = none)]
pub unsafe fn setBodyA(&self, body_a: &SKPhysicsBody);
#[cfg(feature = "SKPhysicsBody")]
#[unsafe(method(bodyB))]
#[unsafe(method_family = none)]
pub unsafe fn bodyB(&self) -> Retained<SKPhysicsBody>;
#[cfg(feature = "SKPhysicsBody")]
#[unsafe(method(setBodyB:))]
#[unsafe(method_family = none)]
pub unsafe fn setBodyB(&self, body_b: &SKPhysicsBody);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(reactionForce))]
#[unsafe(method_family = none)]
pub unsafe fn reactionForce(&self) -> CGVector;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(reactionTorque))]
#[unsafe(method_family = none)]
pub unsafe fn reactionTorque(&self) -> CGFloat;
);
}
impl SKPhysicsJoint {
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>;
);
}
extern_class!(
#[unsafe(super(SKPhysicsJoint, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKPhysicsJointPin;
);
extern_conformance!(
unsafe impl NSCoding for SKPhysicsJointPin {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKPhysicsJointPin {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKPhysicsJointPin {}
);
impl SKPhysicsJointPin {
extern_methods!(
#[cfg(all(feature = "SKPhysicsBody", feature = "objc2-core-foundation"))]
#[unsafe(method(jointWithBodyA:bodyB:anchor:))]
#[unsafe(method_family = none)]
pub unsafe fn jointWithBodyA_bodyB_anchor(
body_a: &SKPhysicsBody,
body_b: &SKPhysicsBody,
anchor: CGPoint,
) -> Retained<SKPhysicsJointPin>;
#[unsafe(method(shouldEnableLimits))]
#[unsafe(method_family = none)]
pub unsafe fn shouldEnableLimits(&self) -> bool;
#[unsafe(method(setShouldEnableLimits:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldEnableLimits(&self, should_enable_limits: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(lowerAngleLimit))]
#[unsafe(method_family = none)]
pub unsafe fn lowerAngleLimit(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setLowerAngleLimit:))]
#[unsafe(method_family = none)]
pub unsafe fn setLowerAngleLimit(&self, lower_angle_limit: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(upperAngleLimit))]
#[unsafe(method_family = none)]
pub unsafe fn upperAngleLimit(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setUpperAngleLimit:))]
#[unsafe(method_family = none)]
pub unsafe fn setUpperAngleLimit(&self, upper_angle_limit: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(frictionTorque))]
#[unsafe(method_family = none)]
pub unsafe fn frictionTorque(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setFrictionTorque:))]
#[unsafe(method_family = none)]
pub unsafe fn setFrictionTorque(&self, friction_torque: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(rotationSpeed))]
#[unsafe(method_family = none)]
pub unsafe fn rotationSpeed(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setRotationSpeed:))]
#[unsafe(method_family = none)]
pub unsafe fn setRotationSpeed(&self, rotation_speed: CGFloat);
);
}
impl SKPhysicsJointPin {
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>;
);
}
extern_class!(
#[unsafe(super(SKPhysicsJoint, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKPhysicsJointSpring;
);
extern_conformance!(
unsafe impl NSCoding for SKPhysicsJointSpring {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKPhysicsJointSpring {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKPhysicsJointSpring {}
);
impl SKPhysicsJointSpring {
extern_methods!(
#[cfg(all(feature = "SKPhysicsBody", feature = "objc2-core-foundation"))]
#[unsafe(method(jointWithBodyA:bodyB:anchorA:anchorB:))]
#[unsafe(method_family = none)]
pub unsafe fn jointWithBodyA_bodyB_anchorA_anchorB(
body_a: &SKPhysicsBody,
body_b: &SKPhysicsBody,
anchor_a: CGPoint,
anchor_b: CGPoint,
) -> Retained<SKPhysicsJointSpring>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(damping))]
#[unsafe(method_family = none)]
pub unsafe fn damping(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setDamping:))]
#[unsafe(method_family = none)]
pub unsafe fn setDamping(&self, damping: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(frequency))]
#[unsafe(method_family = none)]
pub unsafe fn frequency(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setFrequency:))]
#[unsafe(method_family = none)]
pub unsafe fn setFrequency(&self, frequency: CGFloat);
);
}
impl SKPhysicsJointSpring {
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>;
);
}
extern_class!(
#[unsafe(super(SKPhysicsJoint, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKPhysicsJointFixed;
);
extern_conformance!(
unsafe impl NSCoding for SKPhysicsJointFixed {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKPhysicsJointFixed {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKPhysicsJointFixed {}
);
impl SKPhysicsJointFixed {
extern_methods!(
#[cfg(all(feature = "SKPhysicsBody", feature = "objc2-core-foundation"))]
#[unsafe(method(jointWithBodyA:bodyB:anchor:))]
#[unsafe(method_family = none)]
pub unsafe fn jointWithBodyA_bodyB_anchor(
body_a: &SKPhysicsBody,
body_b: &SKPhysicsBody,
anchor: CGPoint,
) -> Retained<SKPhysicsJointFixed>;
);
}
impl SKPhysicsJointFixed {
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>;
);
}
extern_class!(
#[unsafe(super(SKPhysicsJoint, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKPhysicsJointSliding;
);
extern_conformance!(
unsafe impl NSCoding for SKPhysicsJointSliding {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKPhysicsJointSliding {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKPhysicsJointSliding {}
);
impl SKPhysicsJointSliding {
extern_methods!(
#[cfg(all(feature = "SKPhysicsBody", feature = "objc2-core-foundation"))]
#[unsafe(method(jointWithBodyA:bodyB:anchor:axis:))]
#[unsafe(method_family = none)]
pub unsafe fn jointWithBodyA_bodyB_anchor_axis(
body_a: &SKPhysicsBody,
body_b: &SKPhysicsBody,
anchor: CGPoint,
axis: CGVector,
) -> Retained<SKPhysicsJointSliding>;
#[unsafe(method(shouldEnableLimits))]
#[unsafe(method_family = none)]
pub unsafe fn shouldEnableLimits(&self) -> bool;
#[unsafe(method(setShouldEnableLimits:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldEnableLimits(&self, should_enable_limits: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(lowerDistanceLimit))]
#[unsafe(method_family = none)]
pub unsafe fn lowerDistanceLimit(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setLowerDistanceLimit:))]
#[unsafe(method_family = none)]
pub unsafe fn setLowerDistanceLimit(&self, lower_distance_limit: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(upperDistanceLimit))]
#[unsafe(method_family = none)]
pub unsafe fn upperDistanceLimit(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setUpperDistanceLimit:))]
#[unsafe(method_family = none)]
pub unsafe fn setUpperDistanceLimit(&self, upper_distance_limit: CGFloat);
);
}
impl SKPhysicsJointSliding {
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>;
);
}
extern_class!(
#[unsafe(super(SKPhysicsJoint, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKPhysicsJointLimit;
);
extern_conformance!(
unsafe impl NSCoding for SKPhysicsJointLimit {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKPhysicsJointLimit {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKPhysicsJointLimit {}
);
impl SKPhysicsJointLimit {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maxLength))]
#[unsafe(method_family = none)]
pub unsafe fn maxLength(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMaxLength:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaxLength(&self, max_length: CGFloat);
#[cfg(all(feature = "SKPhysicsBody", feature = "objc2-core-foundation"))]
#[unsafe(method(jointWithBodyA:bodyB:anchorA:anchorB:))]
#[unsafe(method_family = none)]
pub unsafe fn jointWithBodyA_bodyB_anchorA_anchorB(
body_a: &SKPhysicsBody,
body_b: &SKPhysicsBody,
anchor_a: CGPoint,
anchor_b: CGPoint,
) -> Retained<SKPhysicsJointLimit>;
);
}
impl SKPhysicsJointLimit {
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>;
);
}