objc2-web-kit 0.3.0

Bindings to the WebKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_any_type?language=objc)
#[deprecated]
pub const DOM_ANY_TYPE: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_number_type?language=objc)
#[deprecated]
pub const DOM_NUMBER_TYPE: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_string_type?language=objc)
#[deprecated]
pub const DOM_STRING_TYPE: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_boolean_type?language=objc)
#[deprecated]
pub const DOM_BOOLEAN_TYPE: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_unordered_node_iterator_type?language=objc)
#[deprecated]
pub const DOM_UNORDERED_NODE_ITERATOR_TYPE: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_ordered_node_iterator_type?language=objc)
#[deprecated]
pub const DOM_ORDERED_NODE_ITERATOR_TYPE: c_uint = 5;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_unordered_node_snapshot_type?language=objc)
#[deprecated]
pub const DOM_UNORDERED_NODE_SNAPSHOT_TYPE: c_uint = 6;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_ordered_node_snapshot_type?language=objc)
#[deprecated]
pub const DOM_ORDERED_NODE_SNAPSHOT_TYPE: c_uint = 7;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_any_unordered_node_type?language=objc)
#[deprecated]
pub const DOM_ANY_UNORDERED_NODE_TYPE: c_uint = 8;
/// [Apple's documentation](https://developer.apple.com/documentation/webkit/dom_first_ordered_node_type?language=objc)
#[deprecated]
pub const DOM_FIRST_ORDERED_NODE_TYPE: c_uint = 9;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domxpathresult?language=objc)
    #[unsafe(super(DOMObject, WebScriptObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
    #[deprecated]
    pub struct DOMXPathResult;
);

#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
unsafe impl NSCopying for DOMXPathResult {}

#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
unsafe impl CopyingHelper for DOMXPathResult {
    type Result = Self;
}

#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
unsafe impl NSObjectProtocol for DOMXPathResult {}

#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMXPathResult {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(resultType))]
        #[unsafe(method_family = none)]
        pub unsafe fn resultType(&self) -> c_ushort;

        #[deprecated]
        #[unsafe(method(numberValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberValue(&self) -> c_double;

        #[deprecated]
        #[unsafe(method(stringValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn stringValue(&self) -> Retained<NSString>;

        #[deprecated]
        #[unsafe(method(booleanValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn booleanValue(&self) -> bool;

        #[cfg(feature = "DOMNode")]
        #[deprecated]
        #[unsafe(method(singleNodeValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn singleNodeValue(&self) -> Option<Retained<DOMNode>>;

        #[deprecated]
        #[unsafe(method(invalidIteratorState))]
        #[unsafe(method_family = none)]
        pub unsafe fn invalidIteratorState(&self) -> bool;

        #[deprecated]
        #[unsafe(method(snapshotLength))]
        #[unsafe(method_family = none)]
        pub unsafe fn snapshotLength(&self) -> c_uint;

        #[cfg(feature = "DOMNode")]
        #[deprecated]
        #[unsafe(method(iterateNext))]
        #[unsafe(method_family = none)]
        pub unsafe fn iterateNext(&self) -> Option<Retained<DOMNode>>;

        #[cfg(feature = "DOMNode")]
        #[deprecated]
        #[unsafe(method(snapshotItem:))]
        #[unsafe(method_family = none)]
        pub unsafe fn snapshotItem(&self, index: c_uint) -> Option<Retained<DOMNode>>;
    );
}

/// Methods declared on superclass `DOMObject`.
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMXPathResult {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMXPathResult {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}