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(NSViewController, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[deprecated = "No longer supported."]
pub struct GKFriendRequestComposeViewController;
);
#[cfg(all(feature = "GKDialogController", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl GKViewController for GKFriendRequestComposeViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for GKFriendRequestComposeViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSEditor for GKFriendRequestComposeViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for GKFriendRequestComposeViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSeguePerforming for GKFriendRequestComposeViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for GKFriendRequestComposeViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl GKFriendRequestComposeViewController {
extern_methods!();
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl GKFriendRequestComposeViewController {
extern_methods!(
#[unsafe(method(initWithNibName:bundle:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithNibName_bundle(
this: Allocated<Self>,
nib_name_or_nil: Option<&NSNibName>,
nib_bundle_or_nil: Option<&NSBundle>,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl GKFriendRequestComposeViewController {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl GKFriendRequestComposeViewController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[deprecated = "No longer supported."]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl GKFriendRequestComposeViewController {
extern_methods!(
#[deprecated = "No longer supported."]
#[unsafe(method(maxNumberOfRecipients))]
#[unsafe(method_family = none)]
pub unsafe fn maxNumberOfRecipients(mtm: MainThreadMarker) -> NSUInteger;
#[deprecated = "No longer supported."]
#[unsafe(method(setMessage:))]
#[unsafe(method_family = none)]
pub unsafe fn setMessage(&self, message: Option<&NSString>);
#[cfg(all(feature = "GKBasePlayer", feature = "GKPlayer"))]
#[unsafe(method(addRecipientPlayers:))]
#[unsafe(method_family = none)]
pub unsafe fn addRecipientPlayers(&self, players: &NSArray<GKPlayer>);
#[deprecated]
#[unsafe(method(addRecipientsWithPlayerIDs:))]
#[unsafe(method_family = none)]
pub unsafe fn addRecipientsWithPlayerIDs(&self, player_i_ds: &NSArray<NSString>);
#[deprecated = "No longer supported."]
#[unsafe(method(addRecipientsWithEmailAddresses:))]
#[unsafe(method_family = none)]
pub unsafe fn addRecipientsWithEmailAddresses(&self, email_addresses: &NSArray<NSString>);
#[deprecated = "No longer supported."]
#[unsafe(method(composeViewDelegate))]
#[unsafe(method_family = none)]
pub unsafe fn composeViewDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn GKFriendRequestComposeViewControllerDelegate>>>;
#[deprecated = "No longer supported."]
#[unsafe(method(setComposeViewDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setComposeViewDelegate(
&self,
compose_view_delegate: Option<
&ProtocolObject<dyn GKFriendRequestComposeViewControllerDelegate>,
>,
);
);
}
extern_protocol!(
#[deprecated = "No longer supported."]
pub unsafe trait GKFriendRequestComposeViewControllerDelegate {
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[deprecated = "No longer supported."]
#[unsafe(method(friendRequestComposeViewControllerDidFinish:))]
#[unsafe(method_family = none)]
unsafe fn friendRequestComposeViewControllerDidFinish(
&self,
view_controller: &GKFriendRequestComposeViewController,
);
}
);