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 GKAchievementDescription;
);
extern_conformance!(
unsafe impl NSCoding for GKAchievementDescription {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GKAchievementDescription {}
);
extern_conformance!(
unsafe impl NSSecureCoding for GKAchievementDescription {}
);
impl GKAchievementDescription {
extern_methods!(
#[cfg(feature = "block2")]
#[unsafe(method(loadAchievementDescriptionsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadAchievementDescriptionsWithCompletionHandler(
completion_handler: Option<
&block2::DynBlock<dyn Fn(*mut NSArray<GKAchievementDescription>, *mut NSError)>,
>,
);
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[unsafe(method(groupIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn groupIdentifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[unsafe(method(achievedDescription))]
#[unsafe(method_family = none)]
pub unsafe fn achievedDescription(&self) -> Retained<NSString>;
#[unsafe(method(unachievedDescription))]
#[unsafe(method_family = none)]
pub unsafe fn unachievedDescription(&self) -> Retained<NSString>;
#[unsafe(method(maximumPoints))]
#[unsafe(method_family = none)]
pub unsafe fn maximumPoints(&self) -> NSInteger;
#[unsafe(method(isHidden))]
#[unsafe(method_family = none)]
pub unsafe fn isHidden(&self) -> bool;
#[unsafe(method(isReplayable))]
#[unsafe(method_family = none)]
pub unsafe fn isReplayable(&self) -> bool;
#[unsafe(method(rarityPercent))]
#[unsafe(method_family = none)]
pub unsafe fn rarityPercent(&self) -> Option<Retained<NSNumber>>;
#[cfg(feature = "GKReleaseState")]
#[unsafe(method(releaseState))]
#[unsafe(method_family = none)]
pub unsafe fn releaseState(&self) -> GKReleaseState;
#[unsafe(method(activityIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn activityIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(activityProperties))]
#[unsafe(method_family = none)]
pub unsafe fn activityProperties(&self) -> Retained<NSDictionary<NSString, NSString>>;
);
}
impl GKAchievementDescription {
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 GKAchievementDescription {
extern_methods!(
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[deprecated]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub unsafe fn image(&self) -> Option<Retained<NSImage>>;
#[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)>>,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(incompleteAchievementImage))]
#[unsafe(method_family = none)]
pub unsafe fn incompleteAchievementImage() -> Retained<NSImage>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(placeholderCompletedAchievementImage))]
#[unsafe(method_family = none)]
pub unsafe fn placeholderCompletedAchievementImage() -> Retained<NSImage>;
);
}