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 to windows 0.46 #53

Merged
merged 1 commit into from
Mar 13, 2023
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
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
rand = "0.8.5"

[dependencies.windows]
version = "0.44.0"
version = "0.46.0"
features = [
"Foundation_Collections",
"Foundation_Numerics",
Expand Down
2 changes: 1 addition & 1 deletion src/comp_assets.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::minesweeper::MineState;
use std::collections::HashMap;
use windows::{
core::{Interface, Result},
core::{ComInterface, Result},
Foundation::Numerics::Vector2,
UI::{
Colors,
Expand Down
3 changes: 1 addition & 2 deletions src/comp_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ use crate::minesweeper::{IndexHelper, MineState};
use crate::visual_grid::{TileCoordinate, VisualGrid};
use std::collections::VecDeque;
use std::time::Duration;
use windows::h;
use windows::{
core::Result,
core::{h, Result},
Foundation::{
Numerics::{Vector2, Vector3},
TimeSpan,
Expand Down
7 changes: 2 additions & 5 deletions src/window.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::sync::Once;

use windows::{
core::{Interface, Result, HSTRING, PCWSTR},
w,
core::{w, ComInterface, Result, HSTRING, PCWSTR},
Foundation::Numerics::Vector2,
Graphics::SizeInt32,
Win32::{
Expand Down Expand Up @@ -36,15 +35,13 @@ impl Window {
let class = WNDCLASSW {
hCursor: unsafe { LoadCursorW(HINSTANCE(0), IDC_ARROW).ok().unwrap() },
hInstance: instance,
lpszClassName: WINDOW_CLASS_NAME.into(),
lpszClassName: WINDOW_CLASS_NAME,
lpfnWndProc: Some(Self::wnd_proc),
..Default::default()
};
assert_ne!(unsafe { RegisterClassW(&class) }, 0);
});

let width = width as i32;
let height = height as i32;
let window_ex_style = WS_EX_NOREDIRECTIONBITMAP;
let window_style = WS_OVERLAPPEDWINDOW;

Expand Down