objc2_ui_kit/generated/
UIPreviewParameters.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipreviewparameters?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct UIPreviewParameters;
16);
17
18unsafe impl NSCopying for UIPreviewParameters {}
19
20unsafe impl CopyingHelper for UIPreviewParameters {
21    type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for UIPreviewParameters {}
25
26impl UIPreviewParameters {
27    extern_methods!(
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        #[unsafe(method(initWithTextLineRects:))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn initWithTextLineRects(
35            this: Allocated<Self>,
36            text_line_rects: &NSArray<NSValue>,
37        ) -> Retained<Self>;
38
39        #[cfg(feature = "UIBezierPath")]
40        #[unsafe(method(visiblePath))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn visiblePath(&self) -> Option<Retained<UIBezierPath>>;
43
44        #[cfg(feature = "UIBezierPath")]
45        /// Setter for [`visiblePath`][Self::visiblePath].
46        #[unsafe(method(setVisiblePath:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn setVisiblePath(&self, visible_path: Option<&UIBezierPath>);
49
50        #[cfg(feature = "UIBezierPath")]
51        #[unsafe(method(shadowPath))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn shadowPath(&self) -> Option<Retained<UIBezierPath>>;
54
55        #[cfg(feature = "UIBezierPath")]
56        /// Setter for [`shadowPath`][Self::shadowPath].
57        #[unsafe(method(setShadowPath:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setShadowPath(&self, shadow_path: Option<&UIBezierPath>);
60
61        #[cfg(feature = "UIColor")]
62        #[unsafe(method(backgroundColor))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn backgroundColor(&self) -> Retained<UIColor>;
65
66        #[cfg(feature = "UIColor")]
67        /// Setter for [`backgroundColor`][Self::backgroundColor].
68        #[unsafe(method(setBackgroundColor:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75impl UIPreviewParameters {
76    extern_methods!(
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
80    );
81}