Skip to content

Commit

Permalink
refactor: move global_shortcut mod to lib roo (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Jul 20, 2021
1 parent 072d24e commit 6e72e54
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changes/global-shortcut-mod-location.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": minor
---

Move `global_shortcut` mod to the lib root.
2 changes: 1 addition & 1 deletion examples/global_shortcut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ fn main() {
accelerator::{Accelerator, AcceleratorId, RawMods, SysMods},
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
global_shortcut::ShortcutManager,
keyboard::KeyCode,
platform::global_shortcut::ShortcutManager,
window::WindowBuilder,
};

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ pub mod error;
pub mod accelerator;
pub mod event;
pub mod event_loop;
pub mod global_shortcut;
mod icon;
pub mod keyboard;
pub mod menu;
Expand Down
1 change: 0 additions & 1 deletion src/platform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
//! However only the module corresponding to the platform you're compiling to will be available.

pub mod android;
pub mod global_shortcut;
pub mod ios;
pub mod macos;
pub mod run_return;
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/linux/global_shortcut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use super::window::{WindowId, WindowRequest};
use crate::{
accelerator::{Accelerator, AcceleratorId},
event_loop::EventLoopWindowTarget,
global_shortcut::{GlobalShortcut as RootGlobalShortcut, ShortcutManagerError},
keyboard::KeyCode,
platform::global_shortcut::{GlobalShortcut as RootGlobalShortcut, ShortcutManagerError},
};
use std::{
collections::HashMap,
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/macos/global_shortcut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
accelerator::{Accelerator, AcceleratorId},
event::Event,
event_loop::EventLoopWindowTarget,
platform::global_shortcut::{GlobalShortcut as RootGlobalShortcut, ShortcutManagerError},
global_shortcut::{GlobalShortcut as RootGlobalShortcut, ShortcutManagerError},
};

use super::{app_state::AppState, event::EventWrapper};
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/windows/global_shortcut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use super::keyboard::key_to_vk;
use crate::{
accelerator::{Accelerator, AcceleratorId},
event_loop::EventLoopWindowTarget,
global_shortcut::{GlobalShortcut as RootGlobalShortcut, ShortcutManagerError},
keyboard::ModifiersState,
platform::global_shortcut::{GlobalShortcut as RootGlobalShortcut, ShortcutManagerError},
};
use std::ptr;
use winapi::{shared::windef::HWND, um::winuser};
Expand Down

0 comments on commit 6e72e54

Please sign in to comment.