Skip to content

Commit 201db0b

Browse files
committed
fmt
1 parent c2898f2 commit 201db0b

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

  • crates/scap-targets/src/platform

crates/scap-targets/src/platform/win.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
use std::{ffi::OsString, mem, os::windows::ffi::OsStringExt, path::PathBuf, str::FromStr};
22
use tracing::error;
33
use windows::{
4-
core::{BOOL, PCWSTR, PWSTR},
54
Graphics::Capture::GraphicsCaptureItem,
65
Win32::{
76
Foundation::{CloseHandle, HWND, LPARAM, POINT, RECT, TRUE, WPARAM},
87
Graphics::{
9-
Dwm::{DwmGetWindowAttribute, DWMWA_CLOAKED, DWMWA_EXTENDED_FRAME_BOUNDS},
8+
Dwm::{DWMWA_CLOAKED, DWMWA_EXTENDED_FRAME_BOUNDS, DwmGetWindowAttribute},
109
Gdi::{
11-
CreateCompatibleBitmap, CreateCompatibleDC, CreateSolidBrush, DeleteDC,
12-
DeleteObject, EnumDisplayDevicesW, EnumDisplayMonitors, EnumDisplaySettingsW,
13-
FillRect, GetDC, GetDIBits, GetMonitorInfoW, GetObjectA, MonitorFromPoint,
14-
MonitorFromWindow, ReleaseDC, SelectObject, BITMAP, BITMAPINFO, BITMAPINFOHEADER,
15-
BI_RGB, DEVMODEW, DIB_RGB_COLORS, DISPLAY_DEVICEW, DISPLAY_DEVICE_STATE_FLAGS,
16-
ENUM_CURRENT_SETTINGS, HBRUSH, HDC, HGDIOBJ, HMONITOR, MONITORINFOEXW,
17-
MONITOR_DEFAULTTONEAREST, MONITOR_DEFAULTTONULL,
10+
BI_RGB, BITMAP, BITMAPINFO, BITMAPINFOHEADER, CreateCompatibleBitmap,
11+
CreateCompatibleDC, CreateSolidBrush, DEVMODEW, DIB_RGB_COLORS,
12+
DISPLAY_DEVICE_STATE_FLAGS, DISPLAY_DEVICEW, DeleteDC, DeleteObject,
13+
ENUM_CURRENT_SETTINGS, EnumDisplayDevicesW, EnumDisplayMonitors,
14+
EnumDisplaySettingsW, FillRect, GetDC, GetDIBits, GetMonitorInfoW, GetObjectA,
15+
HBRUSH, HDC, HGDIOBJ, HMONITOR, MONITOR_DEFAULTTONEAREST, MONITOR_DEFAULTTONULL,
16+
MONITORINFOEXW, MonitorFromPoint, MonitorFromWindow, ReleaseDC, SelectObject,
1817
},
1918
},
2019
Storage::FileSystem::{
21-
GetFileVersionInfoSizeW, GetFileVersionInfoW, VerQueryValueW, FILE_FLAGS_AND_ATTRIBUTES,
20+
FILE_FLAGS_AND_ATTRIBUTES, GetFileVersionInfoSizeW, GetFileVersionInfoW, VerQueryValueW,
2221
},
2322
System::{
2423
Threading::{
25-
GetCurrentProcessId, OpenProcess, QueryFullProcessImageNameW, PROCESS_NAME_FORMAT,
26-
PROCESS_QUERY_LIMITED_INFORMATION,
24+
GetCurrentProcessId, OpenProcess, PROCESS_NAME_FORMAT,
25+
PROCESS_QUERY_LIMITED_INFORMATION, QueryFullProcessImageNameW,
2726
},
2827
WinRT::Graphics::Capture::IGraphicsCaptureItemInterop,
2928
},
@@ -33,21 +32,22 @@ use windows::{
3332
PROCESS_PER_MONITOR_DPI_AWARE,
3433
},
3534
Shell::{
36-
ExtractIconExW, SHGetFileInfoW, SHFILEINFOW, SHGFI_ICON, SHGFI_LARGEICON,
37-
SHGFI_SMALLICON,
35+
ExtractIconExW, SHFILEINFOW, SHGFI_ICON, SHGFI_LARGEICON, SHGFI_SMALLICON,
36+
SHGetFileInfoW,
3837
},
3938
WindowsAndMessaging::{
40-
DestroyIcon, DrawIconEx, EnumChildWindows, EnumWindows, GetClassLongPtrW,
41-
GetClassNameW, GetClientRect, GetCursorPos, GetDesktopWindow, GetIconInfo,
39+
DI_FLAGS, DestroyIcon, DrawIconEx, EnumChildWindows, EnumWindows, GCLP_HICON,
40+
GW_HWNDNEXT, GWL_EXSTYLE, GWL_STYLE, GetClassLongPtrW, GetClassNameW,
41+
GetClientRect, GetCursorPos, GetDesktopWindow, GetIconInfo,
4242
GetLayeredWindowAttributes, GetWindow, GetWindowLongPtrW, GetWindowLongW,
4343
GetWindowRect, GetWindowTextLengthW, GetWindowTextW, GetWindowThreadProcessId,
44-
IsIconic, IsWindowVisible, PrivateExtractIconsW, SendMessageW, WindowFromPoint,
45-
DI_FLAGS, GCLP_HICON, GWL_EXSTYLE, GWL_STYLE, GW_HWNDNEXT, HICON, ICONINFO,
44+
HICON, ICONINFO, IsIconic, IsWindowVisible, PrivateExtractIconsW, SendMessageW,
4645
WM_GETICON, WS_CHILD, WS_EX_LAYERED, WS_EX_TOOLWINDOW, WS_EX_TOPMOST,
47-
WS_EX_TRANSPARENT,
46+
WS_EX_TRANSPARENT, WindowFromPoint,
4847
},
4948
},
5049
},
50+
core::{BOOL, PCWSTR, PWSTR},
5151
};
5252

5353
use crate::bounds::{
@@ -126,7 +126,7 @@ impl DisplayImpl {
126126
}
127127

128128
pub fn raw_id(&self) -> DisplayIdImpl {
129-
DisplayIdImpl(self.0 .0 as u64)
129+
DisplayIdImpl(self.0.0 as u64)
130130
}
131131

132132
pub fn from_id(id: String) -> Option<Self> {
@@ -449,7 +449,7 @@ impl WindowImpl {
449449
}
450450

451451
pub fn id(&self) -> WindowIdImpl {
452-
WindowIdImpl(self.0 .0 as u64)
452+
WindowIdImpl(self.0.0 as u64)
453453
}
454454

455455
pub fn level(&self) -> Option<i32> {

0 commit comments

Comments
 (0)