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
18extern_conformance!(
19    unsafe impl NSObjectProtocol for WKOpenPanelParameters {}
20);
21
22impl WKOpenPanelParameters {
23    extern_methods!(
24        /// Whether the file upload control supports multiple files.
25        #[unsafe(method(allowsMultipleSelection))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn allowsMultipleSelection(&self) -> bool;
28
29        /// Whether the file upload control supports selecting directories.
30        #[unsafe(method(allowsDirectories))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn allowsDirectories(&self) -> bool;
33    );
34}
35
36/// Methods declared on superclass `NSObject`.
37impl WKOpenPanelParameters {
38    extern_methods!(
39        #[unsafe(method(init))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
42
43        #[unsafe(method(new))]
44        #[unsafe(method_family = new)]
45        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
46    );
47}