use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(GKBehavior, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "GKBehavior")]
pub struct GKCompositeBehavior;
);
#[cfg(feature = "GKBehavior")]
extern_conformance!(
unsafe impl NSCopying for GKCompositeBehavior {}
);
#[cfg(feature = "GKBehavior")]
unsafe impl CopyingHelper for GKCompositeBehavior {
type Result = Self;
}
#[cfg(feature = "GKBehavior")]
extern_conformance!(
unsafe impl NSFastEnumeration for GKCompositeBehavior {}
);
#[cfg(feature = "GKBehavior")]
extern_conformance!(
unsafe impl NSObjectProtocol for GKCompositeBehavior {}
);
#[cfg(feature = "GKBehavior")]
impl GKCompositeBehavior {
extern_methods!(
#[unsafe(method(behaviorCount))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorCount(&self) -> NSInteger;
#[unsafe(method(behaviorWithBehaviors:))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorWithBehaviors(behaviors: &NSArray<GKBehavior>) -> Retained<Self>;
#[unsafe(method(behaviorWithBehaviors:andWeights:))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorWithBehaviors_andWeights(
behaviors: &NSArray<GKBehavior>,
weights: &NSArray<NSNumber>,
) -> Retained<Self>;
#[unsafe(method(setWeight:forBehavior:))]
#[unsafe(method_family = none)]
pub unsafe fn setWeight_forBehavior(&self, weight: c_float, behavior: &GKBehavior);
#[unsafe(method(weightForBehavior:))]
#[unsafe(method_family = none)]
pub unsafe fn weightForBehavior(&self, behavior: &GKBehavior) -> c_float;
#[unsafe(method(removeBehavior:))]
#[unsafe(method_family = none)]
pub unsafe fn removeBehavior(&self, behavior: &GKBehavior);
#[unsafe(method(removeAllBehaviors))]
#[unsafe(method_family = none)]
pub unsafe fn removeAllBehaviors(&self);
#[unsafe(method(objectAtIndexedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Retained<GKBehavior>;
#[unsafe(method(setObject:forKeyedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn setObject_forKeyedSubscript(&self, weight: &NSNumber, behavior: &GKBehavior);
#[unsafe(method(objectForKeyedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectForKeyedSubscript(&self, behavior: &GKBehavior) -> Retained<NSNumber>;
);
}
#[cfg(feature = "GKBehavior")]
impl GKCompositeBehavior {
extern_methods!(
#[cfg(feature = "GKGoal")]
#[unsafe(method(behaviorWithGoal:weight:))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorWithGoal_weight(goal: &GKGoal, weight: c_float) -> Retained<Self>;
#[cfg(feature = "GKGoal")]
#[unsafe(method(behaviorWithGoals:))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorWithGoals(goals: &NSArray<GKGoal>) -> Retained<Self>;
#[cfg(feature = "GKGoal")]
#[unsafe(method(behaviorWithGoals:andWeights:))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorWithGoals_andWeights(
goals: &NSArray<GKGoal>,
weights: &NSArray<NSNumber>,
) -> Retained<Self>;
#[cfg(feature = "GKGoal")]
#[unsafe(method(behaviorWithWeightedGoals:))]
#[unsafe(method_family = none)]
pub unsafe fn behaviorWithWeightedGoals(
weighted_goals: &NSDictionary<GKGoal, NSNumber>,
) -> Retained<Self>;
);
}
#[cfg(feature = "GKBehavior")]
impl GKCompositeBehavior {
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>;
);
}