icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! 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_WebScriptObject")]
    #[deprecated]
    pub struct WebScriptObject;

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

#[cfg(feature = "WebKit_WebScriptObject")]
unsafe impl NSObjectProtocol for WebScriptObject {}

extern_methods!(
    #[cfg(feature = "WebKit_WebScriptObject")]
    unsafe impl WebScriptObject {
        #[cfg(feature = "Foundation_NSString")]
        #[deprecated]
        #[method(throwException:)]
        pub unsafe fn throwException(exception_message: Option<&NSString>) -> bool;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
        #[deprecated]
        #[method_id(@__retain_semantics Other callWebScriptMethod:withArguments:)]
        pub unsafe fn callWebScriptMethod_withArguments(
            &self,
            name: Option<&NSString>,
            arguments: Option<&NSArray>,
        ) -> Option<Id<AnyObject>>;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated]
        #[method_id(@__retain_semantics Other evaluateWebScript:)]
        pub unsafe fn evaluateWebScript(&self, script: Option<&NSString>) -> Option<Id<AnyObject>>;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated]
        #[method(removeWebScriptKey:)]
        pub unsafe fn removeWebScriptKey(&self, name: Option<&NSString>);

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated]
        #[method_id(@__retain_semantics Other stringRepresentation)]
        pub unsafe fn stringRepresentation(&self) -> Option<Id<NSString>>;

        #[deprecated]
        #[method_id(@__retain_semantics Other webScriptValueAtIndex:)]
        pub unsafe fn webScriptValueAtIndex(&self, index: c_uint) -> Option<Id<AnyObject>>;

        #[deprecated]
        #[method(setWebScriptValueAtIndex:value:)]
        pub unsafe fn setWebScriptValueAtIndex_value(
            &self,
            index: c_uint,
            value: Option<&AnyObject>,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated]
        #[method(setException:)]
        pub unsafe fn setException(&self, description: Option<&NSString>);

        #[cfg(feature = "WebKit_JSValue")]
        #[deprecated]
        #[method_id(@__retain_semantics Other JSValue)]
        pub unsafe fn JSValue(&self) -> Option<Id<JSValue>>;
    }
);

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

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

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

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

#[cfg(feature = "WebKit_WebUndefined")]
unsafe impl NSCoding for WebUndefined {}

#[cfg(feature = "WebKit_WebUndefined")]
unsafe impl NSCopying for WebUndefined {}

#[cfg(feature = "WebKit_WebUndefined")]
unsafe impl NSObjectProtocol for WebUndefined {}

extern_methods!(
    #[cfg(feature = "WebKit_WebUndefined")]
    unsafe impl WebUndefined {
        #[deprecated]
        #[method_id(@__retain_semantics Other undefined)]
        pub unsafe fn undefined() -> Option<Id<WebUndefined>>;
    }
);

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

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