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)]
#[deprecated]
pub struct GKScore;
);
extern_conformance!(
unsafe impl NSCoding for GKScore {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GKScore {}
);
extern_conformance!(
unsafe impl NSSecureCoding for GKScore {}
);
impl GKScore {
extern_methods!(
#[deprecated]
#[unsafe(method(initWithLeaderboardIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeaderboardIdentifier(
this: Allocated<Self>,
identifier: &NSString,
) -> Retained<Self>;
#[cfg(all(feature = "GKBasePlayer", feature = "GKPlayer"))]
#[deprecated]
#[unsafe(method(initWithLeaderboardIdentifier:player:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeaderboardIdentifier_player(
this: Allocated<Self>,
identifier: &NSString,
player: &GKPlayer,
) -> Retained<Self>;
#[deprecated]
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub unsafe fn value(&self) -> i64;
#[deprecated]
#[unsafe(method(setValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setValue(&self, value: i64);
#[deprecated]
#[unsafe(method(formattedValue))]
#[unsafe(method_family = none)]
pub unsafe fn formattedValue(&self) -> Option<Retained<NSString>>;
#[deprecated]
#[unsafe(method(leaderboardIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn leaderboardIdentifier(&self) -> Retained<NSString>;
#[deprecated]
#[unsafe(method(setLeaderboardIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setLeaderboardIdentifier(&self, leaderboard_identifier: &NSString);
#[deprecated]
#[unsafe(method(context))]
#[unsafe(method_family = none)]
pub unsafe fn context(&self) -> u64;
#[deprecated]
#[unsafe(method(setContext:))]
#[unsafe(method_family = none)]
pub unsafe fn setContext(&self, context: u64);
#[deprecated]
#[unsafe(method(date))]
#[unsafe(method_family = none)]
pub unsafe fn date(&self) -> Retained<NSDate>;
#[cfg(all(feature = "GKBasePlayer", feature = "GKPlayer"))]
#[deprecated]
#[unsafe(method(player))]
#[unsafe(method_family = none)]
pub unsafe fn player(&self) -> Retained<GKPlayer>;
#[deprecated]
#[unsafe(method(rank))]
#[unsafe(method_family = none)]
pub unsafe fn rank(&self) -> NSInteger;
#[deprecated]
#[unsafe(method(shouldSetDefaultLeaderboard))]
#[unsafe(method_family = none)]
pub unsafe fn shouldSetDefaultLeaderboard(&self) -> bool;
#[deprecated]
#[unsafe(method(setShouldSetDefaultLeaderboard:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldSetDefaultLeaderboard(&self, should_set_default_leaderboard: bool);
#[cfg(feature = "block2")]
#[deprecated]
#[unsafe(method(reportScores:withCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn reportScores_withCompletionHandler(
scores: &NSArray<GKScore>,
completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
);
);
}
impl GKScore {
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>;
);
}
#[deprecated]
impl GKScore {
extern_methods!(
#[cfg(feature = "block2")]
#[deprecated]
#[unsafe(method(reportScoreWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn reportScoreWithCompletionHandler(
&self,
completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
);
#[deprecated]
#[unsafe(method(initWithCategory:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCategory(
this: Allocated<Self>,
category: Option<&NSString>,
) -> Retained<Self>;
#[deprecated]
#[unsafe(method(category))]
#[unsafe(method_family = none)]
pub unsafe fn category(&self) -> Option<Retained<NSString>>;
#[deprecated]
#[unsafe(method(setCategory:))]
#[unsafe(method_family = none)]
pub unsafe fn setCategory(&self, category: Option<&NSString>);
);
}
impl GKScore {
extern_methods!(
#[deprecated]
#[unsafe(method(initWithLeaderboardIdentifier:forPlayer:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLeaderboardIdentifier_forPlayer(
this: Allocated<Self>,
identifier: &NSString,
player_id: &NSString,
) -> Option<Retained<Self>>;
#[deprecated]
#[unsafe(method(playerID))]
#[unsafe(method_family = none)]
pub unsafe fn playerID(&self) -> Option<Retained<NSString>>;
);
}