objc2_game_kit/generated/
GKBasePlayer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/gamekit/gkbaseplayer?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct GKBasePlayer;
14);
15
16extern_conformance!(
17    unsafe impl NSCopying for GKBasePlayer {}
18);
19
20unsafe impl CopyingHelper for GKBasePlayer {
21    type Result = Self;
22}
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for GKBasePlayer {}
26);
27
28impl GKBasePlayer {
29    extern_methods!(
30        #[deprecated]
31        #[unsafe(method(playerID))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn playerID(&self) -> Option<Retained<NSString>>;
34
35        /// This player's name representation as displayed in the Game Center in-game UI. Use this when you need to display the player's name. The display name may be very long, so be sure to use appropriate string truncation API when drawing.
36        #[unsafe(method(displayName))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn displayName(&self) -> Option<Retained<NSString>>;
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43impl GKBasePlayer {
44    extern_methods!(
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52    );
53}