objc2_ar_kit/generated/ARQuickLookPreviewItem.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7#[cfg(feature = "objc2-foundation")]
8use objc2_foundation::*;
9
10use crate::*;
11
12#[cfg(feature = "objc2")]
13extern_class!(
14 /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arquicklookpreviewitem?language=objc)
15 #[unsafe(super(NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "objc2")]
18 pub struct ARQuickLookPreviewItem;
19);
20
21#[cfg(feature = "objc2")]
22unsafe impl NSObjectProtocol for ARQuickLookPreviewItem {}
23
24#[cfg(feature = "objc2")]
25impl ARQuickLookPreviewItem {
26 extern_methods!(
27 #[cfg(feature = "objc2-foundation")]
28 /// Creates an object representing the 3D content that will be previewed in AR Quick Look.
29 ///
30 ///
31 /// This object will be previewed in AR Quick Look using the default
32 /// behavior:
33 ///
34 /// - Start in Object mode without camera passthrough
35 ///
36 /// - Display the Share button for 3D content sharing
37 ///
38 /// - Allow scaling content in both Object and AR mode
39 ///
40 /// This is a promise to the ARQuickLookPreviewItem class that the URL points to a 3D content file. This class does not deal with the file's existence or content, and leaves it up to QuickLook to handle and process the URL.
41 ///
42 ///
43 /// Parameter `url`: A file URL to 3D content file (e.g. usdz).
44 ///
45 /// Returns: The preview object to display in AR Quick Look.
46 #[unsafe(method(initWithFileAtURL:))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn initWithFileAtURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
49
50 #[cfg(feature = "objc2-foundation")]
51 /// An optional canonical web page URL for the 3D content that will be shared.
52 ///
53 ///
54 /// If this is supplied, the URL to the canonical web page is shared instead of the 3D content file.
55 /// For example, providing https://developer.apple.com/arkit/gallery/ as the canonical web page URL string will be shared via the Share button. If the web page URL string is malformed or not provided, then AR Quick Look will default to sharing the 3D content.
56 #[unsafe(method(canonicalWebPageURL))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn canonicalWebPageURL(&self) -> Option<Retained<NSURL>>;
59
60 #[cfg(feature = "objc2-foundation")]
61 /// Setter for [`canonicalWebPageURL`][Self::canonicalWebPageURL].
62 #[unsafe(method(setCanonicalWebPageURL:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setCanonicalWebPageURL(&self, canonical_web_page_url: Option<&NSURL>);
65
66 /// Whether or not AR Quick Look allows content scaling in AR mode.
67 /// Defaults to `YES` which allows scaling content in AR mode.
68 #[unsafe(method(allowsContentScaling))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn allowsContentScaling(&self) -> bool;
71
72 /// Setter for [`allowsContentScaling`][Self::allowsContentScaling].
73 #[unsafe(method(setAllowsContentScaling:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn setAllowsContentScaling(&self, allows_content_scaling: bool);
76
77 /// Unavailable
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new() -> Retained<Self>;
85 );
86}