using System;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class User32
{
/// Specifies whether to retrieve or set the values that are indicated by the other members of .
[PInvokeData("Tvout.h")]
public enum VP_COMMAND : uint
{
/// Gets current video capabilities. If capability is not supported, dwFlags is 0.
VP_COMMAND_GET = 0x0001,
/// Sets video parameters.
VP_COMMAND_SET = 0x0002,
}
/// The copy protection command.
[PInvokeData("Tvout.h")]
public enum VP_CP_CMD : uint
{
/// Activate copy protection.
VP_CP_CMD_ACTIVATE = 0x0001,
/// Deactivate copy protection.
VP_CP_CMD_DEACTIVATE = 0x0002,
/// Change copy protection.
VP_CP_CMD_CHANGE = 0x0004,
}
/// The copy protection type. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
[PInvokeData("Tvout.h")]
public enum VP_CP_TYPE : uint
{
/// Only DVD trigger bits available.
VP_CP_TYPE_APS_TRIGGER = 0x0001,
/// Full Macrovision data is available.
VP_CP_TYPE_MACROVISION = 0x0002,
}
///
/// Indicates which fields of contain valid data. For VP_COMMAND_GET, this should be zero. For
/// VP_COMMAND_SET, these are the fields to set.
///
[PInvokeData("Tvout.h")]
public enum VP_FLAGS : uint
{
/// dwMode (for VP_COMMAND_GET and VP_COMMAND_SET) and dwAvailableModes (for VP_COMMAND_GET).
VP_FLAGS_TV_MODE = 0x0001,
/// dwTVStandard (for VP_COMMAND_GET and VP_COMMAND_SET) and dwAvailableTVStandard (for VP_COMMAND_GET).
VP_FLAGS_TV_STANDARD = 0x0002,
/// dwFlickerFilter (for VP_COMMAND_GET and VP_COMMAND_SET).
VP_FLAGS_FLICKER = 0x0004,
/// dwOverScanX, dwOverScanY (for VP_COMMAND_GET and VP_COMMAND_SET).
VP_FLAGS_OVERSCAN = 0x0008,
/// dwMaxUnscaledX, dwMaxUnscaledY (for VP_COMMAND_GET).
VP_FLAGS_MAX_UNSCALED = 0x0010,
/// dwPositionX, dwPositionY (for VP_COMMAND_GET and VP_COMMAND_SET).
VP_FLAGS_POSITION = 0x0020,
/// dwBrightness (for VP_COMMAND_GET and VP_COMMAND_SET).
VP_FLAGS_BRIGHTNESS = 0x0040,
/// dwContrast (for VP_COMMAND_GET and VP_COMMAND_SET).
VP_FLAGS_CONTRAST = 0x0080,
///
/// dwCPType (for VP_COMMAND_GET and VP_COMMAND_SET), dwCPCommand (for VP_COMMAND_SET), dwCPStandard (for VP_COMMAND_GET),
/// dwCPKey (for VP_COMMAND_SET), bCP_APSTriggerBits, bOEMCopyProtection (for VP_COMMAND_GET and VP_COMMAND_SET).
///
VP_FLAGS_COPYPROTECT = 0x0100,
}
/// The current playback mode. This member is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
[PInvokeData("Tvout.h")]
public enum VP_MODE : uint
{
///
/// Describes a set of display settings that are optimal for Windows display, with the flicker filter on and any overscan display off.
///
VP_MODE_WIN_GRAPHICS = 0x0001,
///
/// Describes a set of display settings for video playback, with the flicker filter off and the overscan display on.
///
VP_MODE_TV_PLAYBACK = 0x0002,
}
/// The TV standard. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
[PInvokeData("Tvout.h")]
public enum VP_TV : uint
{
/// NTSC m
VP_TV_STANDARD_NTSC_M = 0x0001,
/// NTSC m j
VP_TV_STANDARD_NTSC_M_J = 0x0002,
/// pal b
VP_TV_STANDARD_PAL_B = 0x0004,
/// pal d
VP_TV_STANDARD_PAL_D = 0x0008,
/// pal h
VP_TV_STANDARD_PAL_H = 0x0010,
/// pal i
VP_TV_STANDARD_PAL_I = 0x0020,
/// pal m
VP_TV_STANDARD_PAL_M = 0x0040,
/// pal n
VP_TV_STANDARD_PAL_N = 0x0080,
/// secam b
VP_TV_STANDARD_SECAM_B = 0x0100,
/// secam d
VP_TV_STANDARD_SECAM_D = 0x0200,
/// secam g
VP_TV_STANDARD_SECAM_G = 0x0400,
/// secam h
VP_TV_STANDARD_SECAM_H = 0x0800,
/// secam k
VP_TV_STANDARD_SECAM_K = 0x1000,
/// secam k1
VP_TV_STANDARD_SECAM_K1 = 0x2000,
/// secam l
VP_TV_STANDARD_SECAM_L = 0x4000,
/// win vga
VP_TV_STANDARD_WIN_VGA = 0x8000,
/// NTSC 433
VP_TV_STANDARD_NTSC_433 = 0x00010000,
/// pal g
VP_TV_STANDARD_PAL_G = 0x00020000,
/// pal 60
VP_TV_STANDARD_PAL_60 = 0x00040000,
/// secam l1
VP_TV_STANDARD_SECAM_L1 = 0x00080000,
}
/// The VIDEOPARAMETERS structure contains information for a video connection.
// https://docs.microsoft.com/en-us/previous-versions//dd145196(v=vs.85) typedef struct _VIDEOPARAMETERS { GUID guid; ULONG dwOffset;
// ULONG dwCommand; ULONG dwFlags; ULONG dwMode; ULONG dwTVStandard; ULONG dwAvailableModes; ULONG dwAvailableTVStandard; ULONG
// dwFlickerFilter; ULONG dwOverScanX; ULONG dwOverScanY; ULONG dwMaxUnscaledX; ULONG dwMaxUnscaledY; ULONG dwPositionX; ULONG
// dwPositionY; ULONG dwBrightness; ULONG dwContrast; ULONG dwCPType; ULONG dwCPCommand; ULONG dwCPStandard; ULONG dwCPKey; ULONG
// bCP_APSTriggerBits; UCHAR bOEMCopyProtection[256]; } VIDOEPARAMETERS, *PVIDEOPARAMETERS;
[PInvokeData("Tvout.h")]
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct VIDEOPARAMETERS
{
///
/// The GUID for this structure. {02C62061-1097-11d1-920F-00A024DF156E}. Display drivers should verify the GUID at the start of
/// the structure before processing the structure.
///
public Guid guid;
/// Reserved; must be zero.
public uint dwOffset;
/// Specifies whether to retrieve or set the values that are indicated by the other members of this structure.
public VP_COMMAND dwCommand;
///
/// Indicates which fields contain valid data. For VP_COMMAND_GET, this should be zero. For VP_COMMAND_SET, these are the fields
/// to set.
///
public VP_FLAGS dwFlags;
/// The current playback mode. This member is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
public VP_MODE dwMode;
/// The TV standard. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
public VP_TV dwTVStandard;
///
/// Specifies which modes are available. This is valid only for VP_COMMAND_GET. It can be any combination of the values specified
/// in dwMode.
///
public VP_MODE dwAvailableModes;
///
/// The TV standards that are available. This is valid only for VP_COMMAND_GET. It can be any combination of the values specified
/// in dwTVStandard.
///
public VP_TV dwAvailableTVStandard;
///
/// The flicker reduction provided by the hardware. This is a percentage value in tenths of a percent, from 0 to 1,000, where 0
/// is no flicker reduction and 1,000 is maximum flicker reduction. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
public uint dwFlickerFilter;
///
/// The amount of overscan in the horizontal direction. This is a percentage value in tenths of a percent, from 0 to 1,000. A
/// value of 0 indicates no overscan, ensuring that the entire display is visible. A value of 1,000 is maximum overscan and
/// typically causes some of the image to be off the edge of the screen. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
public uint dwOverScanX;
///
/// The amount of overscan in the vertical direction. This is a percentage value in tenths of a percent, from 0 to 1,000. A value
/// of 0 indicates no overscan, ensuring that the entire display is visible. A value of 1,000 is maximum overscan and typically
/// causes some of the image to be off the edge of the screen. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
public uint dwOverScanY;
///
/// The maximum horizontal resolution, in pixels, that is supported when the video is not scaled. This field is valid for both VP_COMMAND_GET.
///
public uint dwMaxUnscaledX;
///
/// The maximum vertical resolution, in pixels, that is supported when the video is not scaled. This field is valid for both VP_COMMAND_GET.
///
public uint dwMaxUnscaledY;
///
/// The horizontal adjustment to the center of the image. Units are in pixels. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
public uint dwPositionX;
///
/// The vertical adjustment to the center of the image. Units are in scan lines. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
public uint dwPositionY;
///
/// Adjustment to the DC offset of the video signal to increase brightness on the television. It is a percentage value, 0 to 100,
/// where 0 means no adjustment and 100 means maximum adjustment. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
public uint dwBrightness;
///
/// Adjustment to the gain of the video signal to increase the intensity of whiteness on the television. It is a percentage
/// value, 0 to 100, where 0 means no adjustment and 100 means maximum adjustment. This field is valid for both VP_COMMAND_GET
/// and VP_COMMAND_SET.
///
public uint dwContrast;
/// The copy protection type. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
public VP_CP_TYPE dwCPType;
/// The copy protection command. This field is only valid for VP_COMMAND_SET.
public VP_CP_CMD dwCPCommand;
/// Specifies TV standards for which copy protection types are available. This field is valid only for VP_COMMAND_GET.
public uint dwCPStandard;
///
/// The copy protection key returned if dwCPCommand is set to VP_CP_CMD_ACTIVATE. The caller must set this key when the
/// dwCPCommand field is either VP_CP_CMD_DEACTIVATE or VP_CP_CMD_CHANGE. If the caller sets an incorrect key, the driver must
/// not change the current copy protection settings. This field is valid only for VP_COMMAND_SET.
///
public uint dwCPKey;
/// The DVD APS trigger bit flag. This is valid only for VP_COMMAND_SET. Currently, only bits 0 and 1 are valid.
public uint bCP_APSTriggerBits;
///
/// The OEM-specific copy protection data. Maximum of 256 characters. This field is valid for both VP_COMMAND_GET and VP_COMMAND_SET.
///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string bOEMCopyProtection;
}
}
}