objc2_web_kit/generated/
WebPluginViewFactory.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4#[cfg(feature = "objc2-app-kit")]
5#[cfg(target_os = "macos")]
6use objc2_app_kit::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern "C" {
12    /// the plug-in's view.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webpluginbaseurlkey?language=objc)
15    #[deprecated]
16    pub static WebPlugInBaseURLKey: Option<&'static NSString>;
17}
18
19extern "C" {
20    /// and values of all attributes of the HTML element associated with the plug-in AND
21    /// the names and values of all parameters to be passed to the plug-in (e.g. PARAM
22    /// elements within an APPLET element). In the case of a conflict between names,
23    /// the attributes of an element take precedence over any PARAMs.  All of the keys
24    /// and values in this NSDictionary must be NSStrings.
25    ///
26    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webpluginattributeskey?language=objc)
27    #[deprecated]
28    pub static WebPlugInAttributesKey: Option<&'static NSString>;
29}
30
31extern "C" {
32    /// WebPlugInContainer informal protocol. This object is used for
33    /// callbacks from the plug-in to the app. if this argument is nil, no callbacks will
34    /// occur.
35    ///
36    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webplugincontainerkey?language=objc)
37    #[deprecated]
38    pub static WebPlugInContainerKey: Option<&'static NSString>;
39}
40
41extern "C" {
42    /// the plug-in.  May be nil.
43    ///
44    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webplugincontainingelementkey?language=objc)
45    #[deprecated]
46    pub static WebPlugInContainingElementKey: Option<&'static NSString>;
47}
48
49extern "C" {
50    /// own main resource (the "src" URL, in most cases). If YES, the plug-in should load its own main resource. If NO, the
51    /// plug-in should use the data provided by WebKit. See -webPlugInMainResourceReceivedData: in WebPluginPrivate.h.
52    /// For compatibility with older versions of WebKit, the plug-in should assume that the value for
53    /// WebPlugInShouldLoadMainResourceKey is NO if it is absent from the arguments dictionary.
54    ///
55    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webpluginshouldloadmainresourcekey?language=objc)
56    #[deprecated]
57    pub static WebPlugInShouldLoadMainResourceKey: Option<&'static NSString>;
58}
59
60extern_protocol!(
61    /// WebPlugInViewFactory are used to create the NSView for a plug-in.
62    /// The principal class of the plug-in bundle must implement this protocol.
63    ///
64    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webpluginviewfactory?language=objc)
65    #[deprecated]
66    pub unsafe trait WebPlugInViewFactory: NSObjectProtocol {
67        #[cfg(feature = "objc2-app-kit")]
68        #[cfg(target_os = "macos")]
69        /// Parameter `arguments`: The arguments dictionary with the mentioned keys and objects. This method is required to implement.
70        ///
71        /// Returns: Returns an NSView object that conforms to the WebPlugIn informal protocol.
72        ///
73        /// # Safety
74        ///
75        /// - `arguments` generic should be of the correct type.
76        /// - `arguments` might not allow `None`.
77        #[deprecated]
78        #[unsafe(method(plugInViewWithArguments:))]
79        #[unsafe(method_family = none)]
80        unsafe fn plugInViewWithArguments(
81            arguments: Option<&NSDictionary>,
82            mtm: MainThreadMarker,
83        ) -> Option<Retained<NSView>>;
84    }
85);