objc2_watch_kit/generated/
WKInterfaceSCNScene.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-scene-kit")]
7use objc2_scene_kit::*;
8#[cfg(feature = "objc2-ui-kit")]
9use objc2_ui_kit::*;
10
11use crate::*;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfacescnscene?language=objc)
15    #[unsafe(super(WKInterfaceObject, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "WKInterfaceObject")]
18    pub struct WKInterfaceSCNScene;
19);
20
21#[cfg(feature = "WKInterfaceObject")]
22extern_conformance!(
23    unsafe impl NSObjectProtocol for WKInterfaceSCNScene {}
24);
25
26#[cfg(all(feature = "WKInterfaceObject", feature = "objc2-scene-kit"))]
27extern_conformance!(
28    unsafe impl SCNSceneRenderer for WKInterfaceSCNScene {}
29);
30
31#[cfg(feature = "WKInterfaceObject")]
32impl WKInterfaceSCNScene {
33    extern_methods!(
34        #[deprecated = "Use SceneKit.SceneView instead."]
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[cfg(feature = "objc2-scene-kit")]
40        /// Specifies the scene of the receiver
41        #[unsafe(method(scene))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn scene(&self) -> Option<Retained<SCNScene>>;
44
45        #[cfg(feature = "objc2-scene-kit")]
46        /// Setter for [`scene`][Self::scene].
47        #[unsafe(method(setScene:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setScene(&self, scene: Option<&SCNScene>);
50
51        #[cfg(feature = "objc2-ui-kit")]
52        /// Draws the contents of the view and returns them as a new image object
53        ///
54        /// This method is thread-safe and may be called at any time.
55        #[unsafe(method(snapshot))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn snapshot(&self) -> Retained<UIImage>;
58
59        /// The rate you want the view to redraw its contents.
60        ///
61        /// When your application sets its preferred frame rate, the view chooses a frame rate as close to that as possible based on the capabilities of the screen the view is displayed on. The actual frame rate chosen is usually a factor of the maximum refresh rate of the screen to provide a consistent frame rate. For example, if the maximum refresh rate of the screen is 60 frames per second, that is also the highest frame rate the view sets as the actual frame rate. However, if you ask for a lower frame rate, it might choose 30, 20, 15 or some other factor to be the actual frame rate. Your application should choose a frame rate that it can consistently maintain.
62        /// The default value is 0 which means the display link will fire at the native cadence of the display hardware.
63        #[unsafe(method(preferredFramesPerSecond))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn preferredFramesPerSecond(&self) -> NSInteger;
66
67        /// Setter for [`preferredFramesPerSecond`][Self::preferredFramesPerSecond].
68        #[unsafe(method(setPreferredFramesPerSecond:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setPreferredFramesPerSecond(&self, preferred_frames_per_second: NSInteger);
71
72        #[cfg(feature = "objc2-scene-kit")]
73        /// Defaults to SCNAntialiasingModeNone.
74        #[unsafe(method(antialiasingMode))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn antialiasingMode(&self) -> SCNAntialiasingMode;
77
78        #[cfg(feature = "objc2-scene-kit")]
79        /// Setter for [`antialiasingMode`][Self::antialiasingMode].
80        #[unsafe(method(setAntialiasingMode:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn setAntialiasingMode(&self, antialiasing_mode: SCNAntialiasingMode);
83    );
84}
85
86/// Methods declared on superclass `NSObject`.
87#[cfg(feature = "WKInterfaceObject")]
88impl WKInterfaceSCNScene {
89    extern_methods!(
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}