2023-07-29 00:33:03 +02:00
|
|
|
use icrate::Foundation::NSObject;
|
|
|
|
|
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
2022-09-08 16:45:29 +02:00
|
|
|
|
|
|
|
|
use super::{NSResponder, NSView};
|
|
|
|
|
|
|
|
|
|
extern_class!(
|
|
|
|
|
#[derive(Debug, PartialEq, Eq, Hash)]
|
|
|
|
|
pub(crate) struct NSControl;
|
|
|
|
|
|
|
|
|
|
unsafe impl ClassType for NSControl {
|
|
|
|
|
#[inherits(NSResponder, NSObject)]
|
|
|
|
|
type Super = NSView;
|
2023-07-29 00:33:03 +02:00
|
|
|
type Mutability = mutability::InteriorMutable;
|
2022-09-08 16:45:29 +02:00
|
|
|
}
|
|
|
|
|
);
|
2022-11-29 12:03:51 +02:00
|
|
|
|
|
|
|
|
extern_methods!(
|
|
|
|
|
unsafe impl NSControl {
|
2023-07-29 00:33:03 +02:00
|
|
|
#[method(setEnabled:)]
|
2022-11-29 12:03:51 +02:00
|
|
|
pub fn setEnabled(&self, enabled: bool);
|
|
|
|
|
|
2023-07-29 00:33:03 +02:00
|
|
|
#[method(isEnabled)]
|
2022-11-29 12:03:51 +02:00
|
|
|
pub fn isEnabled(&self) -> bool;
|
|
|
|
|
}
|
|
|
|
|
);
|