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        #[deprecated]
113        #[unsafe(method(printOperationWithPrintInfo:))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn printOperationWithPrintInfo(
116            &self,
117            print_info: Option<&NSPrintInfo>,
118        ) -> Option<Retained<NSPrintOperation>>;
119
120        /// Called by the host application before it initializes and runs a print operation.
121        ///
122        /// If NO is returned, the host application will abort its print operation and call -printDocumentView on the
123        /// WebFrameView.  The document view is then expected to run its own print operation.  If YES is returned, the host
124        /// application's print operation will continue as normal.
125        #[deprecated]
126        #[unsafe(method(documentViewShouldHandlePrint))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn documentViewShouldHandlePrint(&self) -> bool;
129
130        /// Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint.
131        #[deprecated]
132        #[unsafe(method(printDocumentView))]
133        #[unsafe(method_family = none)]
134        pub unsafe fn printDocumentView(&self);
135    );
136}
137
138/// Methods declared on superclass `NSView`.
139#[cfg(feature = "objc2-app-kit")]
140#[cfg(target_os = "macos")]
141impl WebFrameView {
142    extern_methods!(
143        #[unsafe(method(initWithFrame:))]
144        #[unsafe(method_family = init)]
145        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
146
147        #[unsafe(method(initWithCoder:))]
148        #[unsafe(method_family = init)]
149        pub unsafe fn initWithCoder(
150            this: Allocated<Self>,
151            coder: &NSCoder,
152        ) -> Option<Retained<Self>>;
153    );
154}
155
156/// Methods declared on superclass `NSResponder`.
157#[cfg(feature = "objc2-app-kit")]
158#[cfg(target_os = "macos")]
159impl WebFrameView {
160    extern_methods!(
161        #[unsafe(method(init))]
162        #[unsafe(method_family = init)]
163        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164    );
165}
166
167/// Methods declared on superclass `NSObject`.
168#[cfg(feature = "objc2-app-kit")]
169#[cfg(target_os = "macos")]
170impl WebFrameView {
171    extern_methods!(
172        #[unsafe(method(new))]
173        #[unsafe(method_family = new)]
174        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
175    );
176}