mirror of
https://github.com/storytold/winit.git
synced 2026-11-22 20:30:44 +01:00
* Upgrade to objc2 v0.4.0 and icrate v0.0.3 * Fix `touchBar` method * Use ClassType::alloc * Use #[method_id(...)] functionality in declare_class!
32 lines
798 B
Rust
32 lines
798 B
Rust
use icrate::Foundation::{NSArray, NSObject};
|
|
use objc2::rc::Id;
|
|
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
|
|
|
use super::NSWindow;
|
|
|
|
extern_class!(
|
|
#[derive(Debug, PartialEq, Eq, Hash)]
|
|
pub(crate) struct NSWindowTabGroup;
|
|
|
|
unsafe impl ClassType for NSWindowTabGroup {
|
|
type Super = NSObject;
|
|
type Mutability = mutability::InteriorMutable;
|
|
}
|
|
);
|
|
|
|
extern_methods!(
|
|
unsafe impl NSWindowTabGroup {
|
|
#[method(selectNextTab)]
|
|
pub fn selectNextTab(&self);
|
|
|
|
#[method(selectPreviousTab)]
|
|
pub fn selectPreviousTab(&self);
|
|
|
|
#[method_id(windows)]
|
|
pub fn tabbedWindows(&self) -> Id<NSArray<NSWindow>>;
|
|
|
|
#[method(setSelectedWindow:)]
|
|
pub fn setSelectedWindow(&self, window: &NSWindow);
|
|
}
|
|
);
|