objc2_web_kit/generated/
WebFrameView.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::*;
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    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/webframeview?language=objc)
15    #[unsafe(super(NSView, NSResponder, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "objc2-app-kit")]
18    #[cfg(target_os = "macos")]
19    #[deprecated]
20    pub struct WebFrameView;
21);
22
23#[cfg(feature = "objc2-app-kit")]
24#[cfg(target_os = "macos")]
25extern_conformance!(
26    unsafe impl NSAccessibility for WebFrameView {}
27);
28
29#[cfg(feature = "objc2-app-kit")]
30#[cfg(target_os = "macos")]
31extern_conformance!(
32    unsafe impl NSAccessibilityElementProtocol for WebFrameView {}
33);
34
35#[cfg(feature = "objc2-app-kit")]
36#[cfg(target_os = "macos")]
37extern_conformance!(
38    unsafe impl NSAnimatablePropertyContainer for WebFrameView {}
39);
40
41#[cfg(feature = "objc2-app-kit")]
42#[cfg(target_os = "macos")]
43extern_conformance!(
44    unsafe impl NSAppearanceCustomization for WebFrameView {}
45);
46
47#[cfg(feature = "objc2-app-kit")]
48#[cfg(target_os = "macos")]
49extern_conformance!(
50    unsafe impl NSCoding for WebFrameView {}
51);
52
53#[cfg(feature = "objc2-app-kit")]
54#[cfg(target_os = "macos")]
55extern_conformance!(
56    unsafe impl NSDraggingDestination for WebFrameView {}
57);
58
59#[cfg(feature = "objc2-app-kit")]
60#[cfg(target_os = "macos")]
61extern_conformance!(
62    unsafe impl NSObjectProtocol for WebFrameView {}
63);
64
65#[cfg(feature = "objc2-app-kit")]
66#[cfg(target_os = "macos")]
67extern_conformance!(
68    unsafe impl NSUserInterfaceItemIdentification for WebFrameView {}
69);
70
71#[cfg(feature = "objc2-app-kit")]
72#[cfg(target_os = "macos")]
73impl WebFrameView {
74    extern_methods!(
75        #[cfg(feature = "WebFrame")]
76        /// The WebFrame associated with this WebFrameView
77        #[deprecated]
78        #[unsafe(method(webFrame))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn webFrame(&self) -> Option<Retained<WebFrame>>;
81
82        #[cfg(feature = "WebDocument")]
83        /// The WebFrameView's document subview
84        ///
85        /// The subview that renders the WebFrameView's contents
86        #[deprecated]
87        #[unsafe(method(documentView))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn documentView(&self) -> Option<Retained<NSView>>;
90
91        /// Whether the WebFrameView allows its document to be scrolled
92        #[deprecated]
93        #[unsafe(method(allowsScrolling))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn allowsScrolling(&self) -> bool;
96
97        /// Setter for [`allowsScrolling`][Self::allowsScrolling].
98        #[deprecated]
99        #[unsafe(method(setAllowsScrolling:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn setAllowsScrolling(&self, allows_scrolling: bool);
102
103        /// Whether this frame can print headers and footers
104        #[deprecated]
105        #[unsafe(method(canPrintHeadersAndFooters))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn canPrintHeadersAndFooters(&self) -> bool;
108
109        /// Creates a print operation set up to print this frame
110        ///
111        /// Returns: A newly created print operation object
112        ///
113        /// # Safety
114        ///
115        /// `print_info` might not allow `None`.
116        #[deprecated]
117        #[unsafe(method(printOperationWithPrintInfo:))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn printOperationWithPrintInfo(
120            &self,
121            print_info: Option<&NSPrintInfo>,
122        ) -> Option<Retained<NSPrintOperation>>;
123
124        /// Called by the host application before it initializes and runs a print operation.
125        ///
126        /// If NO is returned, the host application will abort its print operation and call -printDocumentView on the
127        /// WebFrameView.  The document view is then expected to run its own print operation.  If YES is returned, the host
128        /// application's print operation will continue as normal.
129        #[deprecated]
130        #[unsafe(method(documentViewShouldHandlePrint))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn documentViewShouldHandlePrint(&self) -> bool;
133
134        /// Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint.
135        #[deprecated]
136        #[unsafe(method(printDocumentView))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn printDocumentView(&self);
139    );
140}
141
142/// Methods declared on superclass `NSView`.
143#[cfg(feature = "objc2-app-kit")]
144#[cfg(target_os = "macos")]
145impl WebFrameView {
146    extern_methods!(
147        #[unsafe(method(initWithFrame:))]
148        #[unsafe(method_family = init)]
149        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
150
151        /// # Safety
152        ///
153        /// `coder` possibly has further requirements.
154        #[unsafe(method(initWithCoder:))]
155        #[unsafe(method_family = init)]
156        pub unsafe fn initWithCoder(
157            this: Allocated<Self>,
158            coder: &NSCoder,
159        ) -> Option<Retained<Self>>;
160    );
161}
162
163/// Methods declared on superclass `NSResponder`.
164#[cfg(feature = "objc2-app-kit")]
165#[cfg(target_os = "macos")]
166impl WebFrameView {
167    extern_methods!(
168        #[unsafe(method(init))]
169        #[unsafe(method_family = init)]
170        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
171    );
172}
173
174/// Methods declared on superclass `NSObject`.
175#[cfg(feature = "objc2-app-kit")]
176#[cfg(target_os = "macos")]
177impl WebFrameView {
178    extern_methods!(
179        #[unsafe(method(new))]
180        #[unsafe(method_family = new)]
181        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
182    );
183}