pub unsafe trait WebDocumentView: NSObjectProtocol {
// Provided methods
unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
where Self: Sized + Message { ... }
unsafe fn dataSourceUpdated(&self, data_source: Option<&WebDataSource>)
where Self: Sized + Message { ... }
unsafe fn setNeedsLayout(&self, flag: bool)
where Self: Sized + Message { ... }
unsafe fn layout(&self)
where Self: Sized + Message { ... }
unsafe fn viewWillMoveToHostWindow(&self, host_window: Option<&NSWindow>)
where Self: Sized + Message { ... }
unsafe fn viewDidMoveToHostWindow(&self)
where Self: Sized + Message { ... }
}WebDocument only.Expand description
Protocol implemented by the document view of WebFrameView
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
👎DeprecatedAvailable on crate feature WebDataSource only.
unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
WebDataSource only.Called when the corresponding data source has been created.
Parameter dataSource: The corresponding data source.
§Safety
data_source might not allow None.
Sourceunsafe fn dataSourceUpdated(&self, data_source: Option<&WebDataSource>)
👎DeprecatedAvailable on crate feature WebDataSource only.
unsafe fn dataSourceUpdated(&self, data_source: Option<&WebDataSource>)
WebDataSource only.Called when the corresponding data source has received data.
Parameter dataSource: The corresponding data source.
§Safety
data_source might not allow None.
Sourceunsafe fn setNeedsLayout(&self, flag: bool)
👎Deprecated
unsafe fn setNeedsLayout(&self, flag: bool)
Called when WebKit has determined that the document view needs to layout. This method should simply set a flag and call layout from drawRect if the flag is YES.
Parameter flag: YES to cause a layout, no to not cause a layout.
Sourceunsafe fn layout(&self)
👎Deprecated
unsafe fn layout(&self)
Called when the document view must immediately layout. For simple views, setting the frame is a sufficient implementation of this method.
Sourceunsafe fn viewWillMoveToHostWindow(&self, host_window: Option<&NSWindow>)
👎DeprecatedAvailable on macOS and crate feature objc2-app-kit only.
unsafe fn viewWillMoveToHostWindow(&self, host_window: Option<&NSWindow>)
objc2-app-kit only.Parameter hostWindow: The host window for the document view.
Called before the host window is set on the parent web view.
§Safety
host_window might not allow None.
Sourceunsafe fn viewDidMoveToHostWindow(&self)
👎Deprecated
unsafe fn viewDidMoveToHostWindow(&self)
Called after the host window is set on the parent web view.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn WebDocumentView
Source§impl ProtocolType for dyn WebDocumentView
impl ProtocolType for dyn WebDocumentView
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".