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_WebDataSource")]
    #[deprecated]
    pub struct WebDataSource;

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

#[cfg(feature = "WebKit_WebDataSource")]
unsafe impl NSObjectProtocol for WebDataSource {}

extern_methods!(
    #[cfg(feature = "WebKit_WebDataSource")]
    unsafe impl WebDataSource {
        #[cfg(feature = "Foundation_NSURLRequest")]
        #[deprecated]
        #[method_id(@__retain_semantics Init initWithRequest:)]
        pub unsafe fn initWithRequest(
            this: Allocated<Self>,
            request: Option<&NSURLRequest>,
        ) -> Option<Id<Self>>;

        #[cfg(feature = "Foundation_NSData")]
        #[deprecated]
        #[method_id(@__retain_semantics Other data)]
        pub unsafe fn data(&self) -> Id<NSData>;

        #[deprecated]
        #[method_id(@__retain_semantics Other representation)]
        pub unsafe fn representation(
            &self,
        ) -> Option<Id<ProtocolObject<dyn WebDocumentRepresentation>>>;

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

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

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

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

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

        #[deprecated]
        #[method(isLoading)]
        pub unsafe fn isLoading(&self) -> bool;

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

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

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

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

        #[cfg(feature = "Foundation_NSArray")]
        #[deprecated]
        #[method_id(@__retain_semantics Other subresources)]
        pub unsafe fn subresources(&self) -> Id<NSArray>;

        #[cfg(all(feature = "Foundation_NSURL", feature = "WebKit_WebResource"))]
        #[deprecated]
        #[method_id(@__retain_semantics Other subresourceForURL:)]
        pub unsafe fn subresourceForURL(&self, url: Option<&NSURL>) -> Option<Id<WebResource>>;

        #[cfg(feature = "WebKit_WebResource")]
        #[deprecated]
        #[method(addSubresource:)]
        pub unsafe fn addSubresource(&self, subresource: Option<&WebResource>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "WebKit_WebDataSource")]
    unsafe impl WebDataSource {
        #[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>;
    }
);