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
19unsafe impl NSObjectProtocol for WKWindowFeatures {}
20
21impl WKWindowFeatures {
22    extern_methods!(
23        /// BOOL. Whether the menu bar should be visible. nil if menu bar visibility was not specified.
24        #[unsafe(method(menuBarVisibility))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn menuBarVisibility(&self) -> Option<Retained<NSNumber>>;
27
28        /// BOOL. Whether the status bar should be visible. nil if status bar visibility was not specified.
29        #[unsafe(method(statusBarVisibility))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn statusBarVisibility(&self) -> Option<Retained<NSNumber>>;
32
33        /// BOOL. Whether toolbars should be visible. nil if toolbar visibility was not specified.
34        #[unsafe(method(toolbarsVisibility))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn toolbarsVisibility(&self) -> Option<Retained<NSNumber>>;
37
38        /// BOOL. Whether the containing window should be resizable. nil if resizability was not specified.
39        #[unsafe(method(allowsResizing))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn allowsResizing(&self) -> Option<Retained<NSNumber>>;
42
43        /// CGFloat. The x coordinate of the containing window. nil if the x coordinate was not specified.
44        #[unsafe(method(x))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn x(&self) -> Option<Retained<NSNumber>>;
47
48        /// CGFloat. The y coordinate of the containing window. nil if the y coordinate was not specified.
49        #[unsafe(method(y))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn y(&self) -> Option<Retained<NSNumber>>;
52
53        /// CGFloat. The width coordinate of the containing window. nil if the width was not specified.
54        #[unsafe(method(width))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn width(&self) -> Option<Retained<NSNumber>>;
57
58        /// CGFloat. The height coordinate of the containing window. nil if the height was not specified.
59        #[unsafe(method(height))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn height(&self) -> Option<Retained<NSNumber>>;
62    );
63}
64
65/// Methods declared on superclass `NSObject`.
66impl WKWindowFeatures {
67    extern_methods!(
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
75    );
76}