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 unsafe fn layoutFrame(&self) -> CGRect;
34
35 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
36 #[unsafe(method(owningView))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn owningView(&self) -> Option<Retained<UIView>>;
39
40 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
41 #[unsafe(method(setOwningView:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setOwningView(&self, owning_view: Option<&UIView>);
46
47 #[unsafe(method(identifier))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn identifier(&self) -> Retained<NSString>;
50
51 #[unsafe(method(setIdentifier:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setIdentifier(&self, identifier: &NSString);
55
56 #[cfg(feature = "NSLayoutAnchor")]
57 #[unsafe(method(leadingAnchor))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn leadingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
60
61 #[cfg(feature = "NSLayoutAnchor")]
62 #[unsafe(method(trailingAnchor))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn trailingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
65
66 #[cfg(feature = "NSLayoutAnchor")]
67 #[unsafe(method(leftAnchor))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn leftAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
70
71 #[cfg(feature = "NSLayoutAnchor")]
72 #[unsafe(method(rightAnchor))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn rightAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
75
76 #[cfg(feature = "NSLayoutAnchor")]
77 #[unsafe(method(topAnchor))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn topAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
80
81 #[cfg(feature = "NSLayoutAnchor")]
82 #[unsafe(method(bottomAnchor))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn bottomAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
85
86 #[cfg(feature = "NSLayoutAnchor")]
87 #[unsafe(method(widthAnchor))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn widthAnchor(&self) -> Retained<NSLayoutDimension>;
90
91 #[cfg(feature = "NSLayoutAnchor")]
92 #[unsafe(method(heightAnchor))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn heightAnchor(&self) -> Retained<NSLayoutDimension>;
95
96 #[cfg(feature = "NSLayoutAnchor")]
97 #[unsafe(method(centerXAnchor))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn centerXAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;
100
101 #[cfg(feature = "NSLayoutAnchor")]
102 #[unsafe(method(centerYAnchor))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn centerYAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
105 );
106}
107
108impl UILayoutGuide {
110 extern_methods!(
111 #[unsafe(method(init))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
114
115 #[unsafe(method(new))]
116 #[unsafe(method_family = new)]
117 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
118 );
119}