objc2_game_kit/generated/
GKAchievementDescription.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct GKAchievementDescription;
20);
21
22extern_conformance!(
23 unsafe impl NSCoding for GKAchievementDescription {}
24);
25
26extern_conformance!(
27 unsafe impl NSObjectProtocol for GKAchievementDescription {}
28);
29
30extern_conformance!(
31 unsafe impl NSSecureCoding for GKAchievementDescription {}
32);
33
34impl GKAchievementDescription {
35 extern_methods!(
36 #[cfg(feature = "block2")]
37 #[unsafe(method(loadAchievementDescriptionsWithCompletionHandler:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn loadAchievementDescriptionsWithCompletionHandler(
41 completion_handler: Option<
42 &block2::DynBlock<dyn Fn(*mut NSArray<GKAchievementDescription>, *mut NSError)>,
43 >,
44 );
45
46 #[unsafe(method(identifier))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn identifier(&self) -> Retained<NSString>;
49
50 #[unsafe(method(groupIdentifier))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn groupIdentifier(&self) -> Option<Retained<NSString>>;
54
55 #[unsafe(method(title))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn title(&self) -> Retained<NSString>;
59
60 #[unsafe(method(achievedDescription))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn achievedDescription(&self) -> Retained<NSString>;
64
65 #[unsafe(method(unachievedDescription))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn unachievedDescription(&self) -> Retained<NSString>;
69
70 #[unsafe(method(maximumPoints))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn maximumPoints(&self) -> NSInteger;
74
75 #[unsafe(method(isHidden))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn isHidden(&self) -> bool;
79
80 #[unsafe(method(isReplayable))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn isReplayable(&self) -> bool;
84
85 #[unsafe(method(rarityPercent))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn rarityPercent(&self) -> Option<Retained<NSNumber>>;
89
90 #[cfg(feature = "GKReleaseState")]
91 #[unsafe(method(releaseState))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn releaseState(&self) -> GKReleaseState;
95
96 #[unsafe(method(activityIdentifier))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn activityIdentifier(&self) -> Retained<NSString>;
100
101 #[unsafe(method(activityProperties))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn activityProperties(&self) -> Retained<NSDictionary<NSString, NSString>>;
105 );
106}
107
108impl GKAchievementDescription {
110 extern_methods!(
111 #[unsafe(method(init))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
114
115 #[unsafe(method(new))]
116 #[unsafe(method_family = new)]
117 pub unsafe fn new() -> Retained<Self>;
118 );
119}
120
121impl GKAchievementDescription {
123 extern_methods!(
124 #[cfg(feature = "objc2-app-kit")]
125 #[cfg(target_os = "macos")]
126 #[deprecated]
127 #[unsafe(method(image))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn image(&self) -> Option<Retained<NSImage>>;
130
131 #[cfg(all(feature = "block2", feature = "objc2-app-kit"))]
132 #[cfg(target_os = "macos")]
133 #[unsafe(method(loadImageWithCompletionHandler:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn loadImageWithCompletionHandler(
136 &self,
137 completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSImage, *mut NSError)>>,
138 );
139
140 #[cfg(feature = "objc2-app-kit")]
141 #[cfg(target_os = "macos")]
142 #[unsafe(method(incompleteAchievementImage))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn incompleteAchievementImage() -> Retained<NSImage>;
145
146 #[cfg(feature = "objc2-app-kit")]
147 #[cfg(target_os = "macos")]
148 #[unsafe(method(placeholderCompletedAchievementImage))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn placeholderCompletedAchievementImage() -> Retained<NSImage>;
151 );
152}