objc2_app_kit/generated/
NSPressureConfiguration.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSPressureConfiguration;
14);
15
16extern_conformance!(
17 unsafe impl NSObjectProtocol for NSPressureConfiguration {}
18);
19
20impl NSPressureConfiguration {
21 extern_methods!(
22 #[cfg(feature = "NSEvent")]
23 #[unsafe(method(pressureBehavior))]
24 #[unsafe(method_family = none)]
25 pub fn pressureBehavior(&self) -> NSPressureBehavior;
26
27 #[cfg(feature = "NSEvent")]
28 #[unsafe(method(initWithPressureBehavior:))]
29 #[unsafe(method_family = init)]
30 pub fn initWithPressureBehavior(
31 this: Allocated<Self>,
32 pressure_behavior: NSPressureBehavior,
33 ) -> Retained<Self>;
34
35 #[unsafe(method(set))]
36 #[unsafe(method_family = none)]
37 pub fn set(&self);
38 );
39}
40
41impl NSPressureConfiguration {
43 extern_methods!(
44 #[unsafe(method(init))]
45 #[unsafe(method_family = init)]
46 pub fn init(this: Allocated<Self>) -> Retained<Self>;
47
48 #[unsafe(method(new))]
49 #[unsafe(method_family = new)]
50 pub fn new() -> Retained<Self>;
51 );
52}
53
54impl DefaultRetained for NSPressureConfiguration {
55 #[inline]
56 fn default_retained() -> Retained<Self> {
57 Self::new()
58 }
59}
60
61#[cfg(all(feature = "NSResponder", feature = "NSView"))]
63impl NSView {
64 extern_methods!(
65 #[unsafe(method(pressureConfiguration))]
66 #[unsafe(method_family = none)]
67 pub fn pressureConfiguration(&self) -> Option<Retained<NSPressureConfiguration>>;
68
69 #[unsafe(method(setPressureConfiguration:))]
71 #[unsafe(method_family = none)]
72 pub fn setPressureConfiguration(
73 &self,
74 pressure_configuration: Option<&NSPressureConfiguration>,
75 );
76 );
77}