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#[doc(alias = "WebPlugInContainer")]
18/// This informal protocol enables a plug-in to request that its containing application
19/// perform certain operations.
20pub unsafe trait NSObjectWebPlugInContainer:
21    ClassType + Sized + private_NSObjectWebPlugInContainer::Sealed
22{
23    extern_methods!(
24        /// Tell the application to show a URL in a target frame
25        ///
26        /// Parameter `request`: The request to be loaded.
27        ///
28        /// Parameter `target`: The target frame. If the frame with the specified target is not
29        /// found, a new window is opened and the main frame of the new window is named
30        /// with the specified target.  If nil is specified, the frame that contains
31        /// the applet is targeted.
32        #[unsafe(method(webPlugInContainerLoadRequest:inFrame:))]
33        #[unsafe(method_family = none)]
34        unsafe fn webPlugInContainerLoadRequest_inFrame(
35            &self,
36            request: Option<&NSURLRequest>,
37            target: Option<&NSString>,
38        );
39
40        /// Tell the application to show the specified status message.
41        ///
42        /// Parameter `message`: The string to be shown.
43        #[unsafe(method(webPlugInContainerShowStatus:))]
44        #[unsafe(method_family = none)]
45        unsafe fn webPlugInContainerShowStatus(&self, message: Option<&NSString>);
46
47        #[cfg(feature = "objc2-app-kit")]
48        #[cfg(target_os = "macos")]
49        /// The color that should be used for any special drawing when
50        /// plug-in is selected.
51        #[unsafe(method(webPlugInContainerSelectionColor))]
52        #[unsafe(method_family = none)]
53        unsafe fn webPlugInContainerSelectionColor(&self) -> Option<Retained<NSColor>>;
54
55        #[cfg(feature = "WebFrame")]
56        /// Allows the plug-in to access the WebFrame that
57        /// contains the plug-in.  This method will not be implemented by containers that
58        /// are not WebKit based.
59        #[unsafe(method(webFrame))]
60        #[unsafe(method_family = none)]
61        unsafe fn webFrame(&self) -> Option<Retained<WebFrame>>;
62    );
63}
64
65impl private_NSObjectWebPlugInContainer::Sealed for NSObject {}
66unsafe impl NSObjectWebPlugInContainer for NSObject {}