objc2_link_presentation/generated/
LPLinkView.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSView, NSResponder, NSObject))]
42 #[derive(Debug, PartialEq, Eq, Hash)]
43 #[cfg(feature = "objc2-app-kit")]
44 #[cfg(target_os = "macos")]
45 pub struct LPLinkView;
46);
47
48#[cfg(feature = "objc2-app-kit")]
49#[cfg(target_os = "macos")]
50unsafe impl NSAccessibility for LPLinkView {}
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54unsafe impl NSAccessibilityElementProtocol for LPLinkView {}
55
56#[cfg(feature = "objc2-app-kit")]
57#[cfg(target_os = "macos")]
58unsafe impl NSAnimatablePropertyContainer for LPLinkView {}
59
60#[cfg(feature = "objc2-app-kit")]
61#[cfg(target_os = "macos")]
62unsafe impl NSAppearanceCustomization for LPLinkView {}
63
64#[cfg(feature = "objc2-app-kit")]
65#[cfg(target_os = "macos")]
66unsafe impl NSCoding for LPLinkView {}
67
68#[cfg(feature = "objc2-app-kit")]
69#[cfg(target_os = "macos")]
70unsafe impl NSDraggingDestination for LPLinkView {}
71
72#[cfg(feature = "objc2-app-kit")]
73#[cfg(target_os = "macos")]
74unsafe impl NSObjectProtocol for LPLinkView {}
75
76#[cfg(feature = "objc2-app-kit")]
77#[cfg(target_os = "macos")]
78unsafe impl NSUserInterfaceItemIdentification for LPLinkView {}
79
80#[cfg(feature = "objc2-app-kit")]
81#[cfg(target_os = "macos")]
82impl LPLinkView {
83 extern_methods!(
84 #[unsafe(method(initWithCoder:))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
87
88 #[unsafe(method(encodeWithCoder:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn encodeWithCoder(&self, coder: &NSCoder);
91
92 #[unsafe(method(initWithURL:))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
96
97 #[cfg(feature = "LPLinkMetadata")]
98 #[unsafe(method(initWithMetadata:))]
100 #[unsafe(method_family = init)]
101 pub unsafe fn initWithMetadata(
102 this: Allocated<Self>,
103 metadata: &LPLinkMetadata,
104 ) -> Retained<Self>;
105
106 #[cfg(feature = "LPLinkMetadata")]
107 #[unsafe(method(metadata))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn metadata(&self) -> Retained<LPLinkMetadata>;
114
115 #[cfg(feature = "LPLinkMetadata")]
116 #[unsafe(method(setMetadata:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setMetadata(&self, metadata: &LPLinkMetadata);
120 );
121}
122
123#[cfg(feature = "objc2-app-kit")]
125#[cfg(target_os = "macos")]
126impl LPLinkView {
127 extern_methods!(
128 #[unsafe(method(initWithFrame:))]
129 #[unsafe(method_family = init)]
130 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
131 );
132}
133
134#[cfg(feature = "objc2-app-kit")]
136#[cfg(target_os = "macos")]
137impl LPLinkView {
138 extern_methods!(
139 #[unsafe(method(init))]
140 #[unsafe(method_family = init)]
141 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
142 );
143}
144
145#[cfg(feature = "objc2-app-kit")]
147#[cfg(target_os = "macos")]
148impl LPLinkView {
149 extern_methods!(
150 #[unsafe(method(new))]
151 #[unsafe(method_family = new)]
152 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
153 );
154}