objc2_web_kit/generated/
WKSecurityOrigin.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A WKSecurityOrigin object contains information about a security origin.
11    ///
12    /// An instance of this class is a transient, data-only object;
13    /// it does not uniquely identify a security origin across multiple delegate method
14    /// calls.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wksecurityorigin?language=objc)
17    #[unsafe(super(NSObject))]
18    #[thread_kind = MainThreadOnly]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    pub struct WKSecurityOrigin;
21);
22
23unsafe impl NSObjectProtocol for WKSecurityOrigin {}
24
25impl WKSecurityOrigin {
26    extern_methods!(
27        #[unsafe(method(init))]
28        #[unsafe(method_family = init)]
29        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
30
31        /// The security origin's protocol.
32        #[unsafe(method(protocol))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn protocol(&self) -> Retained<NSString>;
35
36        /// The security origin's host.
37        #[unsafe(method(host))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn host(&self) -> Retained<NSString>;
40
41        /// The security origin's port.
42        #[unsafe(method(port))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn port(&self) -> NSInteger;
45    );
46}
47
48/// Methods declared on superclass `NSObject`.
49impl WKSecurityOrigin {
50    extern_methods!(
51        #[unsafe(method(new))]
52        #[unsafe(method_family = new)]
53        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
54    );
55}