use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPressureConfiguration;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSPressureConfiguration {}
);
impl NSPressureConfiguration {
extern_methods!(
#[cfg(feature = "NSEvent")]
#[unsafe(method(pressureBehavior))]
#[unsafe(method_family = none)]
pub fn pressureBehavior(&self) -> NSPressureBehavior;
#[cfg(feature = "NSEvent")]
#[unsafe(method(initWithPressureBehavior:))]
#[unsafe(method_family = init)]
pub fn initWithPressureBehavior(
this: Allocated<Self>,
pressure_behavior: NSPressureBehavior,
) -> Retained<Self>;
#[unsafe(method(set))]
#[unsafe(method_family = none)]
pub fn set(&self);
);
}
impl NSPressureConfiguration {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSPressureConfiguration {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSView {
extern_methods!(
#[unsafe(method(pressureConfiguration))]
#[unsafe(method_family = none)]
pub fn pressureConfiguration(&self) -> Option<Retained<NSPressureConfiguration>>;
#[unsafe(method(setPressureConfiguration:))]
#[unsafe(method_family = none)]
pub fn setPressureConfiguration(
&self,
pressure_configuration: Option<&NSPressureConfiguration>,
);
);
}