use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GKLeaderboardSet;
);
extern_conformance!(
unsafe impl NSCoding for GKLeaderboardSet {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GKLeaderboardSet {}
);
extern_conformance!(
unsafe impl NSSecureCoding for GKLeaderboardSet {}
);
impl GKLeaderboardSet {
extern_methods!(
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[unsafe(method(groupIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn groupIdentifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);
#[cfg(feature = "block2")]
#[unsafe(method(loadLeaderboardSetsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadLeaderboardSetsWithCompletionHandler(
completion_handler: Option<
&block2::DynBlock<dyn Fn(*mut NSArray<GKLeaderboardSet>, *mut NSError)>,
>,
);
#[cfg(all(feature = "GKLeaderboard", feature = "block2"))]
#[unsafe(method(loadLeaderboardsWithHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadLeaderboardsWithHandler(
&self,
handler: &block2::DynBlock<dyn Fn(*mut NSArray<GKLeaderboard>, *mut NSError)>,
);
);
}
impl GKLeaderboardSet {
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>;
);
}
impl GKLeaderboardSet {
extern_methods!(
#[cfg(all(feature = "GKLeaderboard", feature = "block2"))]
#[deprecated]
#[unsafe(method(loadLeaderboardsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadLeaderboardsWithCompletionHandler(
&self,
completion_handler: Option<
&block2::DynBlock<dyn Fn(*mut NSArray<GKLeaderboard>, *mut NSError)>,
>,
);
);
}
impl GKLeaderboardSet {
extern_methods!(
#[cfg(all(feature = "block2", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[unsafe(method(loadImageWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadImageWithCompletionHandler(
&self,
completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSImage, *mut NSError)>>,
);
);
}