Skip to main content

WebOpenPanelResultListener

Trait WebOpenPanelResultListener 

Source
pub unsafe trait WebOpenPanelResultListener: NSObjectProtocol {
    // Provided methods
    unsafe fn chooseFilename(&self, file_name: Option<&NSString>)
       where Self: Sized + Message { ... }
    unsafe fn chooseFilenames(&self, file_names: Option<&NSArray>)
       where Self: Sized + Message { ... }
    unsafe fn cancel(&self)
       where Self: Sized + Message { ... }
}
👎Deprecated
Available on crate feature WebUIDelegate only.
Expand description

This protocol is used to call back with the results of the file open panel requested by runOpenPanelForFileButtonWithResultListener:

See also Apple’s documentation

Provided Methods§

Source

unsafe fn chooseFilename(&self, file_name: Option<&NSString>)
where Self: Sized + Message,

👎Deprecated

Call this method to return a filename from the file open panel.

Parameter fileName: the path of the selected file

§Safety

file_name might not allow None.

Source

unsafe fn chooseFilenames(&self, file_names: Option<&NSArray>)
where Self: Sized + Message,

👎Deprecated

Call this method to return an array of filenames from the file open panel.

Parameter fileNames: an array of paths of selected files

§Safety
  • file_names generic should be of the correct type.
  • file_names might not allow None.
Source

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

👎Deprecated

Call this method to indicate that the file open panel was cancelled.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn WebOpenPanelResultListener

Source§

impl ProtocolType for dyn WebOpenPanelResultListener

Source§

const NAME: &'static str = "WebOpenPanelResultListener"

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> WebOpenPanelResultListener for ProtocolObject<T>

Implementors§