Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Jul 13, 2024
1 parent d617c7e commit 0541e89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/component/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#[derive(Debug)]
pub struct Os {
#[cfg(target_os = "macos")]
nsra: objc2::rc::Retained<objc2_app_kit::NSRunningApplication>,
ca: objc2::rc::Retained<objc2_app_kit::NSRunningApplication>,
#[cfg(target_os = "windows")]
hwnd: *mut winapi::shared::windef::HWND__,
}
impl Os {
pub fn new() -> Self {
Self {
#[cfg(target_os = "macos")]
nsra: Self::get_nsra(),
ca: Self::get_ca(),
#[cfg(target_os = "windows")]
hwnd: Self::get_hwnd(),
}
Expand Down
6 changes: 3 additions & 3 deletions src/component/os/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ use objc2_foundation::MainThreadMarker;
use super::*;

impl Os {
pub fn get_nsra() -> Retained<NSRunningApplication> {
pub fn get_ca() -> Retained<NSRunningApplication> {
unsafe { NSRunningApplication::currentApplication() }
}

pub fn hide(&self) {
unsafe {
self.nsra.hide();
self.ca.hide();
}
}

pub fn unhide(&self) {
unsafe {
self.nsra.unhide();
self.ca.unhide();
}
}

Expand Down

0 comments on commit 0541e89

Please sign in to comment.