]> git.proxmox.com Git - rustc.git/blame - vendor/winapi/src/um/shellscalingapi.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / vendor / winapi / src / um / shellscalingapi.rs
CommitLineData
ff7c6d11
XL
1// Licensed under the Apache License, Version 2.0
2// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4// All files in the project carrying such notice may not be copied, modified, or distributed
5// except according to those terms.
6use shared::minwindef::UINT;
7use shared::windef::HMONITOR;
8use um::winnt::{HANDLE, HRESULT};
9ENUM!{enum PROCESS_DPI_AWARENESS {
10 PROCESS_DPI_UNAWARE = 0,
11 PROCESS_SYSTEM_DPI_AWARE = 1,
12 PROCESS_PER_MONITOR_DPI_AWARE = 2,
13}}
14ENUM!{enum MONITOR_DPI_TYPE {
15 MDT_EFFECTIVE_DPI = 0,
16 MDT_ANGULAR_DPI = 1,
17 MDT_RAW_DPI = 2,
18 MDT_DEFAULT = MDT_EFFECTIVE_DPI,
19}}
20extern "system" {
21 pub fn SetProcessDpiAwareness(
22 value: PROCESS_DPI_AWARENESS,
23 ) -> HRESULT;
24 pub fn GetProcessDpiAwareness(
25 hProcess: HANDLE,
26 value: *mut PROCESS_DPI_AWARENESS,
27 ) -> HRESULT;
28 pub fn GetDpiForMonitor(
29 hmonitor: HMONITOR,
30 dpiType: MONITOR_DPI_TYPE,
31 dpiX: *mut UINT,
32 dpiY: *mut UINT,
33 ) -> HRESULT;
34}
35ENUM!{enum SHELL_UI_COMPONENT {
36 SHELL_UI_COMPONENT_TASKBARS = 0,
37 SHELL_UI_COMPONENT_NOTIFICATIONAREA = 1,
38 SHELL_UI_COMPONENT_DESKBAND = 2,
39}}
40extern "system" {
41 pub fn GetDpiForShellUIComponent(
42 component: SHELL_UI_COMPONENT,
43 ) -> UINT;
44}