Debian Codegraph @

third_party/rust/winapi/src/um/shellscalingapi.rs

raw
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.
6 use shared::minwindef::UINT;
7 use shared::windef::HMONITOR;
8 use um::winnt::{HANDLE, HRESULT};
9 ENUM!{enum PROCESS_DPI_AWARENESS {
10 PROCESS_DPI_UNAWARE = 0,
11 PROCESS_SYSTEM_DPI_AWARE = 1,
12 PROCESS_PER_MONITOR_DPI_AWARE = 2,
13 }}
14 ENUM!{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 }}
20 extern "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 }
35 ENUM!{enum SHELL_UI_COMPONENT {
36 SHELL_UI_COMPONENT_TASKBARS = 0,
37 SHELL_UI_COMPONENT_NOTIFICATIONAREA = 1,
38 SHELL_UI_COMPONENT_DESKBAND = 2,
39 }}
40 extern "system" {
41 pub fn GetDpiForShellUIComponent(
42 component: SHELL_UI_COMPONENT,
43 ) -> UINT;
44 }