//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "WebKit_WKUserContentController")]
    pub struct WKUserContentController;

    #[cfg(feature = "WebKit_WKUserContentController")]
    unsafe impl ClassType for WKUserContentController {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "WebKit_WKUserContentController")]
unsafe impl NSCoding for WKUserContentController {}

#[cfg(feature = "WebKit_WKUserContentController")]
unsafe impl NSObjectProtocol for WKUserContentController {}

#[cfg(feature = "WebKit_WKUserContentController")]
unsafe impl NSSecureCoding for WKUserContentController {}

extern_methods!(
    #[cfg(feature = "WebKit_WKUserContentController")]
    unsafe impl WKUserContentController {
        #[cfg(all(feature = "Foundation_NSArray", feature = "WebKit_WKUserScript"))]
        #[method_id(@__retain_semantics Other userScripts)]
        pub unsafe fn userScripts(&self) -> Id<NSArray<WKUserScript>>;

        #[cfg(feature = "WebKit_WKUserScript")]
        #[method(addUserScript:)]
        pub unsafe fn addUserScript(&self, user_script: &WKUserScript);

        #[method(removeAllUserScripts)]
        pub unsafe fn removeAllUserScripts(&self);

        #[cfg(all(feature = "Foundation_NSString", feature = "WebKit_WKContentWorld"))]
        #[method(addScriptMessageHandler:contentWorld:name:)]
        pub unsafe fn addScriptMessageHandler_contentWorld_name(
            &self,
            script_message_handler: &ProtocolObject<dyn WKScriptMessageHandler>,
            world: &WKContentWorld,
            name: &NSString,
        );

        #[cfg(all(feature = "Foundation_NSString", feature = "WebKit_WKContentWorld"))]
        #[method(addScriptMessageHandlerWithReply:contentWorld:name:)]
        pub unsafe fn addScriptMessageHandlerWithReply_contentWorld_name(
            &self,
            script_message_handler_with_reply: &ProtocolObject<dyn WKScriptMessageHandlerWithReply>,
            content_world: &WKContentWorld,
            name: &NSString,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[method(addScriptMessageHandler:name:)]
        pub unsafe fn addScriptMessageHandler_name(
            &self,
            script_message_handler: &ProtocolObject<dyn WKScriptMessageHandler>,
            name: &NSString,
        );

        #[cfg(all(feature = "Foundation_NSString", feature = "WebKit_WKContentWorld"))]
        #[method(removeScriptMessageHandlerForName:contentWorld:)]
        pub unsafe fn removeScriptMessageHandlerForName_contentWorld(
            &self,
            name: &NSString,
            content_world: &WKContentWorld,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[method(removeScriptMessageHandlerForName:)]
        pub unsafe fn removeScriptMessageHandlerForName(&self, name: &NSString);

        #[cfg(feature = "WebKit_WKContentWorld")]
        #[method(removeAllScriptMessageHandlersFromContentWorld:)]
        pub unsafe fn removeAllScriptMessageHandlersFromContentWorld(
            &self,
            content_world: &WKContentWorld,
        );

        #[method(removeAllScriptMessageHandlers)]
        pub unsafe fn removeAllScriptMessageHandlers(&self);

        #[cfg(feature = "WebKit_WKContentRuleList")]
        #[method(addContentRuleList:)]
        pub unsafe fn addContentRuleList(&self, content_rule_list: &WKContentRuleList);

        #[cfg(feature = "WebKit_WKContentRuleList")]
        #[method(removeContentRuleList:)]
        pub unsafe fn removeContentRuleList(&self, content_rule_list: &WKContentRuleList);

        #[method(removeAllContentRuleLists)]
        pub unsafe fn removeAllContentRuleLists(&self);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "WebKit_WKUserContentController")]
    unsafe impl WKUserContentController {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);
