#[cfg(feature = "block2")]
use block2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSColorSampler;
unsafe impl ClassType for NSColorSampler {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSColorSampler {}
extern_methods!(
unsafe impl NSColorSampler {
#[cfg(all(feature = "NSColor", feature = "block2"))]
#[method(showSamplerWithSelectionHandler:)]
pub unsafe fn showSamplerWithSelectionHandler(
&self,
selection_handler: &Block<dyn Fn(*mut NSColor)>,
);
}
);
extern_methods!(
unsafe impl NSColorSampler {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);