objc2_web_kit/generated/
WebPluginContainer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-app-kit")]
6#[cfg(target_os = "macos")]
7use objc2_app_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12mod private_NSObjectWebPlugInContainer {
13    pub trait Sealed {}
14}
15
16/// Category "WebPlugInContainer" on [`NSObject`].
17///
18/// This informal protocol enables a plug-in to request that its containing application
19/// perform certain operations.
20#[doc(alias = "WebPlugInContainer")]
21pub unsafe trait NSObjectWebPlugInContainer:
22    ClassType + Sized + private_NSObjectWebPlugInContainer::Sealed
23{
24    extern_methods!(
25        /// Tell the application to show a URL in a target frame
26        ///
27        /// Parameter `request`: The request to be loaded.
28        ///
29        /// Parameter `target`: The target frame. If the frame with the specified target is not
30        /// found, a new window is opened and the main frame of the new window is named
31        /// with the specified target.  If nil is specified, the frame that contains
32        /// the applet is targeted.
33        ///
34        /// # Safety
35        ///
36        /// - `request` might not allow `None`.
37        /// - `target` might not allow `None`.
38        #[unsafe(method(webPlugInContainerLoadRequest:inFrame:))]
39        #[unsafe(method_family = none)]
40        unsafe fn webPlugInContainerLoadRequest_inFrame(
41            &self,
42            request: Option<&NSURLRequest>,
43            target: Option<&NSString>,
44        );
45
46        /// Tell the application to show the specified status message.
47        ///
48        /// Parameter `message`: The string to be shown.
49        ///
50        /// # Safety
51        ///
52        /// `message` might not allow `None`.
53        #[unsafe(method(webPlugInContainerShowStatus:))]
54        #[unsafe(method_family = none)]
55        unsafe fn webPlugInContainerShowStatus(&self, message: Option<&NSString>);
56
57        #[cfg(feature = "objc2-app-kit")]
58        #[cfg(target_os = "macos")]
59        /// The color that should be used for any special drawing when
60        /// plug-in is selected.
61        #[unsafe(method(webPlugInContainerSelectionColor))]
62        #[unsafe(method_family = none)]
63        unsafe fn webPlugInContainerSelectionColor(&self) -> Option<Retained<NSColor>>;
64
65        #[cfg(feature = "WebFrame")]
66        /// Allows the plug-in to access the WebFrame that
67        /// contains the plug-in.  This method will not be implemented by containers that
68        /// are not WebKit based.
69        #[unsafe(method(webFrame))]
70        #[unsafe(method_family = none)]
71        unsafe fn webFrame(&self) -> Option<Retained<WebFrame>>;
72    );
73}
74
75impl private_NSObjectWebPlugInContainer::Sealed for NSObject {}
76unsafe impl NSObjectWebPlugInContainer for NSObject {}