📄 nvpanelapi.h
字号:
// NVDISPLAYINFO.dwInputFields2 and .dwOutputFields2 bitfields
#define NVDISPLAYINFO2_ALL 0xffffffff // special: all fields valid
#define NVDISPLAYINFO2_PRODUCTNAME 0x00000001 // szProductName valid
#define NVDISPLAYINFO2_DVIOVERHDTV 0x00000002 // bDVIOverHDTV valid
#define NVDISPLAYINFO2_CONNECTEDMONIKER 0x00000004 // szConnectedMoniker valid
#define NVDISPLAYINFO2_ACTIVEMONIKER 0x00000008 // szActiveMoniker valid
#define NVDISPLAYINFO2_SLIENABLED 0x00000010 // bSLIEnabled valid - SLI is turned on/active
#define NVDISPLAYINFO2_SLICONNECTOR 0x00000020 // bSLIConnector valid - SLI connector exists
#define NVDISPLAYINFO2_SLICAPABLE 0x00000040 // bSLICapable valid - SLI can be enabled for this display
#define NVDISPLAYINFO2_CUSTOMNAME 0x00000080 // szCustomName valid
// Display Information Parameter Block
typedef struct tagNVDISPLAYINFO
{
DWORD cbSize; // Size of the NVDISPLAYINFO structure (in bytes),
// set this field to sizeof(NVDISPLAYINFO) to indicate version level of structure
DWORD dwInputFields1; // Specifies which members of structure should be used on input to function (see NVDISPLAYINFO1_*)
DWORD dwOutputFields1; // Specifies which members of structure were processed as result of the call
DWORD dwInputFields2; // Specifies which members of structure should be used on input to function (see NVDISPLAYINFO2_*)
DWORD dwOutputFields2; // Specifies which members of structure were processed as result of the call
char szWindowsDeviceName[MAX_PATH]; // Device name for use with CreateDC (for example: ".\\DISPLAY1")
char szAdapterName[MAX_NVDISPLAYNAME]; // User friendly name for the associated NVIDIA graphics card (for example: GeForce FX 5200 Ultra)
char szDriverVersion[64]; // Display driver version string for device (for example: "6.14.10.6003")
NVDISPLAYMODE nDisplayMode; // Display mode for head on adapter (for example: Clone, HSpan, DualView)
DWORD dwWindowsMonitorNumber; // Windows monitor number for adapter (numbers listed in Microsoft Display Panel)
int nDisplayHeadIndex; // Head index for display on adapter
BOOL bDisplayIsPrimary; // TRUE if display head is primary on adapter
char szDisplayName[MAX_NVDISPLAYNAME]; // User friendly name for the display device, may reflect user overrides (for example: "EIZO L685")
char szVendorName[MAX_NVDISPLAYNAME]; // Vendor name for display device if available (for example: "EIZO")
char szModelName[MAX_NVDISPLAYNAME]; // Model name for display device if available (for example: "EIZ1728")
char szGenericName[MAX_NVDISPLAYNAME]; // Generic name for display device type (for example: "Digital Display")
DWORD dwUniqueId; // Unique identifier for display device, including serial number, zero if not available
NVDISPLAYTYPE nDisplayType; // Type of the display device (for example: CRT, DFP, or TV)
DWORD mmDisplayWidth; // Width of maximum visible display surface or zero if unknown (in millimeters)
DWORD mmDisplayHeight; // Height of maximum visible display surface or zero if unknown (in millimeters)
float fGammaCharacteristic; // Gamma transfer characteristic for monitor (for example: 2.2)
DWORD dwOptimalPelsWidth; // Width of display surface in optimal display mode (not necessarily highest resolution)
DWORD dwOptimalPelsHeight; // Height of display surface in optimal display mode (not necessarily highest resolution)
DWORD dwOptimalDisplayFrequency; // Refresh frequency in optimal display mode (not necessarily highest resolution)
DWORD dwMaximumSafePelsWidth; // Width of display surface in maximum safe display mode (not necessarily highest resolution)
DWORD dwMaximumSafePelsHeight; // Height of display surface in maximum safe display mode (not necessarily highest resolution)
DWORD dwMaximumSafeDisplayFrequency; // Refresh frequency in maximum safe display mode (not necessarily highest resolution)
DWORD dwBitsPerPel; // Color resolution of the display device (for example: 8 bits for 256 colors)
DWORD dwPelsWidth; // Width of the available display surface, including any pannable area (in pixels)
DWORD dwPelsHeight; // Height of the available display surface, including any pannable area (in pixels)
DWORD dwDisplayFrequency; // Refresh frequency of the display device (in hertz)
RECT rcDisplayRect; // Desktop rectangle for display surface (considers DualView and head offset)
DWORD dwVisiblePelsWidth; // Width of the visible display surface, excluding any pannable area (in pixels)
DWORD dwVisiblePelsHeight; // Height of the visible display surface, excluding any pannable area (in pixels)
DWORD dwDegreesRotation; // Rotation angle of display surface (in degrees)
NVTVFORMAT nTvFormat; // Television video signal format (for example: NTSC/M or HDTV 1080i)
NVDFPSCALING nDfpScaling; // Digital Flat Panel scaling mode (for example: Monitor Native)
DWORD dwTVConnectorTypes; // Television connectors (NVTVCONNECTOR_* bitmask)
DWORD dwCurrentConnectorType; // Television active connector (NVTVCONNECTOR_* bitmask)
DWORD dwBoardType; // Type of graphics board (NVBOARDTYPE_* enumeration)
DWORD dwDisplayInstance; // Display instance number (instance of szDisplayName) or zero if indeterminant
DWORD dwDisplayInstanceCount; // Display instance count (instances of szDisplayName) or zero if indeterminant
char szProductName[MAX_NVDISPLAYNAME]; // Product name for display device if available, bypasses user customization of szDisplayName (for example: "EIZO L685")
BOOL bDVIOverHDTV; // DVI over HDTV video for digital display
char szConnectedMoniker[MAX_NVMONIKER];// Device moniker for display based on physically connected devices (empty if not connected)
char szActiveMoniker[MAX_NVMONIKER]; // Device moniker for display based on active display outputs (e.g. those attached to desktop, empty if not attached)
BOOL bSLIEnabled; // SLI is turned on and active
BOOL bSLIConnector; // SLI connector exists
BOOL bSLICapable; // SLI can be enabled for this display
char szCustomName[MAX_NVDISPLAYNAME]; // Custom name for display device type if available (for example: "Dell Monitor on Left")
} NVDISPLAYINFO;
BOOL NVAPIENTRY NvGetDisplayInfo( IN LPCSTR pszUserDisplay, OUT NVDISPLAYINFO* pDisplayInfo );
typedef BOOL (NVAPIENTRY* fNvGetDisplayInfo)( IN LPCSTR pszUserDisplay, OUT NVDISPLAYINFO* pDisplayInfo );
//---------------------------------------------------------------------
// Display Name Functions
//---------------------------------------------------------------------
NVRESULT NVAPIENTRY NvGetDisplayCustomName( IN LPCSTR pszUserDisplay, OUT LPSTR pszTextBuffer, IN DWORD cbTextBuffer );
typedef NVRESULT (NVAPIENTRY* fNvGetDisplayCustomName)( IN LPCSTR pszUserDisplay, OUT LPSTR pszTextBuffer, IN DWORD cbTextBuffer );
NVRESULT NVAPIENTRY NvSetDisplayCustomName( IN LPCSTR pszUserDisplay, IN LPCSTR pszTextBuffer );
typedef NVRESULT (NVAPIENTRY* fNvSetDisplayCustomName)( IN LPCSTR pszUserDisplay, IN LPCSTR pszTextBuffer );
//---------------------------------------------------------------------
// Display Mode Functions
//---------------------------------------------------------------------
#define EDS_ALLMODES 0xffff // Flag to enumeration functions that disables mode filtering against adapter or display capabilities
NVRESULT NVAPIENTRY NvEnumDisplaySettings( IN LPCSTR pszUserDisplay, IN NVDISPLAYMODE displayMode, IN DWORD dwDevModeSize, OUT DEVMODE* pDevModes, IN OUT DWORD* pdwNumDevModes, IN DWORD dwFlags );
typedef NVRESULT (NVAPIENTRY* fNvEnumDisplaySettings)( IN LPCSTR pszUserDisplay, IN NVDISPLAYMODE displayMode, IN DWORD dwDevModeSize, OUT DEVMODE* pDevModes, IN OUT DWORD* pdwNumDevModes, IN DWORD dwFlags );
NVRESULT NVAPIENTRY NvGetLastDisplaySettings( IN LPCSTR pszUserDisplay, IN NVDISPLAYMODE displayMode, OUT DEVMODE* pDevMode, IN DWORD dwFlags );
typedef NVRESULT (NVAPIENTRY* fNvGetLastDisplaySettings)( IN LPCSTR pszUserDisplay, IN NVDISPLAYMODE displayMode, OUT DEVMODE* pDevMode, IN DWORD dwFlags );
NVRESULT NVAPIENTRY NvGetDefaultDisplaySettings( IN LPCSTR pszUserDisplay, IN NVDISPLAYMODE displayMode, OUT DEVMODE* pDevMode, IN DWORD dwFlags );
typedef NVRESULT (NVAPIENTRY* fNvGetDefaultDisplaySettings)( IN LPCSTR pszUserDisplay, IN NVDISPLAYMODE displayMode, OUT DEVMODE* pDevMode, IN DWORD dwFlags );
//---------------------------------------------------------------------
// Physical Connector Information Functions (requires special NV4X+ BIOS)
//---------------------------------------------------------------------
// Physical Connector Layout
typedef enum NVCONNECTORLAYOUT
{
NVCONNECTORLAYOUT_UNKNOWN = 0, // Unknown connector layout
NVCONNECTORLAYOUT_CARD_SINGLESLOT = 1, // Single slot add-in card
NVCONNECTORLAYOUT_CARD_DOUBLESLOT = 2, // Double slot add-in card, used for tall fan sinks and daughtercards
NVCONNECTORLAYOUT_CARD_MOBILE_MXM = 3, // Mobile add-in card conforming to the MXM module standard
NVCONNECTORLAYOUT_CARD_MOBILE_OEM = 4, // Mobile add-in card for OEMs, typically used to add LVDS-SPWG connectors
NVCONNECTORLAYOUT_MOBILE_BACK = 5, // Mobile system with all displays on back of system
NVCONNECTORLAYOUT_MOBILE_BACK_LEFT = 6, // Mobile system with all displays on back and left of system
NVCONNECTORLAYOUT_MOBILE_BACK_DOCK = 7, // Mobile system with all displays on back of system or on the docking station
NVCONNECTORLAYOUT_NFORCE_STANDARD = 8, // System with standard nForce connector layout
} NVCONNECTORLAYOUT;
// Physical Connector Type
typedef enum NVCONNECTORTYPE
{
NVCONNECTORTYPE_UNKNOWN = 0, // Unknown connector type
NVCONNECTORTYPE_UNCLASSIFIED_ANALOG = 1, // Unclassifiable Analog connector
NVCONNECTORTYPE_UNCLASSIFIED_DIGITAL = 2, // Unclassifiable Digital connector
NVCONNECTORTYPE_UNCLASSIFIED_TV = 3, // Unclassifiable TV connector
NVCONNECTORTYPE_UNCLASSIFIED_LVDS = 4, // Unclassifiable LVDS connector (as in laptop panels)
NVCONNECTORTYPE_VGA = 5, // VGA 15-pin connector
NVCONNECTORTYPE_DVI_A = 6, // DVI-A - DVI Analog
NVCONNECTORTYPE_DVI_D = 7, // DVI-D - DVI Digital
NVCONNECTORTYPE_DVI_I = 8, // DVI-I - DVI Integrated
NVCONNECTORTYPE_DVI_I_TV_SVIDEO = 9, // DVI-I-TV S-Video
NVCONNECTORTYPE_DVI_I_TV_COMPOSITE = 10, // DVI-I-TV Composite
NVCONNECTORTYPE_DVI_I_TV_SVIDEO_BREAKOUT_COMPOSITE = 11, // DVI-I-TV S-Video Breakout (Composite)
NVCONNECTORTYPE_LFH_DVI_I_1 = 12, // LFH-DVI-I-1 - 60-pin LFH connector (as in Quadro NVS series)
NVCONNECTORTYPE_LFH_DVI_I_2 = 13, // LFH-DVI-I-2 - 60-pin LFH connector
NVCONNECTORTYPE_LVDS_SPWG = 14, // LVDS-SPWG - Low Voltage Differential Signaling (as in laptop panels)
NVCONNECTORTYPE_LVDS_OEM = 15, // LVDS-OEM - Low Voltage Differential Signaling
NVCONNECTORTYPE_TMDS_OEM = 16, // TMDS-OEM - Transition Minimized Differential Signaling
NVCONNECTORTYPE_ADC = 17, // Apple Display Connector (ADC)
NVCONNECTORTYPE_TV_COMPOSITE = 18, // TV - Composite Out
NVCONNECTORTYPE_TV_SVIDEO = 19, // TV - S-Video Out
NVCONNECTORTYPE_TV_SVIDEO_BREAKOUT_COMPOSITE = 20, // TV - S-Video Breakout (Composite)
NVCONNECTORTYPE_TV_SCART = 21, // TV - SCART D-Connector
NVCONNECTORTYPE_PC_YPRPB = 22, // Personal Cinema - YPrPb
NVCONNECTORTYPE_PC_SVIDEO = 23, // Personal Cinema - S-Video
NVCONNECTORTYPE_PC_COMPOSITE = 24, // Personal Cinema - Composite
NVCONNECTORTYPE_STEREO = 25, // 3-Pin DIN Stereo Connector
} NVCONNECTORTYPE;
// Physical Connector Flags
#define NVCONNECTORFLAG_REMOVEABLE 0x00000001 // Connector supports removeable devices (an example of a fixed connector is an internal laptop display)
#define NVCONNECTORFLAG_DIGITAL 0x00000002 // Connector supports digital displays (ex. DFPs)
#define NVCONNECTORFLAG_ANALOG 0x00000004 // Connector supports analog displays (ex. CRTs)
#define NVCONNECTORFLAG_TV 0x00000008 // Connector supports TV sets
#define NVCONNECTORFLAG_HDTV 0x00000010 // Connector supports HDTV sets
// Physical Connector Information
typedef struct NVCONNECTORINFO
{
DWORD cbSize; // Size of the NVCONNECTORINFO structure in bytes (on input)
NVCONNECTORLAYOUT nConnectorLayout; // Connector layout
DWORD dwConnectorCount; // Number of connectors on card
} NVCONNECTORINFO;
// Physical Connector Details
typedef struct tagNVCONNECTORDETAIL
{
DWORD cbSize; // Size of the NVCONNECTORDETAIL structure in bytes (on input)
NVCONNECTORTYPE nConnectorType; // Connector type
DWORD dwConnectorLocation; // Connector location (for add-in cards zero means the
// connector furthest from the motherboard)
DWORD dwFlags; // Connector flags (see NVCONNECTORFLAG_* definitions)
} NVCONNECTORDETAIL;
NVRESULT NVAPIENTRY NvGetPhysicalConnectorInfo( IN UINT nWindowsMonitorNumber, OUT NVCONNECTORINFO* pConnectorInfo );
typedef NVRESULT (NVAPIENTRY* fNvGetPhysicalConnectorInfo)( IN UINT nWindowsMonitorNumber, OUT NVCONNECTORINFO* pConnectorInfo );
NVRESULT NVAPIENTRY NvEnumPhysicalConnectorDetails( IN UINT nWindowsMonitorNumber, IN DWORD dwConnectorIndex, OUT NVCONNECTORDETAIL* pConnectorDetail );
typedef NVRESULT (NVAPIENTRY* fNvEnumPhysicalConnectorDetails)( IN UINT nWindowsMonitorNumber, IN DWORD dwConnectorIndex, OUT NVCONNECTORDETAIL* pConnectorDetail );
//---------------------------------------------------------------------
// Desktop Configuration Functions
//---------------------------------------------------------------------
DWORD NVAPIENTRY dtcfgex( IN OUT LPSTR lpszCmdLine );
typedef DWORD (NVAPIENTRY* fdtcfgex)( IN OUT LPSTR lpszCmdLine );
DWORD NVAPIENTRY GetdtcfgLastError();
typedef DWORD (NVAPIENTRY* fGetdtcfgLastError)();
DWORD NVAPIENTRY GetdtcfgLastErrorEx( IN OUT LPSTR lpszCmdLine, IN OUT DWORD *pdwCmdLineSize );
typedef DWORD (NVAPIENTRY* fGetdtcfgLastErrorEx)( IN OUT LPSTR lpszCmdLine, IN OUT DWORD *pdwCmdLineSize );
//---------------------------------------------------------------------
// Gamma Ramp Functions
//---------------------------------------------------------------------
typedef enum NVCOLORAPPLY
{
NVCOLORAPPLY_DESKTOP, // Apply color settings to Desktop
NVCOLORAPPLY_OVERLAYVMR, // Apply color settings to Overlay/Video Mirroring
NVCOLORAPPLY_FULLSCREENVIDEO, // Apply color settings to Fullscreen Video
NVCOLORAPPLY_COUNT // Number of apply color settings targets
} NVCOLORAPPLY;
BOOL NVAPIENTRY NvColorGetGammaRampEx( IN LPCSTR pszUserDisplay, OUT GAMMARAMP* pGammaRamp, IN NVCOLORAPPLY applyFrom );
typedef BOOL (NVAPIENTRY* fNvColorGetGammaRampEx)( IN LPCSTR pszUserDisplay, OUT GAMMARAMP* pGammaRamp, IN NVCOLORAPPLY applyFrom );
BOOL NVAPIENTRY NvColorSetGammaRampEx( IN LPCSTR pszUserDisplay, IN const GAMMARAMP* pGammaRamp, IN NVCOLORAPPLY applyTo );
typedef BOOL (NVAPIENTRY* fNvColorSetGammaRampEx)( IN LPCSTR pszUserDisplay, IN const GAMMARAMP* pGammaRamp, IN NVCOLORAPPLY applyTo );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -