objc2_web_kit/generated/
WKWindowFeatures.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    /// WKWindowFeatures specifies optional attributes for the containing window when a new WKWebView is requested.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkwindowfeatures?language=objc)
13    #[unsafe(super(NSObject))]
14    #[thread_kind = MainThreadOnly]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct WKWindowFeatures;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for WKWindowFeatures {}
21);
22
23impl WKWindowFeatures {
24    extern_methods!(
25        /// BOOL. Whether the menu bar should be visible. nil if menu bar visibility was not specified.
26        #[unsafe(method(menuBarVisibility))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn menuBarVisibility(&self) -> Option<Retained<NSNumber>>;
29
30        /// BOOL. Whether the status bar should be visible. nil if status bar visibility was not specified.
31        #[unsafe(method(statusBarVisibility))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn statusBarVisibility(&self) -> Option<Retained<NSNumber>>;
34
35        /// BOOL. Whether toolbars should be visible. nil if toolbar visibility was not specified.
36        #[unsafe(method(toolbarsVisibility))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn toolbarsVisibility(&self) -> Option<Retained<NSNumber>>;
39
40        /// BOOL. Whether the containing window should be resizable. nil if resizability was not specified.
41        #[unsafe(method(allowsResizing))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn allowsResizing(&self) -> Option<Retained<NSNumber>>;
44
45        /// CGFloat. The x coordinate of the containing window. nil if the x coordinate was not specified.
46        #[unsafe(method(x))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn x(&self) -> Option<Retained<NSNumber>>;
49
50        /// CGFloat. The y coordinate of the containing window. nil if the y coordinate was not specified.
51        #[unsafe(method(y))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn y(&self) -> Option<Retained<NSNumber>>;
54
55        /// CGFloat. The width coordinate of the containing window. nil if the width was not specified.
56        #[unsafe(method(width))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn width(&self) -> Option<Retained<NSNumber>>;
59
60        /// CGFloat. The height coordinate of the containing window. nil if the height was not specified.
61        #[unsafe(method(height))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn height(&self) -> Option<Retained<NSNumber>>;
64    );
65}
66
67/// Methods declared on superclass `NSObject`.
68impl WKWindowFeatures {
69    extern_methods!(
70        #[unsafe(method(init))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73
74        #[unsafe(method(new))]
75        #[unsafe(method_family = new)]
76        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
77    );
78}