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(feature = "unstable-darwin-objc", feature(darwin_objc))]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10// Update in Cargo.toml as well.
11#![doc(html_root_url = "https://docs.rs/objc2-authentication-services/0.3.2")]
12#![allow(unused_imports)]
13#![allow(dead_code)]
14
15#[cfg(feature = "alloc")]
16extern crate alloc;
17
18#[cfg(feature = "std")]
19extern crate std;
20
21mod generated;
22#[allow(unused_imports, unreachable_pub)]
23pub use self::generated::*;
24
25use objc2::runtime::NSObject;
26use objc2::{extern_class, ClassType, MainThreadOnly};
27
28// TODO: UIViewController on iOS, NSViewController on macOS
29pub type ASViewController = NSObject;
30// TODO: UIWindow on iOS, NSWindow on macOS
31pub type ASPresentationAnchor = NSObject;
32// TODO: UIImage on iOS, NSImage on macOS
33pub type ASImage = NSObject;
34
35// TODO: UIControl on iOS, NSControl on macOS
36#[cfg(feature = "ASAuthorizationAppleIDButton")]
37type ASControl = NSObject;
38
39extern_class!(
40    #[unsafe(super(ASViewController))]
41    #[thread_kind = MainThreadOnly]
42    #[derive(Debug, PartialEq, Eq, Hash)]
43    #[cfg(feature = "ASCredentialProviderViewController")]
44    pub struct ASCredentialProviderViewController;
45);
46
47extern_class!(
48    #[unsafe(super(ASViewController))]
49    #[thread_kind = MainThreadOnly]
50    #[derive(Debug, PartialEq, Eq, Hash)]
51    #[cfg(feature = "ASAccountAuthenticationModificationViewController")]
52    pub struct ASAccountAuthenticationModificationViewController;
53);
54
55extern_class!(
56    #[unsafe(super(ASControl))]
57    #[thread_kind = MainThreadOnly]
58    #[derive(Debug, PartialEq, Eq, Hash)]
59    #[cfg(feature = "ASAuthorizationAppleIDButton")]
60    pub struct ASAuthorizationAppleIDButton;
61);