' ########################################################################################
' Microsoft Windows
' File: HighLevelMonitorConfigurationAPI.inc (Windows Vista)
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_highlevelmonitorconfigurationapi_PBI)
#DEFINE PBX_highlevelmonitorconfigurationapi_PBI
%EQUATE `HIGHLEVELMONITORCONFIGURATIONAPI_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
#INCLUDE ONCE "Legacy/System/physicalmonitorenumerationapi.inc"
'#pragma pack( push, 1 )
'/******************************************************************************
' Flags
'******************************************************************************/
%EQUATE `MC_CAPS_NONE = &H00000000
%EQUATE `MC_CAPS_MONITOR_TECHNOLOGY_TYPE = &H00000001
%EQUATE `MC_CAPS_BRIGHTNESS = &H00000002
%EQUATE `MC_CAPS_CONTRAST = &H00000004
%EQUATE `MC_CAPS_COLOR_TEMPERATURE = &H00000008
%EQUATE `MC_CAPS_RED_GREEN_BLUE_GAIN = &H00000010
%EQUATE `MC_CAPS_RED_GREEN_BLUE_DRIVE = &H00000020
%EQUATE `MC_CAPS_DEGAUSS = &H00000040
%EQUATE `MC_CAPS_DISPLAY_AREA_POSITION = &H00000080
%EQUATE `MC_CAPS_DISPLAY_AREA_SIZE = &H00000100
%EQUATE `MC_CAPS_RESTORE_FACTORY_DEFAULTS = &H00000400
%EQUATE `MC_CAPS_RESTORE_FACTORY_COLOR_DEFAULTS = &H00000800
%EQUATE `MC_RESTORE_FACTORY_DEFAULTS_ENABLES_MONITOR_SETTINGS = &H00001000
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_NONE = &H00000000
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_4000K = &H00000001
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_5000K = &H00000002
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_6500K = &H00000004
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_7500K = &H00000008
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_8200K = &H00000010
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_9300K = &H00000020
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_10000K = &H00000040
%EQUATE `MC_SUPPORTED_COLOR_TEMPERATURE_11500K = &H00000080
'/******************************************************************************
' Enumerations
'******************************************************************************/
' enum _MC_DISPLAY_TECHNOLOGY_TYPE
%EQUATE `MC_SHADOW_MASK_CATHODE_RAY_TUBE = 0
%EQUATE `MC_APERTURE_GRILL_CATHODE_RAY_TUBE = 1
%EQUATE `MC_THIN_FILM_TRANSISTOR = 2
%EQUATE `MC_LIQUID_CRYSTAL_ON_SILICON = 3
%EQUATE `MC_PLASMA = 4
%EQUATE `MC_ORGANIC_LIGHT_EMITTING_DIODE = 5
%EQUATE `MC_ELECTROLUMINESCENT = 6
%EQUATE `MC_MICROELECTROMECHANICAL = 7
%EQUATE `MC_FIELD_EMISSION_DEVICE = 8
' enum _MC_DRIVE_TYPE
%EQUATE `MC_RED_DRIVE = 0
%EQUATE `MC_GREEN_DRIVE = 1
%EQUATE `MC_BLUE_DRIVE = 2
' enum _MC_GAIN_TYPE
%EQUATE `MC_RED_GAIN = 0
%EQUATE `MC_GREEN_GAIN = 1
%EQUATE `MC_BLUE_GAIN = 2
' enum _MC_POSITION_TYPE
%EQUATE `MC_HORIZONTAL_POSITION = 0
%EQUATE `MC_VERTICAL_POSITION = 1
' enum _MC_SIZE_TYPE
%EQUATE `MC_WIDTH = 0
%EQUATE `MC_HEIGHT = 1
' enum _MC_COLOR_TEMPERATURE
%EQUATE `MC_COLOR_TEMPERATURE_UNKNOWN = 0
%EQUATE `MC_COLOR_TEMPERATURE_4000K = 1
%EQUATE `MC_COLOR_TEMPERATURE_5000K = 2
%EQUATE `MC_COLOR_TEMPERATURE_6500K = 3
%EQUATE `MC_COLOR_TEMPERATURE_7500K = 4
%EQUATE `MC_COLOR_TEMPERATURE_8200K = 5
%EQUATE `MC_COLOR_TEMPERATURE_9300K = 6
%EQUATE `MC_COLOR_TEMPERATURE_10000K = 7
%EQUATE `MC_COLOR_TEMPERATURE_11500K = 8
'/******************************************************************************
' Monitor capability functions
'******************************************************************************/
DECLARE FUNCTION GetMonitorCapabilities LIB "dxva2.dll" ALIAS "GetMonitorCapabilities" ( BYVAL hMonitor AS QUAD , BYREF pdwMonitorCapabilities AS QUAD , BYREF pdwSupportedColorTemperatures AS QUAD ) AS LONG
'/******************************************************************************
' Monitor setting persistence functions
'******************************************************************************/
DECLARE FUNCTION SaveCurrentMonitorSettings LIB "dxva2.dll" ALIAS "SaveCurrentMonitorSettings" ( BYVAL hMonitor AS QUAD ) AS LONG
'/******************************************************************************
' Monitor meta-data functions
'******************************************************************************/
DECLARE FUNCTION GetMonitorTechnologyType LIB "dxva2.dll" ALIAS "GetMonitorTechnologyType" ( BYVAL hMonitor AS QUAD , BYVAL pdtyDisplayTechnologyType AS LONG ) AS LONG
'/******************************************************************************
' Monitor image calibration functions
'******************************************************************************/
DECLARE FUNCTION GetMonitorBrightness LIB "dxva2.dll" ALIAS "GetMonitorBrightness" ( BYVAL hMonitor AS QUAD , BYREF pdwMinimumBrightness AS QUAD , BYREF pdwCurrentBrightness AS QUAD , BYREF pdwMaximumBrightness AS QUAD ) AS LONG
DECLARE FUNCTION GetMonitorContrast LIB "dxva2.dll" ALIAS "GetMonitorContrast" ( BYVAL hMonitor AS QUAD
 , BYREF pdwMinimumContrast AS DWORD
 , BYREF pdwCurrentContrast AS DWORD
 , BYREF pdwMaximumContrast AS DWORD
 ) AS LONG
DECLARE FUNCTION GetMonitorColorTemperature LIB "dxva2.dll" ALIAS "GetMonitorColorTemperature" ( BYVAL hMonitor AS DWORD
 , BYREF pctCurrentColorTemperature AS DWORD
 ) AS LONG
DECLARE FUNCTION GetMonitorRedGreenOrBlueDrive LIB "dxva2.dll" ALIAS "GetMonitorRedGreenOrBlueDrive" ( BYVAL hMonitor AS DWORD
 , BYREF pdwMinimumDrive AS DWORD
 , BYREF pdwCurrentDrive AS DWORD
 , BYREF pdwMaximumDrive AS DWORD
 ) AS LONG
DECLARE FUNCTION GetMonitorRedGreenOrBlueGain LIB "dxva2.dll" ALIAS "GetMonitorRedGreenOrBlueGain" ( BYVAL hMonitor AS DWORD
 , BYVAL gtGainType AS LONG
 , BYREF pdwMinimumGain AS DWORD
 , BYREF pdwCurrentGain AS DWORD
 , BYREF pdwMaximumGain AS DWORD
 ) AS LONG
DECLARE FUNCTION SetMonitorBrightness LIB "dxva2.dll" ALIAS "SetMonitorBrightness" ( BYVAL hMonitor AS DWORD
 , BYVAL dwNewBrightness AS DWORD
 ) AS LONG
DECLARE FUNCTION SetMonitorContrast LIB "dxva2.dll" ALIAS "SetMonitorContrast" ( BYVAL hMonitor AS DWORD
 , BYVAL dwNewContrast AS DWORD
 ) AS LONG
DECLARE FUNCTION SetMonitorColorTemperature LIB "dxva2.dll" ALIAS "SetMonitorColorTemperature" ( BYVAL hMonitor AS DWORD
 , BYVAL ctCurrentColorTemperature AS LONG
 ) AS LONG
DECLARE FUNCTION SetMonitorRedGreenOrBlueDrive LIB "dxva2.dll" ALIAS "SetMonitorRedGreenOrBlueDrive" ( BYVAL hMonitor AS DWORD
 , BYVAL dtDriveType AS LONG
 , BYVAL dwNewDrive AS DWORD
 ) AS LONG
DECLARE FUNCTION SetMonitorRedGreenOrBlueGain LIB "dxva2.dll" ALIAS "SetMonitorRedGreenOrBlueGain" ( BYVAL hMonitor AS DWORD
 , BYVAL gtGainType AS LONG
 , BYVAL dwNewGain AS DWORD
 ) AS LONG
DECLARE FUNCTION DegaussMonitor LIB "dxva2.dll" ALIAS "DegaussMonitor" ( BYVAL hMonitor AS DWORD
 ) AS LONG
'/******************************************************************************
' Monitor image size and position calibration functions
'******************************************************************************/
DECLARE FUNCTION GetMonitorDisplayAreaSize LIB "dxva2.dll" ALIAS "GetMonitorDisplayAreaSize" ( BYVAL hMonitor AS QUAD , BYVAL stSizeType AS LONG , BYREF pdwMinimumWidthOrHeight AS QUAD , BYREF pdwCurrentWidthOrHeight AS QUAD , BYREF pdwMaximumWidthOrHeight AS QUAD ) AS LONG
DECLARE FUNCTION GetMonitorDisplayAreaPosition LIB "dxva2.dll" ALIAS "GetMonitorDisplayAreaPosition" ( BYVAL hMonitor AS QUAD
 , BYVAL ptPositionType AS LONG
 , BYREF pdwMinimumPosition AS DWORD
 , BYREF pdwCurrentPosition AS DWORD
 , BYREF pdwMaximumPosition AS DWORD
 ) AS LONG
DECLARE FUNCTION SetMonitorDisplayAreaSize LIB "dxva2.dll" ALIAS "SetMonitorDisplayAreaSize" ( BYVAL hMonitor AS DWORD
 , BYVAL stSizeType AS LONG
 , BYVAL dwNewDisplayAreaWidthOrHeight AS DWORD
 ) AS LONG
DECLARE FUNCTION SetMonitorDisplayAreaPosition LIB "dxva2.dll" ALIAS "SetMonitorDisplayAreaPosition" ( BYVAL hMonitor AS DWORD
 , BYVAL ptPositionType AS LONG
 , BYVAL dwNewPosition AS DWORD
 ) AS LONG
'/******************************************************************************
' Restore to defaults functions
'******************************************************************************/
DECLARE FUNCTION RestoreMonitorFactoryColorDefaults LIB "dxva2.dll" ALIAS "RestoreMonitorFactoryColorDefaults" ( BYVAL hMonitor AS QUAD ) AS LONG
DECLARE FUNCTION RestoreMonitorFactoryDefaults LIB "dxva2.dll" ALIAS "RestoreMonitorFactoryDefaults" ( BYVAL hMonitor AS QUAD
 ) AS LONG
'#pragma pack( pop )
#ENDIF
