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