objc2-web-kit 0.3.2

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

use crate::*;

extern_class!(
    /// A WKBackForwardListItem object represents a webpage in the back-forward list of a web view.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkbackforwardlistitem?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct WKBackForwardListItem;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for WKBackForwardListItem {}
);

impl WKBackForwardListItem {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        /// The URL of the webpage represented by this item.
        #[unsafe(method(URL))]
        #[unsafe(method_family = none)]
        pub unsafe fn URL(&self) -> Retained<NSURL>;

        /// The title of the webpage represented by this item.
        #[unsafe(method(title))]
        #[unsafe(method_family = none)]
        pub unsafe fn title(&self) -> Option<Retained<NSString>>;

        /// The URL of the initial request that created this item.
        #[unsafe(method(initialURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn initialURL(&self) -> Retained<NSURL>;
    );
}

/// Methods declared on superclass `NSObject`.
impl WKBackForwardListItem {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}