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