objc2_authentication_services/
lib.rs

1//! # Bindings to the `AuthenticationServices` framework
2//!
3//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
4//!
5//! [apple-doc]: https://developer.apple.com/documentation/authenticationservices/
6//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
7#![no_std]
8#![cfg_attr(docsrs, feature(doc_auto_cfg))]
9// Update in Cargo.toml as well.
10#![doc(html_root_url = "https://docs.rs/objc2-authentication-services/0.3.1")]
11#![allow(unused_imports)]
12#![allow(dead_code)]
13
14#[cfg(feature = "alloc")]
15extern crate alloc;
16
17#[cfg(feature = "std")]
18extern crate std;
19
20mod generated;
21#[allow(unused_imports, unreachable_pub)]
22pub use self::generated::*;
23
24use objc2::runtime::NSObject;
25use objc2::{extern_class, ClassType, MainThreadOnly};
26
27// TODO: UIViewController on iOS, NSViewController on macOS
28pub type ASViewController = NSObject;
29// TODO: UIWindow on iOS, NSWindow on macOS
30pub type ASPresentationAnchor = NSObject;
31// TODO: UIImage on iOS, NSImage on macOS
32pub type ASImage = NSObject;
33
34// TODO: UIControl on iOS, NSControl on macOS
35#[cfg(feature = "ASAuthorizationAppleIDButton")]
36type ASControl = NSObject;
37
38extern_class!(
39    #[unsafe(super(ASViewController))]
40    #[thread_kind = MainThreadOnly]
41    #[derive(Debug, PartialEq, Eq, Hash)]
42    #[cfg(feature = "ASCredentialProviderViewController")]
43    pub struct ASCredentialProviderViewController;
44);
45
46extern_class!(
47    #[unsafe(super(ASViewController))]
48    #[thread_kind = MainThreadOnly]
49    #[derive(Debug, PartialEq, Eq, Hash)]
50    #[cfg(feature = "ASAccountAuthenticationModificationViewController")]
51    pub struct ASAccountAuthenticationModificationViewController;
52);
53
54extern_class!(
55    #[unsafe(super(ASControl))]
56    #[thread_kind = MainThreadOnly]
57    #[derive(Debug, PartialEq, Eq, Hash)]
58    #[cfg(feature = "ASAuthorizationAppleIDButton")]
59    pub struct ASAuthorizationAppleIDButton;
60);