objc2-web-kit 0.2.2

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

use crate::*;

extern_methods!(
    /// DOMNodeExtensions
    #[cfg(all(
        feature = "DOMNode",
        feature = "DOMObject",
        feature = "WebScriptObject"
    ))]
    unsafe impl DOMNode {
        #[method(boundingBox)]
        pub unsafe fn boundingBox(&self) -> NSRect;

        #[method_id(@__retain_semantics Other lineBoxRects)]
        pub unsafe fn lineBoxRects(&self) -> Option<Retained<NSArray>>;
    }
);

extern_methods!(
    /// DOMElementAppKitExtensions
    #[cfg(all(
        feature = "DOMElement",
        feature = "DOMNode",
        feature = "DOMObject",
        feature = "WebScriptObject"
    ))]
    unsafe impl DOMElement {
        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[method_id(@__retain_semantics Other image)]
        pub unsafe fn image(&self) -> Option<Retained<NSImage>>;
    }
);

extern_methods!(
    /// DOMHTMLDocumentExtensions
    #[cfg(all(
        feature = "DOMDocument",
        feature = "DOMHTMLDocument",
        feature = "DOMNode",
        feature = "DOMObject",
        feature = "WebScriptObject"
    ))]
    unsafe impl DOMHTMLDocument {
        #[cfg(feature = "DOMDocumentFragment")]
        #[method_id(@__retain_semantics Other createDocumentFragmentWithMarkupString:baseURL:)]
        pub unsafe fn createDocumentFragmentWithMarkupString_baseURL(
            &self,
            markup_string: Option<&NSString>,
            base_url: Option<&NSURL>,
        ) -> Option<Retained<DOMDocumentFragment>>;

        #[cfg(feature = "DOMDocumentFragment")]
        #[method_id(@__retain_semantics Other createDocumentFragmentWithText:)]
        pub unsafe fn createDocumentFragmentWithText(
            &self,
            text: Option<&NSString>,
        ) -> Option<Retained<DOMDocumentFragment>>;
    }
);