use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GKBehavior;
);
extern_conformance!(
unsafe impl NSCopying for GKBehavior {}
);
unsafe impl CopyingHelper for GKBehavior {
type Result = Self;
}
extern_conformance!(
unsafe impl NSFastEnumeration for GKBehavior {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GKBehavior {}
);
impl GKBehavior {
extern_methods!(
#[unsafe(method(goalCount))]
#[unsafe(method_family = none)]
pub unsafe fn goalCount(&self) -> NSInteger;
#[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 = "GKGoal")]
#[unsafe(method(setWeight:forGoal:))]
#[unsafe(method_family = none)]
pub unsafe fn setWeight_forGoal(&self, weight: c_float, goal: &GKGoal);
#[cfg(feature = "GKGoal")]
#[unsafe(method(weightForGoal:))]
#[unsafe(method_family = none)]
pub unsafe fn weightForGoal(&self, goal: &GKGoal) -> c_float;
#[cfg(feature = "GKGoal")]
#[unsafe(method(removeGoal:))]
#[unsafe(method_family = none)]
pub unsafe fn removeGoal(&self, goal: &GKGoal);
#[unsafe(method(removeAllGoals))]
#[unsafe(method_family = none)]
pub unsafe fn removeAllGoals(&self);
#[cfg(feature = "GKGoal")]
#[unsafe(method(objectAtIndexedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Retained<GKGoal>;
#[cfg(feature = "GKGoal")]
#[unsafe(method(setObject:forKeyedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn setObject_forKeyedSubscript(&self, weight: &NSNumber, goal: &GKGoal);
#[cfg(feature = "GKGoal")]
#[unsafe(method(objectForKeyedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectForKeyedSubscript(&self, goal: &GKGoal) -> Option<Retained<NSNumber>>;
);
}
impl GKBehavior {
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>;
);
}