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
18extern_conformance!(
19    unsafe impl NSCopying for UIPreviewParameters {}
20);
21
22unsafe impl CopyingHelper for UIPreviewParameters {
23    type Result = Self;
24}
25
26extern_conformance!(
27    unsafe impl NSObjectProtocol for UIPreviewParameters {}
28);
29
30impl UIPreviewParameters {
31    extern_methods!(
32        #[unsafe(method(init))]
33        #[unsafe(method_family = init)]
34        pub fn init(this: Allocated<Self>) -> Retained<Self>;
35
36        #[unsafe(method(initWithTextLineRects:))]
37        #[unsafe(method_family = init)]
38        pub fn initWithTextLineRects(
39            this: Allocated<Self>,
40            text_line_rects: &NSArray<NSValue>,
41        ) -> Retained<Self>;
42
43        #[cfg(feature = "UIBezierPath")]
44        #[unsafe(method(visiblePath))]
45        #[unsafe(method_family = none)]
46        pub fn visiblePath(&self) -> Option<Retained<UIBezierPath>>;
47
48        #[cfg(feature = "UIBezierPath")]
49        /// Setter for [`visiblePath`][Self::visiblePath].
50        ///
51        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
52        #[unsafe(method(setVisiblePath:))]
53        #[unsafe(method_family = none)]
54        pub fn setVisiblePath(&self, visible_path: Option<&UIBezierPath>);
55
56        #[cfg(feature = "UIBezierPath")]
57        #[unsafe(method(shadowPath))]
58        #[unsafe(method_family = none)]
59        pub fn shadowPath(&self) -> Option<Retained<UIBezierPath>>;
60
61        #[cfg(feature = "UIBezierPath")]
62        /// Setter for [`shadowPath`][Self::shadowPath].
63        ///
64        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
65        #[unsafe(method(setShadowPath:))]
66        #[unsafe(method_family = none)]
67        pub fn setShadowPath(&self, shadow_path: Option<&UIBezierPath>);
68
69        #[cfg(feature = "UIColor")]
70        #[unsafe(method(backgroundColor))]
71        #[unsafe(method_family = none)]
72        pub fn backgroundColor(&self) -> Retained<UIColor>;
73
74        #[cfg(feature = "UIColor")]
75        /// Setter for [`backgroundColor`][Self::backgroundColor].
76        ///
77        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
78        #[unsafe(method(setBackgroundColor:))]
79        #[unsafe(method_family = none)]
80        pub fn setBackgroundColor(&self, background_color: Option<&UIColor>);
81    );
82}
83
84/// Methods declared on superclass `NSObject`.
85impl UIPreviewParameters {
86    extern_methods!(
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
90    );
91}