objc2-web-kit 0.3.1

Bindings to the WebKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;

use crate::*;

mod private_NSObjectWebPlugInContainer {
    pub trait Sealed {}
}

/// Category "WebPlugInContainer" on [`NSObject`].
/// This informal protocol enables a plug-in to request that its containing application
/// perform certain operations.
#[doc(alias = "WebPlugInContainer")]
pub unsafe trait NSObjectWebPlugInContainer:
    ClassType + Sized + private_NSObjectWebPlugInContainer::Sealed
{
    extern_methods!(
        /// Tell the application to show a URL in a target frame
        ///
        /// Parameter `request`: The request to be loaded.
        ///
        /// Parameter `target`: The target frame. If the frame with the specified target is not
        /// found, a new window is opened and the main frame of the new window is named
        /// with the specified target.  If nil is specified, the frame that contains
        /// the applet is targeted.
        #[unsafe(method(webPlugInContainerLoadRequest:inFrame:))]
        #[unsafe(method_family = none)]
        unsafe fn webPlugInContainerLoadRequest_inFrame(
            &self,
            request: Option<&NSURLRequest>,
            target: Option<&NSString>,
        );

        /// Tell the application to show the specified status message.
        ///
        /// Parameter `message`: The string to be shown.
        #[unsafe(method(webPlugInContainerShowStatus:))]
        #[unsafe(method_family = none)]
        unsafe fn webPlugInContainerShowStatus(&self, message: Option<&NSString>);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        /// The color that should be used for any special drawing when
        /// plug-in is selected.
        #[unsafe(method(webPlugInContainerSelectionColor))]
        #[unsafe(method_family = none)]
        unsafe fn webPlugInContainerSelectionColor(&self) -> Option<Retained<NSColor>>;

        #[cfg(feature = "WebFrame")]
        /// Allows the plug-in to access the WebFrame that
        /// contains the plug-in.  This method will not be implemented by containers that
        /// are not WebKit based.
        #[unsafe(method(webFrame))]
        #[unsafe(method_family = none)]
        unsafe fn webFrame(&self) -> Option<Retained<WebFrame>>;
    );
}

impl private_NSObjectWebPlugInContainer::Sealed for NSObject {}
unsafe impl NSObjectWebPlugInContainer for NSObject {}