objc2_game_controller/generated/
GCDeviceLight.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
7use crate::*;
8
9extern_class!(
10    /// A controller light is an abstract representation of the light-emitting capabilities of a GCController instance.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdevicelight?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct GCDeviceLight;
16);
17
18extern_conformance!(
19    unsafe impl NSObjectProtocol for GCDeviceLight {}
20);
21
22impl GCDeviceLight {
23    extern_methods!(
24        #[cfg(feature = "GCColor")]
25        #[unsafe(method(color))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn color(&self) -> Retained<GCColor>;
28
29        #[cfg(feature = "GCColor")]
30        /// Setter for [`color`][Self::color].
31        ///
32        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
33        #[unsafe(method(setColor:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setColor(&self, color: &GCColor);
36
37        #[unsafe(method(init))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40    );
41}
42
43/// Methods declared on superclass `NSObject`.
44impl GCDeviceLight {
45    extern_methods!(
46        #[unsafe(method(new))]
47        #[unsafe(method_family = new)]
48        pub unsafe fn new() -> Retained<Self>;
49    );
50}