objc2-web-kit 0.3.1

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!(
    /// WKWindowFeatures specifies optional attributes for the containing window when a new WKWebView is requested.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkwindowfeatures?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct WKWindowFeatures;
);

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

impl WKWindowFeatures {
    extern_methods!(
        /// BOOL. Whether the menu bar should be visible. nil if menu bar visibility was not specified.
        #[unsafe(method(menuBarVisibility))]
        #[unsafe(method_family = none)]
        pub unsafe fn menuBarVisibility(&self) -> Option<Retained<NSNumber>>;

        /// BOOL. Whether the status bar should be visible. nil if status bar visibility was not specified.
        #[unsafe(method(statusBarVisibility))]
        #[unsafe(method_family = none)]
        pub unsafe fn statusBarVisibility(&self) -> Option<Retained<NSNumber>>;

        /// BOOL. Whether toolbars should be visible. nil if toolbar visibility was not specified.
        #[unsafe(method(toolbarsVisibility))]
        #[unsafe(method_family = none)]
        pub unsafe fn toolbarsVisibility(&self) -> Option<Retained<NSNumber>>;

        /// BOOL. Whether the containing window should be resizable. nil if resizability was not specified.
        #[unsafe(method(allowsResizing))]
        #[unsafe(method_family = none)]
        pub unsafe fn allowsResizing(&self) -> Option<Retained<NSNumber>>;

        /// CGFloat. The x coordinate of the containing window. nil if the x coordinate was not specified.
        #[unsafe(method(x))]
        #[unsafe(method_family = none)]
        pub unsafe fn x(&self) -> Option<Retained<NSNumber>>;

        /// CGFloat. The y coordinate of the containing window. nil if the y coordinate was not specified.
        #[unsafe(method(y))]
        #[unsafe(method_family = none)]
        pub unsafe fn y(&self) -> Option<Retained<NSNumber>>;

        /// CGFloat. The width coordinate of the containing window. nil if the width was not specified.
        #[unsafe(method(width))]
        #[unsafe(method_family = none)]
        pub unsafe fn width(&self) -> Option<Retained<NSNumber>>;

        /// CGFloat. The height coordinate of the containing window. nil if the height was not specified.
        #[unsafe(method(height))]
        #[unsafe(method_family = none)]
        pub unsafe fn height(&self) -> Option<Retained<NSNumber>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl WKWindowFeatures {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}