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.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Vanara.InteropServices;
namespace Vanara.PInvoke
{
@ -219,14 +221,17 @@ namespace Vanara.PInvoke
public enum StandardClipboardFormat : uint
{
/// <summary>A handle to a bitmap (HBITMAP).</summary>
[CorrespondingType(typeof(HBITMAP))]
CF_BITMAP = 2,
/// <summary>A memory object containing a BITMAPINFO structure followed by the bitmap bits.</summary>
[CorrespondingType(typeof(Gdi32.SafeBITMAPINFO))]
CF_DIB = 8,
/// <summary>
/// A memory object containing a BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits.
/// </summary>
//[CorrespondingType(typeof(Gdi32.SafeBITMAPV5HEADER))]
CF_DIBV5 = 17,
/// <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 format in lieu of the privately formatted data.
/// </summary>
[CorrespondingType(typeof(HBITMAP))]
CF_DSPBITMAP = 0x0082,
/// <summary>
/// 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.
/// </summary>
[CorrespondingType(typeof(HENHMETAFILE))]
CF_DSPENHMETAFILE = 0x008E,
/// <summary>
/// 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.
/// </summary>
[CorrespondingType(typeof(SafeMemStruct<METAFILEPICT, HGlobalMemoryMethods>))]
CF_DSPMETAFILEPICT = 0x0083,
/// <summary>
/// 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.
/// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UTF8Encoding))]
CF_DSPTEXT = 0x0081,
/// <summary>A handle to an enhanced metafile (HENHMETAFILE).</summary>
[CorrespondingType(typeof(HENHMETAFILE))]
CF_ENHMETAFILE = 14,
/// <summary>
@ -267,6 +277,7 @@ namespace Vanara.PInvoke
/// handle allocated by the GlobalAlloc function with the GMEM_MOVEABLE flag.
/// </para>
/// </summary>
[CorrespondingType(typeof(Stream))]
CF_GDIOBJFIRST = 0x0300,
/// <summary>See CF_GDIOBJFIRST.</summary>
@ -295,18 +306,21 @@ namespace Vanara.PInvoke
/// correct code page table is used for the conversion.
/// </para>
/// </summary>
[CorrespondingType(typeof(SafeMemStruct<LCID, HGlobalMemoryMethods>))]
CF_LOCALE = 16,
/// <summary>
/// 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.
/// </summary>
[CorrespondingType(typeof(SafeMemStruct<METAFILEPICT, HGlobalMemoryMethods>))]
CF_METAFILEPICT = 3,
/// <summary>
/// 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.
/// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UTF8Encoding))]
CF_OEMTEXT = 7,
/// <summary>
@ -328,6 +342,7 @@ namespace Vanara.PInvoke
/// CF_PALETTE format.
/// </para>
/// </summary>
[CorrespondingType(typeof(HPALETTE))]
CF_PALETTE = 9,
/// <summary>Data for the pen extensions to the Microsoft Windows for Pen Computing.</summary>
@ -344,6 +359,7 @@ namespace Vanara.PInvoke
CF_PRIVATELAST = 0x02FF,
/// <summary>Represents audio data more complex than can be represented in a CF_WAVE standard wave format.</summary>
[CorrespondingType(typeof(Stream))]
CF_RIFF = 11,
/// <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
/// data. Use this format for ANSI text.
/// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UTF8Encoding))]
CF_TEXT = 1,
/// <summary>Tagged-image file format.</summary>
[CorrespondingType(typeof(Stream))]
CF_TIFF = 6,
/// <summary>
/// Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of
/// the data.
/// </summary>
[CorrespondingType(typeof(SafeMemString<HGlobalMemoryMethods>), EncodingType = typeof(UnicodeEncoding))]
CF_UNICODETEXT = 13,
/// <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,
}