Added CorrespondingType attributes to StandardClipboardFormat values.

pull/250/head
dahall 2021-08-17 11:07:23 -06:00
parent b864f19066
commit e693b4b11e
1 changed files with 20 additions and 0 deletions

View File

@ -1,7 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using Vanara.InteropServices;
namespace Vanara.PInvoke namespace Vanara.PInvoke
{ {
@ -219,14 +221,17 @@ namespace Vanara.PInvoke
public enum StandardClipboardFormat : uint public enum StandardClipboardFormat : uint
{ {
/// <summary>A handle to a bitmap (HBITMAP).</summary> /// <summary>A handle to a bitmap (HBITMAP).</summary>
[CorrespondingType(typeof(HBITMAP))]
CF_BITMAP = 2, CF_BITMAP = 2,
/// <summary>A memory object containing a BITMAPINFO structure followed by the bitmap bits.</summary> /// <summary>A memory object containing a BITMAPINFO structure followed by the bitmap bits.</summary>
[CorrespondingType(typeof(Gdi32.SafeBITMAPINFO))]
CF_DIB = 8, CF_DIB = 8,
/// <summary> /// <summary>
/// A memory object containing a BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits. /// A memory object containing a BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits.
/// </summary> /// </summary>
//[CorrespondingType(typeof(Gdi32.SafeBITMAPV5HEADER))]
CF_DIBV5 = 17, CF_DIBV5 = 17,
/// <summary>Software Arts' Data Interchange Format.</summary> /// <summary>Software Arts' Data Interchange Format.</summary>
@ -236,27 +241,32 @@ namespace Vanara.PInvoke
/// Bitmap display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in /// Bitmap display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in
/// bitmap format in lieu of the privately formatted data. /// bitmap format in lieu of the privately formatted data.
/// </summary> /// </summary>
[CorrespondingType(typeof(HBITMAP))]
CF_DSPBITMAP = 0x0082, CF_DSPBITMAP = 0x0082,
/// <summary> /// <summary>
/// Enhanced metafile display format associated with a private format. The hMem parameter must be a handle to data that can be /// Enhanced metafile display format associated with a private format. The hMem parameter must be a handle to data that can be
/// displayed in enhanced metafile format in lieu of the privately formatted data. /// displayed in enhanced metafile format in lieu of the privately formatted data.
/// </summary> /// </summary>
[CorrespondingType(typeof(HENHMETAFILE))]
CF_DSPENHMETAFILE = 0x008E, CF_DSPENHMETAFILE = 0x008E,
/// <summary> /// <summary>
/// Metafile-picture display format associated with a private format. The hMem parameter must be a handle to data that can be /// Metafile-picture display format associated with a private format. The hMem parameter must be a handle to data that can be
/// displayed in metafile-picture format in lieu of the privately formatted data. /// displayed in metafile-picture format in lieu of the privately formatted data.
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemStruct<METAFILEPICT, HGlobalMemoryMethods>))]
CF_DSPMETAFILEPICT = 0x0083, CF_DSPMETAFILEPICT = 0x0083,
/// <summary> /// <summary>
/// Text display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in /// Text display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in
/// text format in lieu of the privately formatted data. /// text format in lieu of the privately formatted data.
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UTF8Encoding))]
CF_DSPTEXT = 0x0081, CF_DSPTEXT = 0x0081,
/// <summary>A handle to an enhanced metafile (HENHMETAFILE).</summary> /// <summary>A handle to an enhanced metafile (HENHMETAFILE).</summary>
[CorrespondingType(typeof(HENHMETAFILE))]
CF_ENHMETAFILE = 14, CF_ENHMETAFILE = 14,
/// <summary> /// <summary>
@ -267,6 +277,7 @@ namespace Vanara.PInvoke
/// handle allocated by the GlobalAlloc function with the GMEM_MOVEABLE flag. /// handle allocated by the GlobalAlloc function with the GMEM_MOVEABLE flag.
/// </para> /// </para>
/// </summary> /// </summary>
[CorrespondingType(typeof(Stream))]
CF_GDIOBJFIRST = 0x0300, CF_GDIOBJFIRST = 0x0300,
/// <summary>See CF_GDIOBJFIRST.</summary> /// <summary>See CF_GDIOBJFIRST.</summary>
@ -295,18 +306,21 @@ namespace Vanara.PInvoke
/// correct code page table is used for the conversion. /// correct code page table is used for the conversion.
/// </para> /// </para>
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemStruct<LCID, HGlobalMemoryMethods>))]
CF_LOCALE = 16, CF_LOCALE = 16,
/// <summary> /// <summary>
/// Handle to a metafile picture format as defined by the METAFILEPICT structure. When passing a CF_METAFILEPICT handle by means /// Handle to a metafile picture format as defined by the METAFILEPICT structure. When passing a CF_METAFILEPICT handle by means
/// of DDE, the application responsible for deleting hMem should also free the metafile referred to by the CF_METAFILEPICT handle. /// of DDE, the application responsible for deleting hMem should also free the metafile referred to by the CF_METAFILEPICT handle.
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemStruct<METAFILEPICT, HGlobalMemoryMethods>))]
CF_METAFILEPICT = 3, CF_METAFILEPICT = 3,
/// <summary> /// <summary>
/// Text format containing characters in the OEM character set. Each line ends with a carriage return/linefeed (CR-LF) /// Text format containing characters in the OEM character set. Each line ends with a carriage return/linefeed (CR-LF)
/// combination. A null character signals the end of the data. /// combination. A null character signals the end of the data.
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UTF8Encoding))]
CF_OEMTEXT = 7, CF_OEMTEXT = 7,
/// <summary> /// <summary>
@ -328,6 +342,7 @@ namespace Vanara.PInvoke
/// CF_PALETTE format. /// CF_PALETTE format.
/// </para> /// </para>
/// </summary> /// </summary>
[CorrespondingType(typeof(HPALETTE))]
CF_PALETTE = 9, CF_PALETTE = 9,
/// <summary>Data for the pen extensions to the Microsoft Windows for Pen Computing.</summary> /// <summary>Data for the pen extensions to the Microsoft Windows for Pen Computing.</summary>
@ -344,6 +359,7 @@ namespace Vanara.PInvoke
CF_PRIVATELAST = 0x02FF, CF_PRIVATELAST = 0x02FF,
/// <summary>Represents audio data more complex than can be represented in a CF_WAVE standard wave format.</summary> /// <summary>Represents audio data more complex than can be represented in a CF_WAVE standard wave format.</summary>
[CorrespondingType(typeof(Stream))]
CF_RIFF = 11, CF_RIFF = 11,
/// <summary>Microsoft Symbolic Link (SYLK) format.</summary> /// <summary>Microsoft Symbolic Link (SYLK) format.</summary>
@ -353,18 +369,22 @@ namespace Vanara.PInvoke
/// Text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the /// Text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the
/// data. Use this format for ANSI text. /// data. Use this format for ANSI text.
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UTF8Encoding))]
CF_TEXT = 1, CF_TEXT = 1,
/// <summary>Tagged-image file format.</summary> /// <summary>Tagged-image file format.</summary>
[CorrespondingType(typeof(Stream))]
CF_TIFF = 6, CF_TIFF = 6,
/// <summary> /// <summary>
/// Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of /// Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of
/// the data. /// the data.
/// </summary> /// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UnicodeEncoding))]
CF_UNICODETEXT = 13, CF_UNICODETEXT = 13,
/// <summary>Represents audio data in one of the standard wave formats, such as 11 kHz or 22 kHz PCM.</summary> /// <summary>Represents audio data in one of the standard wave formats, such as 11 kHz or 22 kHz PCM.</summary>
[CorrespondingType(typeof(Stream))]
CF_WAVE = 12, CF_WAVE = 12,
} }