objc2_ui_kit/generated/
UILayoutGuide.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct UILayoutGuide;
18);
19
20extern_conformance!(
21 unsafe impl NSCoding for UILayoutGuide {}
22);
23
24extern_conformance!(
25 unsafe impl NSObjectProtocol for UILayoutGuide {}
26);
27
28impl UILayoutGuide {
29 extern_methods!(
30 #[cfg(feature = "objc2-core-foundation")]
31 #[unsafe(method(layoutFrame))]
32 #[unsafe(method_family = none)]
33 pub fn layoutFrame(&self) -> CGRect;
34
35 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
36 #[unsafe(method(owningView))]
37 #[unsafe(method_family = none)]
38 pub fn owningView(&self) -> Option<Retained<UIView>>;
39
40 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
41 #[unsafe(method(setOwningView:))]
45 #[unsafe(method_family = none)]
46 pub fn setOwningView(&self, owning_view: Option<&UIView>);
47
48 #[unsafe(method(identifier))]
49 #[unsafe(method_family = none)]
50 pub fn identifier(&self) -> Retained<NSString>;
51
52 #[unsafe(method(setIdentifier:))]
56 #[unsafe(method_family = none)]
57 pub fn setIdentifier(&self, identifier: &NSString);
58
59 #[cfg(feature = "NSLayoutAnchor")]
60 #[unsafe(method(leadingAnchor))]
61 #[unsafe(method_family = none)]
62 pub fn leadingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
63
64 #[cfg(feature = "NSLayoutAnchor")]
65 #[unsafe(method(trailingAnchor))]
66 #[unsafe(method_family = none)]
67 pub fn trailingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
68
69 #[cfg(feature = "NSLayoutAnchor")]
70 #[unsafe(method(leftAnchor))]
71 #[unsafe(method_family = none)]
72 pub fn leftAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
73
74 #[cfg(feature = "NSLayoutAnchor")]
75 #[unsafe(method(rightAnchor))]
76 #[unsafe(method_family = none)]
77 pub fn rightAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
78
79 #[cfg(feature = "NSLayoutAnchor")]
80 #[unsafe(method(topAnchor))]
81 #[unsafe(method_family = none)]
82 pub fn topAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
83
84 #[cfg(feature = "NSLayoutAnchor")]
85 #[unsafe(method(bottomAnchor))]
86 #[unsafe(method_family = none)]
87 pub fn bottomAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
88
89 #[cfg(feature = "NSLayoutAnchor")]
90 #[unsafe(method(widthAnchor))]
91 #[unsafe(method_family = none)]
92 pub fn widthAnchor(&self) -> Retained<NSLayoutDimension>;
93
94 #[cfg(feature = "NSLayoutAnchor")]
95 #[unsafe(method(heightAnchor))]
96 #[unsafe(method_family = none)]
97 pub fn heightAnchor(&self) -> Retained<NSLayoutDimension>;
98
99 #[cfg(feature = "NSLayoutAnchor")]
100 #[unsafe(method(centerXAnchor))]
101 #[unsafe(method_family = none)]
102 pub fn centerXAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
103
104 #[cfg(feature = "NSLayoutAnchor")]
105 #[unsafe(method(centerYAnchor))]
106 #[unsafe(method_family = none)]
107 pub fn centerYAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
108 );
109}
110
111impl UILayoutGuide {
113 extern_methods!(
114 #[unsafe(method(init))]
115 #[unsafe(method_family = init)]
116 pub fn init(this: Allocated<Self>) -> Retained<Self>;
117
118 #[unsafe(method(new))]
119 #[unsafe(method_family = new)]
120 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
121 );
122}