diff --git a/lib/dwmapi/src/lib.rs b/lib/dwmapi/src/lib.rs index 88586780a..22da684b6 100644 --- a/lib/dwmapi/src/lib.rs +++ b/lib/dwmapi/src/lib.rs @@ -18,7 +18,8 @@ extern "system" { // pub fn DwmGetGraphicsStreamClient(); // pub fn DwmGetGraphicsStreamTransformHint(); // pub fn DwmGetTransportAttributes(); - // pub fn DwmGetWindowAttribute(); + pub fn DwmGetWindowAttribute(hWnd: HWND, dwAttribute: DWORD, pvAttribute: LPVOID, + cbAttribute: DWORD) -> HRESULT; // pub fn DwmInvalidateIconicBitmaps(); // pub fn DwmIsCompositionEnabled(); // pub fn DwmModifyPreviousDxFrameDuration(); diff --git a/lib/shcore/src/lib.rs b/lib/shcore/src/lib.rs index 8f96f8d31..6511304b9 100644 --- a/lib/shcore/src/lib.rs +++ b/lib/shcore/src/lib.rs @@ -5,9 +5,9 @@ extern crate winapi; use winapi::*; extern "system" { - pub fn GetDpiForMonitor(hmonitor: HMONITOR, dpiType: MONITOR_DPI_TYPE, dpiX: *UINT, dpiY: *UINT) -> HRESULT + pub fn GetDpiForMonitor(hmonitor: HMONITOR, dpiType: MONITOR_DPI_TYPE, dpiX: *mut UINT, dpiY: *mut UINT) -> HRESULT; pub fn GetDpiForShellUiComponent(component: SHELL_UI_COMPONENT) -> UINT; - pub fn GetProcessDPIAwareness(hProcess: HANDLE, value: *PROCESS_DPI_AWARENESS) -> HRESULT; + pub fn GetProcessDPIAwareness(hProcess: HANDLE, value: *mut PROCESS_DPI_AWARENESS) -> HRESULT; pub fn SetProcessDPIAwareness(value: PROCESS_DPI_AWARENESS) -> HRESULT; pub fn LogicalToPhysicalPointForPerMonitorDPI(hwnd: HWND, lpPoint: LPPOINT) -> BOOL; pub fn PhysicalToLogicalPointForPerMonitorDPI(hwnd: HWND, lpPoint: LPPOINT) -> BOOL; diff --git a/src/um/dwmapi.rs b/src/um/dwmapi.rs index 2d2fc641d..792363335 100644 --- a/src/um/dwmapi.rs +++ b/src/um/dwmapi.rs @@ -9,3 +9,20 @@ STRUCT!{struct DWM_BLURBEHIND { hRgnBlur: HRGN, fTransitionOnMaximized: BOOL, }} + +pub const DWMWA_NCRENDERING_ENABLED: DWORD = 1; +pub const DWMWA_NCRENDERING_POLICY: DWORD = 2; +pub const DWMWA_TRANSITIONS_FORCEDISABLED: DWORD = 2; +pub const DWMWA_ALLOW_NCPAINT: DWORD = 4; +pub const DWMWA_CAPTION_BUTTON_BOUNDS: DWORD = 5; +pub const DWMWA_NONCLIENT_RTL_LAYOUT: DWORD = 6; +pub const DWMWA_FORCE_ICONIC_REPRESENTATION: DWORD = 7; +pub const DWMWA_FLIP3D_POLICY: DWORD = 8; +pub const DWMWA_EXTENDED_FRAME_BOUNDS: DWORD = 9; +pub const DWMWA_HAS_ICONIC_BITMAP: DWORD = 10; +pub const DWMWA_DISALLOW_PEEK: DWORD = 11; +pub const DWMWA_EXCLUDED_FROM_PEEK: DWORD = 12; +pub const DWMWA_CLOAK: DWORD = 13; +pub const DWMWA_CLOAKED: DWORD = 14; +pub const DWMWA_FREEZE_REPRESENTATION: DWORD = 15; +pub const DWMWA_LAST: DWORD = 16; diff --git a/src/um/wingdi.rs b/src/um/wingdi.rs index 39ec75852..c8cff7249 100644 --- a/src/um/wingdi.rs +++ b/src/um/wingdi.rs @@ -1249,3 +1249,8 @@ pub const META_CREATEPENINDIRECT: WORD = 0x02FA; pub const META_CREATEFONTINDIRECT: WORD = 0x02FB; pub const META_CREATEBRUSHINDIRECT: WORD = 0x02FC; pub const META_CREATEREGION: WORD = 0x06FF; +pub const ERROR: c_int = 0; +pub const NULLREGION: c_int = 1; +pub const SIMPLEREGION: c_int = 2; +pub const COMPLEXREGION: c_int = 3; +pub const RGN_ERROR: c_int = ERROR; diff --git a/src/um/winuser.rs b/src/um/winuser.rs index 00569c18e..0755f956f 100644 --- a/src/um/winuser.rs +++ b/src/um/winuser.rs @@ -2444,3 +2444,13 @@ pub const TPM_VERNEGANIMATION: UINT = 0x2000; pub const TPM_NOANIMATION: UINT = 0x4000; pub const TPM_LAYOUTRTL: UINT = 0x8000; pub const TPM_WORKAREA: UINT = 0x10000; + +// ANIMATIONINFO and related fields +STRUCT!{struct ANIMATIONINFO { + cbSize: UINT, + iMinAnimate: c_int, +}} +pub type LPANIMATIONINFO = *mut ANIMATIONINFO; +pub const SPIF_UPDATEINIFILE: UINT = 0x0001; +pub const SPIF_SENDWININICHANGE: UINT = 0x0002; +pub const SPIF_SENDCHANGE: UINT = SPIF_SENDWININICHANGE;