objc2_web_kit/generated/
WKOpenPanelParameters.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// WKOpenPanelParameters contains parameters that a file upload control has specified.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkopenpanelparameters?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct WKOpenPanelParameters;
16);
17
18unsafe impl NSObjectProtocol for WKOpenPanelParameters {}
19
20impl WKOpenPanelParameters {
21    extern_methods!(
22        /// Whether the file upload control supports multiple files.
23        #[unsafe(method(allowsMultipleSelection))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn allowsMultipleSelection(&self) -> bool;
26
27        /// Whether the file upload control supports selecting directories.
28        #[unsafe(method(allowsDirectories))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn allowsDirectories(&self) -> bool;
31    );
32}
33
34/// Methods declared on superclass `NSObject`.
35impl WKOpenPanelParameters {
36    extern_methods!(
37        #[unsafe(method(init))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40
41        #[unsafe(method(new))]
42        #[unsafe(method_family = new)]
43        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
44    );
45}