Debian Codegraph @

thirdparty/misc/nvapi_minimal.h

raw symbols SCIP
1 #ifndef NVAPI_MINIMAL_H
2 #define NVAPI_MINIMAL_H
3 typedef uint32_t NvU32;
4 typedef uint16_t NvU16;
5 typedef uint8_t NvU8;
6
7 #define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16))
8
9 #define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
10
11 NV_DECLARE_HANDLE(NvDRSSessionHandle);
12 NV_DECLARE_HANDLE(NvDRSProfileHandle);
13
14 #define NVAPI_UNICODE_STRING_MAX 2048
15 #define NVAPI_BINARY_DATA_MAX 4096
16 typedef NvU16 NvAPI_UnicodeString[NVAPI_UNICODE_STRING_MAX];
17 typedef char NvAPI_ShortString[64];
18
19 #define NVAPI_SETTING_MAX_VALUES 100
20
21 typedef enum _NVDRS_SETTING_TYPE
22 {
23 NVDRS_DWORD_TYPE,
24 NVDRS_BINARY_TYPE,
25 NVDRS_STRING_TYPE,
26 NVDRS_WSTRING_TYPE
27 } NVDRS_SETTING_TYPE;
28
29 typedef enum _NVDRS_SETTING_LOCATION
30 {
31 NVDRS_CURRENT_PROFILE_LOCATION,
32 NVDRS_GLOBAL_PROFILE_LOCATION,
33 NVDRS_BASE_PROFILE_LOCATION,
34 NVDRS_DEFAULT_PROFILE_LOCATION
35 } NVDRS_SETTING_LOCATION;
36
37 typedef struct _NVDRS_GPU_SUPPORT
38 {
39 NvU32 geforce : 1;
40 NvU32 quadro : 1;
41 NvU32 nvs : 1;
42 NvU32 reserved4 : 1;
43 NvU32 reserved5 : 1;
44 NvU32 reserved6 : 1;
45 NvU32 reserved7 : 1;
46 NvU32 reserved8 : 1;
47 NvU32 reserved9 : 1;
48 NvU32 reserved10 : 1;
49 NvU32 reserved11 : 1;
50 NvU32 reserved12 : 1;
51 NvU32 reserved13 : 1;
52 NvU32 reserved14 : 1;
53 NvU32 reserved15 : 1;
54 NvU32 reserved16 : 1;
55 NvU32 reserved17 : 1;
56 NvU32 reserved18 : 1;
57 NvU32 reserved19 : 1;
58 NvU32 reserved20 : 1;
59 NvU32 reserved21 : 1;
60 NvU32 reserved22 : 1;
61 NvU32 reserved23 : 1;
62 NvU32 reserved24 : 1;
63 NvU32 reserved25 : 1;
64 NvU32 reserved26 : 1;
65 NvU32 reserved27 : 1;
66 NvU32 reserved28 : 1;
67 NvU32 reserved29 : 1;
68 NvU32 reserved30 : 1;
69 NvU32 reserved31 : 1;
70 NvU32 reserved32 : 1;
71 } NVDRS_GPU_SUPPORT;
72
73 //! Enum to decide on the datatype of setting value.
74 typedef struct _NVDRS_BINARY_SETTING
75 {
76 NvU32 valueLength; //!< valueLength should always be in number of bytes.
77 NvU8 valueData[NVAPI_BINARY_DATA_MAX];
78 } NVDRS_BINARY_SETTING;
79
80 typedef struct _NVDRS_SETTING_VALUES
81 {
82 NvU32 version; //!< Structure Version
83 NvU32 numSettingValues; //!< Total number of values available in a setting.
84 NVDRS_SETTING_TYPE settingType; //!< Type of setting value.
85 union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
86 {
87 NvU32 u32DefaultValue; //!< Accessing default DWORD value of this setting.
88 NVDRS_BINARY_SETTING binaryDefaultValue; //!< Accessing default Binary value of this setting.
89 //!< Must be allocated by caller with valueLength specifying buffer size, or only valueLength will be filled in.
90 NvAPI_UnicodeString wszDefaultValue; //!< Accessing default unicode string value of this setting.
91 };
92 union //!< Setting values can be of either DWORD, Binary values or String type,
93 { //!< NOT mixed types.
94 NvU32 u32Value; //!< All possible DWORD values for a setting
95 NVDRS_BINARY_SETTING binaryValue; //!< All possible Binary values for a setting
96 NvAPI_UnicodeString wszValue; //!< Accessing current unicode string value of this setting.
97 }settingValues[NVAPI_SETTING_MAX_VALUES];
98 } NVDRS_SETTING_VALUES;
99
100 //! Macro for constructing the version field of ::_NVDRS_SETTING_VALUES
101 #define NVDRS_SETTING_VALUES_VER MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1)
102
103 typedef struct _NVDRS_SETTING_V1
104 {
105 NvU32 version; //!< Structure Version
106 NvAPI_UnicodeString settingName; //!< String name of setting
107 NvU32 settingId; //!< 32 bit setting Id
108 NVDRS_SETTING_TYPE settingType; //!< Type of setting value.
109 NVDRS_SETTING_LOCATION settingLocation; //!< Describes where the value in CurrentValue comes from.
110 NvU32 isCurrentPredefined; //!< It is different than 0 if the currentValue is a predefined Value,
111 //!< 0 if the currentValue is a user value.
112 NvU32 isPredefinedValid; //!< It is different than 0 if the PredefinedValue union contains a valid value.
113 union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
114 {
115 NvU32 u32PredefinedValue; //!< Accessing default DWORD value of this setting.
116 NVDRS_BINARY_SETTING binaryPredefinedValue; //!< Accessing default Binary value of this setting.
117 //!< Must be allocated by caller with valueLength specifying buffer size,
118 //!< or only valueLength will be filled in.
119 NvAPI_UnicodeString wszPredefinedValue; //!< Accessing default unicode string value of this setting.
120 };
121 union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
122 {
123 NvU32 u32CurrentValue; //!< Accessing current DWORD value of this setting.
124 NVDRS_BINARY_SETTING binaryCurrentValue; //!< Accessing current Binary value of this setting.
125 //!< Must be allocated by caller with valueLength specifying buffer size,
126 //!< or only valueLength will be filled in.
127 NvAPI_UnicodeString wszCurrentValue; //!< Accessing current unicode string value of this setting.
128 };
129 } NVDRS_SETTING_V1;
130
131 //! Macro for constructing the version field of ::_NVDRS_SETTING
132 #define NVDRS_SETTING_VER1 MAKE_NVAPI_VERSION(NVDRS_SETTING_V1, 1)
133
134 typedef NVDRS_SETTING_V1 NVDRS_SETTING;
135 #define NVDRS_SETTING_VER NVDRS_SETTING_VER1
136
137 typedef struct _NVDRS_APPLICATION_V4
138 {
139 NvU32 version; //!< Structure Version
140 NvU32 isPredefined; //!< Is the application userdefined/predefined
141 NvAPI_UnicodeString appName; //!< String name of the Application
142 NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application
143 NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application
144 NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found.
145 //!< When specifying multiple files, separate them using the ':' character.
146 NvU32 isMetro:1; //!< Windows 8 style app
147 NvU32 isCommandLine:1; //!< Command line parsing for the application name
148 NvU32 reserved:30; //!< Reserved. Should be 0.
149 NvAPI_UnicodeString commandLine; //!< If isCommandLine is set to 0 this must be an empty. If isCommandLine is set to 1
150 //!< this contains application's command line as if it was returned by GetCommandLineW.
151 } NVDRS_APPLICATION_V4;
152
153 #define NVDRS_APPLICATION_VER_V4 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V4,4)
154
155 typedef NVDRS_APPLICATION_V4 NVDRS_APPLICATION;
156 #define NVDRS_APPLICATION_VER NVDRS_APPLICATION_VER_V4
157
158 typedef struct _NVDRS_PROFILE_V1
159 {
160 NvU32 version; //!< Structure Version
161 NvAPI_UnicodeString profileName; //!< String name of the Profile
162 NVDRS_GPU_SUPPORT gpuSupport; //!< This read-only flag indicates the profile support on either
163 //!< Quadro, or Geforce, or both.
164 NvU32 isPredefined; //!< Is the Profile user-defined, or predefined
165 NvU32 numOfApps; //!< Total number of applications that belong to this profile. Read-only
166 NvU32 numOfSettings; //!< Total number of settings applied for this Profile. Read-only
167 } NVDRS_PROFILE_V1;
168
169 typedef NVDRS_PROFILE_V1 NVDRS_PROFILE;
170
171 //! Macro for constructing the version field of ::NVDRS_PROFILE
172 #define NVDRS_PROFILE_VER1 MAKE_NVAPI_VERSION(NVDRS_PROFILE_V1,1)
173 #define NVDRS_PROFILE_VER NVDRS_PROFILE_VER1
174
175 #endif