objc2_game_controller/generated/
GCColor.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Represents a color used by a GCDeviceLight.
12    ///
13    ///
14    /// See: GCDeviceLight
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gccolor?language=objc)
17    #[unsafe(super(NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    pub struct GCColor;
20);
21
22extern_conformance!(
23    unsafe impl NSCoding for GCColor {}
24);
25
26extern_conformance!(
27    unsafe impl NSCopying for GCColor {}
28);
29
30unsafe impl CopyingHelper for GCColor {
31    type Result = Self;
32}
33
34extern_conformance!(
35    unsafe impl NSObjectProtocol for GCColor {}
36);
37
38extern_conformance!(
39    unsafe impl NSSecureCoding for GCColor {}
40);
41
42impl GCColor {
43    extern_methods!(
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[unsafe(method(initWithRed:green:blue:))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn initWithRed_green_blue(
51            this: Allocated<Self>,
52            red: c_float,
53            green: c_float,
54            blue: c_float,
55        ) -> Retained<Self>;
56
57        #[unsafe(method(red))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn red(&self) -> c_float;
60
61        #[unsafe(method(green))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn green(&self) -> c_float;
64
65        #[unsafe(method(blue))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn blue(&self) -> c_float;
68    );
69}
70
71/// Methods declared on superclass `NSObject`.
72impl GCColor {
73    extern_methods!(
74        #[unsafe(method(new))]
75        #[unsafe(method_family = new)]
76        pub unsafe fn new() -> Retained<Self>;
77    );
78}