Skip to main content

WebDocumentView

Trait WebDocumentView 

Source
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 { ... }
}
👎Deprecated
Available on crate feature WebDocument only.
Expand description

Protocol implemented by the document view of WebFrameView

See also Apple’s documentation

Provided Methods§

Source

unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
where Self: Sized + Message,

👎Deprecated
Available on crate feature WebDataSource only.

Called when the corresponding data source has been created.

Parameter dataSource: The corresponding data source.

§Safety

data_source might not allow None.

Source

unsafe fn dataSourceUpdated(&self, data_source: Option<&WebDataSource>)
where Self: Sized + Message,

👎Deprecated
Available on crate feature WebDataSource only.

Called when the corresponding data source has received data.

Parameter dataSource: The corresponding data source.

§Safety

data_source might not allow None.

Source

unsafe fn setNeedsLayout(&self, flag: bool)
where Self: Sized + Message,

👎Deprecated

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.

Source

unsafe fn layout(&self)
where Self: Sized + Message,

👎Deprecated

Called when the document view must immediately layout. For simple views, setting the frame is a sufficient implementation of this method.

Source

unsafe fn viewWillMoveToHostWindow(&self, host_window: Option<&NSWindow>)
where Self: Sized + Message,

👎Deprecated
Available on macOS and crate feature 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.

Source

unsafe fn viewDidMoveToHostWindow(&self)
where Self: Sized + Message,

👎Deprecated

Called after the host window is set on the parent web view.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn WebDocumentView

Source§

impl ProtocolType for dyn WebDocumentView

Source§

const NAME: &'static str = "WebDocumentView"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> WebDocumentView for ProtocolObject<T>
where T: ?Sized + WebDocumentView,

Implementors§