2023-07-29 00:33:03 +02:00
|
|
|
use icrate::Foundation::{NSArray, NSObject, NSString};
|
|
|
|
|
use objc2::rc::Id;
|
|
|
|
|
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
2022-10-19 03:34:36 +09:00
|
|
|
|
|
|
|
|
extern_class!(
|
|
|
|
|
#[derive(Debug, PartialEq, Eq, Hash)]
|
|
|
|
|
pub(crate) struct NSAppearance;
|
|
|
|
|
|
|
|
|
|
unsafe impl ClassType for NSAppearance {
|
|
|
|
|
type Super = NSObject;
|
2023-07-29 00:33:03 +02:00
|
|
|
type Mutability = mutability::InteriorMutable;
|
2022-10-19 03:34:36 +09:00
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
type NSAppearanceName = NSString;
|
|
|
|
|
|
|
|
|
|
extern_methods!(
|
|
|
|
|
unsafe impl NSAppearance {
|
2023-07-29 00:33:03 +02:00
|
|
|
#[method_id(appearanceNamed:)]
|
|
|
|
|
pub fn appearanceNamed(name: &NSAppearanceName) -> Id<Self>;
|
2022-10-19 03:34:36 +09:00
|
|
|
|
2023-07-29 00:33:03 +02:00
|
|
|
#[method_id(bestMatchFromAppearancesWithNames:)]
|
2022-10-19 03:34:36 +09:00
|
|
|
pub fn bestMatchFromAppearancesWithNames(
|
|
|
|
|
&self,
|
|
|
|
|
appearances: &NSArray<NSAppearanceName>,
|
2023-07-29 00:33:03 +02:00
|
|
|
) -> Id<NSAppearanceName>;
|
2022-10-19 03:34:36 +09:00
|
|
|
}
|
|
|
|
|
);
|