node-gpuinfo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +336 -0
  3. package/binding.gyp +69 -0
  4. package/build/Release/gpu.exp +0 -0
  5. package/build/Release/gpu.lib +0 -0
  6. package/build/Release/gpu.node +0 -0
  7. package/build/Release/gpu.pdb +0 -0
  8. package/build/binding.sln +19 -0
  9. package/build/gpu.vcxproj +175 -0
  10. package/build/gpu.vcxproj.filters +169 -0
  11. package/example.js +69 -0
  12. package/index.js +33 -0
  13. package/package.json +68 -0
  14. package/src/binding.cpp +201 -0
  15. package/src/gpu_info.c +130 -0
  16. package/src/gpu_info.h +86 -0
  17. package/src/includes/adlx/ADLX.h +367 -0
  18. package/src/includes/adlx/ADLXDefines.h +1345 -0
  19. package/src/includes/adlx/ADLXHelper/ADLXHelper.c +175 -0
  20. package/src/includes/adlx/ADLXHelper/ADLXHelper.h +245 -0
  21. package/src/includes/adlx/ADLXHelper/WinAPIS.c +64 -0
  22. package/src/includes/adlx/ADLXStructures.h +206 -0
  23. package/src/includes/adlx/ADLXVersion.h +18 -0
  24. package/src/includes/adlx/I3DSettings.h +3476 -0
  25. package/src/includes/adlx/I3DSettings1.h +292 -0
  26. package/src/includes/adlx/I3DSettings2.h +317 -0
  27. package/src/includes/adlx/IApplications.h +397 -0
  28. package/src/includes/adlx/IChangedEvent.h +71 -0
  29. package/src/includes/adlx/ICollections.h +325 -0
  30. package/src/includes/adlx/IDesktops.h +918 -0
  31. package/src/includes/adlx/IDisplay3DLUT.h +663 -0
  32. package/src/includes/adlx/IDisplayGamma.h +683 -0
  33. package/src/includes/adlx/IDisplayGamut.h +760 -0
  34. package/src/includes/adlx/IDisplaySettings.h +3476 -0
  35. package/src/includes/adlx/IDisplays.h +2676 -0
  36. package/src/includes/adlx/IDisplays1.h +191 -0
  37. package/src/includes/adlx/IDisplays2.h +188 -0
  38. package/src/includes/adlx/IDisplays3.h +256 -0
  39. package/src/includes/adlx/IGPUAutoTuning.h +460 -0
  40. package/src/includes/adlx/IGPUManualFanTuning.h +1007 -0
  41. package/src/includes/adlx/IGPUManualGFXTuning.h +607 -0
  42. package/src/includes/adlx/IGPUManualPowerTuning.h +340 -0
  43. package/src/includes/adlx/IGPUManualVRAMTuning.h +576 -0
  44. package/src/includes/adlx/IGPUPresetTuning.h +469 -0
  45. package/src/includes/adlx/IGPUTuning.h +1239 -0
  46. package/src/includes/adlx/IGPUTuning1.h +197 -0
  47. package/src/includes/adlx/II2C.h +198 -0
  48. package/src/includes/adlx/ILog.h +72 -0
  49. package/src/includes/adlx/IMultiMedia.h +578 -0
  50. package/src/includes/adlx/IPerformanceMonitoring.h +2520 -0
  51. package/src/includes/adlx/IPerformanceMonitoring1.h +134 -0
  52. package/src/includes/adlx/IPerformanceMonitoring2.h +341 -0
  53. package/src/includes/adlx/IPerformanceMonitoring3.h +199 -0
  54. package/src/includes/adlx/IPowerTuning.h +473 -0
  55. package/src/includes/adlx/IPowerTuning1.h +515 -0
  56. package/src/includes/adlx/ISmartAccessMemory.h +114 -0
  57. package/src/includes/adlx/ISystem.h +1557 -0
  58. package/src/includes/adlx/ISystem1.h +237 -0
  59. package/src/includes/adlx/ISystem2.h +643 -0
  60. package/src/linux/amd_linux.c +269 -0
  61. package/src/linux/intel_linux.c +20 -0
  62. package/src/linux/nvidia_linux.c +257 -0
  63. package/src/macos/amd_mac.c +131 -0
  64. package/src/macos/intel_mac.c +131 -0
  65. package/src/macos/nvidia_mac.c +21 -0
  66. package/src/vendor/amd.c +37 -0
  67. package/src/vendor/intel.c +37 -0
  68. package/src/vendor/nvidia.c +37 -0
  69. package/src/windows/amd_windows.c +468 -0
  70. package/src/windows/intel_windows.c +157 -0
  71. package/src/windows/nvidia_windows.c +252 -0
@@ -0,0 +1,1345 @@
1
+ //
2
+ // Copyright (c) 2021 - 2025 Advanced Micro Devices, Inc. All rights reserved.
3
+ //
4
+ //-------------------------------------------------------------------------------------------------
5
+
6
+ #ifndef ADLX_DEFINES_H
7
+ #define ADLX_DEFINES_H
8
+ #pragma once
9
+
10
+ #if defined(_WIN32)
11
+ #include <Windows.h>
12
+ #endif
13
+
14
+ #include <stdio.h>
15
+ #include <stdint.h>
16
+ #include "ADLXVersion.h"
17
+
18
+ //-------------------------------------------------------------------------------------------------
19
+ //Version stuff
20
+ #pragma region version
21
+
22
+ #define ADLX_MAKE_FULL_VER(VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE, VERSION_BUILD_NUM) ( ((adlx_uint64)(VERSION_MAJOR) << 48ull) | ((adlx_uint64)(VERSION_MINOR) << 32ull) | ((adlx_uint64)(VERSION_RELEASE) << 16ull) | (adlx_uint64)(VERSION_BUILD_NUM))
23
+ #define ADLX_FULL_VERSION ADLX_MAKE_FULL_VER(ADLX_VER_MAJOR, ADLX_VER_MINOR, ADLX_VER_RELEASE, ADLX_VER_BUILD_NUM)
24
+
25
+ #define ADLX_VERSION_STR ADLX_VER_MAJOR##.##ADLX_VER_MINOR
26
+ #pragma endregion version
27
+
28
+ //-------------------------------------------------------------------------------------------------
29
+ //ADLX Platform - platform-specific defines, such as types and C/C++ declarations
30
+ #pragma region platform
31
+ /**
32
+ * @defgroup typedefs ADLX Primitive Data Types
33
+ * @ENG_START_DOX
34
+ * This section provides definitions for ADLX primitive data types.
35
+ * @ENG_END_DOX
36
+ *
37
+ * @requirements
38
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
39
+ *
40
+ * ADLX Type | Description
41
+ * ----: | :----
42
+ * adlx_int64 | @ENG_START_DOX adlx_int64 is typedef of int64_t @ENG_END_DOX
43
+ * adlx_int32 | @ENG_START_DOX adlx_int32 is typedef of int32_t @ENG_END_DOX
44
+ * adlx_int16 | @ENG_START_DOX adlx_int16 is typedef of int16_t @ENG_END_DOX
45
+ * adlx_int8 | @ENG_START_DOX adlx_int8 is typedef of int8_t @ENG_END_DOX
46
+ * adlx_uint64 | @ENG_START_DOX adlx_uint64 is typedef of uint64_t @ENG_END_DOX
47
+ * adlx_uint32 | @ENG_START_DOX adlx_uint32 is typedef of uint32_t @ENG_END_DOX
48
+ * adlx_uint16 | @ENG_START_DOX adlx_uint16 is typedef of uint16_t @ENG_END_DOX
49
+ * adlx_uint8 | @ENG_START_DOX adlx_uint8 is typedef of uint8_t @ENG_END_DOX
50
+ * adlx_size | @ENG_START_DOX adlx_size is typedef of size_t @ENG_END_DOX
51
+ * adlx_handle | @ENG_START_DOX adlx_handle is typedef of void* @ENG_END_DOX
52
+ * adlx_double | @ENG_START_DOX adlx_double is typedef of double @ENG_END_DOX
53
+ * adlx_float | @ENG_START_DOX adlx_float is typedef of float @ENG_END_DOX
54
+ * adlx_void | @ENG_START_DOX adlx_void is typedef of void @ENG_END_DOX
55
+ * adlx_int | @ENG_START_DOX adlx_int is typedef of adlx_int32 @ENG_END_DOX
56
+ * adlx_uint | @ENG_START_DOX adlx_uint is typedef of adlx_uint32 @ENG_END_DOX
57
+ * adlx_ulong | @ENG_START_DOX adlx_ulong is typedef of unsigned long @ENG_END_DOX
58
+ * adlx_bool | @ENG_START_DOX adlx_bool is typedef of bool @ENG_END_DOX
59
+ */
60
+ #pragma region ADLX simple data types
61
+ typedef int64_t adlx_int64;
62
+ typedef int32_t adlx_int32;
63
+ typedef int16_t adlx_int16;
64
+ typedef int8_t adlx_int8;
65
+
66
+ typedef uint64_t adlx_uint64;
67
+ typedef uint32_t adlx_uint32;
68
+ typedef uint16_t adlx_uint16;
69
+ typedef uint8_t adlx_uint8;
70
+ typedef size_t adlx_size;
71
+
72
+ typedef void* adlx_handle;
73
+ typedef double adlx_double;
74
+ typedef float adlx_float;
75
+
76
+ typedef void adlx_void;
77
+
78
+ typedef long adlx_long;
79
+ typedef adlx_int32 adlx_int;
80
+ typedef unsigned long adlx_ulong;
81
+ typedef adlx_uint32 adlx_uint;
82
+
83
+ typedef uint8_t adlx_byte;
84
+
85
+ #if defined(__cplusplus)
86
+ typedef bool adlx_bool;
87
+ #else
88
+ typedef adlx_uint8 adlx_bool;
89
+ #define true 1
90
+ #define false 0
91
+ #endif
92
+ #pragma endregion ADLX simple data types
93
+
94
+ //Calling standards
95
+ #pragma region Export declarations
96
+
97
+ #if defined(_WIN32)
98
+ // Microsoft
99
+ #define ADLX_CORE_LINK __declspec(dllexport)
100
+ #define ADLX_STD_CALL __stdcall
101
+ #define ADLX_CDECL_CALL __cdecl
102
+ #define ADLX_FAST_CALL __fastcall
103
+ #define ADLX_INLINE __inline
104
+ #define ADLX_FORCEINLINE __forceinline
105
+ #define ADLX_NO_VTABLE __declspec(novtable)
106
+ #else
107
+ #define EXPORT
108
+ #define IMPORT
109
+ #pragma warning Unknown dynamic link import/export semantics.
110
+ #endif
111
+
112
+ #pragma endregion Export declarations
113
+
114
+ //Various platform APIs
115
+ #pragma region Platform APIs
116
+
117
+ /**
118
+ * @page adlx_atomic_inc adlx_atomic_inc
119
+ * @ENG_START_DOX
120
+ * @brief An atomic increment of a variable in multithreading environments.
121
+ * @ENG_END_DOX
122
+ *
123
+ * @syntax
124
+ * @codeStart
125
+ * adlx_long adlx_atomic_inc (adlx_long* x)
126
+ * @codeEnd
127
+ * @params
128
+ * @paramrow{1.,[in],x,adlx_long*,@ENG_START_DOX The pointer to the variable to be incremented. @ENG_END_DOX}
129
+ *
130
+ * @retvalues
131
+ * @ENG_START_DOX
132
+ * The incremented value.
133
+ * @ENG_END_DOX
134
+ * @requirements
135
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
136
+ */
137
+ adlx_long ADLX_CDECL_CALL adlx_atomic_inc (adlx_long* x);
138
+
139
+ /**
140
+ * @page adlx_atomic_dec adlx_atomic_dec
141
+ * @ENG_START_DOX
142
+ * @brief An atomic decrement of a variable in multithreading environments.
143
+ * @ENG_END_DOX
144
+ *
145
+ * @syntax
146
+ * @codeStart
147
+ * adlx_long adlx_atomic_dec (adlx_long* x)
148
+ * @codeEnd
149
+ * @params
150
+ * @paramrow{1.,[in],x,adlx_long*,@ENG_START_DOX The pointer to the variable to be decremented. @ENG_END_DOX}
151
+ *
152
+ * @retvalues
153
+ * @ENG_START_DOX
154
+ * The decremented value.
155
+ * @ENG_END_DOX
156
+ * @requirements
157
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
158
+ */
159
+ adlx_long ADLX_CDECL_CALL adlx_atomic_dec (adlx_long* x);
160
+
161
+
162
+ /**
163
+ * @page adlx_load_library adlx_load_library
164
+ * @ENG_START_DOX
165
+ * @brief Loads a module into the address space of the calling process.
166
+ * @ENG_END_DOX
167
+ *
168
+ * @syntax
169
+ * @codeStart
170
+ * adlx_handle adlx_load_library (const TCHAR* filename)
171
+ * @codeEnd
172
+ * @params
173
+ * @paramrow{1.,[in],filename,const TCHAR*,@ENG_START_DOX The zero-terminated string that specifies the file name of the module to be loaded. @ENG_END_DOX}
174
+ *
175
+ * @retvalues
176
+ * @ENG_START_DOX
177
+ * If the module is successfully loaded, a handle to the loaded module is returned.<br>
178
+ * If the module is not successfully loaded, __nullptr__ is returned.<br>
179
+ * @ENG_END_DOX
180
+ *
181
+ * @detaileddesc
182
+ * @ENG_START_DOX
183
+ * @details
184
+ * Use this function to load ADLX in your application. Specify the __filename__ parameter as @ref ADLX_DLL_NAME.
185
+ * @ENG_END_DOX
186
+ *
187
+ * @requirements
188
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
189
+ */
190
+ adlx_handle ADLX_CDECL_CALL adlx_load_library (const TCHAR* filename);
191
+
192
+ /**
193
+ * @page adlx_free_library adlx_free_library
194
+ * @ENG_START_DOX
195
+ * @brief Frees a loaded module.
196
+ * @ENG_END_DOX
197
+ *
198
+ * @syntax
199
+ * @codeStart
200
+ * int adlx_free_library (adlx_handle module)
201
+ * @codeEnd
202
+ * @params
203
+ * @paramrow{1.,[in],module,adlx_handle,@ENG_START_DOX The handle to the loaded module. @ENG_END_DOX}
204
+ *
205
+ * @retvalues
206
+ * @ENG_START_DOX
207
+ * If the module is successfully unloaded, a non-zero value is returned.<br>
208
+ * If the module is not successfully unloaded, zero is returned.<br>
209
+ * @ENG_END_DOX
210
+ *
211
+ * @detaileddesc
212
+ * @ENG_START_DOX
213
+ * @details
214
+ * When ADLX is successfully freed with this function, ADLX is unloaded from the address space of the calling process and the handle to the module is no longer valid.
215
+ * @ENG_END_DOX
216
+ *
217
+ * @requirements
218
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
219
+ */
220
+ int ADLX_CDECL_CALL adlx_free_library (adlx_handle module);
221
+
222
+ /**
223
+ * @page adlx_get_proc_address adlx_get_proc_address
224
+ * @ENG_START_DOX
225
+ * @brief Retrieves the address of a function from a module.
226
+ * @ENG_END_DOX
227
+ *
228
+ * @syntax
229
+ * @codeStart
230
+ * void* adlx_get_proc_address (adlx_handle module, const char* procName)
231
+ * @codeEnd
232
+ * @params
233
+ * @paramrow{1.,[in],module,adlx_handle,@ENG_START_DOX The handle to the module. @ENG_END_DOX}
234
+ * @paramrow{2.,[in],procName,const char*,@ENG_START_DOX The zero-terminated string that specifies the name of the function. @ENG_END_DOX}
235
+ *
236
+ * @retvalues
237
+ * @ENG_START_DOX
238
+ * If the function was found, the address of the function is returned.<br>
239
+ * If the function was not found, __nullptr__ is returned.<br>
240
+ * @ENG_END_DOX
241
+ *
242
+ * @detaileddesc
243
+ * @ENG_START_DOX
244
+ * @details
245
+ * Use this function to load ADLX functions from the ADLX module. The name of the ADLX function can be one of values: @ref ADLX_QUERY_FULL_VERSION_FUNCTION_NAME, @ref ADLX_QUERY_VERSION_FUNCTION_NAME, @ref ADLX_INIT_FUNCTION_NAME, @ref ADLX_INIT_WITH_CALLER_ADL_FUNCTION_NAME, @ref ADLX_TERMINATE_FUNCTION_NAME.<br>
246
+ * Parameter: procName | Description | Return Value
247
+ * -|-|-
248
+ * @ref ADLX_QUERY_FULL_VERSION_FUNCTION_NAME | The function to query the full version of ADLX. | @ref page_ADLXQueryFullVersion_Fn|
249
+ * @ref ADLX_QUERY_VERSION_FUNCTION_NAME | The function to query the version of ADLX. | @ref page_ADLXQueryVersion_Fn|
250
+ * @ref ADLX_INIT_FUNCTION_NAME | The function to initialize ADLX with default parameters. | @ref page_ADLXInitialize_Fn |
251
+ * @ref ADLX_INIT_WITH_INCOMPATIBLE_DRIVER_FUNCTION_NAME | The function to initialize ADLX with a legacy driver. | @ref page_ADLXInitialize_Fn |
252
+ * @ref ADLX_INIT_WITH_CALLER_ADL_FUNCTION_NAME | The function to initialize ADLX with an ADL context. | @ref page_ADLXInitializeWithCallerAdl_Fn|
253
+ * @ref ADLX_TERMINATE_FUNCTION_NAME | The function to terminate ADLX. | @ref page_ADLXTerminate_Fn |
254
+ * @ENG_END_DOX
255
+ *
256
+ * @requirements
257
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
258
+ */
259
+ void* ADLX_CDECL_CALL adlx_get_proc_address (adlx_handle module, const char* procName);
260
+
261
+ #pragma endregion Platform APIs
262
+
263
+ #pragma endregion platform
264
+ /** @file */
265
+ //-------------------------------------------------------------------------------------------------
266
+ //ADLX data types
267
+ #pragma region ADLX data types
268
+
269
+ #pragma region ADLX_RESULT
270
+ /**
271
+ * @enum ADLX_RESULT
272
+ * @ingroup enumerations
273
+ * @ENG_START_DOX
274
+ * @brief Indicates the result returned from an ADLX function or from an ADLX method.
275
+ * @ENG_END_DOX
276
+ */
277
+ typedef enum
278
+ {
279
+ ADLX_OK = 0, /**< @ENG_START_DOX This result indicates success. @ENG_END_DOX */
280
+ ADLX_ALREADY_ENABLED, /**< @ENG_START_DOX This result indicates that the asked action is already enabled. @ENG_END_DOX */
281
+ ADLX_ALREADY_INITIALIZED, /**< @ENG_START_DOX This result indicates that ADLX has a unspecified type of initialization. @ENG_END_DOX */
282
+ ADLX_FAIL, /**< @ENG_START_DOX This result indicates an unspecified failure. @ENG_END_DOX */
283
+ ADLX_INVALID_ARGS, /**< @ENG_START_DOX This result indicates that the arguments are invalid. @ENG_END_DOX */
284
+ ADLX_BAD_VER, /**< @ENG_START_DOX This result indicates that the asked version is incompatible with the current version. @ENG_END_DOX */
285
+ ADLX_UNKNOWN_INTERFACE, /**< @ENG_START_DOX This result indicates that an unknown interface was asked. @ENG_END_DOX */
286
+ ADLX_TERMINATED, /**< @ENG_START_DOX This result indicates that the calls were made in an interface after ADLX was terminated. @ENG_END_DOX */
287
+ ADLX_ADL_INIT_ERROR, /**< @ENG_START_DOX This result indicates that the ADL initialization failed. @ENG_END_DOX */
288
+ ADLX_NOT_FOUND, /**< @ENG_START_DOX This result indicates that the item is not found. @ENG_END_DOX */
289
+ ADLX_INVALID_OBJECT, /**< @ENG_START_DOX This result indicates that the method was called into an invalid object. @ENG_END_DOX */
290
+ ADLX_ORPHAN_OBJECTS, /**< @ENG_START_DOX This result indicates that ADLX was terminated with outstanding ADLX objects. Any interface obtained from ADLX points to invalid memory and calls in their methods will result in unexpected behavior. @ENG_END_DOX */
291
+ ADLX_NOT_SUPPORTED, /**< @ENG_START_DOX This result indicates that the asked feature is not supported. @ENG_END_DOX */
292
+ ADLX_PENDING_OPERATION, /**< @ENG_START_DOX This result indicates a failure due to an operation currently in progress. @ENG_END_DOX */
293
+ ADLX_GPU_INACTIVE, /**< @ENG_START_DOX This result indicates that the GPU is inactive. @ENG_END_DOX */
294
+ ADLX_GPU_IN_USE, /**< @ENG_START_DOX This result indicates that the GPU is in used by applications. @ENG_END_DOX */
295
+ ADLX_TIMEOUT_OPERATION, /**< @ENG_START_DOX This result indicates that the operation is timeout. @ENG_END_DOX */
296
+ ADLX_NOT_ACTIVE /**< @ENG_START_DOX This result indicates that the asked feature is inactive. @ENG_END_DOX */
297
+ } ADLX_RESULT;
298
+
299
+ /**
300
+ * @def ADLX_SUCCEEDED
301
+ * @ingroup ADLXMacro
302
+ * @ENG_START_DOX Checks if the result code passed as parameter indicates a successful operation. @ENG_END_DOX
303
+ * @definition
304
+ * @codeStart
305
+ * \#define ADLX_SUCCEEDED(x) (<b>ADLX_OK</b> == (x) || <b>ADLX_ALREADY_ENABLED</b> == (x) || <b>ADLX_ALREADY_INITIALIZED</b> == (x))
306
+ * @codeEnd
307
+ */
308
+ #define ADLX_SUCCEEDED(x) (ADLX_OK == (x) || ADLX_ALREADY_ENABLED == (x) || ADLX_ALREADY_INITIALIZED == (x))
309
+
310
+ /**
311
+ * @def ADLX_FAILED
312
+ * @ingroup ADLXMacro
313
+ * @ENG_START_DOX Checks if the result code passed as parameter indicates an unsuccessful operation. @ENG_END_DOX
314
+ * @definition
315
+ * @codeStart
316
+ * \#define ADLX_FAILED(x) (<b>ADLX_OK</b> != (x) && <b>ADLX_ALREADY_ENABLED</b> != (x) && <b>ADLX_ALREADY_INITIALIZED</b> != (x))
317
+ * @codeEnd
318
+ */
319
+ #define ADLX_FAILED(x) (ADLX_OK != (x) && ADLX_ALREADY_ENABLED != (x) && ADLX_ALREADY_INITIALIZED != (x))
320
+
321
+ #pragma endregion ADLX_RESULT
322
+
323
+ #pragma region ADLX_HG_TYPE
324
+ /**
325
+ * @enum ADLX_HG_TYPE
326
+ * @ingroup enumerations
327
+ * @ENG_START_DOX
328
+ * @brief Indicates the type of Hybrid Graphic.
329
+ * @ENG_END_DOX
330
+ */
331
+ typedef enum
332
+ {
333
+ NONE = 0, /**< @ENG_START_DOX This is not a Hybrid Graphics system. @ENG_END_DOX */
334
+ AMD, /**< @ENG_START_DOX This is an AMD integrated GPU. @ENG_END_DOX */
335
+ OTHER, /**< @ENG_START_DOX This is a non-AMD integrated GPU. @ENG_END_DOX */
336
+ } ADLX_HG_TYPE;
337
+ #pragma endregion ADLX_HG_TYPE
338
+
339
+ #pragma region ADLX_ASIC_FAMILY_TYPE
340
+ /**
341
+ * @enum ADLX_ASIC_FAMILY_TYPE
342
+ * @ingroup enumerations
343
+ * @ENG_START_DOX
344
+ * @brief Indicates the ASIC family type.
345
+ * @ENG_END_DOX
346
+ */
347
+ typedef enum
348
+ {
349
+ ASIC_UNDEFINED = 0, /**< @ENG_START_DOX The ASIC family type is not defined. @ENG_END_DOX */
350
+ ASIC_RADEON, /**< @ENG_START_DOX The ASIC family type is discrete. @ENG_END_DOX */
351
+ ASIC_FIREPRO, /**< @ENG_START_DOX The ASIC family type is Firepro. @ENG_END_DOX */
352
+ ASIC_FIREMV, /**< @ENG_START_DOX The ASIC family type is FireMV. @ENG_END_DOX */
353
+ ASIC_FIRESTREAM, /**< @ENG_START_DOX The ASIC family type is FireStream. @ENG_END_DOX */
354
+ ASIC_FUSION, /**< @ENG_START_DOX The ASIC family type is Fusion. @ENG_END_DOX */
355
+ ASIC_EMBEDDED, /**< @ENG_START_DOX The ASIC family type is Embedded. @ENG_END_DOX */
356
+ } ADLX_ASIC_FAMILY_TYPE;
357
+ #pragma endregion ADLX_ASIC_FAMILY_TYPE
358
+
359
+ #pragma region ADLX_PCI_BUS_TYPE
360
+ /**
361
+ * @enum ADLX_PCI_BUS_TYPE
362
+ * @ingroup enumerations
363
+ * @ENG_START_DOX
364
+ * @brief Indicates the PCI bus type.
365
+ * @ENG_END_DOX
366
+ */
367
+ typedef enum
368
+ {
369
+ UNDEFINED = 0, /**< @ENG_START_DOX The PCI bus type is not defined. @ENG_END_DOX */
370
+ PCI, /**< @ENG_START_DOX The PCI bus type is PCI bus. @ENG_END_DOX */
371
+ AGP, /**< @ENG_START_DOX The PCI bus type is AGP bus. @ENG_END_DOX */
372
+ PCIE, /**< @ENG_START_DOX The PCI bus type is PCI Express bus. @ENG_END_DOX */
373
+ PCIE_2_0, /**< @ENG_START_DOX The PCI bus type is PCI Express 2nd generation bus. @ENG_END_DOX */
374
+ PCIE_3_0, /**< @ENG_START_DOX The PCI bus type is PCI Express 3rd generation bus. @ENG_END_DOX */
375
+ PCIE_4_0 /**< @ENG_START_DOX The PCI bus type is PCI Express 4th generation bus. @ENG_END_DOX */
376
+ } ADLX_PCI_BUS_TYPE;
377
+ #pragma endregion ADLX_PCI_BUS_TYPE
378
+
379
+ #pragma region ADLX_DP_LINK_RATE
380
+ /**
381
+ * @enum ADLX_DP_LINK_RATE
382
+ * @ingroup enumerations
383
+ * @ENG_START_DOX
384
+ * @brief Indicates the DP link rate.
385
+ * @ENG_END_DOX
386
+ */
387
+ typedef enum
388
+ {
389
+ DP_LINK_RATE_UNKNOWN = 0, /**< @ENG_START_DOX The DP link rate is unknown. @ENG_END_DOX */
390
+ DP_LINK_RATE_RBR, /**< @ENG_START_DOX The DP link rate is 1.62 Gbps/Lane. @ENG_END_DOX */
391
+ DP_LINK_RATE_2_16GBPS, /**< @ENG_START_DOX The DP link rate is 2.16 Gbps/Lane. @ENG_END_DOX */
392
+ DP_LINK_RATE_2_43GBPS, /**< @ENG_START_DOX The DP link rate is 2.43 Gbps/Lane. @ENG_END_DOX */
393
+ DP_LINK_RATE_HBR, /**< @ENG_START_DOX The DP link rate is 2.70 Gbps/Lane. @ENG_END_DOX */
394
+ DP_LINK_RATE_4_32GBPS, /**< @ENG_START_DOX The DP link rate is 4.32 Gbps/Lane. @ENG_END_DOX */
395
+ DP_LINK_RATE_HBR2, /**< @ENG_START_DOX The DP link rate is 5.40 Gbps/Lane. @ENG_END_DOX */
396
+ DP_LINK_RATE_HBR3, /**< @ENG_START_DOX The DP link rate is 8.10 Gbps/Lane. @ENG_END_DOX */
397
+ DP_LINK_RATE_UHBR10, /**< @ENG_START_DOX The DP link rate is 10 Gbps/Lane. @ENG_END_DOX */
398
+ DP_LINK_RATE_UHBR13D5, /**< @ENG_START_DOX The DP link rate is 13.5 Gbps/Lane. @ENG_END_DOX */
399
+ DP_LINK_RATE_UHBR20 /**< @ENG_START_DOX The DP link rate is 20 Gbps/Lane. @ENG_END_DOX */
400
+ } ADLX_DP_LINK_RATE;
401
+
402
+ #pragma endregion ADLX_DP_LINK_RATE
403
+
404
+ #pragma region ADLX_GPU_TYPE
405
+ /**
406
+ * @enum ADLX_GPU_TYPE
407
+ * @ingroup enumerations
408
+ * @ENG_START_DOX
409
+ * @brief Indicates the GPU type.
410
+ * @ENG_END_DOX
411
+ */
412
+ typedef enum
413
+ {
414
+ GPUTYPE_UNDEFINED = 0, /**< @ENG_START_DOX The GPU type is unknown. @ENG_END_DOX */
415
+ GPUTYPE_INTEGRATED, /**< @ENG_START_DOX The GPU type is an integrated GPU. @ENG_END_DOX */
416
+ GPUTYPE_DISCRETE, /**< @ENG_START_DOX The GPU type is a discrete GPU. @ENG_END_DOX */
417
+ } ADLX_GPU_TYPE;
418
+ #pragma endregion ADLX_GPU_TYPE
419
+
420
+ #pragma region ADLX_DISPLAY_CONNECTOR_TYPE
421
+ /**
422
+ * @enum ADLX_DISPLAY_CONNECTOR_TYPE
423
+ * @ingroup enumerations
424
+ * @ENG_START_DOX
425
+ * @brief Indicates the display connector type.
426
+ * @ENG_END_DOX
427
+ */
428
+ typedef enum
429
+ {
430
+ DISPLAY_CONTYPE_UNKNOWN = 0, /**< @ENG_START_DOX The display connector type is unknown. @ENG_END_DOX */
431
+ DISPLAY_CONTYPE_VGA, /**< @ENG_START_DOX The display connector type is VGA. @ENG_END_DOX */
432
+ DISPLAY_CONTYPE_DVI_D, /**< @ENG_START_DOX The display connector type is DVI-D. @ENG_END_DOX */
433
+ DISPLAY_CONTYPE_DVI_I, /**< @ENG_START_DOX The display connector type is DVI-I. @ENG_END_DOX */
434
+ DISPLAY_CONTYPE_CVDONGLE_NTSC, /**< @ENG_START_DOX The display connector type is NTSC. @ENG_END_DOX */
435
+ DISPLAY_CONTYPE_CVDONGLE_JPN, /**< @ENG_START_DOX The display connector type is JPN. @ENG_END_DOX */
436
+ DISPLAY_CONTYPE_CVDONGLE_NONI2C_JPN, /**< @ENG_START_DOX The display connector type is NONI2C-JPN. @ENG_END_DOX */
437
+ DISPLAY_CONTYPE_CVDONGLE_NONI2C_NTSC, /**< @ENG_START_DOX The display connector type is NONI2C-NTSC. @ENG_END_DOX */
438
+ DISPLAY_CONTYPE_PROPRIETARY, /**< @ENG_START_DOX The display connector type is PROPRIETARY. @ENG_END_DOX */
439
+ DISPLAY_CONTYPE_HDMI_TYPE_A, /**< @ENG_START_DOX The display connector type is HDMI A. @ENG_END_DOX */
440
+ DISPLAY_CONTYPE_HDMI_TYPE_B, /**< @ENG_START_DOX The display connector type is HDMI B. @ENG_END_DOX */
441
+ DISPLAY_CONTYPE_SVIDEO, /**< @ENG_START_DOX The display connector type is SVIDEO. @ENG_END_DOX */
442
+ DISPLAY_CONTYPE_COMPOSITE, /**< @ENG_START_DOX The display connector type is COMPOSITE. @ENG_END_DOX */
443
+ DISPLAY_CONTYPE_RCA_3COMPONENT, /**< @ENG_START_DOX The display connector type is RCA. @ENG_END_DOX */
444
+ DISPLAY_CONTYPE_DISPLAYPORT, /**< @ENG_START_DOX The display connector type is DISPLAYPORT. @ENG_END_DOX */
445
+ DISPLAY_CONTYPE_EDP, /**< @ENG_START_DOX The display connector type is EDP. @ENG_END_DOX */
446
+ DISPLAY_CONTYPE_WIRELESSDISPLAY, /**< @ENG_START_DOX The display connector type is WIRELESSDISPLAY. @ENG_END_DOX */
447
+ DISPLAY_CONTYPE_USB_TYPE_C /**< @ENG_START_DOX The display connector type is USB Type-C. @ENG_END_DOX */
448
+ }ADLX_DISPLAY_CONNECTOR_TYPE;
449
+ #pragma endregion ADLX_DISPLAY_CONNECTOR_TYPE
450
+
451
+ #pragma region ADLX_DISPLAY_TYPE
452
+ /**
453
+ * @enum ADLX_DISPLAY_TYPE
454
+ * @ingroup enumerations
455
+ * @ENG_START_DOX
456
+ * @brief Indicates the display type.
457
+ * @ENG_END_DOX
458
+ */
459
+ typedef enum
460
+ {
461
+ DISPLAY_TYPE_UNKOWN = 0, /**< @ENG_START_DOX The display type is an unknown display. @ENG_END_DOX */
462
+ DISPLAY_TYPE_MONITOR, /**< @ENG_START_DOX The display type is a monitor display. @ENG_END_DOX */
463
+ DISPLAY_TYPE_TELEVISION, /**< @ENG_START_DOX The display type is a TV display. @ENG_END_DOX */
464
+ DISPLAY_TYPE_LCD_PANEL, /**< @ENG_START_DOX The display type is an LCD display. @ENG_END_DOX */
465
+ DISPLAY_TYPE_DIGITAL_FLAT_PANEL, /**< @ENG_START_DOX The display type is a DFP display. @ENG_END_DOX */
466
+ DISPLAY_TYPE_COMPONENT_VIDEO, /**< @ENG_START_DOX The display type is a component video display. @ENG_END_DOX */
467
+ DISPLAY_TYPE_PROJECTOR /**< @ENG_START_DOX The display type is a projector display. @ENG_END_DOX */
468
+ }ADLX_DISPLAY_TYPE;
469
+ #pragma endregion ADLX_DISPLAY_TYPE
470
+
471
+ #pragma region ADLX_DISPLAY_SCAN_TYPE
472
+ /**
473
+ * @enum ADLX_DISPLAY_SCAN_TYPE
474
+ * @ingroup enumerations
475
+ * @ENG_START_DOX
476
+ * @brief Indicates the display scan type.
477
+ * @ENG_END_DOX
478
+ */
479
+ typedef enum
480
+ {
481
+ PROGRESSIVE = 0, /**< @ENG_START_DOX The display scan type is progressive mode. @ENG_END_DOX */
482
+ INTERLACED /**< @ENG_START_DOX The display scan type is interlaced mode. @ENG_END_DOX */
483
+ } ADLX_DISPLAY_SCAN_TYPE;
484
+ #pragma endregion ADLX_DISPLAY_SCAN_TYPE
485
+
486
+ #pragma region ADLX_DISPLAY_TIMING_POLARITY
487
+ /**
488
+ * @enum ADLX_DISPLAY_TIMING_POLARITY
489
+ * @ingroup enumerations
490
+ * @ENG_START_DOX
491
+ * @brief Display timing polarity
492
+ * @ENG_END_DOX
493
+ */
494
+ typedef enum
495
+ {
496
+ POSITIVE = 0, /**< @ENG_START_DOX Positive Polarity @ENG_END_DOX */
497
+ NEGATIVE /**< @ENG_START_DOX Negative Polarity @ENG_END_DOX */
498
+ } ADLX_DISPLAY_TIMING_POLARITY;
499
+
500
+ #pragma endregion ADLX_DISPLAY_TIMING_POLARITY
501
+
502
+ #pragma region ADLX_DISPLAY_TIMING_LIMITATION
503
+ /**
504
+ * @enum ADLX_DISPLAY_TIMING_LIMITATION
505
+ * @ingroup enumerations
506
+ * @ENG_START_DOX
507
+ * @brief Display timing limitation
508
+ * @ENG_END_DOX
509
+ */
510
+ typedef enum
511
+ {
512
+ PIXEL_CLOCK_MAX = 650000, /**< @ENG_START_DOX Maximum pixel clock @ENG_END_DOX */
513
+ PIXEL_CLOCK_MIN = 0, /**< @ENG_START_DOX Minimum pixel clock @ENG_END_DOX */
514
+ REFRESH_RATE_MAX = 200, /**< @ENG_START_DOX Maximum refresh rate @ENG_END_DOX */
515
+ REFRESH_RATE_MIN = 1, /**< @ENG_START_DOX Minimum refresh rate @ENG_END_DOX */
516
+ RESOLUTION_MAX = 9999, /**< @ENG_START_DOX Maximum resolution @ENG_END_DOX */
517
+ RESOLUTION_MIN = 1 /**< @ENG_START_DOX Minimum resolution @ENG_END_DOX */
518
+ } ADLX_DISPLAY_TIMING_LIMITATION;
519
+
520
+ #pragma endregion ADLX_DISPLAY_TIMING_LIMITATION
521
+
522
+ #pragma region ADLX_USER_3DLUT_SIZE
523
+ /**
524
+ * @def MAX_USER_3DLUT_NUM_POINTS
525
+ * @ingroup ADLXMacro
526
+ * @ENG_START_DOX Constant value used to set size of user 3D LUT data @ENG_END_DOX
527
+ * @definition
528
+ * @codeStart
529
+ * \#define MAX_USER_3DLUT_NUM_POINTS 17
530
+ * @codeEnd
531
+ */
532
+
533
+ #define MAX_USER_3DLUT_NUM_POINTS 17
534
+
535
+ #pragma endregion ADLX_USER_3DLUT_SIZE
536
+
537
+ #pragma region ADLX_GAMUT_SPACE
538
+ /**
539
+ * @enum ADLX_GAMUT_SPACE
540
+ * @ingroup enumerations
541
+ * @ENG_START_DOX
542
+ * @brief Indicates the predefined gamut space.
543
+ * @ENG_END_DOX
544
+ */
545
+ typedef enum
546
+ {
547
+ GAMUT_SPACE_CCIR_709 = 0, /**< @ENG_START_DOX The predefined gamut space is GAMUT_SPACE_CCIR_709. @ENG_END_DOX */
548
+ GAMUT_SPACE_CCIR_601, /**< @ENG_START_DOX The predefined gamut space is GAMUT_SPACE_CCIR_601. @ENG_END_DOX */
549
+ GAMUT_SPACE_ADOBE_RGB, /**< @ENG_START_DOX The predefined gamut space is GAMUT_SPACE_ADOBE_RGB. @ENG_END_DOX */
550
+ GAMUT_SPACE_CIE_RGB, /**< @ENG_START_DOX The predefined gamut space is GAMUT_SPACE_CIE_RGB. @ENG_END_DOX */
551
+ GAMUT_SPACE_CCIR_2020, /**< @ENG_START_DOX The predefined gamut space is GAMUT_SPACE_CCIR_2020. @ENG_END_DOX */
552
+ GAMUT_SPACE_CUSTOM /**< @ENG_START_DOX The predefined gamut space is GAMUT_SPACE_CUSTOM. @ENG_END_DOX */
553
+ } ADLX_GAMUT_SPACE;
554
+ #pragma endregion ADLX_GAMUT_SPACE
555
+
556
+ #pragma region ADLX_WHITE_POINT
557
+ /**
558
+ * @enum ADLX_WHITE_POINT
559
+ * @ingroup enumerations
560
+ * @ENG_START_DOX
561
+ * @brief Indicates the standardized white point setting.
562
+ * @ENG_END_DOX
563
+ */
564
+ typedef enum
565
+ {
566
+ WHITE_POINT_5000K = 0, /**< @ENG_START_DOX The white point setting is 5000k. @ENG_END_DOX */
567
+ WHITE_POINT_6500K, /**< @ENG_START_DOX The white point setting is 6500k. @ENG_END_DOX */
568
+ WHITE_POINT_7500K, /**< @ENG_START_DOX The white point setting is 7500k. @ENG_END_DOX */
569
+ WHITE_POINT_9300K, /**< @ENG_START_DOX The white point setting is 9300k. @ENG_END_DOX */
570
+ WHITE_POINT_CUSTOM /**< @ENG_START_DOX The white point setting is customized. @ENG_END_DOX */
571
+ } ADLX_WHITE_POINT;
572
+ #pragma endregion ADLX_WHITE_POINT
573
+
574
+ #pragma region ADLX_GAMMA_TYPE
575
+ /**
576
+ * @enum ADLX_GAMMA_TYPE
577
+ * @ingroup enumerations
578
+ * @ENG_START_DOX
579
+ * @brief Indicates the gamma type.
580
+ * @ENG_END_DOX
581
+ */
582
+ typedef enum
583
+ {
584
+ UNKNOW = 0, /**< @ENG_START_DOX The gamma type is unknown. @ENG_END_DOX */
585
+ DEGAMMA_RAMP, /**< @ENG_START_DOX The gamma type is Degamma Ramp way. @ENG_END_DOX */
586
+ REGAMMA_RAMP, /**< @ENG_START_DOX The gamma type is Regamma Ramp way. @ENG_END_DOX */
587
+ DEGAMMA_COEFFICIENTS, /**< @ENG_START_DOX The gamma type is Degamma coefficients way. @ENG_END_DOX */
588
+ REGAMMA_COEFFICIENTS /**< @ENG_START_DOX The gamma type is Regamma coefficients way. @ENG_END_DOX */
589
+ } ADLX_GAMMA_TYPE;
590
+ #pragma endregion ADLX_GAMMA_TYPE
591
+
592
+ #pragma region ADLX_ORIENTATION
593
+ /**
594
+ * @enum ADLX_ORIENTATION
595
+ * @ingroup enumerations
596
+ * @ENG_START_DOX
597
+ * @brief Indicates the orientation.
598
+ * @ENG_END_DOX
599
+ */
600
+ typedef enum
601
+ {
602
+ ORIENTATION_LANDSCAPE = 0, /**< @ENG_START_DOX The orientation is landscape. @ENG_END_DOX */
603
+ ORIENTATION_PORTRAIT = 90, /**< @ENG_START_DOX The orientation is Portrait. @ENG_END_DOX */
604
+ ORIENTATION_LANDSCAPE_FLIPPED = 180, /**< @ENG_START_DOX The orientation is landscape (flipped). @ENG_END_DOX */
605
+ ORIENTATION_PORTRAIT_FLIPPED = 270, /**< @ENG_START_DOX the orientation is Portrait (flipped). @ENG_END_DOX */
606
+ } ADLX_ORIENTATION;
607
+ #pragma endregion ADLX_ORIENTATION
608
+
609
+ #pragma region ADLX_DESKTOP_TYPE
610
+ /**
611
+ * @enum ADLX_DESKTOP_TYPE
612
+ * @ingroup enumerations
613
+ * @ENG_START_DOX
614
+ * @brief Types of desktops in respect to display composition
615
+ * @ENG_END_DOX
616
+ */
617
+ typedef enum {
618
+ DESKTOP_SINGLE = 0, /**< @ENG_START_DOX Single display desktop: one display showing the entire desktop @ENG_END_DOX */
619
+ DESKTOP_DUPLCATE = 1, /**< @ENG_START_DOX Duplicate desktop: two or more displays each show the entire desktop @ENG_END_DOX */
620
+ DESKTOP_EYEFINITY = 2, /**< @ENG_START_DOX AMD Eyefinity desktop: two or more displays each show a portion of the desktop @ENG_END_DOX */
621
+ } ADLX_DESKTOP_TYPE;
622
+ #pragma endregion ADLX_DESKTOP_TYPE
623
+
624
+ #pragma region ADLX_LOG_SEVERITY
625
+ /** @enum ADLX_LOG_SEVERITY
626
+ * @ingroup enumerations
627
+ * @ENG_START_DOX
628
+ * @brief Indicates the severity level for ADLX logs.
629
+ * @ENG_END_DOX
630
+ *
631
+ */
632
+ typedef enum
633
+ {
634
+ LDEBUG = 0, /**< @ENG_START_DOX The log captures errors, warnings and debug information. @ENG_END_DOX */
635
+ LWARNING, /**< @ENG_START_DOX The log captures errors and warnings. @ENG_END_DOX */
636
+ LERROR, /**< @ENG_START_DOX The log captures errors. @ENG_END_DOX */
637
+ } ADLX_LOG_SEVERITY;
638
+ #pragma endregion ADLX_LOG_SEVERITY
639
+
640
+ #pragma region ADLX_LOG_DESTINATION
641
+ /** @enum ADLX_LOG_DESTINATION
642
+ * @ingroup enumerations
643
+ * @ENG_START_DOX
644
+ * @brief Indicates the location of the log traces that are generated from the internal code execution of ADLX.
645
+ * @ENG_END_DOX
646
+ *
647
+ */
648
+ typedef enum
649
+ {
650
+ LOCALFILE = 0, /**< @ENG_START_DOX The log destination is a file. @ENG_END_DOX */
651
+ DBGVIEW, /**< @ENG_START_DOX The log destination is the application debugger. @ENG_END_DOX */
652
+ APPLICATION, /**< @ENG_START_DOX The log destination is the application. @ENG_END_DOX */
653
+ } ADLX_LOG_DESTINATION;
654
+ #pragma endregion ADLX_LOG_DESTINATION
655
+
656
+ #pragma region ADLX_SCALE_MODE
657
+ /** @enum ADLX_SCALE_MODE
658
+ * @ingroup enumerations
659
+ * @ENG_START_DOX
660
+ * @brief Indicates the methods to stretch and position the image to fit on the display.
661
+ * @ENG_END_DOX
662
+ *
663
+ */
664
+ typedef enum
665
+ {
666
+ PRESERVE_ASPECT_RATIO = 0, /**< @ENG_START_DOX The scale mode preserves aspect ratio. @ENG_END_DOX */
667
+ FULL_PANEL, /**< @ENG_START_DOX The scale mode extends to full panel. @ENG_END_DOX */
668
+ CENTERED /**< @ENG_START_DOX The scale mode is centered on screen. @ENG_END_DOX */
669
+ } ADLX_SCALE_MODE;
670
+
671
+ #pragma endregion ADLX_SCALE_MODE
672
+
673
+ #pragma region ADLX_COLOR_DEPTH
674
+ /** @enum ADLX_COLOR_DEPTH
675
+ * @ingroup enumerations
676
+ * @ENG_START_DOX
677
+ * @brief Indicates the color/bit depth, which is the number of bits used to indicate the color of a single pixel.
678
+ * @ENG_END_DOX
679
+ *
680
+ */
681
+ typedef enum
682
+ {
683
+ BPC_UNKNOWN = 0,
684
+ BPC_6, /**< @ENG_START_DOX A color component/pixel with 6 bits @ENG_END_DOX */
685
+ BPC_8, /**< @ENG_START_DOX A color component/pixel with 8 bits @ENG_END_DOX */
686
+ BPC_10, /**< @ENG_START_DOX A color component/pixel with 10 bits @ENG_END_DOX */
687
+ BPC_12, /**< @ENG_START_DOX A color component/pixel with 12 bits @ENG_END_DOX */
688
+ BPC_14, /**< @ENG_START_DOX A color component/pixel with 14 bits @ENG_END_DOX */
689
+ BPC_16 /**< @ENG_START_DOX A color component/pixel with 16 bits @ENG_END_DOX */
690
+ } ADLX_COLOR_DEPTH;
691
+
692
+ #pragma endregion ADLX_COLOR_DEPTH
693
+
694
+ #pragma region ADLX_PIXEL_FORMAT
695
+ /** @enum ADLX_PIXEL_FORMAT
696
+ * @ingroup enumerations
697
+ * @ENG_START_DOX
698
+ * @brief Indicates the pixel format to encode images for the display.
699
+ * @ENG_END_DOX
700
+ *
701
+ */
702
+ typedef enum
703
+ {
704
+ FORMAT_UNKNOWN = 0,/**< @ENG_START_DOX The pixel format is unknown. @ENG_END_DOX */
705
+ RGB_444_FULL, /**< @ENG_START_DOX The pixel format is RGB 4:4:4 PC Standard (Full RGB). @ENG_END_DOX */
706
+ YCBCR_444, /**< @ENG_START_DOX The pixel format is YCbCr 4:4:4. @ENG_END_DOX */
707
+ YCBCR_422, /**< @ENG_START_DOX The pixel format is YCbCr 4:2:2. @ENG_END_DOX */
708
+ RGB_444_LIMITED, /**< @ENG_START_DOX The pixel format is RGB 4:4:4 Studio (Limited RGB). @ENG_END_DOX */
709
+ YCBCR_420 /**< @ENG_START_DOX The pixel format is YCbCr 4:2:0 Pixel Format. @ENG_END_DOX */
710
+ } ADLX_PIXEL_FORMAT;
711
+
712
+ #pragma endregion ADLX_PIXEL_FORMAT
713
+
714
+ #pragma region ADLX_TIMING_STANDARD
715
+
716
+ /** @enum ADLX_TIMING_STANDARD
717
+ * @ingroup enumerations
718
+ * @ENG_START_DOX
719
+ * @brief Timing standard for custom resolution
720
+ * @ENG_END_DOX
721
+ *
722
+ */
723
+ typedef enum
724
+ {
725
+ CVT = 0, /**< @ENG_START_DOX Coordinated Video Timings(CVT) VESA standard for generating and defining the display timings. @ENG_END_DOX */
726
+ CVT_RB, /**< @ENG_START_DOX Coordinated Video Timings-Reduced Blanking(CVT-RB).Reduces horizontal and vertical blanking
727
+ periods and allows a lower pixel clock rate and higher frame rates. @ENG_END_DOX */
728
+ GTF, /**< @ENG_START_DOX Generalized Timing Formula(GTF). A method of generating industry standard display timings. @ENG_END_DOX */
729
+ DMT, /**< @ENG_START_DOX Display Monitor Timmings(DMT). VESA standard that lists pre-defined display timings for various resolutions and display sizes. @ENG_END_DOX */
730
+ MANUAL /**< @ENG_START_DOX Manual control @ENG_END_DOX */
731
+ } ADLX_TIMING_STANDARD;
732
+
733
+ #pragma endregion ADLX_TIMING_STANDARD
734
+
735
+ #pragma region ADLX_WAIT_FOR_VERTICAL_REFRESH_MODE
736
+ /** @enum ADLX_WAIT_FOR_VERTICAL_REFRESH_MODE
737
+ * @ingroup enumerations
738
+ * @ENG_START_DOX
739
+ * @brief Indicates the modes of VSync settings.
740
+ * @ENG_END_DOX
741
+ */
742
+ typedef enum
743
+ {
744
+ WFVR_ALWAYS_OFF = 0, /**< @ENG_START_DOX VSync is always off. @ENG_END_DOX */
745
+ WFVR_OFF_UNLESS_APP_SPECIFIES, /**< @ENG_START_DOX VSync is off, unless specified by the application. @ENG_END_DOX */
746
+ WFVR_ON_UNLESS_APP_SPECIFIES, /**< @ENG_START_DOX VSync is on, unless specified by application. @ENG_END_DOX */
747
+ WFVR_ALWAYS_ON, /**< @ENG_START_DOX VSync is always on. @ENG_END_DOX */
748
+ } ADLX_WAIT_FOR_VERTICAL_REFRESH_MODE;
749
+ #pragma endregion ADLX_WAIT_FOR_VERTICAL_REFRESH_MODE
750
+
751
+ #pragma region ADLX_ANTI_ALIASING_MODE
752
+ /** @enum ADLX_ANTI_ALIASING_MODE
753
+ * @ingroup enumerations
754
+ * @ENG_START_DOX
755
+ * @brief Indicates the anti-aliasing mode.
756
+ * @ENG_END_DOX
757
+ */
758
+ typedef enum
759
+ {
760
+ AA_MODE_USE_APP_SETTINGS = 0, /**< @ENG_START_DOX The anti-aliasing mode uses application settings. @ENG_END_DOX */
761
+ AA_MODE_ENHANCE_APP_SETTINGS, /**< @ENG_START_DOX The anti-aliasing mode enhances the application settings. @ENG_END_DOX */
762
+ AA_MODE_OVERRIDE_APP_SETTINGS, /**< @ENG_START_DOX The anti-aliasing mode overrides the application settings. @ENG_END_DOX */
763
+ } ADLX_ANTI_ALIASING_MODE;
764
+ #pragma endregion ADLX_ANTI_ALIASING_MODE
765
+
766
+ #pragma region ADLX_ANTI_ALIASING_LEVEL
767
+ /** @enum ADLX_ANTI_ALIASING_LEVEL
768
+ * @ingroup enumerations
769
+ * @ENG_START_DOX
770
+ * @brief Indicates the anti-aliasing level.
771
+ * @ENG_END_DOX
772
+ */
773
+ typedef enum
774
+ {
775
+ AA_LEVEL_INVALID = 0, /**< @ENG_START_DOX The anti-aliasing level is invalid. @ENG_END_DOX */
776
+ AA_LEVEL_2X = 2, /**< @ENG_START_DOX The anti-aliasing level is 2X. @ENG_END_DOX */
777
+ AA_LEVEL_2XEQ = 3, /**< @ENG_START_DOX The anti-aliasing level is 2XEQ. @ENG_END_DOX */
778
+ AA_LEVEL_4X = 4, /**< @ENG_START_DOX The anti-aliasing level is 4X. @ENG_END_DOX */
779
+ AA_LEVEL_4XEQ = 5, /**< @ENG_START_DOX The anti-aliasing level is 4XEQ. @ENG_END_DOX */
780
+ AA_LEVEL_8X = 8, /**< @ENG_START_DOX The anti-aliasing level is 8X. @ENG_END_DOX */
781
+ AA_LEVEL_8XEQ = 9, /**< @ENG_START_DOX The anti-aliasing level is 8XEQ. @ENG_END_DOX */
782
+ } ADLX_ANTI_ALIASING_LEVEL;
783
+ #pragma endregion ADLX_ANTI_ALIASING_LEVEL
784
+
785
+ #pragma region ADLX_ANTI_ALIASING_METHOD
786
+ /** @enum ADLX_ANTI_ALIASING_METHOD
787
+ * @ingroup enumerations
788
+ * @ENG_START_DOX
789
+ * @brief Indicates the anti-aliasing method.
790
+ * @ENG_END_DOX
791
+ */
792
+ typedef enum
793
+ {
794
+ AA_METHOD_MULTISAMPLING = 0, /**< @ENG_START_DOX The multi-sampling method. @ENG_END_DOX */
795
+ AA_METHOD_ADAPTIVE_MULTISAMPLING, /**< @ENG_START_DOX The adaptive multi-sampling method. @ENG_END_DOX */
796
+ AA_METHOD_SUPERSAMPLING, /**< @ENG_START_DOX The super-sampling method. @ENG_END_DOX */
797
+ } ADLX_ANTI_ALIASING_METHOD;
798
+ #pragma endregion ADLX_ANTI_ALIASING_METHOD
799
+
800
+ #pragma region ADLX_ANISOTROPIC_FILTERING_LEVEL
801
+ /** @enum ADLX_ANISOTROPIC_FILTERING_LEVEL
802
+ * @ingroup enumerations
803
+ * @ENG_START_DOX
804
+ * @brief Indicates the Anisotropic Filtering level.
805
+ * @ENG_END_DOX
806
+ */
807
+ typedef enum
808
+ {
809
+ AF_LEVEL_INVALID = 0, /**< @ENG_START_DOX The Anisotropic Filtering level is invalid. @ENG_END_DOX */
810
+ AF_LEVEL_X2 = 2, /**< @ENG_START_DOX The Anisotropic Filtering level is 2X. @ENG_END_DOX */
811
+ AF_LEVEL_X4 = 4, /**< @ENG_START_DOX The Anisotropic Filtering level is 4X. @ENG_END_DOX */
812
+ AF_LEVEL_X8 = 8, /**< @ENG_START_DOX The Anisotropic Filtering level is 8X. @ENG_END_DOX */
813
+ AF_LEVEL_X16 = 16, /**< @ENG_START_DOX The Anisotropic Filtering level is 16X. @ENG_END_DOX */
814
+ } ADLX_ANISOTROPIC_FILTERING_LEVEL;
815
+ #pragma endregion ADLX_ANISOTROPIC_FILTERING_LEVEL
816
+
817
+ #pragma region ADLX_TESSELLATION_MODE
818
+ /** @enum ADLX_TESSELLATION_MODE
819
+ * @ingroup enumerations
820
+ * @ENG_START_DOX
821
+ * @brief Indicates the tessellation setting on a GPU.
822
+ * @ENG_END_DOX
823
+ */
824
+ typedef enum
825
+ {
826
+ T_MODE_AMD_OPTIMIZED = 0, /**< @ENG_START_DOX This mode uses AMD optimization. @ENG_END_DOX */
827
+ T_MODE_USE_APP_SETTINGS, /**< @ENG_START_DOX This mode uses application settings. @ENG_END_DOX */
828
+ T_MODE_OVERRIDE_APP_SETTINGS, /**< @ENG_START_DOX This mode uses override application settings. @ENG_END_DOX */
829
+ } ADLX_TESSELLATION_MODE;
830
+ #pragma endregion ADLX_TESSELLATION_MODE
831
+
832
+ #pragma region ADLX_TESSELLATION_LEVEL
833
+ /** @enum ADLX_TESSELLATION_LEVEL
834
+ * @ingroup enumerations
835
+ * @ENG_START_DOX
836
+ * @brief Indicates the tessellation level on a GPU.
837
+ * @ENG_END_DOX
838
+ */
839
+ typedef enum
840
+ {
841
+ T_LEVEL_OFF = 1, /**< @ENG_START_DOX The tessellation level is Off. @ENG_END_DOX */
842
+ T_LEVEL_2X = 2, /**< @ENG_START_DOX The tessellation level is 2X. @ENG_END_DOX */
843
+ T_LEVEL_4X = 4, /**< @ENG_START_DOX The tessellation level is 4X. @ENG_END_DOX */
844
+ T_LEVEL_6X = 6, /**< @ENG_START_DOX The tessellation level is 6X. @ENG_END_DOX */
845
+ T_LEVEL_8X = 8, /**< @ENG_START_DOX The tessellation level is 8X. @ENG_END_DOX */
846
+ T_LEVEL_16X = 16, /**< @ENG_START_DOX The tessellation level is 16X. @ENG_END_DOX */
847
+ T_LEVEL_32X = 32, /**< @ENG_START_DOX The tessellation level is 32X. @ENG_END_DOX */
848
+ T_LEVEL_64X = 64, /**< @ENG_START_DOX The tessellation level is 64X. @ENG_END_DOX */
849
+ } ADLX_TESSELLATION_LEVEL;
850
+ #pragma endregion ADLX_TESSELLATION_LEVEL
851
+
852
+ #pragma region ADLX_MEMORYTIMING_DESCRIPTION
853
+ /**
854
+ * @enum ADLX_MEMORYTIMING_DESCRIPTION
855
+ * @ingroup enumerations
856
+ * @ENG_START_DOX
857
+ * @brief Indicates the memory timing description.
858
+ * @ENG_END_DOX
859
+ */
860
+ typedef enum
861
+ {
862
+ MEMORYTIMING_DEFAULT = 0, /**< @ENG_START_DOX The memory timing is default. @ENG_END_DOX */
863
+ MEMORYTIMING_FAST_TIMING, /**< @ENG_START_DOX The memory timing is fast timing. @ENG_END_DOX */
864
+ MEMORYTIMING_FAST_TIMING_LEVEL_2, /**< @ENG_START_DOX The memory timing is fast timing level 2. @ENG_END_DOX */
865
+ MEMORYTIMING_AUTOMATIC, /**< @ENG_START_DOX The memory timing is automatic. @ENG_END_DOX */
866
+ MEMORYTIMING_MEMORYTIMING_LEVEL_1, /**< @ENG_START_DOX The memory timing is level 1. @ENG_END_DOX */
867
+ MEMORYTIMING_MEMORYTIMING_LEVEL_2, /**< @ENG_START_DOX The memory timing is level 2. @ENG_END_DOX */
868
+ } ADLX_MEMORYTIMING_DESCRIPTION;
869
+ #pragma endregion ADLX_MEMORYTIMING_DESCRIPTION
870
+
871
+
872
+ #pragma region ADLX_I2C_LINE
873
+ /** @enum ADLX_I2C_LINE
874
+ * @ingroup enumerations
875
+ * @ENG_START_DOX
876
+ * @brief Indicates the I2C line options.
877
+ * @ENG_END_DOX
878
+ */
879
+ typedef enum
880
+ {
881
+ I2C_LINE_OEM = 1, /**< @ENG_START_DOX The I2C line is OEM. @ENG_END_DOX */
882
+ I2C_LINE_OD_CONTROL, /**< @ENG_START_DOX The I2C line is Over Driver Control. @ENG_END_DOX */
883
+ I2C_LINE_OEM2, /**< @ENG_START_DOX The I2C line is OEM2. @ENG_END_DOX */
884
+ I2C_LINE_OEM3, /**< @ENG_START_DOX The I2C line is OEM3. @ENG_END_DOX */
885
+ I2C_LINE_OEM4, /**< @ENG_START_DOX The I2C line is OEM4. @ENG_END_DOX */
886
+ I2C_LINE_OEM5, /**< @ENG_START_DOX The I2C line is OEM5. @ENG_END_DOX */
887
+ I2C_LINE_OEM6 /**< @ENG_START_DOX The I2C line is OEM6. @ENG_END_DOX */
888
+ } ADLX_I2C_LINE;
889
+ #pragma endregion ADLX_I2C_LINE
890
+
891
+ #pragma region ADLX_SYNC_ORIGIN
892
+ /** @enum ADLX_SYNC_ORIGIN
893
+ * @ingroup enumerations
894
+ * @ENG_START_DOX
895
+ * @brief Indicates the origin of an event.
896
+ * @ENG_END_DOX
897
+ */
898
+ typedef enum
899
+ {
900
+ SYNC_ORIGIN_UNKNOWN = 1, /**< @ENG_START_DOX The event has an unknown trigger. @ENG_END_DOX */
901
+ SYNC_ORIGIN_INTERNAL, /**< @ENG_START_DOX The event is triggered by a change in settings using ADLX in this application. @ENG_END_DOX */
902
+ SYNC_ORIGIN_EXTERNAL /**< @ENG_START_DOX The event is triggered by a change in settings using ADLX in another application. @ENG_END_DOX */
903
+ } ADLX_SYNC_ORIGIN;
904
+ #pragma endregion ADLX_SYNC_ORIGIN
905
+
906
+ #pragma region ADLX_3DLUT_TRANSFER_FUNCTION
907
+ /** @enum ADLX_3DLUT_TRANSFER_FUNCTION
908
+ * @ingroup enumerations
909
+ * @ENG_START_DOX
910
+ * @brief Indicates the User 3D LUT transfer function.
911
+ * @ENG_END_DOX
912
+ */
913
+ typedef enum
914
+ {
915
+ TF_SRGB = 1, /**< @ENG_START_DOX The transfer function is sRGB. @ENG_END_DOX */
916
+ TF_PQ, /**< @ENG_START_DOX The transfer function is PQ. @ENG_END_DOX */
917
+ TF_G22 /**< @ENG_START_DOX The transfer function is G22. @ENG_END_DOX */
918
+ } ADLX_3DLUT_TRANSFER_FUNCTION;
919
+ #pragma endregion ADLX_3DLUT_TRANSFER_FUNCTION
920
+
921
+ #pragma region ADLX_3DLUT_COLORSPACE
922
+ /** @enum ADLX_3DLUT_COLORSPACE
923
+ * @ingroup enumerations
924
+ * @ENG_START_DOX
925
+ * @brief Indicates the custom 3D LUT color space.
926
+ * @ENG_END_DOX
927
+ */
928
+ typedef enum
929
+ {
930
+ CS_SRGB = 1, /**< @ENG_START_DOX The color space is sRGB. @ENG_END_DOX */
931
+ CS_BT2020, /**< @ENG_START_DOX The color space is BT2020. @ENG_END_DOX */
932
+ CS_DCIP3, /**< @ENG_START_DOX The color space is DCIP3. @ENG_END_DOX */
933
+ CS_NATIVE /**< @ENG_START_DOX The color space is native. @ENG_END_DOX */
934
+ } ADLX_3DLUT_COLORSPACE;
935
+ #pragma endregion ADLX_3DLUT_COLORSPACE
936
+
937
+ #pragma region ADLX_SSM_BIAS_MODE
938
+ /** @enum ADLX_SSM_BIAS_MODE
939
+ * @ingroup enumerations
940
+ * @ENG_START_DOX
941
+ * @brief AMD SmartShift Max bias mode.
942
+ * @ENG_END_DOX
943
+ */
944
+ typedef enum
945
+ {
946
+ SSM_BIAS_AUTO = 0, /**< @ENG_START_DOX The bias control type is auto. @ENG_END_DOX */
947
+ SSM_BIAS_MANUAL /**< @ENG_START_DOX The bias control type is manual. @ENG_END_DOX */
948
+ }ADLX_SSM_BIAS_MODE;
949
+ #pragma endregion ADLX_SSM_BIAS_MODE
950
+
951
+ #pragma region ADLX_SSECO_INACTIVE_REASON
952
+ /** @enum ADLX_SMARTSHIFT_ECO_INACTIVE_REASON
953
+ * @ingroup enumerations
954
+ * @ENG_START_DOX
955
+ * @brief Indicates the type of SmartShift Eco inactive state reason.
956
+ * @ENG_END_DOX
957
+ */
958
+ typedef enum
959
+ {
960
+ INACTIVE_REASON_UNKNOWN = 0, /**< @ENG_START_DOX SmartShift Eco is inactive for an unknown reason. @ENG_END_DOX */
961
+ INACTIVE_REASON_PRIMARY_DISPLAY_CONNECTED_TO_DGPU, /**< @ENG_START_DOX SmartShift Eco is inactive because the DGPU is driving the primary display. @ENG_END_DOX */
962
+ INACTIVE_REASON_DETACHABLE_GPU_CONNECTED, /**< @ENG_START_DOX SmartShift Eco is inactive because a detachable GPU is connected. @ENG_END_DOX */
963
+ INACTIVE_REASON_SESSION_INACTIVE, /**< @ENG_START_DOX SmartShift Eco is inactive because the current Windows user session is inactive. @ENG_END_DOX */
964
+ INACTIVE_REASON_MULTIPLE_SESSION_ACTIVE /**< @ENG_START_DOX SmartShift Eco is inactive because there are multiple active Windows user sessions. @ENG_END_DOX */
965
+ } ADLX_SMARTSHIFT_ECO_INACTIVE_REASON;
966
+ #pragma endregion ADLX_SSECO_INACTIVE_REASON
967
+
968
+ #pragma region ADLX_ANTILAG_STATE
969
+ /**
970
+ * @enum ADLX_ANTILAG_STATE
971
+ * @ingroup enumerations
972
+ * @ENG_START_DOX
973
+ * @brief Indicates the state of Anti Lag.
974
+ * @ENG_END_DOX
975
+ */
976
+ typedef enum
977
+ {
978
+ ANTILAG = 0, /**< @ENG_START_DOX The Antilag level is AntiLag. @ENG_END_DOX */
979
+ ANTILAGNEXT, /**< @ENG_START_DOX The Antilag level is AntiLag Next. @ENG_END_DOX */
980
+ } ADLX_ANTILAG_STATE;
981
+ #pragma endregion ADLX_ANTILAG_STATE
982
+
983
+ #pragma region ADLX_MGPU_MODE
984
+ /**
985
+ * @enum ADLX_MGPU_MODE
986
+ * @ingroup enumerations
987
+ * @ENG_START_DOX
988
+ * @brief Indicates the AMD MGPU mode.
989
+ * @ENG_END_DOX
990
+ */
991
+ typedef enum
992
+ {
993
+ MGPU_NONE = 0, /**< @ENG_START_DOX The GPU is not part of an AMD MGPU configuration. @ENG_END_DOX */
994
+ MGPU_PRIMARY, /**< @ENG_START_DOX The GPU is the primary GPU in an AMD MGPU configuration. @ENG_END_DOX */
995
+ MGPU_SECONDARY, /**< @ENG_START_DOX The GPU is the secondary GPU in an AMD MGPU configuration. @ENG_END_DOX */
996
+ } ADLX_MGPU_MODE;
997
+ #pragma endregion ADLX_MGPU_MODE
998
+
999
+ #pragma region ADLX_APP_GPU_DEPENDENCY
1000
+ /**
1001
+ * @enum ADLX_APP_GPU_DEPENDENCY
1002
+ * @ingroup enumerations
1003
+ * @ENG_START_DOX
1004
+ * @brief Indicates the type of dependence of an application on the GPU on which it runs.
1005
+ * @ENG_END_DOX
1006
+ */
1007
+ typedef enum
1008
+ {
1009
+ APP_GPU_UNKNOWN = 0, /**< @ENG_START_DOX It is unknown if the application is bound to the GPU on which it runs. The application might behave unexpectedly if the GPU is powered off or disabled. @ENG_END_DOX */
1010
+ APP_GPU_BOUND, /**< @ENG_START_DOX The application is bound to the GPU on which it runs and will behave unexpectedly if the GPU is powered off or disabled. @ENG_END_DOX */
1011
+ APP_GPU_NOT_BOUND, /**< @ENG_START_DOX The application is not bound to this GPU on which it runs and will continue to run properly if the GPU is powered off or disabled. @ENG_END_DOX */
1012
+ } ADLX_APP_GPU_DEPENDENCY;
1013
+
1014
+ #pragma endregion ADLX_APP_GPU_DEPENDENCY
1015
+
1016
+ #pragma endregion ADLX data types
1017
+
1018
+ //-------------------------------------------------------------------------------------------------
1019
+ //definitions for IADLXInterface
1020
+ #pragma region ADLX_DECLARE_IID
1021
+ //------------------------------------------------------------------------
1022
+ //IID's
1023
+ #if defined(__cplusplus)
1024
+ #define ADLX_DECLARE_IID(X) static ADLX_INLINE const wchar_t* IID() { return X; }
1025
+ #define ADLX_IS_IID(X, Y) (!wcscmp (X, Y))
1026
+
1027
+ #define ADLX_DECLARE_ITEM_IID(X) static ADLX_INLINE const wchar_t* ITEM_IID() { return X; }
1028
+ #else //__cplusplus
1029
+ #define ADLX_IS_IID(X, Y) (!wcscmp (X, Y))
1030
+ #define ADLX_DECLARE_IID(name,X) static const wchar_t* IID_##name(void) { return X; }
1031
+
1032
+ #define ADLX_DECLARE_ITEM_IID(name,X) static const wchar_t* ITEM_IID_##name(void) { return X; }
1033
+ #endif //__cplusplus
1034
+ #pragma endregion ADLX_DECLARE_IID
1035
+
1036
+ //------------------------------------------------------------------------
1037
+ //All ref-counted interfaces derive from this interface
1038
+ #pragma region IADLXInterface
1039
+ #if defined (__cplusplus)
1040
+ namespace adlx
1041
+ {
1042
+ class ADLX_NO_VTABLE IADLXInterface
1043
+ {
1044
+ public:
1045
+ ADLX_DECLARE_IID (L"IADLXInterface")
1046
+ /**
1047
+ * @page DOX_IADLXInterface_Acquire Acquire
1048
+ * @ENG_START_DOX
1049
+ * @brief Increments the reference count for an ADLX interface.
1050
+ * @ENG_END_DOX
1051
+ * @syntax
1052
+ * @codeStart
1053
+ * adlx_long Acquire ()
1054
+ * @codeEnd
1055
+ *
1056
+ * @params
1057
+ * N/A
1058
+ *
1059
+ * @retvalues
1060
+ * @ENG_START_DOX
1061
+ * Returns the new reference count.
1062
+ * @ENG_END_DOX
1063
+ *
1064
+ * @detaileddesc
1065
+ * @ENG_START_DOX
1066
+ * @details __Acquire__ must be used when a copy of the interface pointer is needed.<br>
1067
+ * @ENG_END_DOX
1068
+ *
1069
+ * @addinfo
1070
+ * @ENG_START_DOX
1071
+ * In C++, when using ADLX interfaces as smart pointers, there is no need to call the __Acquire__ because smart pointers call it in their internal implementation.
1072
+ * @ENG_END_DOX
1073
+ *
1074
+ * @requirements
1075
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
1076
+ *
1077
+ */
1078
+ virtual adlx_long ADLX_STD_CALL Acquire () = 0;
1079
+ /**
1080
+ * @page DOX_IADLXInterface_Release Release
1081
+ * @ENG_START_DOX
1082
+ * @brief Decrements the reference count for an ADLX interface.
1083
+ * @ENG_END_DOX
1084
+ *
1085
+ * @syntax
1086
+ * @codeStart
1087
+ * adlx_long Release ()
1088
+ * @codeEnd
1089
+ *
1090
+ * @params
1091
+ * N/A
1092
+ *
1093
+ * @retvalues
1094
+ * @ENG_START_DOX
1095
+ * Returns the new reference count.
1096
+ * @ENG_END_DOX
1097
+ *
1098
+ * @detaileddesc
1099
+ * @ENG_START_DOX
1100
+ * @details __Release__ must be called when an interface is no longer needed. It decrements the reference counting and returns the new reference count. When the reference count reaches zero, the object behind this interface will self-destruct and free its memory and resources.
1101
+ * @ENG_END_DOX
1102
+ *
1103
+ * @addinfo
1104
+ * @ENG_START_DOX
1105
+ * In C++, when using ADLX interfaces as smart pointers, there is no need to call the __Release__ because smart pointers call it in their internal implementation.
1106
+ * @ENG_END_DOX
1107
+ *
1108
+ * @requirements
1109
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
1110
+ *
1111
+ */
1112
+ virtual adlx_long ADLX_STD_CALL Release () = 0;
1113
+
1114
+ /**
1115
+ * @page DOX_IADLXInterface_QueryInterface QueryInterface
1116
+ * @ENG_START_DOX
1117
+ * @brief Retrieves reference counted interfaces to an object.
1118
+ * @ENG_END_DOX
1119
+ *
1120
+ * @syntax
1121
+ * @codeStart
1122
+ * @ref ADLX_RESULT QueryInterface (const wchar_t* interfaceId, void** ppInterface)
1123
+ * @codeEnd
1124
+ *
1125
+ * @params
1126
+ * @paramrow{1.,[in] ,interfaceId,const wchar_t*,@ENG_START_DOX The identifier of the interface being requested. @ENG_END_DOX}
1127
+ * @paramrow{2.,[out],ppInterface,void**,@ENG_START_DOX The address of a pointer to the returned interface. If the interface is not successfully returned\, the method sets the dereferenced address __*ppInterface__ to __nullptr__. @ENG_END_DOX}
1128
+ *
1129
+ *
1130
+ * @retvalues
1131
+ * @ENG_START_DOX
1132
+ * If __QueryInterface__ is successfully called, __ADLX_OK__ is returned. <br>
1133
+ * If the requested interface is not supported, __ADLX_UNKNOWN_INTERFACE__ is returned. <br>
1134
+ * If the __*ppInterface__ parameter is __nullptr__, __ADLX_INVALID_ARGS__ is returned. <br>
1135
+ * If __QueryInterface__ is not successfully called, an error code is returned. <br>
1136
+ * Refer @ref ADLX_RESULT for success codes and error codes.
1137
+ * @ENG_END_DOX
1138
+ *
1139
+ * @detaileddesc
1140
+ * @ENG_START_DOX
1141
+ * @details To ensure ADLX SDK backwards and forward compatibility the ADLX interfaces are locked, they do not change in subsequent versions of the driver. When an ADLX interface needs another functionality, an extension interface is provided. The extension interface is obtained from the initial interface using __QueryInterface__. The documentation for the extension interface shows how to obtain it.<br>
1142
+ * The returned interface must be discarded with @ref DOX_IADLXInterface_Release when no longer needed.
1143
+ * @ENG_END_DOX
1144
+ *
1145
+ * @addinfo
1146
+ * @ENG_START_DOX
1147
+ * In C++ when using a smart pointer for the returned interface there is no need to call __QueryInterface__ and @ref DOX_IADLXInterface_Release because the smart pointer calls them internally.
1148
+ * @ENG_END_DOX
1149
+ *
1150
+ * @requirements
1151
+ * @DetailsTable{#include "ADLXDefines.h", @ADLX_First_Ver}
1152
+ *
1153
+ */
1154
+ virtual ADLX_RESULT ADLX_STD_CALL QueryInterface (const wchar_t* interfaceId, void** ppInterface) = 0;
1155
+ }; //IADLXInterface
1156
+ } // namespace adlx
1157
+ //----------------------------------------------------------------------------------------------
1158
+ #else //__cplusplus
1159
+ ADLX_DECLARE_IID (IADLXInterface, L"IADLXInterface")
1160
+ typedef struct IADLXInterface IADLXInterface;
1161
+
1162
+ typedef struct IADLXInterfaceVtbl
1163
+ {
1164
+ // IADLXInterface interface
1165
+ adlx_long (ADLX_STD_CALL *Acquire)(IADLXInterface* pThis);
1166
+ adlx_long (ADLX_STD_CALL *Release)(IADLXInterface* pThis);
1167
+ ADLX_RESULT (ADLX_STD_CALL *QueryInterface)(IADLXInterface* pThis, const wchar_t* interfaceId, void** ppInterface);
1168
+ } IADLXInterfaceVtbl;
1169
+
1170
+ struct IADLXInterface
1171
+ {
1172
+ const IADLXInterfaceVtbl *pVtbl;
1173
+ };
1174
+
1175
+ #endif //__cplusplus
1176
+ #pragma endregion IADLXInterface
1177
+
1178
+ //------------------------------------------------------------------------
1179
+ //Template for ADLX smart pointer for interfaces derived from IADLXInterface
1180
+ #pragma region IADLXInterfacePtr
1181
+ #if defined(__cplusplus)
1182
+ namespace adlx
1183
+ {
1184
+ template<class _Interf>
1185
+ class IADLXInterfacePtr_T
1186
+ {
1187
+ private:
1188
+ _Interf* m_pInterf;
1189
+
1190
+ void InternalAcquire ()
1191
+ {
1192
+ if (m_pInterf != nullptr)
1193
+ {
1194
+ m_pInterf->Acquire ();
1195
+ }
1196
+ }
1197
+ void InternalRelease ()
1198
+ {
1199
+ if (m_pInterf != nullptr)
1200
+ {
1201
+ m_pInterf->Release ();
1202
+ }
1203
+ }
1204
+ public:
1205
+ IADLXInterfacePtr_T () : m_pInterf (nullptr)
1206
+ {}
1207
+
1208
+ IADLXInterfacePtr_T (const IADLXInterfacePtr_T<_Interf>& p) : m_pInterf (p.m_pInterf)
1209
+ {
1210
+ InternalAcquire ();
1211
+ }
1212
+
1213
+ IADLXInterfacePtr_T (_Interf* pInterface) : m_pInterf (pInterface)
1214
+ {
1215
+ InternalAcquire ();
1216
+ }
1217
+
1218
+ template<class _OtherInterf>
1219
+ explicit IADLXInterfacePtr_T (const IADLXInterfacePtr_T<_OtherInterf>& cp) : m_pInterf (nullptr)
1220
+ {
1221
+ void* pInterf = nullptr;
1222
+ if ((cp == NULL) || (cp->QueryInterface (_Interf::IID (), &pInterf) != ADLX_OK))
1223
+ {
1224
+ pInterf = nullptr;
1225
+ }
1226
+ m_pInterf = static_cast<_Interf*>(pInterf);
1227
+ }
1228
+
1229
+ template<class _OtherInterf>
1230
+ explicit IADLXInterfacePtr_T (_OtherInterf* cp) : m_pInterf (nullptr)
1231
+ {
1232
+ void* pInterf = nullptr;
1233
+ if ((cp == nullptr) || (cp->QueryInterface (_Interf::IID (), &pInterf) != ADLX_OK))
1234
+ {
1235
+ pInterf = nullptr;
1236
+ }
1237
+ m_pInterf = static_cast<_Interf*>(pInterf);
1238
+ }
1239
+
1240
+ ~IADLXInterfacePtr_T ()
1241
+ {
1242
+ InternalRelease ();
1243
+ }
1244
+
1245
+ IADLXInterfacePtr_T& operator=(_Interf* pInterface)
1246
+ {
1247
+ if (m_pInterf != pInterface)
1248
+ {
1249
+ _Interf* pOldInterface = m_pInterf;
1250
+ m_pInterf = pInterface;
1251
+ InternalAcquire ();
1252
+ if (pOldInterface != nullptr)
1253
+ {
1254
+ pOldInterface->Release ();
1255
+ }
1256
+ }
1257
+ return *this;
1258
+ }
1259
+
1260
+ IADLXInterfacePtr_T& operator=(const IADLXInterfacePtr_T<_Interf>& cp)
1261
+ {
1262
+ return operator=(cp.m_pInterf);
1263
+ }
1264
+
1265
+ void Attach (_Interf* pInterface)
1266
+ {
1267
+ InternalRelease ();
1268
+ m_pInterf = pInterface;
1269
+ }
1270
+
1271
+ _Interf* Detach ()
1272
+ {
1273
+ _Interf* const pOld = m_pInterf;
1274
+ m_pInterf = NULL;
1275
+ return pOld;
1276
+ }
1277
+ void Release ()
1278
+ {
1279
+ InternalRelease ();
1280
+ m_pInterf = NULL;
1281
+ }
1282
+
1283
+ operator _Interf*() const
1284
+ {
1285
+ return m_pInterf;
1286
+ }
1287
+
1288
+ _Interf& operator*() const
1289
+ {
1290
+ return *m_pInterf;
1291
+ }
1292
+
1293
+ // Returns the address of the interface pointer contained in this
1294
+ // class. This is required for initializing from C-style factory function to
1295
+ // avoid getting an incorrect ref count at the beginning.
1296
+
1297
+ _Interf** operator&()
1298
+ {
1299
+ InternalRelease ();
1300
+ m_pInterf = 0;
1301
+ return &m_pInterf;
1302
+ }
1303
+
1304
+ _Interf* operator->() const
1305
+ {
1306
+ return m_pInterf;
1307
+ }
1308
+
1309
+ bool operator==(const IADLXInterfacePtr_T<_Interf>& p)
1310
+ {
1311
+ return (m_pInterf == p.m_pInterf);
1312
+ }
1313
+
1314
+ bool operator==(_Interf* p)
1315
+ {
1316
+ return (m_pInterf == p);
1317
+ }
1318
+
1319
+ bool operator!=(const IADLXInterfacePtr_T<_Interf>& p)
1320
+ {
1321
+ return !(operator==(p));
1322
+ }
1323
+ bool operator!=(_Interf* p)
1324
+ {
1325
+ return !(operator==(p));
1326
+ }
1327
+
1328
+ _Interf* GetPtr ()
1329
+ {
1330
+ return m_pInterf;
1331
+ }
1332
+
1333
+ const _Interf* GetPtr () const
1334
+ {
1335
+ return m_pInterf;
1336
+ }
1337
+ }; //IADLXInterfacePtr_T
1338
+
1339
+ typedef IADLXInterfacePtr_T<IADLXInterface> IADLXInterfacePtr;
1340
+
1341
+ } // namespace adlx
1342
+ #endif //__cplusplus
1343
+ #pragma endregion IADLXInterfacePtr
1344
+
1345
+ #endif //ADLX_DEFINES_H