Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update winapi to 0.3 #346

Merged
merged 6 commits into from
Dec 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ cocoa = "0.11"
core-foundation = "0.4"
core-graphics = "0.10"

[target.'cfg(target_os = "windows")'.dependencies]
winapi = "0.2"
shell32-sys = "0.1"
user32-sys = "~0.1.2"
kernel32-sys = "0.2"
dwmapi-sys = "0.1"
[target.'cfg(target_os = "windows")'.dependencies.winapi]
version = "0.3"
features = [
"winnt",
"winuser",
"wingdi",
"shellapi",
"dwmapi",
"processthreadsapi",
"libloaderapi",
"windowsx",
"hidusage",
]

[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))'.dependencies]
wayland-client = { version = "0.12.0", features = ["dlopen"] }
Expand Down
8 changes: 0 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ extern crate libc;

#[cfg(target_os = "windows")]
extern crate winapi;
#[cfg(target_os = "windows")]
extern crate kernel32;
#[cfg(target_os = "windows")]
extern crate shell32;
#[cfg(target_os = "windows")]
extern crate user32;
#[cfg(target_os = "windows")]
extern crate dwmapi;
#[cfg(any(target_os = "macos", target_os = "ios"))]
#[macro_use]
extern crate objc;
Expand Down
6 changes: 3 additions & 3 deletions src/os/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use libc;
use MonitorId;
use Window;
use WindowBuilder;
use winapi;
use winapi::shared::windef::HWND;

/// Additional methods on `Window` that are specific to Windows.
pub trait WindowExt {
Expand All @@ -24,13 +24,13 @@ impl WindowExt for Window {

/// Additional methods on `WindowBuilder` that are specific to Windows.
pub trait WindowBuilderExt {
fn with_parent_window(self, parent: winapi::HWND) -> WindowBuilder;
fn with_parent_window(self, parent: HWND) -> WindowBuilder;
}

impl WindowBuilderExt for WindowBuilder {
/// Sets a parent to the window to be created.
#[inline]
fn with_parent_window(mut self, parent: winapi::HWND) -> WindowBuilder {
fn with_parent_window(mut self, parent: HWND) -> WindowBuilder {
self.platform_specific.parent = Some(parent);
self
}
Expand Down
292 changes: 147 additions & 145 deletions src/platform/windows/event.rs

Large diffs are not rendered by default.

Loading