nvapi_sys/
dispcontrol.rs

1use std::os::raw::c_char;
2use status::NvAPI_Status;
3use handles;
4
5nvapi! {
6    pub type EnumNvidiaDisplayHandleFn = extern "C" fn(thisEnum: u32, pNvDispHandle: *mut handles::NvDisplayHandle) -> NvAPI_Status;
7
8    /// This function returns the handle of the NVIDIA display specified by the enum
9    /// index (thisEnum). The client should keep enumerating until it
10    /// returns NVAPI_END_ENUMERATION.
11    ///
12    /// Note: Display handles can get invalidated on a modeset, so the calling applications need to
13    /// renum the handles after every modeset.
14    pub unsafe fn NvAPI_EnumNvidiaDisplayHandle;
15}
16
17nvapi! {
18    pub type EnumNvidiaUnAttachedDisplayHandleFn = extern "C" fn(thisEnum: u32, pNvUnAttachedDispHandle: *mut handles::NvUnAttachedDisplayHandle) -> NvAPI_Status;
19
20    /// This function returns the handle of the NVIDIA unattached display specified by the enum
21    /// index (thisEnum). The client should keep enumerating until it
22    /// returns error.
23    ///
24    /// Note: Display handles can get invalidated on a modeset, so the calling applications need to
25    /// renum the handles after every modeset.
26    pub unsafe fn NvAPI_EnumNvidiaUnAttachedDisplayHandle;
27}
28
29nvapi! {
30    pub type GetAssociatedNvidiaDisplayHandleFn = extern "C" fn(szDisplayName: *const c_char, pNvDispHandle: *mut handles::NvDisplayHandle) -> NvAPI_Status;
31
32    /// This function returns the handle of the NVIDIA display that is associated
33    /// with the given display "name" (such as "\\.\DISPLAY1").
34    pub unsafe fn NvAPI_GetAssociatedNvidiaDisplayHandle;
35}
36
37nvapi! {
38    pub type DISP_GetAssociatedUnAttachedNvidiaDisplayHandleFn = extern "C" fn(szDisplayName: *const c_char, pNvUnAttachedDispHandle: *mut handles::NvDisplayHandle) -> NvAPI_Status;
39
40    /// This function returns the handle of an unattached NVIDIA display that is
41    /// associated with the given display name (such as "\\DISPLAY1").
42    pub unsafe fn NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle;
43}
44