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(UIDynamicBehavior, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIDynamicBehavior")]
pub struct UIDynamicItemBehavior;
);
#[cfg(feature = "UIDynamicBehavior")]
extern_conformance!(
unsafe impl NSObjectProtocol for UIDynamicItemBehavior {}
);
#[cfg(feature = "UIDynamicBehavior")]
impl UIDynamicItemBehavior {
extern_methods!(
#[unsafe(method(initWithItems:))]
#[unsafe(method_family = init)]
pub fn initWithItems(
this: Allocated<Self>,
items: &NSArray<ProtocolObject<dyn UIDynamicItem>>,
) -> Retained<Self>;
#[unsafe(method(addItem:))]
#[unsafe(method_family = none)]
pub fn addItem(&self, item: &ProtocolObject<dyn UIDynamicItem>);
#[unsafe(method(removeItem:))]
#[unsafe(method_family = none)]
pub fn removeItem(&self, item: &ProtocolObject<dyn UIDynamicItem>);
#[unsafe(method(items))]
#[unsafe(method_family = none)]
pub fn items(&self) -> Retained<NSArray<ProtocolObject<dyn UIDynamicItem>>>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(elasticity))]
#[unsafe(method_family = none)]
pub fn elasticity(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setElasticity:))]
#[unsafe(method_family = none)]
pub fn setElasticity(&self, elasticity: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(friction))]
#[unsafe(method_family = none)]
pub fn friction(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setFriction:))]
#[unsafe(method_family = none)]
pub fn setFriction(&self, friction: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(density))]
#[unsafe(method_family = none)]
pub fn density(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setDensity:))]
#[unsafe(method_family = none)]
pub fn setDensity(&self, density: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(resistance))]
#[unsafe(method_family = none)]
pub fn resistance(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setResistance:))]
#[unsafe(method_family = none)]
pub fn setResistance(&self, resistance: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(angularResistance))]
#[unsafe(method_family = none)]
pub fn angularResistance(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setAngularResistance:))]
#[unsafe(method_family = none)]
pub fn setAngularResistance(&self, angular_resistance: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(charge))]
#[unsafe(method_family = none)]
pub fn charge(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setCharge:))]
#[unsafe(method_family = none)]
pub fn setCharge(&self, charge: CGFloat);
#[unsafe(method(isAnchored))]
#[unsafe(method_family = none)]
pub fn isAnchored(&self) -> bool;
#[unsafe(method(setAnchored:))]
#[unsafe(method_family = none)]
pub fn setAnchored(&self, anchored: bool);
#[unsafe(method(allowsRotation))]
#[unsafe(method_family = none)]
pub fn allowsRotation(&self) -> bool;
#[unsafe(method(setAllowsRotation:))]
#[unsafe(method_family = none)]
pub fn setAllowsRotation(&self, allows_rotation: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(addLinearVelocity:forItem:))]
#[unsafe(method_family = none)]
pub fn addLinearVelocity_forItem(
&self,
velocity: CGPoint,
item: &ProtocolObject<dyn UIDynamicItem>,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(linearVelocityForItem:))]
#[unsafe(method_family = none)]
pub fn linearVelocityForItem(&self, item: &ProtocolObject<dyn UIDynamicItem>) -> CGPoint;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(addAngularVelocity:forItem:))]
#[unsafe(method_family = none)]
pub fn addAngularVelocity_forItem(
&self,
velocity: CGFloat,
item: &ProtocolObject<dyn UIDynamicItem>,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(angularVelocityForItem:))]
#[unsafe(method_family = none)]
pub fn angularVelocityForItem(&self, item: &ProtocolObject<dyn UIDynamicItem>) -> CGFloat;
);
}
#[cfg(feature = "UIDynamicBehavior")]
impl UIDynamicItemBehavior {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}