diff --git a/Cargo.toml b/Cargo.toml index e6fa54607..dfa4e0699 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,6 +232,18 @@ evntcons = [] fibersapi = [] fileapi = [] functiondiscoverykeys_devpkey = [] +gdipluscolor = [] +gdipluscolormatrix = [] +gdipluseffects = [] +gdiplusenums = [] +gdiplusflat = [] +gdiplusgpstubs = [] +gdiplusimaging = [] +gdiplusinit = [] +gdiplusmem = [] +gdiplusmetaheader = [] +gdipluspixelformats = [] +gdiplustypes = [] "gl-gl" = [] handleapi = [] heapapi = [] diff --git a/build.rs b/build.rs index ce691ded8..9b3a5935f 100644 --- a/build.rs +++ b/build.rs @@ -175,7 +175,7 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static ("dcomp", &["d2d1", "d2d1_1", "d2d1effects", "d2dbasetypes", "d3d9types", "d3dcommon", "dcompanimation", "dcomptypes", "dxgi", "dxgi1_2", "dxgiformat", "guiddef", "minwinbase", "minwindef", "ntdef", "unknwnbase", "windef"], &["dcomp"]), ("dcompanimation", &["ntdef", "unknwnbase"], &[]), ("dde", &["basetsd", "minwindef"], &["user32"]), - ("ddraw", &[], &[]), + ("ddraw", &["guiddef", "minwindef", "unknwnbase", "windef", "winerror", "wingdi", "winnt"], &["ddraw"]), ("ddrawi", &[], &[]), ("ddrawint", &[], &[]), ("debugapi", &["minwinbase", "minwindef", "winnt"], &["kernel32"]), @@ -211,6 +211,18 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static ("fibersapi", &["minwindef", "winnt"], &["kernel32"]), ("fileapi", &["minwinbase", "minwindef", "winnt"], &["kernel32"]), ("functiondiscoverykeys_devpkey", &["wtypes"], &[]), + ("gdipluscolor", &["gdipluspixelformats", "minwindef", "windef", "wingdi"], &[]), + ("gdipluscolormatrix", &["gdipluscolor", "gdiplustypes", "minwindef"], &[]), + ("gdipluseffects", &["gdipluscolormatrix", "gdiplustypes", "guiddef", "minwindef", "windef", "winnt"], &["gdiplus"]), + ("gdiplusenums", &["minwindef", "wingdi"], &[]), + ("gdiplusflat", &["basetsd", "ddraw", "gdipluscolor", "gdipluscolormatrix", "gdipluseffects", "gdiplusenums", "gdiplusgpstubs", "gdiplusimaging", "gdiplusmetaheader", "gdipluspixelformats", "gdiplustypes", "guiddef", "minwindef", "objidlbase", "windef", "wingdi", "winnt", "wtypes"], &["gdiplus"]), + ("gdiplusgpstubs", &["gdiplusenums", "gdiplustypes"], &[]), + ("gdiplusimaging", &["basetsd", "gdipluspixelformats", "guiddef", "minwindef", "unknwnbase", "winerror", "winnt", "wtypes"], &[]), + ("gdiplusinit", &["basetsd", "gdiplustypes", "minwindef", "winnt"], &["gdiplus"]), + ("gdiplusmem", &[], &["gdiplus"]), + ("gdiplusmetaheader", &["basetsd", "gdiplusenums", "gdiplustypes", "minwindef", "windef", "wingdi"], &[]), + ("gdipluspixelformats", &["minwindef", "winnt"], &[]), + ("gdiplustypes", &["gdiplusenums", "minwindef", "winnt"], &[]), ("gl-gl", &[], &["opengl32"]), ("handleapi", &["minwindef", "winnt"], &["kernel32"]), ("heapapi", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]), diff --git a/src/macros.rs b/src/macros.rs index d6b133f02..905d1a27b 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -20,6 +20,11 @@ macro_rules! MAKE_SCODE { ($sev << 31) | ($fac << 16) | $code } } +macro_rules! MAKE_DDHRESULT { + ($code:expr) => { + MAKE_HRESULT!(1, $crate::um::ddraw::_FACDD, $code) + }; +} macro_rules! HIDP_ERROR_CODES { ($sev:expr, $code:expr) => { ($sev << 28) | (FACILITY_HID_ERROR_CODE << 16) | $code diff --git a/src/um/ddraw.rs b/src/um/ddraw.rs index fd0d9e89b..f93ba6e6d 100644 --- a/src/um/ddraw.rs +++ b/src/um/ddraw.rs @@ -3,6 +3,26 @@ // , at your option. // All files in the project carrying such notice may not be copied, modified, or distributed // except according to those terms. +use shared::guiddef::{GUID, REFGUID, REFIID}; +use shared::minwindef::{BOOL, BYTE, DWORD, LPBOOL, LPDWORD, LPLONG, LPVOID, WORD}; +use shared::windef::{HDC, HMONITOR, HWND, LPRECT, LPSIZE}; +use shared::winerror::{ + CO_E_NOTINITIALIZED, E_FAIL, E_INVALIDARG, E_NOTIMPL, E_OUTOFMEMORY, HRESULT, MAKE_HRESULT, + S_FALSE, S_OK +}; +use um::unknwnbase::{IUnknown, IUnknownVtbl}; +use um::wingdi::{LPPALETTEENTRY, LPRGNDATA}; +use um::winnt::{HANDLE, LARGE_INTEGER, LONG, LPSTR, LPWSTR}; +pub const _FACDD: HRESULT = 0x876; +#[inline] +pub fn MAKE_DDHRESULT(code: HRESULT) -> HRESULT { + MAKE_HRESULT(1, _FACDD, code) +} +pub const FOURCC_DXT1: DWORD = MAKEFOURCC!(b'D', b'X', b'T', b'1'); +pub const FOURCC_DXT2: DWORD = MAKEFOURCC!(b'D', b'X', b'T', b'2'); +pub const FOURCC_DXT3: DWORD = MAKEFOURCC!(b'D', b'X', b'T', b'3'); +pub const FOURCC_DXT4: DWORD = MAKEFOURCC!(b'D', b'X', b'T', b'4'); +pub const FOURCC_DXT5: DWORD = MAKEFOURCC!(b'D', b'X', b'T', b'5'); DEFINE_GUID!{CLSID_DirectDraw, 0xd7b70ee0, 0x4340, 0x11cf, 0xb0, 0x63, 0x00, 0x20, 0xaf, 0xc2, 0xcd, 0x35} DEFINE_GUID!{CLSID_DirectDraw7, @@ -35,3 +55,2443 @@ DEFINE_GUID!{IID_IDirectDrawColorControl, 0x4b9f0ee0, 0x0d7e, 0x11d0, 0x9b, 0x06, 0x00, 0xa0, 0xc9, 0x03, 0xa3, 0xb8} DEFINE_GUID!{IID_IDirectDrawGammaControl, 0x69c11c3e, 0xb46b, 0x11d1, 0xad, 0x7a, 0x00, 0xc0, 0x4f, 0xc2, 0x9b, 0x4e} +pub type LPDIRECTDRAW = *mut IDirectDraw; +pub type LPDIRECTDRAW2 = *mut IDirectDraw2; +pub type LPDIRECTDRAW4 = *mut IDirectDraw4; +pub type LPDIRECTDRAW7 = *mut IDirectDraw7; +pub type LPDIRECTDRAWSURFACE = *mut IDirectDrawSurface; +pub type LPDIRECTDRAWSURFACE2 = *mut IDirectDrawSurface2; +pub type LPDIRECTDRAWSURFACE3 = *mut IDirectDrawSurface3; +pub type LPDIRECTDRAWSURFACE4 = *mut IDirectDrawSurface4; +pub type LPDIRECTDRAWSURFACE7 = *mut IDirectDrawSurface7; +pub type LPDIRECTDRAWPALETTE = *mut IDirectDrawPalette; +pub type LPDIRECTDRAWCLIPPER = *mut IDirectDrawClipper; +pub type LPDIRECTDRAWCOLORCONTROL = *mut IDirectDrawColorControl; +pub type LPDIRECTDRAWGAMMACONTROL = *mut IDirectDrawGammaControl; +// pub type LPDDFXROP = *mut DDFXROP; +pub type LPDDSURFACEDESC = *mut DDSURFACEDESC; +pub type LPDDSURFACEDESC2 = *mut DDSURFACEDESC2; +pub type LPDDCOLORCONTROL = *mut DDCOLORCONTROL; +FN!{stdcall LPDDENUMCALLBACKA( + *mut GUID, + LPSTR, + LPSTR, + LPVOID, +) -> BOOL} +FN!{stdcall LPDDENUMCALLBACKW( + *mut GUID, + LPWSTR, + LPWSTR, + LPVOID, +) -> BOOL} +extern "system" { + pub fn DirectDrawEnumerateW( + lpCallback: LPDDENUMCALLBACKW, + lpContext: LPVOID, + ) -> HRESULT; + pub fn DirectDrawEnumerateA( + lpCallback: LPDDENUMCALLBACKA, + lpContext: LPVOID, + ) -> HRESULT; +} +FN!{stdcall LPDDENUMCALLBACKEXA( + *mut GUID, + LPSTR, + LPSTR, + LPVOID, + HMONITOR, +) -> bool} +FN!{stdcall LPDDENUMCALLBACKEXW( + *mut GUID, + LPWSTR, + LPWSTR, + LPVOID, + HMONITOR, +) -> bool} +extern "system" { + pub fn DirectDrawEnumerateExW( + lpCallback: LPDDENUMCALLBACKEXW, + lpContext: LPVOID, + dwFlags: DWORD, + ) -> HRESULT; + pub fn DirectDrawEnumerateExA( + lpCallback: LPDDENUMCALLBACKEXA, + lpContext: LPVOID, + dwFlags: DWORD, + ) -> HRESULT; +} +FN!{stdcall LPDIRECTDRAWENUMERATEEXA( + lpCallback: LPDDENUMCALLBACKEXA, + plContext: LPVOID, + dwFlags: DWORD, +) -> HRESULT} +FN!{stdcall LPDIRECTDRAWENUMERATEEXW( + lpCallback: LPDDENUMCALLBACKEXW, + plContext: LPVOID, + dwFlags: DWORD, +) -> HRESULT} +extern "system" { + pub fn DirectDrawCreate( + lpGUID: *mut GUID, + lplpDD: *mut LPDIRECTDRAW, + pUnkOuter: *mut IUnknown, + ) -> HRESULT; + pub fn DirectDrawCreateEx( + lpGuid: *mut GUID, + lplpDD: *mut LPVOID, + iid: REFIID, + pUnkOuter: *mut IUnknown, + ) -> HRESULT; + pub fn DirectDrawCreateClipper( + dwFlags: DWORD, + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + pUnkOuter: *mut IUnknown, + ) -> HRESULT; +} +pub const DDENUM_ATTACHEDSECONDARYDEVICES: DWORD = 0x00000001; +pub const DDENUM_DETACHEDSECONDARYDEVICES: DWORD = 0x00000002; +pub const DDENUM_NONDISPLAYDEVICES: DWORD = 0x00000004; +pub const REGSTR_KEY_DDHW_DESCRIPTION: &'static str = "Description"; +pub const REGSTR_KEY_DDHW_DRIVERNAME: &'static str = "DriverName"; +pub const REGSTR_PATH_DDHW: &'static str = "Hardware\\DirectDrawDrivers"; +pub const DDCREATE_HARDWAREONLY: DWORD = 0x00000001; +pub const DDCREATE_EMULATIONONLY: DWORD = 0x00000002; +FN!{stdcall LPDDENUMMODESCALLBACK( + LPDDSURFACEDESC, + LPVOID, +) -> HRESULT} +FN!{stdcall LPDDENUMMODESCALLBACK2( + LPDDSURFACEDESC2, + LPVOID, +) -> HRESULT} +FN!{stdcall LPDDENUMSURFACESCALLBACK( + LPDIRECTDRAWSURFACE, + LPDDSURFACEDESC, + LPVOID, +) -> HRESULT} +FN!{stdcall LPDDENUMSURFACESCALLBACK2( + LPDIRECTDRAWSURFACE4, + LPDDSURFACEDESC2, + LPVOID, +) -> HRESULT} +FN!{stdcall LPDDENUMSURFACESCALLBACK7( + LPDIRECTDRAWSURFACE7, + LPDDSURFACEDESC2, + LPVOID, +) -> HRESULT} +STRUCT!{struct DDARGB { + blue: BYTE, + green: BYTE, + red: BYTE, + alpha: BYTE, +}} +pub type LPDDARGB = *mut DDARGB; +STRUCT!{struct DDRGBA { + red: BYTE, + green: BYTE, + blue: BYTE, + alpha: BYTE, +}} +pub type LPDDRGBA = *mut DDRGBA; +STRUCT!{struct DDCOLORKEY { + dwColorSpaceLowValue: DWORD, + dwColorSpaceHighValue: DWORD, +}} +pub type LPDDCOLORKEY = *mut DDCOLORKEY; +UNION!{union DDBLTFX_u1 { + [usize; 1], + dwZDestConst dwZDestConst_mut: DWORD, + lpDDSZBufferDest lpDDSZBufferDest_mut: LPDIRECTDRAWSURFACE, +}} +UNION!{union DDBLTFX_u2 { + [usize; 1], + dwZSrcConst dwZSrcConst_mut: DWORD, + lpDDSZBufferSrc lpDDSZBufferSrc_mut: LPDIRECTDRAWSURFACE, +}} +UNION!{union DDBLTFX_u3 { + [usize; 1], + dwAlphaDestConst dwAlphaDestConst_mut: DWORD, + lpDDSAlphaDest lpDDSAlphaDest_mut: LPDIRECTDRAWSURFACE, +}} +UNION!{union DDBLTFX_u4 { + [usize; 1], + dwAlphaSrcConst dwAlphaSrcConst_mut: DWORD, + lpDDSAlphaSrc lpDDSAlphaSrc_mut: LPDIRECTDRAWSURFACE, +}} +UNION!{union DDBLTFX_u5 { + [usize; 1], + dwFillColor dwFillColor_mut: DWORD, + dwFillDepth dwFillDepth_mut: DWORD, + dwFillPixel dwFillPixel_mut: DWORD, + lpDDSPattern lpDDSPattern_mut: LPDIRECTDRAWSURFACE, +}} +STRUCT!{struct DDBLTFX { + dwSize: DWORD, + dwDDFX: DWORD, + dwROP: DWORD, + dwDDROP: DWORD, + dwRotationAngle: DWORD, + dwZBufferOpCode: DWORD, + dwZBufferLow: DWORD, + dwZBufferHigh: DWORD, + dwZBufferBaseDest: DWORD, + dwZDestConstBitDepth: DWORD, + u1: DDBLTFX_u1, + dwZSrcConstBitDepth: DWORD, + u2: DDBLTFX_u2, + dwAlphaEdgeBlendBitDepth: DWORD, + dwAlphaEdgeBlend: DWORD, + dwReserved: DWORD, + dwAlphaDestConstBitDepth: DWORD, + u3: DDBLTFX_u3, + dwAlphaSrcConstBitDepth: DWORD, + u4: DDBLTFX_u4, + u5: DDBLTFX_u5, + ddckDestColorkey: DDCOLORKEY, + ddckSrcColorkey: DDCOLORKEY, +}} +pub type LPDDBLTFX = *mut DDBLTFX; +STRUCT!{struct DDSCAPS { + dwCaps: DWORD, +}} +pub type LPDDSCAPS = *mut DDSCAPS; +STRUCT!{struct DDOSCAPS { + dwCaps: DWORD, +}} +pub type LPDDOSCAPS = *mut DDOSCAPS; +UNION!{union DDSCAPSEX_u1 { + [u32; 1], + dwCaps4 dwCaps4_mut: DWORD, + dwVolumeDepth dwVolumeDepth_mut: DWORD, +}} +STRUCT!{struct DDSCAPSEX { + dwCaps2: DWORD, + dwCaps3: DWORD, + u1: DDSCAPSEX_u1, +}} +pub type LPDDSCAPSEX = *mut DDSCAPSEX; +UNION!{union DDSCAPS2_u1 { + [u32; 1], + dwCaps4 dwCaps4_mut: DWORD, + dwVolumeDepth dwVolumeDepth_mut: DWORD, +}} +STRUCT!{struct DDSCAPS2 { + dwCaps: DWORD, + dwCaps2: DWORD, + dwCaps3: DWORD, + u1: DDSCAPS2_u1, +}} +pub type LPDDSCAPS2 = *mut DDSCAPS2; +pub const DD_ROP_SPACE: usize = 256 / 32; +STRUCT!{struct DDCAPS_DX1 { + dwSize: DWORD, + dwCaps: DWORD, + dwCaps2: DWORD, + dwCKeyCaps: DWORD, + dwFXCaps: DWORD, + dwFXAlphaCaps: DWORD, + dwPalCaps: DWORD, + dwSVCaps: DWORD, + dwAlphaBltConstBitDepths: DWORD, + dwAlphaBltPixelBitDepths: DWORD, + dwAlphaBltSurfaceBitDepths: DWORD, + dwAlphaOverlayConstBitDepths: DWORD, + dwAlphaOverlayPixelBitDepths: DWORD, + dwAlphaOverlaySurfaceBitDepths: DWORD, + dwZBufferBitDepths: DWORD, + dwVidMemTotal: DWORD, + dwVidMemFree: DWORD, + dwMaxVisibleOverlays: DWORD, + dwCurrVisibleOverlays: DWORD, + dwNumFourCCCodes: DWORD, + dwAlignBoundarySrc: DWORD, + dwAlignSizeSrc: DWORD, + dwAlignBoundaryDest: DWORD, + dwAlignSizeDest: DWORD, + dwAlignStrideAlign: DWORD, + dwRops: [DWORD; DD_ROP_SPACE], + ddsCaps: DDSCAPS, + dwMinOverlayStretch: DWORD, + dwMaxOverlayStretch: DWORD, + dwMinLiveVideoStretch: DWORD, + dwMaxLiveVideoStretch: DWORD, + dwMinHwCodecStretch: DWORD, + dwMaxHwCodecStretch: DWORD, + dwReserved1: DWORD, + dwReserved2: DWORD, + dwReserved3: DWORD, +}} +pub type LPDDCAPS_DX1 = *mut DDCAPS_DX1; +STRUCT!{struct DDCAPS_DX3 { + dwSize: DWORD, + dwCaps: DWORD, + dwCaps2: DWORD, + dwCKeyCaps: DWORD, + dwFXCaps: DWORD, + dwFXAlphaCaps: DWORD, + dwPalCaps: DWORD, + dwSVCaps: DWORD, + dwAlphaBltConstBitDepths: DWORD, + dwAlphaBltPixelBitDepths: DWORD, + dwAlphaBltSurfaceBitDepths: DWORD, + dwAlphaOverlayConstBitDepths: DWORD, + dwAlphaOverlayPixelBitDepths: DWORD, + dwAlphaOverlaySurfaceBitDepths: DWORD, + dwZBufferBitDepths: DWORD, + dwVidMemTotal: DWORD, + dwVidMemFree: DWORD, + dwMaxVisibleOverlays: DWORD, + dwCurrVisibleOverlays: DWORD, + dwNumFourCCCodes: DWORD, + dwAlignBoundarySrc: DWORD, + dwAlignSizeSrc: DWORD, + dwAlignBoundaryDest: DWORD, + dwAlignSizeDest: DWORD, + dwAlignStrideAlign: DWORD, + dwRops: [DWORD; DD_ROP_SPACE], + ddsCaps: DDSCAPS, + dwMinOverlayStretch: DWORD, + dwMaxOverlayStretch: DWORD, + dwMinLiveVideoStretch: DWORD, + dwMaxLiveVideoStretch: DWORD, + dwMinHwCodecStretch: DWORD, + dwMaxHwCodecStretch: DWORD, + dwReserved1: DWORD, + dwReserved2: DWORD, + dwReserved3: DWORD, + dwSVBCaps: DWORD, + dwSVBCKeyCaps: DWORD, + dwSVBFXCaps: DWORD, + dwSVBRops: [DWORD; DD_ROP_SPACE], + dwVSBCaps: DWORD, + dwVSBCKeyCaps: DWORD, + dwVSBFXCaps: DWORD, + dwVSBRops: [DWORD; DD_ROP_SPACE], + dwSSBCaps: DWORD, + dwSSBCKeyCaps: DWORD, + dwSSBFXCaps: DWORD, + dwSSBRops: [DWORD; DD_ROP_SPACE], + dwReserved4: DWORD, + dwReserved5: DWORD, + dwReserved6: DWORD, +}} +pub type LPDDCAPS_DX3 = *mut DDCAPS_DX3; +STRUCT!{struct DDCAPS_DX5 { + dwSize: DWORD, + dwCaps: DWORD, + dwCaps2: DWORD, + dwCKeyCaps: DWORD, + dwFXCaps: DWORD, + dwFXAlphaCaps: DWORD, + dwPalCaps: DWORD, + dwSVCaps: DWORD, + dwAlphaBltConstBitDepths: DWORD, + dwAlphaBltPixelBitDepths: DWORD, + dwAlphaBltSurfaceBitDepths: DWORD, + dwAlphaOverlayConstBitDepths: DWORD, + dwAlphaOverlayPixelBitDepths: DWORD, + dwAlphaOverlaySurfaceBitDepths: DWORD, + dwZBufferBitDepths: DWORD, + dwVidMemTotal: DWORD, + dwVidMemFree: DWORD, + dwMaxVisibleOverlays: DWORD, + dwCurrVisibleOverlays: DWORD, + dwNumFourCCCodes: DWORD, + dwAlignBoundarySrc: DWORD, + dwAlignSizeSrc: DWORD, + dwAlignBoundaryDest: DWORD, + dwAlignSizeDest: DWORD, + dwAlignStrideAlign: DWORD, + dwRops: [DWORD; DD_ROP_SPACE], + ddsCaps: DDSCAPS, + dwMinOverlayStretch: DWORD, + dwMaxOverlayStretch: DWORD, + dwMinLiveVideoStretch: DWORD, + dwMaxLiveVideoStretch: DWORD, + dwMinHwCodecStretch: DWORD, + dwMaxHwCodecStretch: DWORD, + dwReserved1: DWORD, + dwReserved2: DWORD, + dwReserved3: DWORD, + dwSVBCaps: DWORD, + dwSVBCKeyCaps: DWORD, + dwSVBFXCaps: DWORD, + dwSVBRops: [DWORD; DD_ROP_SPACE], + dwVSBCaps: DWORD, + dwVSBCKeyCaps: DWORD, + dwVSBFXCaps: DWORD, + dwVSBRops: [DWORD; DD_ROP_SPACE], + dwSSBCaps: DWORD, + dwSSBCKeyCaps: DWORD, + dwSSBFXCaps: DWORD, + dwSSBRops: [DWORD; DD_ROP_SPACE], + dwMaxVideoPorts: DWORD, + dwCurrVideoPorts: DWORD, + dwSVBCaps2: DWORD, + dwNLVBCaps: DWORD, + dwNLVBCaps2: DWORD, + dwNLVBCKeyCaps: DWORD, + dwNLVBFXCaps: DWORD, + dwNLVBRops: [DWORD; DD_ROP_SPACE], +}} +pub type LPDDCAPS_DX5 = *mut DDCAPS_DX5; +STRUCT!{struct DDCAPS_DX6 { + dwSize: DWORD, + dwCaps: DWORD, + dwCaps2: DWORD, + dwCKeyCaps: DWORD, + dwFXCaps: DWORD, + dwFXAlphaCaps: DWORD, + dwPalCaps: DWORD, + dwSVCaps: DWORD, + dwAlphaBltConstBitDepths: DWORD, + dwAlphaBltPixelBitDepths: DWORD, + dwAlphaBltSurfaceBitDepths: DWORD, + dwAlphaOverlayConstBitDepths: DWORD, + dwAlphaOverlayPixelBitDepths: DWORD, + dwAlphaOverlaySurfaceBitDepths: DWORD, + dwZBufferBitDepths: DWORD, + dwVidMemTotal: DWORD, + dwVidMemFree: DWORD, + dwMaxVisibleOverlays: DWORD, + dwCurrVisibleOverlays: DWORD, + dwNumFourCCCodes: DWORD, + dwAlignBoundarySrc: DWORD, + dwAlignSizeSrc: DWORD, + dwAlignBoundaryDest: DWORD, + dwAlignSizeDest: DWORD, + dwAlignStrideAlign: DWORD, + dwRops: [DWORD; DD_ROP_SPACE], + ddsOldCaps: DDSCAPS, + dwMinOverlayStretch: DWORD, + dwMaxOverlayStretch: DWORD, + dwMinLiveVideoStretch: DWORD, + dwMaxLiveVideoStretch: DWORD, + dwMinHwCodecStretch: DWORD, + dwMaxHwCodecStretch: DWORD, + dwReserved1: DWORD, + dwReserved2: DWORD, + dwReserved3: DWORD, + dwSVBCaps: DWORD, + dwSVBCKeyCaps: DWORD, + dwSVBFXCaps: DWORD, + dwSVBRops: [DWORD; DD_ROP_SPACE], + dwVSBCaps: DWORD, + dwVSBCKeyCaps: DWORD, + dwVSBFXCaps: DWORD, + dwVSBRops: [DWORD; DD_ROP_SPACE], + dwSSBCaps: DWORD, + dwSSBCKeyCaps: DWORD, + dwSSBFXCaps: DWORD, + dwSSBRops: [DWORD; DD_ROP_SPACE], + dwMaxVideoPorts: DWORD, + dwCurrVideoPorts: DWORD, + dwSVBCaps2: DWORD, + dwNLVBCaps: DWORD, + dwNLVBCaps2: DWORD, + dwNLVBCKeyCaps: DWORD, + dwNLVBFXCaps: DWORD, + dwNLVBRops: [DWORD; DD_ROP_SPACE], + ddsCaps: DDSCAPS2, +}} +pub type LPDDCAPS_DX6 = *mut DDCAPS_DX6; +STRUCT!{struct DDCAPS_DX7 { + dwSize: DWORD, + dwCaps: DWORD, + dwCaps2: DWORD, + dwCKeyCaps: DWORD, + dwFXCaps: DWORD, + dwFXAlphaCaps: DWORD, + dwPalCaps: DWORD, + dwSVCaps: DWORD, + dwAlphaBltConstBitDepths: DWORD, + dwAlphaBltPixelBitDepths: DWORD, + dwAlphaBltSurfaceBitDepths: DWORD, + dwAlphaOverlayConstBitDepths: DWORD, + dwAlphaOverlayPixelBitDepths: DWORD, + dwAlphaOverlaySurfaceBitDepths: DWORD, + dwZBufferBitDepths: DWORD, + dwVidMemTotal: DWORD, + dwVidMemFree: DWORD, + dwMaxVisibleOverlays: DWORD, + dwCurrVisibleOverlays: DWORD, + dwNumFourCCCodes: DWORD, + dwAlignBoundarySrc: DWORD, + dwAlignSizeSrc: DWORD, + dwAlignBoundaryDest: DWORD, + dwAlignSizeDest: DWORD, + dwAlignStrideAlign: DWORD, + dwRops: [DWORD; DD_ROP_SPACE], + ddsOldCaps: DDSCAPS, + dwMinOverlayStretch: DWORD, + dwMaxOverlayStretch: DWORD, + dwMinLiveVideoStretch: DWORD, + dwMaxLiveVideoStretch: DWORD, + dwMinHwCodecStretch: DWORD, + dwMaxHwCodecStretch: DWORD, + dwReserved1: DWORD, + dwReserved2: DWORD, + dwReserved3: DWORD, + dwSVBCaps: DWORD, + dwSVBCKeyCaps: DWORD, + dwSVBFXCaps: DWORD, + dwSVBRops: [DWORD; DD_ROP_SPACE], + dwVSBCaps: DWORD, + dwVSBCKeyCaps: DWORD, + dwVSBFXCaps: DWORD, + dwVSBRops: [DWORD; DD_ROP_SPACE], + dwSSBCaps: DWORD, + dwSSBCKeyCaps: DWORD, + dwSSBFXCaps: DWORD, + dwSSBRops: [DWORD; DD_ROP_SPACE], + dwMaxVideoPorts: DWORD, + dwCurrVideoPorts: DWORD, + dwSVBCaps2: DWORD, + dwNLVBCaps: DWORD, + dwNLVBCaps2: DWORD, + dwNLVBCKeyCaps: DWORD, + dwNLVBFXCaps: DWORD, + dwNLVBRops: [DWORD; DD_ROP_SPACE], + ddsCaps: DDSCAPS2, +}} +pub type LPDDCAPS_DX7 = *mut DDCAPS_DX7; +pub type DDCAPS = DDCAPS_DX7; +pub type LPDDCAPS = *mut DDCAPS; +UNION!{union DDPIXELFORMAT_u1 { + [u32; 1], + dwRGBBitCount dwRGBBitCount_mut: DWORD, + dwYUVBitCount dwYUVBitCount_mut: DWORD, + dwZBufferBitDepth dwZBufferBitDepth_mut: DWORD, + dwAlphaBitDepth dwAlphaBitDepth_mut: DWORD, + dwLuminanceBitCount dwLuminanceBitCount_mut: DWORD, + dwBumpBitCount dwBumpBitCount_mut: DWORD, + dwPrivateFormatBitCount dwPrivateFormatBitCount_mut: DWORD, +}} +UNION!{union DDPIXELFORMAT_u2 { + [u32; 1], + dwRBitMask dwRBitMask_mut: DWORD, + dwYBitMask dwYBitMask_mut: DWORD, + dwStencilBitDepth dwStencilBitDepth_mut: DWORD, + dwLuminanceBitMask dwLuminanceBitMask_mut: DWORD, + dwBumpDuBitMask dwBumpDuBitMask_mut: DWORD, + dwOperations dwOperations_mut: DWORD, +}} +STRUCT!{struct DDPIXELFORMAT_u3_MultiSampleCaps { + wFlipMSTypes: WORD, + wBltMSTypes: WORD, +}} +UNION!{union DDPIXELFORMAT_u3 { + [u32; 1], + dwGBitMask dwGBitMask_mut: DWORD, + dwUBitMask dwUBitMask_mut: DWORD, + dwZBitMask dwZBitMask_mut: DWORD, + dwBumpDvBitMask dwBumpDvBitMask_mut: DWORD, + MultiSampleCaps MultiSampleCaps_mut: DDPIXELFORMAT_u3_MultiSampleCaps, +}} +UNION!{union DDPIXELFORMAT_u4 { + [u32; 1], + dwBBitMask dwBBitMask_mut: DWORD, + dwVBitMask dwVBitMask_mut: DWORD, + dwStencilBitMask dwStencilBitMask_mut: DWORD, + dwBumpLuminanceBitMask dwBumpLuminanceBitMask_mut: DWORD, +}} +UNION!{union DDPIXELFORMAT_u5 { + [u32; 1], + dwRGBAlphaBitMask dwRGBAlphaBitMask_mut: DWORD, + dwYUVAlphaBitMask dwYUVAlphaBitMask_mut: DWORD, + dwLuminanceAlphaBitMask dwLuminanceAlphaBitMask_mut: DWORD, + dwRGBZBitMask dwRGBZBitMask_mut: DWORD, + dwYUVZBitMask dwYUVZBitMask_mut: DWORD, +}} +STRUCT!{struct DDPIXELFORMAT { + dwSize: DWORD, + dwFlags: DWORD, + dwFourCC: DWORD, + u1: DDPIXELFORMAT_u1, + u2: DDPIXELFORMAT_u2, + u3: DDPIXELFORMAT_u3, + u4: DDPIXELFORMAT_u4, + u5: DDPIXELFORMAT_u5, +}} +pub type LPDDPIXELFORMAT = *mut DDPIXELFORMAT; +UNION!{union DDOVERLAYFX_u1 { + [usize; 1], + dwAlphaDestConst dwAlphaDestConst_mut: DWORD, + lpDDSAlphaDest lpDDSAlphaDest_mut: LPDIRECTDRAWSURFACE, +}} +UNION!{union DDOVERLAYFX_u2 { + [usize; 1], + dwAlphaSrcConst dwAlphaSrcConst_mut: DWORD, + lpDDSAlphaSrc lpDDSAlphaSrc_mut: LPDIRECTDRAWSURFACE, +}} +STRUCT!{struct DDOVERLAYFX { + dwSize: DWORD, + dwAlphaEdgeBlendBitDepth: DWORD, + dwAlphaEdgeBlend: DWORD, + dwReserved: DWORD, + dwAlphaDestConstBitDepth: DWORD, + u1: DDOVERLAYFX_u1, + dwAlphaSrcConstBitDepth: DWORD, + u2: DDOVERLAYFX_u2, + dckDestColorkey: DDCOLORKEY, + dckSrcColorkey: DDCOLORKEY, + dwDDFX: DWORD, + dwFlags: DWORD, +}} +pub type LPDDOVERLAYFX = *mut DDOVERLAYFX; +STRUCT!{struct DDBLTBATCH { + lprDest: LPRECT, + lpDDSSrc: LPDIRECTDRAWSURFACE, + lprSrc: LPRECT, + dwFlags: DWORD, + lpDDBltFx: LPDDBLTFX, +}} +pub type LPDDBLTBATCH = *mut DDBLTBATCH; +STRUCT!{struct DDGAMMARAMP { + red: [WORD; 256], + green: [WORD; 256], + blue: [WORD; 256], +}} +pub type LPDDGAMMARAMP = *mut DDGAMMARAMP; +pub const MAX_DDDEVICEID_STRING: usize = 512; +STRUCT!{struct DDDEVICEIDENTIFIER { + szDriver: [char; MAX_DDDEVICEID_STRING], + szDescription: [char; MAX_DDDEVICEID_STRING], + liDriverVersion: LARGE_INTEGER, + dwVendorId: DWORD, + dwDeviceId: DWORD, + dwSubSysId: DWORD, + dwRevision: DWORD, + guidDeviceIdentifier: GUID, +}} +pub type LPDDDEVICEIDENTIFIER = *mut DDDEVICEIDENTIFIER; +STRUCT!{struct DDDEVICEIDENTIFIER2 { + szDriver: [char; MAX_DDDEVICEID_STRING], + szDescription: [char; MAX_DDDEVICEID_STRING], + liDriverVersion: LARGE_INTEGER, + dwVendorId: DWORD, + dwDeviceId: DWORD, + dwSubSysId: DWORD, + dwRevision: DWORD, + guidDeviceIdentifier: GUID, + dwWHQLLevel: DWORD, +}} +pub type LPDDDEVICEIDENTIFIER2 = *mut DDDEVICEIDENTIFIER2; +pub const DDGDI_GETHOSTIDENTIFIER: DWORD = 0x00000001; +#[inline] +pub fn GET_WHQL_YEAR(dwWHQLLevel: u32) -> u32 { + dwWHQLLevel / 0x10000 +} +#[inline] +pub fn GET_WHQL_MONTH(dwWHQLLevel: u32) -> u32 { + (dwWHQLLevel / 0x100) & 0x00ff +} +#[inline] +pub fn GET_WHQL_DAY(dwWHQLLevel: u32) -> u32 { + dwWHQLLevel & 0xff +} +FN!{stdcall LPCLIPPERCALLBACK( + lpDDClipper: LPDIRECTDRAWCLIPPER, + hWnd: HWND, + code: DWORD, + lpContext: LPVOID, +) -> DWORD} +FN!{stdcall LPSURFACESTREAMINGCALLBACK( + DWORD, +) -> DWORD} +RIDL!{#[uuid(0x6c14db80, 0xa733, 0x11ce, 0xa5, 0x21, 0x00, 0x20, 0xaf, 0x0b, 0xe5, 0x60)] +interface IDirectDraw(IDirectDrawVtbl): IUnknown(IUnknownVtbl) { + fn Compact() -> HRESULT, + fn CreateClipper( + dwFlags: DWORD, + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreatePalette( + dwFlags: DWORD, + lpDDColorArray: LPPALETTEENTRY, + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreateSurface( + lpDDSurfaceDesc: LPDDSURFACEDESC, + lplpDDSurface: *mut LPDIRECTDRAWSURFACE, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn DuplicateSurface( + lpDDSurface: LPDIRECTDRAWSURFACE, + lplpDupDDSurface: *mut LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn EnumDisplayModes( + dwFlags: DWORD, + lpDDSurfaceDesc: LPDDSURFACEDESC, + lpContext: LPVOID, + lpEnumModesCallback: LPDDENUMMODESCALLBACK, + ) -> HRESULT, + fn EnumSurfaces( + dwFlags: DWORD, + lpDDSD: LPDDSURFACEDESC, + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn FlipToGDISurface() -> HRESULT, + fn GetCaps( + lpDDDriverCaps: LPDDCAPS, + lpDDHELCaps: LPDDCAPS, + ) -> HRESULT, + fn GetDisplayMode( + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn GetFourCCCodes( + lpNumCodes: LPDWORD, + lpCodes: LPDWORD, + ) -> HRESULT, + fn GetGDISurface( + lplpGDIDDSSurface: *mut LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn GetMonitorFrequency( + lpdwFrequency: LPDWORD, + ) -> HRESULT, + fn GetScanLine( + lpdwScanLine: LPDWORD, + ) -> HRESULT, + fn GetVerticalBlankStatus( + lpbIsInVB: LPBOOL, + ) -> HRESULT, + fn Initialize( + lpGUID: *mut GUID, + ) -> HRESULT, + fn RestoreDisplayMode() -> HRESULT, + fn SetCooperativeLevel( + hWnd: HWND, + dwFlags: DWORD, + ) -> HRESULT, + fn SetDisplayMode( + dwWidth: DWORD, + dwHeight: DWORD, + dwBPP: DWORD, + ) -> HRESULT, + fn WaitForVerticalBlank( + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, +}} +RIDL!{#[uuid(0xb3a6f3e0, 0x2b43, 0x11cf, 0xa2, 0xde, 0x00, 0xaa, 0x00, 0xb9, 0x33, 0x56)] +interface IDirectDraw2(IDirectDraw2Vtbl): IUnknown(IUnknownVtbl) { + fn Compact() -> HRESULT, + fn CreateClipper( + dwFlags: DWORD, + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreatePalette( + dwFlags: DWORD, + lpDDColorArray: LPPALETTEENTRY, + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreateSurface( + lpDDSurfaceDesc: LPDDSURFACEDESC, + lplpDDSurface: *mut LPDIRECTDRAWSURFACE, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn DuplicateSurface( + lpDDSurface: LPDIRECTDRAWSURFACE, + lplpDupDDSurface: *mut LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn EnumDisplayModes( + dwFlags: DWORD, + lpDDSurfaceDesc: LPDDSURFACEDESC, + lpContext: LPVOID, + lpEnumModesCallback: LPDDENUMMODESCALLBACK, + ) -> HRESULT, + fn EnumSurfaces( + dwFlags: DWORD, + lpDDSD: LPDDSURFACEDESC, + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn FlipToGDISurface() -> HRESULT, + fn GetCaps( + lpDDDriverCaps: LPDDCAPS, + lpDDHELCaps: LPDDCAPS, + ) -> HRESULT, + fn GetDisplayMode( + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn GetFourCCCodes( + lpNumCodes: LPDWORD, + lpCodes: LPDWORD, + ) -> HRESULT, + fn GetGDISurface( + lplpGDIDDSSurface: *mut LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn GetMonitorFrequency( + lpdwFrequency: LPDWORD, + ) -> HRESULT, + fn GetScanLine( + lpdwScanLine: LPDWORD, + ) -> HRESULT, + fn GetVerticalBlankStatus( + lpbIsInVB: LPBOOL, + ) -> HRESULT, + fn Initialize( + lpGUID: *mut GUID, + ) -> HRESULT, + fn RestoreDisplayMode() -> HRESULT, + fn SetCooperativeLevel( + hWnd: HWND, + dwFlags: DWORD, + ) -> HRESULT, + fn SetDisplayMode( + dwWidth: DWORD, + dwHeight: DWORD, + dwBPP: DWORD, + dwRefreshRate: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn WaitForVerticalBlank( + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn GetAvailableVidMem( + lpDDSCaps: LPDDSCAPS, + lpdwTotal: LPDWORD, + lpdwFree: LPDWORD, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x9c59509a, 0x39bd, 0x11d1, 0x8c, 0x4a, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc5)] +interface IDirectDraw4(IDirectDraw4Vtbl): IUnknown(IUnknownVtbl) { + fn Compact() -> HRESULT, + fn CreateClipper( + dwFlags: DWORD, + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreatePalette( + dwFlags: DWORD, + lpDDColorArray: LPPALETTEENTRY, + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreateSurface( + lpDDSurfaceDesc2: LPDDSURFACEDESC2, + lplpDDSurface: *mut LPDIRECTDRAWSURFACE4, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn DuplicateSurface( + lpDDSurface: LPDIRECTDRAWSURFACE4, + lplpDupDDSurface: *mut LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn EnumDisplayModes( + dwFlags: DWORD, + lpDDSurfaceDesc2: LPDDSURFACEDESC2, + lpContext: LPVOID, + lpEnumModesCallback: LPDDENUMMODESCALLBACK2, + ) -> HRESULT, + fn EnumSurfaces( + dwFlags: DWORD, + lpDDSD2: LPDDSURFACEDESC2, + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK2, + ) -> HRESULT, + fn FlipToGDISurface() -> HRESULT, + fn GetCaps( + lpDDDriverCaps: LPDDCAPS, + lpDDHELCaps: LPDDCAPS, + ) -> HRESULT, + fn GetDisplayMode( + lpDDSurfaceDesc2: LPDDSURFACEDESC2, + ) -> HRESULT, + fn GetFourCCCodes( + lpNumCodes: LPDWORD, + lpCodes: LPDWORD, + ) -> HRESULT, + fn GetGDISurface( + lplpGDIDDSSurface: *mut LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn GetMonitorFrequency( + lpdwFrequency: LPDWORD, + ) -> HRESULT, + fn GetScanLine( + lpdwScanLine: LPDWORD, + ) -> HRESULT, + fn GetVerticalBlankStatus( + lpbIsInVB: LPBOOL, + ) -> HRESULT, + fn Initialize( + lpGUID: *mut GUID, + ) -> HRESULT, + fn RestoreDisplayMode() -> HRESULT, + fn SetCooperativeLevel( + hWnd: HWND, + dwFlags: DWORD, + ) -> HRESULT, + fn SetDisplayMode( + dwWidth: DWORD, + dwHeight: DWORD, + dwBPP: DWORD, + dwRefreshRate: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn WaitForVerticalBlank( + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn GetAvailableVidMem( + lpDDSCaps2: LPDDSCAPS2, + lpdwTotal: LPDWORD, + lpdwFree: LPDWORD, + ) -> HRESULT, + fn GetSurfaceFromDC( + hdc: HDC, + lpDDS: *mut LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn RestoreAllSurfaces() -> HRESULT, + fn TestCooperativeLevel() -> HRESULT, + fn GetDeviceIdentifier( + lpdddi: LPDDDEVICEIDENTIFIER, + dwFlags: DWORD, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x15e65ec0, 0x3b9c, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b)] +interface IDirectDraw7(IDirectDraw7Vtbl): IUnknown(IUnknownVtbl) { + fn Compact() -> HRESULT, + fn CreateClipper( + dwFlags: DWORD, + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreatePalette( + dwFlags: DWORD, + lpDDColorArray: LPPALETTEENTRY, + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn CreateSurface( + lpDDSurfaceDesc2: LPDDSURFACEDESC2, + lplpDDSurface: *mut LPDIRECTDRAWSURFACE7, + pUnkOuter: *mut IUnknown, + ) -> HRESULT, + fn DuplicateSurface( + lpDDSurface: LPDIRECTDRAWSURFACE7, + lplpDupDDSurface: *mut LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn EnumDisplayModes( + dwFlags: DWORD, + lpDDSurfaceDesc2: LPDDSURFACEDESC2, + lpContext: LPVOID, + lpEnumModesCallback: LPDDENUMMODESCALLBACK2, + ) -> HRESULT, + fn EnumSurfaces( + dwFlags: DWORD, + lpDDSD2: LPDDSURFACEDESC2, + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK7, + ) -> HRESULT, + fn FlipToGDISurface() -> HRESULT, + fn GetCaps( + lpDDDriverCaps: LPDDCAPS, + lpDDHELCaps: LPDDCAPS, + ) -> HRESULT, + fn GetDisplayMode( + lpDDSurfaceDesc2: LPDDSURFACEDESC2, + ) -> HRESULT, + fn GetFourCCCodes( + lpNumCodes: LPDWORD, + lpCodes: LPDWORD, + ) -> HRESULT, + fn GetGDISurface( + lplpGDIDDSSurface: *mut LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn GetMonitorFrequency( + lpdwFrequency: LPDWORD, + ) -> HRESULT, + fn GetScanLine( + lpdwScanLine: LPDWORD, + ) -> HRESULT, + fn GetVerticalBlankStatus( + lpbIsInVB: LPBOOL, + ) -> HRESULT, + fn Initialize( + lpGUID: *mut GUID, + ) -> HRESULT, + fn RestoreDisplayMode() -> HRESULT, + fn SetCooperativeLevel( + hWnd: HWND, + dwFlags: DWORD, + ) -> HRESULT, + fn SetDisplayMode( + dwWidth: DWORD, + dwHeight: DWORD, + dwBPP: DWORD, + dwRefreshRate: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn WaitForVerticalBlank( + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn GetAvailableVidMem( + lpDDSCaps2: LPDDSCAPS2, + lpdwTotal: LPDWORD, + lpdwFree: LPDWORD, + ) -> HRESULT, + fn GetSurfaceFromDC( + hdc: HDC, + lpDDS: *mut LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn RestoreAllSurfaces() -> HRESULT, + fn TestCooperativeLevel() -> HRESULT, + fn GetDeviceIdentifier( + lpdddi: LPDDDEVICEIDENTIFIER2, + dwFlags: DWORD, + ) -> HRESULT, + fn StartModeTest( + lpModesToTest: LPSIZE, + dwNumEntries: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn EvaluateMode( + dwFlags: DWORD, + pSecondsUntilTimeout: *mut DWORD, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x6c14db84, 0xa733, 0x11ce, 0xa5, 0x21, 0x00, 0x20, 0xaf, 0x0b, 0xe5, 0x60)] +interface IDirectDrawPalette(IDirectDrawPaletteVtbl): IUnknown(IUnknownVtbl) { + fn GetCaps( + lpdwCaps: LPDWORD, + ) -> HRESULT, + fn GetEntries( + dwFlags: DWORD, + dwBase: DWORD, + dwNumEntries: DWORD, + lpEntries: LPPALETTEENTRY, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + dwFlags: DWORD, + lpDDColorTable: LPPALETTEENTRY, + ) -> HRESULT, + fn SetEntries( + dwFlags: DWORD, + dwStartingEntry: DWORD, + dwCount: DWORD, + lpEntries: LPPALETTEENTRY, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x6c14db85, 0xa733, 0x11ce, 0xa5, 0x21, 0x00, 0x20, 0xaf, 0x0b, 0xe5, 0x60)] +interface IDirectDrawClipper(IDirectDrawClipperVtbl): IUnknown(IUnknownVtbl) { + fn GetClipList( + lpRect: LPRECT, + lpClipList: LPRGNDATA, + lpdwSize: LPDWORD, + ) -> HRESULT, + fn GetHWnd( + lphWnd: *mut HWND, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + dwFlags: DWORD, + ) -> HRESULT, + fn IsClipListChanged( + lpbChanged: *mut BOOL, + ) -> HRESULT, + fn SetClipList( + lpClipList: LPRGNDATA, + dwFlags: DWORD, + ) -> HRESULT, + fn SetHWnd( + dwFlags: DWORD, + hWnd: HWND, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x6c14db81, 0xa733, 0x11ce, 0xa5, 0x21, 0x00, 0x20, 0xaf, 0x0b, 0xe5, 0x60)] +interface IDirectDrawSurface(IDirectDrawSurfaceVtbl): IUnknown(IUnknownVtbl) { + fn AddAttachedSurface( + lpDDSurface: LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn AddOverlayDirtyRect( + lpRect: LPRECT, + ) -> HRESULT, + fn Blt( + lpDestRect: LPRECT, + lpDDSrcSurface: LPDIRECTDRAWSURFACE, + lpSrcRect: LPRECT, + dwFlags: DWORD, + lpDDBltFx: LPDDBLTFX, + ) -> HRESULT, + fn BltBatch( + lpDDBltBatch: LPDDBLTBATCH, + dwCount: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn BltFast( + dwX: DWORD, + dwY: DWORD, + lpDDSrcSurface: LPDIRECTDRAWSURFACE, + lpSrcRect: LPRECT, + dwFlags: DWORD, + ) -> HRESULT, + fn DeleteAttachedSurface( + dwFlags: DWORD, + lpDDSAttachedSurface: LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn EnumAttachedSurfaces( + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn EnumOverlayZOrders( + dwFlags: DWORD, + lpContext: LPVOID, + lpfnCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn Flip( + lpDDSurfaceTargetOverride: LPDIRECTDRAWSURFACE, + dwFlags: DWORD, + ) -> HRESULT, + fn GetAttachedSurface( + lpDDSCaps: LPDDSCAPS, + lplpDDAttachedSurface: *mut LPDIRECTDRAWSURFACE, + ) -> HRESULT, + fn GetBltStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetCaps( + lpDDSCaps: LPDDSCAPS, + ) -> HRESULT, + fn GetClipper( + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn GetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn GetDC( + lphDC: *mut HDC, + ) -> HRESULT, + fn GetFlipStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetOverlayPosition( + lplX: LPLONG, + lplY: LPLONG, + ) -> HRESULT, + fn GetPalette( + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn GetPixelFormat( + lpDDPixelFormat: LPDDPIXELFORMAT, + ) -> HRESULT, + fn GetSurfaceDesc( + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn IsLost() -> HRESULT, + fn Lock( + lpDestRect: LPRECT, + lpDDSurfaceDesc: LPDDSURFACEDESC, + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn ReleaseDC( + hDC: HDC, + ) -> HRESULT, + fn Restore() -> HRESULT, + fn SetClipper( + lpDDClipper: LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn SetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn SetOverlayPosition( + lX: LONG, + lY: LONG, + ) -> HRESULT, + fn SetPalette( + lpDDPalette: LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn Unlock( + lpRect: LPVOID, + ) -> HRESULT, + fn UpdateOverlay( + lpSrcRect: LPRECT, + lpDDDestSurface: LPDIRECTDRAWSURFACE, + lpDestRect: LPRECT, + dwFlags: DWORD, + lpDDOverlayFx: LPDDOVERLAYFX, + ) -> HRESULT, + fn UpdateOverlayDisplay( + dwFlags: DWORD, + ) -> HRESULT, + fn UpdateOverlayZOrder( + dwFlags: DWORD, + lpDDSReference: LPDIRECTDRAWSURFACE, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x57805885, 0x6eec, 0x11cf, 0x94, 0x41, 0xa8, 0x23, 0x03, 0xc1, 0x0e, 0x27)] +interface IDirectDrawSurface2(IDirectDrawSurface2Vtbl): IUnknown(IUnknownVtbl) { + fn AddAttachedSurface( + lpDDSurface: LPDIRECTDRAWSURFACE2, + ) -> HRESULT, + fn AddOverlayDirtyRect( + lpRect: LPRECT, + ) -> HRESULT, + fn Blt( + lpDestRect: LPRECT, + lpDDSrcSurface: LPDIRECTDRAWSURFACE2, + lpSrcRect: LPRECT, + dwFlags: DWORD, + lpDDBltFx: LPDDBLTFX, + ) -> HRESULT, + fn BltBatch( + lpDDBltBatch: LPDDBLTBATCH, + dwCount: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn BltFast( + dwX: DWORD, + dwY: DWORD, + lpDDSrcSurface: LPDIRECTDRAWSURFACE2, + lpSrcRect: LPRECT, + dwFlags: DWORD, + ) -> HRESULT, + fn DeleteAttachedSurface( + dwFlags: DWORD, + lpDDSAttachedSurface: LPDIRECTDRAWSURFACE2, + ) -> HRESULT, + fn EnumAttachedSurfaces( + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn EnumOverlayZOrders( + dwFlags: DWORD, + lpContext: LPVOID, + lpfnCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn Flip( + lpDDSurfaceTargetOverride: LPDIRECTDRAWSURFACE2, + dwFlags: DWORD, + ) -> HRESULT, + fn GetAttachedSurface( + lpDDSCaps: LPDDSCAPS, + lplpDDAttachedSurface: *mut LPDIRECTDRAWSURFACE2, + ) -> HRESULT, + fn GetBltStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetCaps( + lpDDSCaps: LPDDSCAPS, + ) -> HRESULT, + fn GetClipper( + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn GetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn GetDC( + lphDC: *mut HDC, + ) -> HRESULT, + fn GetFlipStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetOverlayPosition( + lplX: LPLONG, + lplY: LPLONG, + ) -> HRESULT, + fn GetPalette( + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn GetPixelFormat( + lpDDPixelFormat: LPDDPIXELFORMAT, + ) -> HRESULT, + fn GetSurfaceDesc( + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn IsLost() -> HRESULT, + fn Lock( + lpDestRect: LPRECT, + lpDDSurfaceDesc: LPDDSURFACEDESC, + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn ReleaseDC( + hDC: HDC, + ) -> HRESULT, + fn Restore() -> HRESULT, + fn SetClipper( + lpDDClipper: LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn SetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn SetOverlayPosition( + lX: LONG, + lY: LONG, + ) -> HRESULT, + fn SetPalette( + lpDDPalette: LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn Unlock( + lpRect: LPVOID, + ) -> HRESULT, + fn UpdateOverlay( + lpSrcRect: LPRECT, + lpDDDestSurface: LPDIRECTDRAWSURFACE2, + lpDestRect: LPRECT, + dwFlags: DWORD, + lpDDOverlayFx: LPDDOVERLAYFX, + ) -> HRESULT, + fn UpdateOverlayDisplay( + dwFlags: DWORD, + ) -> HRESULT, + fn UpdateOverlayZOrder( + dwFlags: DWORD, + lpDDSReference: LPDIRECTDRAWSURFACE2, + ) -> HRESULT, + fn GetDDInterface( + lplpDD: *mut LPVOID, + ) -> HRESULT, + fn PageLock( + dwFlags: DWORD, + ) -> HRESULT, + fn PageUnlock( + dwFlags: DWORD, + ) -> HRESULT, +}} +RIDL!{#[uuid(0xda044e00, 0x69b2, 0x11d0, 0xa1, 0xd5, 0x00, 0xaa, 0x00, 0xb8, 0xdf, 0xbb)] +interface IDirectDrawSurface3(IDirectDrawSurface3Vtbl): IUnknown(IUnknownVtbl) { + fn AddAttachedSurface( + lpDDSurface: LPDIRECTDRAWSURFACE3, + ) -> HRESULT, + fn AddOverlayDirtyRect( + lpRect: LPRECT, + ) -> HRESULT, + fn Blt( + lpDestRect: LPRECT, + lpDDSrcSurface: LPDIRECTDRAWSURFACE3, + lpSrcRect: LPRECT, + dwFlags: DWORD, + lpDDBltFx: LPDDBLTFX, + ) -> HRESULT, + fn BltBatch( + lpDDBltBatch: LPDDBLTBATCH, + dwCount: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn BltFast( + dwX: DWORD, + dwY: DWORD, + lpDDSrcSurface: LPDIRECTDRAWSURFACE3, + lpSrcRect: LPRECT, + dwFlags: DWORD, + ) -> HRESULT, + fn DeleteAttachedSurface( + dwFlags: DWORD, + lpDDSAttachedSurface: LPDIRECTDRAWSURFACE3, + ) -> HRESULT, + fn EnumAttachedSurfaces( + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn EnumOverlayZOrders( + dwFlags: DWORD, + lpContext: LPVOID, + lpfnCallback: LPDDENUMSURFACESCALLBACK, + ) -> HRESULT, + fn Flip( + lpDDSurfaceTargetOverride: LPDIRECTDRAWSURFACE3, + dwFlags: DWORD, + ) -> HRESULT, + fn GetAttachedSurface( + lpDDSCaps: LPDDSCAPS, + lplpDDAttachedSurface: *mut LPDIRECTDRAWSURFACE3, + ) -> HRESULT, + fn GetBltStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetCaps( + lpDDSCaps: LPDDSCAPS, + ) -> HRESULT, + fn GetClipper( + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn GetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn GetDC( + lphDC: *mut HDC, + ) -> HRESULT, + fn GetFlipStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetOverlayPosition( + lplX: LPLONG, + lplY: LPLONG, + ) -> HRESULT, + fn GetPalette( + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn GetPixelFormat( + lpDDPixelFormat: LPDDPIXELFORMAT, + ) -> HRESULT, + fn GetSurfaceDesc( + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + lpDDSurfaceDesc: LPDDSURFACEDESC, + ) -> HRESULT, + fn IsLost() -> HRESULT, + fn Lock( + lpDestRect: LPRECT, + lpDDSurfaceDesc: LPDDSURFACEDESC, + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn ReleaseDC( + hDC: HDC, + ) -> HRESULT, + fn Restore() -> HRESULT, + fn SetClipper( + lpDDClipper: LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn SetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn SetOverlayPosition( + lX: LONG, + lY: LONG, + ) -> HRESULT, + fn SetPalette( + lpDDPalette: LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn Unlock( + lpRect: LPVOID, + ) -> HRESULT, + fn UpdateOverlay( + lpSrcRect: LPRECT, + lpDDDestSurface: LPDIRECTDRAWSURFACE3, + lpDestRect: LPRECT, + dwFlags: DWORD, + lpDDOverlayFx: LPDDOVERLAYFX, + ) -> HRESULT, + fn UpdateOverlayDisplay( + dwFlags: DWORD, + ) -> HRESULT, + fn UpdateOverlayZOrder( + dwFlags: DWORD, + lpDDSReference: LPDIRECTDRAWSURFACE3, + ) -> HRESULT, + fn GetDDInterface( + lplpDD: *mut LPVOID, + ) -> HRESULT, + fn PageLock( + dwFlags: DWORD, + ) -> HRESULT, + fn PageUnlock( + dwFlags: DWORD, + ) -> HRESULT, + fn SetSurfaceDesc( + lpDDsd2: LPDDSURFACEDESC, + dwFlags: DWORD, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x0b2b8630, 0xad35, 0x11d0, 0x8e, 0xa6, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b)] +interface IDirectDrawSurface4(IDirectDrawSurface4Vtbl): IUnknown(IUnknownVtbl) { + fn AddAttachedSurface( + lpDDSurface: LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn AddOverlayDirtyRect( + lpRect: LPRECT, + ) -> HRESULT, + fn Blt( + lpDestRect: LPRECT, + lpDDSrcSurface: LPDIRECTDRAWSURFACE4, + lpSrcRect: LPRECT, + dwFlags: DWORD, + lpDDBltFx: LPDDBLTFX, + ) -> HRESULT, + fn BltBatch( + lpDDBltBatch: LPDDBLTBATCH, + dwCount: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn BltFast( + dwX: DWORD, + dwY: DWORD, + lpDDSrcSurface: LPDIRECTDRAWSURFACE4, + lpSrcRect: LPRECT, + dwFlags: DWORD, + ) -> HRESULT, + fn DeleteAttachedSurface( + dwFlags: DWORD, + lpDDSAttachedSurface: LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn EnumAttachedSurfaces( + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK2, + ) -> HRESULT, + fn EnumOverlayZOrders( + dwFlags: DWORD, + lpContext: LPVOID, + lpfnCallback: LPDDENUMSURFACESCALLBACK2, + ) -> HRESULT, + fn Flip( + lpDDSurfaceTargetOverride: LPDIRECTDRAWSURFACE4, + dwFlags: DWORD, + ) -> HRESULT, + fn GetAttachedSurface( + lpDDSCaps: LPDDSCAPS2, + lplpDDAttachedSurface: *mut LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn GetBltStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetCaps( + lpDDSCaps: LPDDSCAPS2, + ) -> HRESULT, + fn GetClipper( + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn GetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn GetDC( + lphDC: *mut HDC, + ) -> HRESULT, + fn GetFlipStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetOverlayPosition( + lplX: LPLONG, + lplY: LPLONG, + ) -> HRESULT, + fn GetPalette( + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn GetPixelFormat( + lpDDPixelFormat: LPDDPIXELFORMAT, + ) -> HRESULT, + fn GetSurfaceDesc( + lpDDSurfaceDesc: LPDDSURFACEDESC2, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + lpDDSurfaceDesc: LPDDSURFACEDESC2, + ) -> HRESULT, + fn IsLost() -> HRESULT, + fn Lock( + lpDestRect: LPRECT, + lpDDSurfaceDesc: LPDDSURFACEDESC2, + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn ReleaseDC( + hDC: HDC, + ) -> HRESULT, + fn Restore() -> HRESULT, + fn SetClipper( + lpDDClipper: LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn SetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn SetOverlayPosition( + lX: LONG, + lY: LONG, + ) -> HRESULT, + fn SetPalette( + lpDDPalette: LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn Unlock( + lpRect: LPVOID, + ) -> HRESULT, + fn UpdateOverlay( + lpSrcRect: LPRECT, + lpDDDestSurface: LPDIRECTDRAWSURFACE4, + lpDestRect: LPRECT, + dwFlags: DWORD, + lpDDOverlayFx: LPDDOVERLAYFX, + ) -> HRESULT, + fn UpdateOverlayDisplay( + dwFlags: DWORD, + ) -> HRESULT, + fn UpdateOverlayZOrder( + dwFlags: DWORD, + lpDDSReference: LPDIRECTDRAWSURFACE4, + ) -> HRESULT, + fn GetDDInterface( + lplpDD: *mut LPVOID, + ) -> HRESULT, + fn PageLock( + dwFlags: DWORD, + ) -> HRESULT, + fn PageUnlock( + dwFlags: DWORD, + ) -> HRESULT, + fn SetSurfaceDesc( + lpDDsd2: LPDDSURFACEDESC2, + dwFlags: DWORD, + ) -> HRESULT, + fn SetPrivateData( + guidTag: REFGUID, + lpData: LPVOID, + cbSize: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn GetPrivateData( + guidTag: REFGUID, + lpBuffer: LPVOID, + lpcbBufferSize: LPDWORD, + ) -> HRESULT, + fn FreePrivateData( + guidTag: REFGUID, + ) -> HRESULT, + fn GetUniquenessValue( + lpValue: LPDWORD, + ) -> HRESULT, + fn ChangeUniquenessValue() -> HRESULT, +}} +RIDL!{#[uuid(0x06675a80, 0x3b9b, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b)] +interface IDirectDrawSurface7(IDirectDrawSurface7Vtbl): IUnknown(IUnknownVtbl) { + fn AddAttachedSurface( + lpDDSurface: LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn AddOverlayDirtyRect( + lpRect: LPRECT, + ) -> HRESULT, + fn Blt( + lpDestRect: LPRECT, + lpDDSrcSurface: LPDIRECTDRAWSURFACE7, + lpSrcRect: LPRECT, + dwFlags: DWORD, + lpDDBltFx: LPDDBLTFX, + ) -> HRESULT, + fn BltBatch( + lpDDBltBatch: LPDDBLTBATCH, + dwCount: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn BltFast( + dwX: DWORD, + dwY: DWORD, + lpDDSrcSurface: LPDIRECTDRAWSURFACE7, + lpSrcRect: LPRECT, + dwFlags: DWORD, + ) -> HRESULT, + fn DeleteAttachedSurface( + dwFlags: DWORD, + lpDDSAttachedSurface: LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn EnumAttachedSurfaces( + lpContext: LPVOID, + lpEnumSurfacesCallback: LPDDENUMSURFACESCALLBACK7, + ) -> HRESULT, + fn EnumOverlayZOrders( + dwFlags: DWORD, + lpContext: LPVOID, + lpfnCallback: LPDDENUMSURFACESCALLBACK7, + ) -> HRESULT, + fn Flip( + lpDDSurfaceTargetOverride: LPDIRECTDRAWSURFACE7, + dwFlags: DWORD, + ) -> HRESULT, + fn GetAttachedSurface( + lpDDSCaps: LPDDSCAPS2, + lplpDDAttachedSurface: *mut LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn GetBltStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetCaps( + lpDDSCaps: LPDDSCAPS2, + ) -> HRESULT, + fn GetClipper( + lplpDDClipper: *mut LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn GetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn GetDC( + lphDC: *mut HDC, + ) -> HRESULT, + fn GetFlipStatus( + dwFlags: DWORD, + ) -> HRESULT, + fn GetOverlayPosition( + lplX: LPLONG, + lplY: LPLONG, + ) -> HRESULT, + fn GetPalette( + lplpDDPalette: *mut LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn GetPixelFormat( + lpDDPixelFormat: LPDDPIXELFORMAT, + ) -> HRESULT, + fn GetSurfaceDesc( + lpDDSurfaceDesc: LPDDSURFACEDESC2, + ) -> HRESULT, + fn Initialize( + lpDD: LPDIRECTDRAW, + lpDDSurfaceDesc: LPDDSURFACEDESC2, + ) -> HRESULT, + fn IsLost() -> HRESULT, + fn Lock( + lpDestRect: LPRECT, + lpDDSurfaceDesc: LPDDSURFACEDESC2, + dwFlags: DWORD, + hEvent: HANDLE, + ) -> HRESULT, + fn ReleaseDC( + hDC: HDC, + ) -> HRESULT, + fn Restore() -> HRESULT, + fn SetClipper( + lpDDClipper: LPDIRECTDRAWCLIPPER, + ) -> HRESULT, + fn SetColorKey( + dwFlags: DWORD, + lpDDColorKey: LPDDCOLORKEY, + ) -> HRESULT, + fn SetOverlayPosition( + lX: LONG, + lY: LONG, + ) -> HRESULT, + fn SetPalette( + lpDDPalette: LPDIRECTDRAWPALETTE, + ) -> HRESULT, + fn Unlock( + lpRect: LPVOID, + ) -> HRESULT, + fn UpdateOverlay( + lpSrcRect: LPRECT, + lpDDDestSurface: LPDIRECTDRAWSURFACE7, + lpDestRect: LPRECT, + dwFlags: DWORD, + lpDDOverlayFx: LPDDOVERLAYFX, + ) -> HRESULT, + fn UpdateOverlayDisplay( + dwFlags: DWORD, + ) -> HRESULT, + fn UpdateOverlayZOrder( + dwFlags: DWORD, + lpDDSReference: LPDIRECTDRAWSURFACE7, + ) -> HRESULT, + fn GetDDInterface( + lplpDD: *mut LPVOID, + ) -> HRESULT, + fn PageLock( + dwFlags: DWORD, + ) -> HRESULT, + fn PageUnlock( + dwFlags: DWORD, + ) -> HRESULT, + fn SetSurfaceDesc( + lpDDsd2: LPDDSURFACEDESC2, + dwFlags: DWORD, + ) -> HRESULT, + fn SetPrivateData( + guidTag: REFGUID, + lpData: LPVOID, + cbSize: DWORD, + dwFlags: DWORD, + ) -> HRESULT, + fn GetPrivateData( + guidTag: REFGUID, + lpBuffer: LPVOID, + lpcbBufferSize: LPDWORD, + ) -> HRESULT, + fn FreePrivateData( + guidTag: REFGUID, + ) -> HRESULT, + fn GetUniquenessValue( + lpValue: LPDWORD, + ) -> HRESULT, + fn ChangeUniquenessValue() -> HRESULT, + fn SetPriority( + dwPriority: DWORD, + ) -> HRESULT, + fn GetPriority( + lpdwPriority: LPDWORD, + ) -> HRESULT, + fn SetLOD( + dwMaxLOD: DWORD, + ) -> HRESULT, + fn GetLOD( + lpdwMaxLOD: LPDWORD, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x4b9f0ee0, 0x0d7e, 0x11d0, 0x9b, 0x06, 0x00, 0xa0, 0xc9, 0x03, 0xa3, 0xb8)] +interface IDirectDrawColorControl(IDirectDrawColorControlVtbl): IUnknown(IUnknownVtbl) { + fn GetColorControls( + lpColorControl: LPDDCOLORCONTROL, + ) -> HRESULT, + fn SetColorControls( + lpColorControl: LPDDCOLORCONTROL, + ) -> HRESULT, +}} +RIDL!{#[uuid(0x69c11c3e, 0xb46b, 0x11d1, 0xad, 0x7a, 0x00, 0xc0, 0x4f, 0xc2, 0x9b, 0x4e)] +interface IDirectDrawGammaControl(IDirectDrawGammaControlVtbl): IUnknown(IUnknownVtbl) { + fn GetGammaRamp( + dwFlags: DWORD, + lpRampData: LPDDGAMMARAMP, + ) -> HRESULT, + fn SetGammaRamp( + dwFlags: DWORD, + lpRampData: LPDDGAMMARAMP, + ) -> HRESULT, +}} +UNION!{union DDSURFACEDESC_u1 { + [u32; 1], + lPitch lPitch_mut: LONG, + dwLinearSize dwLinearSize_mut: DWORD, +}} +UNION!{union DDSURFACEDESC_u2 { + [u32; 1], + dwMipMapCount dwMipMapCount_mut: DWORD, + dwZBufferBitDepth dwZBufferBitDepth_mut: DWORD, + dwRefreshRate dwRefreshRate_mut: DWORD, +}} +STRUCT!{struct DDSURFACEDESC { + dwSize: DWORD, + dwFlags: DWORD, + dwHeight: DWORD, + dwWidth: DWORD, + u1: DDSURFACEDESC_u1, + dwBackBufferCount: DWORD, + u2: DDSURFACEDESC_u2, + dwAlphaBitDepth: DWORD, + dwReserved: DWORD, + lpSurface: LPVOID, + ddckCKDestOverlay: DDCOLORKEY, + ddckCKDestBlt: DDCOLORKEY, + ddckCKSrcOverlay: DDCOLORKEY, + ddckCKSrcBlt: DDCOLORKEY, + ddpfPixelFormat: DDPIXELFORMAT, + ddsCaps: DDSCAPS, +}} +UNION!{union DDSURFACEDESC2_u1 { + [u32; 1], + lPitch lPitch_mut: LONG, + dwLinearSize dwLinearSize_mut: DWORD, +}} +UNION!{union DDSURFACEDESC2_u5 { + [u32; 1], + dwBackBufferCount dwBackBufferCount_mut: DWORD, + dwDepth dwDepth_mut: DWORD, +}} +UNION!{union DDSURFACEDESC2_u2 { + [u32; 1], + dwMipMapCount dwMipMapCount_mut: DWORD, + dwRefreshRate dwRefreshRate_mut: DWORD, + dwSrcVBHandle dwSrcVBHandle_mut: DWORD, +}} +UNION!{union DDSURFACEDESC2_u3 { + [u32; 2], + ddckCKDestOverlay ddckCKDestOverlay_mut: DDCOLORKEY, + dwEmptyFaceColor dwEmptyFaceColor_mut: DWORD, +}} +UNION!{union DDSURFACEDESC2_u4 { + [u32; 8], + ddpfPixelFormat ddpfPixelFormat_mut: DDPIXELFORMAT, + dwFVF dwFVF_mut: DWORD, +}} +STRUCT!{struct DDSURFACEDESC2 { + dwSize: DWORD, + dwFlags: DWORD, + dwHeight: DWORD, + dwWidth: DWORD, + u1: DDSURFACEDESC2_u1, + u5: DDSURFACEDESC2_u5, + u2: DDSURFACEDESC2_u2, + dwAlphaBitDepth: DWORD, + dwReserved: DWORD, + lpSurface: LPVOID, + u3: DDSURFACEDESC2_u3, + ddckCKDestBlt: DDCOLORKEY, + ddckCKSrcOverlay: DDCOLORKEY, + ddckCKSrcBlt: DDCOLORKEY, + u4: DDSURFACEDESC2_u4, + ddsCaps: DDSCAPS2, + dwTextureStage: DWORD, +}} +pub const DDSD_CAPS: DWORD = 0x00000001; +pub const DDSD_HEIGHT: DWORD = 0x00000002; +pub const DDSD_WIDTH: DWORD = 0x00000004; +pub const DDSD_PITCH: DWORD = 0x00000008; +pub const DDSD_BACKBUFFERCOUNT: DWORD = 0x00000020; +pub const DDSD_ZBUFFERBITDEPTH: DWORD = 0x00000040; +pub const DDSD_ALPHABITDEPTH: DWORD = 0x00000080; +pub const DDSD_LPSURFACE: DWORD = 0x00000800; +pub const DDSD_PIXELFORMAT: DWORD = 0x00001000; +pub const DDSD_CKDESTOVERLAY: DWORD = 0x00002000; +pub const DDSD_CKDESTBLT: DWORD = 0x00004000; +pub const DDSD_CKSRCOVERLAY: DWORD = 0x00008000; +pub const DDSD_CKSRCBLT: DWORD = 0x00010000; +pub const DDSD_MIPMAPCOUNT: DWORD = 0x00020000; +pub const DDSD_REFRESHRATE: DWORD = 0x00040000; +pub const DDSD_LINEARSIZE: DWORD = 0x00080000; +pub const DDSD_TEXTURESTAGE: DWORD = 0x00100000; +pub const DDSD_FVF: DWORD = 0x00200000; +pub const DDSD_SRCVBHANDLE: DWORD = 0x00400000; +pub const DDSD_DEPTH: DWORD = 0x00800000; +pub const DDSD_ALL: DWORD = 0x00fff9ee; +STRUCT!{struct DDOPTSURFACEDESC { + dwSize: DWORD, + dwFlags: DWORD, + ddSCaps: DDSCAPS2, + ddOSCaps: DDOSCAPS, + guid: GUID, + dwCompressionRatio: DWORD, +}} +pub const DDOSD_GUID: DWORD = 0x00000001; +pub const DDOSD_COMPRESSION_RATIO: DWORD = 0x00000002; +pub const DDOSD_SCAPS: DWORD = 0x00000004; +pub const DDOSD_OSCAPS: DWORD = 0x00000008; +pub const DDOSD_ALL: DWORD = 0x0000000f; +pub const DDOSDCAPS_OPTCOMPRESSED: DWORD = 0x00000001; +pub const DDOSDCAPS_OPTREORDERED: DWORD = 0x00000002; +pub const DDOSDCAPS_MONOLITHICMIPMAP: DWORD = 0x00000004; +pub const DDOSDCAPS_VALIDSCAPS: DWORD = 0x30004800; +pub const DDOSDCAPS_VALIDOSCAPS: DWORD = 0x00000007; +STRUCT!{struct DDCOLORCONTROL { + dwSize: DWORD, + dwFlags: DWORD, + lBrightness: LONG, + lContrast: LONG, + lHue: LONG, + lSaturation: LONG, + lSharpness: LONG, + lGamma: LONG, + lColorEnable: LONG, + dwReserved1: DWORD, +}} +pub const DDCOLOR_BRIGHTNESS: DWORD = 0x00000001; +pub const DDCOLOR_CONTRAST: DWORD = 0x00000002; +pub const DDCOLOR_HUE: DWORD = 0x00000004; +pub const DDCOLOR_SATURATION: DWORD = 0x00000008; +pub const DDCOLOR_SHARPNESS: DWORD = 0x00000010; +pub const DDCOLOR_GAMMA: DWORD = 0x00000020; +pub const DDCOLOR_COLORENABLE: DWORD = 0x00000040; +pub const DDSCAPS_RESERVED1: DWORD = 0x00000001; +pub const DDSCAPS_ALPHA: DWORD = 0x00000002; +pub const DDSCAPS_BACKBUFFER: DWORD = 0x00000004; +pub const DDSCAPS_COMPLEX: DWORD = 0x00000008; +pub const DDSCAPS_FLIP: DWORD = 0x00000010; +pub const DDSCAPS_FRONTBUFFER: DWORD = 0x00000020; +pub const DDSCAPS_OFFSCREENPLAIN: DWORD = 0x00000040; +pub const DDSCAPS_OVERLAY: DWORD = 0x00000080; +pub const DDSCAPS_PALETTE: DWORD = 0x00000100; +pub const DDSCAPS_PRIMARYSURFACE: DWORD = 0x00000200; +pub const DDSCAPS_RESERVED3: DWORD = 0x00000400; +pub const DDSCAPS_PRIMARYSURFACELEFT: DWORD = 0x00000000; +pub const DDSCAPS_SYSTEMMEMORY: DWORD = 0x00000800; +pub const DDSCAPS_TEXTURE: DWORD = 0x00001000; +pub const DDSCAPS_3DDEVICE: DWORD = 0x00002000; +pub const DDSCAPS_VIDEOMEMORY: DWORD = 0x00004000; +pub const DDSCAPS_VISIBLE: DWORD = 0x00008000; +pub const DDSCAPS_WRITEONLY: DWORD = 0x00010000; +pub const DDSCAPS_ZBUFFER: DWORD = 0x00020000; +pub const DDSCAPS_OWNDC: DWORD = 0x00040000; +pub const DDSCAPS_LIVEVIDEO: DWORD = 0x00080000; +pub const DDSCAPS_HWCODEC: DWORD = 0x00100000; +pub const DDSCAPS_MODEX: DWORD = 0x00200000; +pub const DDSCAPS_MIPMAP: DWORD = 0x00400000; +pub const DDSCAPS_RESERVED2: DWORD = 0x00800000; +pub const DDSCAPS_ALLOCONLOAD: DWORD = 0x04000000; +pub const DDSCAPS_VIDEOPORT: DWORD = 0x08000000; +pub const DDSCAPS_LOCALVIDMEM: DWORD = 0x10000000; +pub const DDSCAPS_NONLOCALVIDMEM: DWORD = 0x20000000; +pub const DDSCAPS_STANDARDVGAMODE: DWORD = 0x40000000; +pub const DDSCAPS_OPTIMIZED: DWORD = 0x80000000; +pub const DDSCAPS2_RESERVED4: DWORD = 0x00000002; +pub const DDSCAPS2_HARDWAREDEINTERLACE: DWORD = 0x00000000; +pub const DDSCAPS2_HINTDYNAMIC: DWORD = 0x00000004; +pub const DDSCAPS2_HINTSTATIC: DWORD = 0x00000008; +pub const DDSCAPS2_TEXTUREMANAGE: DWORD = 0x00000010; +pub const DDSCAPS2_RESERVED1: DWORD = 0x00000020; +pub const DDSCAPS2_RESERVED2: DWORD = 0x00000040; +pub const DDSCAPS2_OPAQUE: DWORD = 0x00000080; +pub const DDSCAPS2_HINTANTIALIASING: DWORD = 0x00000100; +pub const DDSCAPS2_CUBEMAP: DWORD = 0x00000200; +pub const DDSCAPS2_CUBEMAP_POSITIVEX: DWORD = 0x00000400; +pub const DDSCAPS2_CUBEMAP_NEGATIVEX: DWORD = 0x00000800; +pub const DDSCAPS2_CUBEMAP_POSITIVEY: DWORD = 0x00001000; +pub const DDSCAPS2_CUBEMAP_NEGATIVEY: DWORD = 0x00002000; +pub const DDSCAPS2_CUBEMAP_POSITIVEZ: DWORD = 0x00004000; +pub const DDSCAPS2_CUBEMAP_NEGATIVEZ: DWORD = 0x00008000; +pub const DDSCAPS2_CUBEMAP_ALLFACES: DWORD = DDSCAPS2_CUBEMAP_POSITIVEX + | DDSCAPS2_CUBEMAP_NEGATIVEX | DDSCAPS2_CUBEMAP_POSITIVEY | DDSCAPS2_CUBEMAP_NEGATIVEY + | DDSCAPS2_CUBEMAP_POSITIVEZ | DDSCAPS2_CUBEMAP_NEGATIVEZ; +pub const DDSCAPS2_MIPMAPSUBLEVEL: DWORD = 0x00010000; +pub const DDSCAPS2_D3DTEXTUREMANAGE: DWORD = 0x00020000; +pub const DDSCAPS2_DONOTPERSIST: DWORD = 0x00040000; +pub const DDSCAPS2_STEREOSURFACELEFT: DWORD = 0x00080000; +pub const DDSCAPS2_VOLUME: DWORD = 0x00200000; +pub const DDSCAPS2_NOTUSERLOCKABLE: DWORD = 0x00400000; +pub const DDSCAPS2_POINTS: DWORD = 0x00800000; +pub const DDSCAPS2_RTPATCHES: DWORD = 0x01000000; +pub const DDSCAPS2_NPATCHES: DWORD = 0x02000000; +pub const DDSCAPS2_RESERVED3: DWORD = 0x04000000; +pub const DDSCAPS2_DISCARDBACKBUFFER: DWORD = 0x10000000; +pub const DDSCAPS2_ENABLEALPHACHANNEL: DWORD = 0x20000000; +pub const DDSCAPS2_EXTENDEDFORMATPRIMARY: DWORD = 0x40000000; +pub const DDSCAPS2_ADDITIONALPRIMARY: DWORD = 0x80000000; +pub const DDSCAPS3_MULTISAMPLE_MASK: DWORD = 0x0000001F; +pub const DDSCAPS3_MULTISAMPLE_QUALITY_MASK: DWORD = 0x000000E0; +pub const DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT: DWORD = 5; +pub const DDSCAPS3_RESERVED1: DWORD = 0x00000100; +pub const DDSCAPS3_RESERVED2: DWORD = 0x00000200; +pub const DDSCAPS3_LIGHTWEIGHTMIPMAP: DWORD = 0x00000400; +pub const DDSCAPS3_AUTOGENMIPMAP: DWORD = 0x00000800; +pub const DDSCAPS3_DMAP: DWORD = 0x00001000; +pub const DDSCAPS3_CREATESHAREDRESOURCE: DWORD = 0x00002000; +pub const DDSCAPS3_READONLYRESOURCE: DWORD = 0x00004000; +pub const DDSCAPS3_OPENSHAREDRESOURCE: DWORD = 0x00008000; +pub const DDCAPS_3D: DWORD = 0x00000001; +pub const DDCAPS_ALIGNBOUNDARYDEST: DWORD = 0x00000002; +pub const DDCAPS_ALIGNSIZEDEST: DWORD = 0x00000004; +pub const DDCAPS_ALIGNBOUNDARYSRC: DWORD = 0x00000008; +pub const DDCAPS_ALIGNSIZESRC: DWORD = 0x00000010; +pub const DDCAPS_ALIGNSTRIDE: DWORD = 0x00000020; +pub const DDCAPS_BLT: DWORD = 0x00000040; +pub const DDCAPS_BLTQUEUE: DWORD = 0x00000080; +pub const DDCAPS_BLTFOURCC: DWORD = 0x00000100; +pub const DDCAPS_BLTSTRETCH: DWORD = 0x00000200; +pub const DDCAPS_GDI: DWORD = 0x00000400; +pub const DDCAPS_OVERLAY: DWORD = 0x00000800; +pub const DDCAPS_OVERLAYCANTCLIP: DWORD = 0x00001000; +pub const DDCAPS_OVERLAYFOURCC: DWORD = 0x00002000; +pub const DDCAPS_OVERLAYSTRETCH: DWORD = 0x00004000; +pub const DDCAPS_PALETTE: DWORD = 0x00008000; +pub const DDCAPS_PALETTEVSYNC: DWORD = 0x00010000; +pub const DDCAPS_READSCANLINE: DWORD = 0x00020000; +pub const DDCAPS_RESERVED1: DWORD = 0x00040000; +pub const DDCAPS_VBI: DWORD = 0x00080000; +pub const DDCAPS_ZBLTS: DWORD = 0x00100000; +pub const DDCAPS_ZOVERLAYS: DWORD = 0x00200000; +pub const DDCAPS_COLORKEY: DWORD = 0x00400000; +pub const DDCAPS_ALPHA: DWORD = 0x00800000; +pub const DDCAPS_COLORKEYHWASSIST: DWORD = 0x01000000; +pub const DDCAPS_NOHARDWARE: DWORD = 0x02000000; +pub const DDCAPS_BLTCOLORFILL: DWORD = 0x04000000; +pub const DDCAPS_BANKSWITCHED: DWORD = 0x08000000; +pub const DDCAPS_BLTDEPTHFILL: DWORD = 0x10000000; +pub const DDCAPS_CANCLIP: DWORD = 0x20000000; +pub const DDCAPS_CANCLIPSTRETCHED: DWORD = 0x40000000; +pub const DDCAPS_CANBLTSYSMEM: DWORD = 0x80000000; +pub const DDCAPS2_CERTIFIED: DWORD = 0x00000001; +pub const DDCAPS2_NO2DDURING3DSCENE: DWORD = 0x00000002; +pub const DDCAPS2_VIDEOPORT: DWORD = 0x00000004; +pub const DDCAPS2_AUTOFLIPOVERLAY: DWORD = 0x00000008; +pub const DDCAPS2_CANBOBINTERLEAVED: DWORD = 0x00000010; +pub const DDCAPS2_CANBOBNONINTERLEAVED: DWORD = 0x00000020; +pub const DDCAPS2_COLORCONTROLOVERLAY: DWORD = 0x00000040; +pub const DDCAPS2_COLORCONTROLPRIMARY: DWORD = 0x00000080; +pub const DDCAPS2_CANDROPZ16BIT: DWORD = 0x00000100; +pub const DDCAPS2_NONLOCALVIDMEM: DWORD = 0x00000200; +pub const DDCAPS2_NONLOCALVIDMEMCAPS: DWORD = 0x00000400; +pub const DDCAPS2_NOPAGELOCKREQUIRED: DWORD = 0x00000800; +pub const DDCAPS2_WIDESURFACES: DWORD = 0x00001000; +pub const DDCAPS2_CANFLIPODDEVEN: DWORD = 0x00002000; +pub const DDCAPS2_CANBOBHARDWARE: DWORD = 0x00004000; +pub const DDCAPS2_COPYFOURCC: DWORD = 0x00008000; +pub const DDCAPS2_PRIMARYGAMMA: DWORD = 0x00020000; +pub const DDCAPS2_CANRENDERWINDOWED: DWORD = 0x00080000; +pub const DDCAPS2_CANCALIBRATEGAMMA: DWORD = 0x00100000; +pub const DDCAPS2_FLIPINTERVAL: DWORD = 0x00200000; +pub const DDCAPS2_FLIPNOVSYNC: DWORD = 0x00400000; +pub const DDCAPS2_CANMANAGETEXTURE: DWORD = 0x00800000; +pub const DDCAPS2_TEXMANINNONLOCALVIDMEM: DWORD = 0x01000000; +pub const DDCAPS2_STEREO: DWORD = 0x02000000; +pub const DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL: DWORD = 0x04000000; +pub const DDCAPS2_RESERVED1: DWORD = 0x08000000; +pub const DDCAPS2_CANMANAGERESOURCE: DWORD = 0x10000000; +pub const DDCAPS2_DYNAMICTEXTURES: DWORD = 0x20000000; +pub const DDCAPS2_CANAUTOGENMIPMAP: DWORD = 0x40000000; +pub const DDCAPS2_CANSHARERESOURCE: DWORD = 0x80000000; +pub const DDFXALPHACAPS_BLTALPHAEDGEBLEND: DWORD = 0x00000001; +pub const DDFXALPHACAPS_BLTALPHAPIXELS: DWORD = 0x00000002; +pub const DDFXALPHACAPS_BLTALPHAPIXELSNEG: DWORD = 0x00000004; +pub const DDFXALPHACAPS_BLTALPHASURFACES: DWORD = 0x00000008; +pub const DDFXALPHACAPS_BLTALPHASURFACESNEG: DWORD = 0x00000010; +pub const DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND: DWORD = 0x00000020; +pub const DDFXALPHACAPS_OVERLAYALPHAPIXELS: DWORD = 0x00000040; +pub const DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG: DWORD = 0x00000080; +pub const DDFXALPHACAPS_OVERLAYALPHASURFACES: DWORD = 0x00000100; +pub const DDFXALPHACAPS_OVERLAYALPHASURFACESNEG: DWORD = 0x00000200; +pub const DDFXCAPS_BLTARITHSTRETCHY: DWORD = 0x00000020; +pub const DDFXCAPS_BLTARITHSTRETCHYN: DWORD = 0x00000010; +pub const DDFXCAPS_BLTMIRRORLEFTRIGHT: DWORD = 0x00000040; +pub const DDFXCAPS_BLTMIRRORUPDOWN: DWORD = 0x00000080; +pub const DDFXCAPS_BLTROTATION: DWORD = 0x00000100; +pub const DDFXCAPS_BLTROTATION90: DWORD = 0x00000200; +pub const DDFXCAPS_BLTSHRINKX: DWORD = 0x00000400; +pub const DDFXCAPS_BLTSHRINKXN: DWORD = 0x00000800; +pub const DDFXCAPS_BLTSHRINKY: DWORD = 0x00001000; +pub const DDFXCAPS_BLTSHRINKYN: DWORD = 0x00002000; +pub const DDFXCAPS_BLTSTRETCHX: DWORD = 0x00004000; +pub const DDFXCAPS_BLTSTRETCHXN: DWORD = 0x00008000; +pub const DDFXCAPS_BLTSTRETCHY: DWORD = 0x00010000; +pub const DDFXCAPS_BLTSTRETCHYN: DWORD = 0x00020000; +pub const DDFXCAPS_OVERLAYARITHSTRETCHY: DWORD = 0x00040000; +pub const DDFXCAPS_OVERLAYARITHSTRETCHYN: DWORD = 0x00000008; +pub const DDFXCAPS_OVERLAYSHRINKX: DWORD = 0x00080000; +pub const DDFXCAPS_OVERLAYSHRINKXN: DWORD = 0x00100000; +pub const DDFXCAPS_OVERLAYSHRINKY: DWORD = 0x00200000; +pub const DDFXCAPS_OVERLAYSHRINKYN: DWORD = 0x00400000; +pub const DDFXCAPS_OVERLAYSTRETCHX: DWORD = 0x00800000; +pub const DDFXCAPS_OVERLAYSTRETCHXN: DWORD = 0x01000000; +pub const DDFXCAPS_OVERLAYSTRETCHY: DWORD = 0x02000000; +pub const DDFXCAPS_OVERLAYSTRETCHYN: DWORD = 0x04000000; +pub const DDFXCAPS_OVERLAYMIRRORLEFTRIGHT: DWORD = 0x08000000; +pub const DDFXCAPS_OVERLAYMIRRORUPDOWN: DWORD = 0x10000000; +pub const DDFXCAPS_OVERLAYDEINTERLACE: DWORD = 0x20000000; +pub const DDFXCAPS_BLTALPHA: DWORD = 0x00000001; +pub const DDFXCAPS_BLTFILTER: DWORD = DDFXCAPS_BLTARITHSTRETCHY; +pub const DDFXCAPS_OVERLAYALPHA: DWORD = 0x00000004; +pub const DDFXCAPS_OVERLAYFILTER: DWORD = DDFXCAPS_OVERLAYARITHSTRETCHY; +pub const DDSVCAPS_RESERVED1: DWORD = 0x00000001; +pub const DDSVCAPS_RESERVED2: DWORD = 0x00000002; +pub const DDSVCAPS_RESERVED3: DWORD = 0x00000004; +pub const DDSVCAPS_RESERVED4: DWORD = 0x00000008; +pub const DDSVCAPS_STEREOSEQUENTIAL: DWORD = 0x00000010; +pub const DDPCAPS_4BIT: DWORD = 0x00000001; +pub const DDPCAPS_8BITENTRIES: DWORD = 0x00000002; +pub const DDPCAPS_8BIT: DWORD = 0x00000004; +pub const DDPCAPS_INITIALIZE: DWORD = 0x00000000; +pub const DDPCAPS_PRIMARYSURFACE: DWORD = 0x00000010; +pub const DDPCAPS_PRIMARYSURFACELEFT: DWORD = 0x00000020; +pub const DDPCAPS_ALLOW256: DWORD = 0x00000040; +pub const DDPCAPS_VSYNC: DWORD = 0x00000080; +pub const DDPCAPS_1BIT: DWORD = 0x00000100; +pub const DDPCAPS_2BIT: DWORD = 0x00000200; +pub const DDPCAPS_ALPHA: DWORD = 0x00000400; +pub const DDSPD_IUNKNOWNPOINTER: DWORD = 0x00000001; +pub const DDSPD_VOLATILE: DWORD = 0x00000002; +pub const DDBD_1: DWORD = 0x00004000; +pub const DDBD_2: DWORD = 0x00002000; +pub const DDBD_4: DWORD = 0x00001000; +pub const DDBD_8: DWORD = 0x00000800; +pub const DDBD_16: DWORD = 0x00000400; +pub const DDBD_24: DWORD = 0x00000200; +pub const DDBD_32: DWORD = 0x00000100; +pub const DDCKEY_COLORSPACE: DWORD = 0x00000001; +pub const DDCKEY_DESTBLT: DWORD = 0x00000002; +pub const DDCKEY_DESTOVERLAY: DWORD = 0x00000004; +pub const DDCKEY_SRCBLT: DWORD = 0x00000008; +pub const DDCKEY_SRCOVERLAY: DWORD = 0x00000010; +pub const DDCKEYCAPS_DESTBLT: DWORD = 0x00000001; +pub const DDCKEYCAPS_DESTBLTCLRSPACE: DWORD = 0x00000002; +pub const DDCKEYCAPS_DESTBLTCLRSPACEYUV: DWORD = 0x00000004; +pub const DDCKEYCAPS_DESTBLTYUV: DWORD = 0x00000008; +pub const DDCKEYCAPS_DESTOVERLAY: DWORD = 0x00000010; +pub const DDCKEYCAPS_DESTOVERLAYCLRSPACE: DWORD = 0x00000020; +pub const DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV: DWORD = 0x00000040; +pub const DDCKEYCAPS_DESTOVERLAYONEACTIVE: DWORD = 0x00000080; +pub const DDCKEYCAPS_DESTOVERLAYYUV: DWORD = 0x00000100; +pub const DDCKEYCAPS_SRCBLT: DWORD = 0x00000200; +pub const DDCKEYCAPS_SRCBLTCLRSPACE: DWORD = 0x00000400; +pub const DDCKEYCAPS_SRCBLTCLRSPACEYUV: DWORD = 0x00000800; +pub const DDCKEYCAPS_SRCBLTYUV: DWORD = 0x00001000; +pub const DDCKEYCAPS_SRCOVERLAY: DWORD = 0x00002000; +pub const DDCKEYCAPS_SRCOVERLAYCLRSPACE: DWORD = 0x00004000; +pub const DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV: DWORD = 0x00008000; +pub const DDCKEYCAPS_SRCOVERLAYONEACTIVE: DWORD = 0x00010000; +pub const DDCKEYCAPS_SRCOVERLAYYUV: DWORD = 0x00020000; +pub const DDCKEYCAPS_NOCOSTOVERLAY: DWORD = 0x00040000; +pub const DDPF_ALPHAPIXELS: DWORD = 0x00000001; +pub const DDPF_ALPHA: DWORD = 0x00000002; +pub const DDPF_FOURCC: DWORD = 0x00000004; +pub const DDPF_PALETTEINDEXED4: DWORD = 0x00000008; +pub const DDPF_PALETTEINDEXEDTO8: DWORD = 0x00000010; +pub const DDPF_PALETTEINDEXED8: DWORD = 0x00000020; +pub const DDPF_RGB: DWORD = 0x00000040; +pub const DDPF_COMPRESSED: DWORD = 0x00000080; +pub const DDPF_RGBTOYUV: DWORD = 0x00000100; +pub const DDPF_YUV: DWORD = 0x00000200; +pub const DDPF_ZBUFFER: DWORD = 0x00000400; +pub const DDPF_PALETTEINDEXED1: DWORD = 0x00000800; +pub const DDPF_PALETTEINDEXED2: DWORD = 0x00001000; +pub const DDPF_ZPIXELS: DWORD = 0x00002000; +pub const DDPF_STENCILBUFFER: DWORD = 0x00004000; +pub const DDPF_ALPHAPREMULT: DWORD = 0x00008000; +pub const DDPF_LUMINANCE: DWORD = 0x00020000; +pub const DDPF_BUMPLUMINANCE: DWORD = 0x00040000; +pub const DDPF_BUMPDUDV: DWORD = 0x00080000; +pub const DDENUMSURFACES_ALL: DWORD = 0x00000001; +pub const DDENUMSURFACES_MATCH: DWORD = 0x00000002; +pub const DDENUMSURFACES_NOMATCH: DWORD = 0x00000004; +pub const DDENUMSURFACES_CANBECREATED: DWORD = 0x00000008; +pub const DDENUMSURFACES_DOESEXIST: DWORD = 0x00000010; +pub const DDSDM_STANDARDVGAMODE: DWORD = 0x00000001; +pub const DDEDM_REFRESHRATES: DWORD = 0x00000001; +pub const DDEDM_STANDARDVGAMODES: DWORD = 0x00000002; +pub const DDSCL_FULLSCREEN: DWORD = 0x00000001; +pub const DDSCL_ALLOWREBOOT: DWORD = 0x00000002; +pub const DDSCL_NOWINDOWCHANGES: DWORD = 0x00000004; +pub const DDSCL_NORMAL: DWORD = 0x00000008; +pub const DDSCL_EXCLUSIVE: DWORD = 0x00000010; +pub const DDSCL_ALLOWMODEX: DWORD = 0x00000040; +pub const DDSCL_SETFOCUSWINDOW: DWORD = 0x00000080; +pub const DDSCL_SETDEVICEWINDOW: DWORD = 0x00000100; +pub const DDSCL_CREATEDEVICEWINDOW: DWORD = 0x00000200; +pub const DDSCL_MULTITHREADED: DWORD = 0x00000400; +pub const DDSCL_FPUSETUP: DWORD = 0x00000800; +pub const DDSCL_FPUPRESERVE: DWORD = 0x00001000; +pub const DDBLT_ALPHADEST: DWORD = 0x00000001; +pub const DDBLT_ALPHADESTCONSTOVERRIDE: DWORD = 0x00000002; +pub const DDBLT_ALPHADESTNEG: DWORD = 0x00000004; +pub const DDBLT_ALPHADESTSURFACEOVERRIDE: DWORD = 0x00000008; +pub const DDBLT_ALPHAEDGEBLEND: DWORD = 0x00000010; +pub const DDBLT_ALPHASRC: DWORD = 0x00000020; +pub const DDBLT_ALPHASRCCONSTOVERRIDE: DWORD = 0x00000040; +pub const DDBLT_ALPHASRCNEG: DWORD = 0x00000080; +pub const DDBLT_ALPHASRCSURFACEOVERRIDE: DWORD = 0x00000100; +pub const DDBLT_ASYNC: DWORD = 0x00000200; +pub const DDBLT_COLORFILL: DWORD = 0x00000400; +pub const DDBLT_DDFX: DWORD = 0x00000800; +pub const DDBLT_DDROPS: DWORD = 0x00001000; +pub const DDBLT_KEYDEST: DWORD = 0x00002000; +pub const DDBLT_KEYDESTOVERRIDE: DWORD = 0x00004000; +pub const DDBLT_KEYSRC: DWORD = 0x00008000; +pub const DDBLT_KEYSRCOVERRIDE: DWORD = 0x00010000; +pub const DDBLT_ROP: DWORD = 0x00020000; +pub const DDBLT_ROTATIONANGLE: DWORD = 0x00040000; +pub const DDBLT_ZBUFFER: DWORD = 0x00080000; +pub const DDBLT_ZBUFFERDESTCONSTOVERRIDE: DWORD = 0x00100000; +pub const DDBLT_ZBUFFERDESTOVERRIDE: DWORD = 0x00200000; +pub const DDBLT_ZBUFFERSRCCONSTOVERRIDE: DWORD = 0x00400000; +pub const DDBLT_ZBUFFERSRCOVERRIDE: DWORD = 0x00800000; +pub const DDBLT_WAIT: DWORD = 0x01000000; +pub const DDBLT_DEPTHFILL: DWORD = 0x02000000; +pub const DDBLT_DONOTWAIT: DWORD = 0x08000000; +pub const DDBLT_PRESENTATION: DWORD = 0x10000000; +pub const DDBLT_LAST_PRESENTATION: DWORD = 0x20000000; +pub const DDBLT_EXTENDED_FLAGS: DWORD = 0x40000000; +pub const DDBLT_EXTENDED_LINEAR_CONTENT: DWORD = 0x00000004; +pub const DDBLTFAST_NOCOLORKEY: DWORD = 0x00000000; +pub const DDBLTFAST_SRCCOLORKEY: DWORD = 0x00000001; +pub const DDBLTFAST_DESTCOLORKEY: DWORD = 0x00000002; +pub const DDBLTFAST_WAIT: DWORD = 0x00000010; +pub const DDBLTFAST_DONOTWAIT: DWORD = 0x00000020; +pub const DDFLIP_WAIT: DWORD = 0x00000001; +pub const DDFLIP_EVEN: DWORD = 0x00000002; +pub const DDFLIP_ODD: DWORD = 0x00000004; +pub const DDFLIP_NOVSYNC: DWORD = 0x00000008; +pub const DDFLIP_INTERVAL2: DWORD = 0x02000000; +pub const DDFLIP_INTERVAL3: DWORD = 0x03000000; +pub const DDFLIP_INTERVAL4: DWORD = 0x04000000; +pub const DDFLIP_STEREO: DWORD = 0x00000010; +pub const DDFLIP_DONOTWAIT: DWORD = 0x00000020; +pub const DDOVER_ALPHADEST: DWORD = 0x00000001; +pub const DDOVER_ALPHADESTCONSTOVERRIDE: DWORD = 0x00000002; +pub const DDOVER_ALPHADESTNEG: DWORD = 0x00000004; +pub const DDOVER_ALPHADESTSURFACEOVERRIDE: DWORD = 0x00000008; +pub const DDOVER_ALPHAEDGEBLEND: DWORD = 0x00000010; +pub const DDOVER_ALPHASRC: DWORD = 0x00000020; +pub const DDOVER_ALPHASRCCONSTOVERRIDE: DWORD = 0x00000040; +pub const DDOVER_ALPHASRCNEG: DWORD = 0x00000080; +pub const DDOVER_ALPHASRCSURFACEOVERRIDE: DWORD = 0x00000100; +pub const DDOVER_HIDE: DWORD = 0x00000200; +pub const DDOVER_KEYDEST: DWORD = 0x00000400; +pub const DDOVER_KEYDESTOVERRIDE: DWORD = 0x00000800; +pub const DDOVER_KEYSRC: DWORD = 0x00001000; +pub const DDOVER_KEYSRCOVERRIDE: DWORD = 0x00002000; +pub const DDOVER_SHOW: DWORD = 0x00004000; +pub const DDOVER_ADDDIRTYRECT: DWORD = 0x00008000; +pub const DDOVER_REFRESHDIRTYRECTS: DWORD = 0x00010000; +pub const DDOVER_REFRESHALL: DWORD = 0x00020000; +pub const DDOVER_DDFX: DWORD = 0x00080000; +pub const DDOVER_AUTOFLIP: DWORD = 0x00100000; +pub const DDOVER_BOB: DWORD = 0x00200000; +pub const DDOVER_OVERRIDEBOBWEAVE: DWORD = 0x00400000; +pub const DDOVER_INTERLEAVED: DWORD = 0x00800000; +pub const DDOVER_BOBHARDWARE: DWORD = 0x01000000; +pub const DDOVER_ARGBSCALEFACTORS: DWORD = 0x02000000; +pub const DDOVER_DEGRADEARGBSCALING: DWORD = 0x04000000; +pub const DDSETSURFACEDESC_RECREATEDC: DWORD = 0x00000000; +pub const DDSETSURFACEDESC_PRESERVEDC: DWORD = 0x00000001; +pub const DDLOCK_SURFACEMEMORYPTR: DWORD = 0x00000000; +pub const DDLOCK_WAIT: DWORD = 0x00000001; +pub const DDLOCK_EVENT: DWORD = 0x00000002; +pub const DDLOCK_READONLY: DWORD = 0x00000010; +pub const DDLOCK_WRITEONLY: DWORD = 0x00000020; +pub const DDLOCK_NOSYSLOCK: DWORD = 0x00000800; +pub const DDLOCK_NOOVERWRITE: DWORD = 0x00001000; +pub const DDLOCK_DISCARDCONTENTS: DWORD = 0x00002000; +pub const DDLOCK_OKTOSWAP: DWORD = 0x00002000; +pub const DDLOCK_DONOTWAIT: DWORD = 0x00004000; +pub const DDLOCK_HASVOLUMETEXTUREBOXRECT: DWORD = 0x00008000; +pub const DDLOCK_NODIRTYUPDATE: DWORD = 0x00010000; +pub const DDBLTFX_ARITHSTRETCHY: DWORD = 0x00000001; +pub const DDBLTFX_MIRRORLEFTRIGHT: DWORD = 0x00000002; +pub const DDBLTFX_MIRRORUPDOWN: DWORD = 0x00000004; +pub const DDBLTFX_NOTEARING: DWORD = 0x00000008; +pub const DDBLTFX_ROTATE180: DWORD = 0x00000010; +pub const DDBLTFX_ROTATE270: DWORD = 0x00000020; +pub const DDBLTFX_ROTATE90: DWORD = 0x00000040; +pub const DDBLTFX_ZBUFFERRANGE: DWORD = 0x00000080; +pub const DDBLTFX_ZBUFFERBASEDEST: DWORD = 0x00000100; +pub const DDOVERFX_ARITHSTRETCHY: DWORD = 0x00000001; +pub const DDOVERFX_MIRRORLEFTRIGHT: DWORD = 0x00000002; +pub const DDOVERFX_MIRRORUPDOWN: DWORD = 0x00000004; +pub const DDOVERFX_DEINTERLACE: DWORD = 0x00000008; +pub const DDWAITVB_BLOCKBEGIN: DWORD = 0x00000001; +pub const DDWAITVB_BLOCKBEGINEVENT: DWORD = 0x00000002; +pub const DDWAITVB_BLOCKEND: DWORD = 0x00000004; +pub const DDGFS_CANFLIP: DWORD = 0x00000001; +pub const DDGFS_ISFLIPDONE: DWORD = 0x00000002; +pub const DDGBS_CANBLT: DWORD = 0x00000001; +pub const DDGBS_ISBLTDONE: DWORD = 0x00000002; +pub const DDENUMOVERLAYZ_BACKTOFRONT: DWORD = 0x00000000; +pub const DDENUMOVERLAYZ_FRONTTOBACK: DWORD = 0x00000001; +pub const DDOVERZ_SENDTOFRONT: DWORD = 0x00000000; +pub const DDOVERZ_SENDTOBACK: DWORD = 0x00000001; +pub const DDOVERZ_MOVEFORWARD: DWORD = 0x00000002; +pub const DDOVERZ_MOVEBACKWARD: DWORD = 0x00000003; +pub const DDOVERZ_INSERTINFRONTOF: DWORD = 0x00000004; +pub const DDOVERZ_INSERTINBACKOF: DWORD = 0x00000005; +pub const DDSGR_CALIBRATE: DWORD = 0x00000001; +pub const DDSMT_ISTESTREQUIRED: DWORD = 0x00000001; +pub const DDEM_MODEPASSED: DWORD = 0x00000001; +pub const DDEM_MODEFAILED: DWORD = 0x00000002; +pub const DD_OK: HRESULT = S_OK; +pub const DD_FALSE: HRESULT = S_FALSE; +pub const DDENUMRET_CANCEL: DWORD = 0; +pub const DDENUMRET_OK: DWORD = 1; +pub const DDERR_ALREADYINITIALIZED: HRESULT = MAKE_DDHRESULT!(5); +pub const DDERR_CANNOTATTACHSURFACE: HRESULT = MAKE_DDHRESULT!(10); +pub const DDERR_CANNOTDETACHSURFACE: HRESULT = MAKE_DDHRESULT!(20); +pub const DDERR_CURRENTLYNOTAVAIL: HRESULT = MAKE_DDHRESULT!(40); +pub const DDERR_EXCEPTION: HRESULT = MAKE_DDHRESULT!(55); +pub const DDERR_GENERIC: HRESULT = E_FAIL; +pub const DDERR_HEIGHTALIGN: HRESULT = MAKE_DDHRESULT!(90); +pub const DDERR_INCOMPATIBLEPRIMARY: HRESULT = MAKE_DDHRESULT!(95); +pub const DDERR_INVALIDCAPS: HRESULT = MAKE_DDHRESULT!(100); +pub const DDERR_INVALIDCLIPLIST: HRESULT = MAKE_DDHRESULT!(110); +pub const DDERR_INVALIDMODE: HRESULT = MAKE_DDHRESULT!(120); +pub const DDERR_INVALIDOBJECT: HRESULT = MAKE_DDHRESULT!(130); +pub const DDERR_INVALIDPARAMS: HRESULT = E_INVALIDARG; +pub const DDERR_INVALIDPIXELFORMAT: HRESULT = MAKE_DDHRESULT!(145); +pub const DDERR_INVALIDRECT: HRESULT = MAKE_DDHRESULT!(150); +pub const DDERR_LOCKEDSURFACES: HRESULT = MAKE_DDHRESULT!(160); +pub const DDERR_NO3D: HRESULT = MAKE_DDHRESULT!(170); +pub const DDERR_NOALPHAHW: HRESULT = MAKE_DDHRESULT!(180); +pub const DDERR_NOSTEREOHARDWARE: HRESULT = MAKE_DDHRESULT!(181); +pub const DDERR_NOSURFACELEFT: HRESULT = MAKE_DDHRESULT!(182); +pub const DDERR_NOCLIPLIST: HRESULT = MAKE_DDHRESULT!(205); +pub const DDERR_NOCOLORCONVHW: HRESULT = MAKE_DDHRESULT!(210); +pub const DDERR_NOCOOPERATIVELEVELSET: HRESULT = MAKE_DDHRESULT!(212); +pub const DDERR_NOCOLORKEY: HRESULT = MAKE_DDHRESULT!(215); +pub const DDERR_NOCOLORKEYHW: HRESULT = MAKE_DDHRESULT!(220); +pub const DDERR_NODIRECTDRAWSUPPORT: HRESULT = MAKE_DDHRESULT!(222); +pub const DDERR_NOEXCLUSIVEMODE: HRESULT = MAKE_DDHRESULT!(225); +pub const DDERR_NOFLIPHW: HRESULT = MAKE_DDHRESULT!(230); +pub const DDERR_NOGDI: HRESULT = MAKE_DDHRESULT!(240); +pub const DDERR_NOMIRRORHW: HRESULT = MAKE_DDHRESULT!(250); +pub const DDERR_NOTFOUND: HRESULT = MAKE_DDHRESULT!(255); +pub const DDERR_NOOVERLAYHW: HRESULT = MAKE_DDHRESULT!(260); +pub const DDERR_OVERLAPPINGRECTS: HRESULT = MAKE_DDHRESULT!(270); +pub const DDERR_NORASTEROPHW: HRESULT = MAKE_DDHRESULT!(280); +pub const DDERR_NOROTATIONHW: HRESULT = MAKE_DDHRESULT!(290); +pub const DDERR_NOSTRETCHHW: HRESULT = MAKE_DDHRESULT!(310); +pub const DDERR_NOT4BITCOLOR: HRESULT = MAKE_DDHRESULT!(316); +pub const DDERR_NOT4BITCOLORINDEX: HRESULT = MAKE_DDHRESULT!(317); +pub const DDERR_NOT8BITCOLOR: HRESULT = MAKE_DDHRESULT!(320); +pub const DDERR_NOTEXTUREHW: HRESULT = MAKE_DDHRESULT!(330); +pub const DDERR_NOVSYNCHW: HRESULT = MAKE_DDHRESULT!(335); +pub const DDERR_NOZBUFFERHW: HRESULT = MAKE_DDHRESULT!(340); +pub const DDERR_NOZOVERLAYHW: HRESULT = MAKE_DDHRESULT!(350); +pub const DDERR_OUTOFCAPS: HRESULT = MAKE_DDHRESULT!(360); +pub const DDERR_OUTOFMEMORY: HRESULT = E_OUTOFMEMORY; +pub const DDERR_OUTOFVIDEOMEMORY: HRESULT = MAKE_DDHRESULT!(380); +pub const DDERR_OVERLAYCANTCLIP: HRESULT = MAKE_DDHRESULT!(382); +pub const DDERR_OVERLAYCOLORKEYONLYONEACTIVE: HRESULT = MAKE_DDHRESULT!(384); +pub const DDERR_PALETTEBUSY: HRESULT = MAKE_DDHRESULT!(387); +pub const DDERR_COLORKEYNOTSET: HRESULT = MAKE_DDHRESULT!(400); +pub const DDERR_SURFACEALREADYATTACHED: HRESULT = MAKE_DDHRESULT!(410); +pub const DDERR_SURFACEALREADYDEPENDENT: HRESULT = MAKE_DDHRESULT!(420); +pub const DDERR_SURFACEBUSY: HRESULT = MAKE_DDHRESULT!(430); +pub const DDERR_CANTLOCKSURFACE: HRESULT = MAKE_DDHRESULT!(435); +pub const DDERR_SURFACEISOBSCURED: HRESULT = MAKE_DDHRESULT!(440); +pub const DDERR_SURFACELOST: HRESULT = MAKE_DDHRESULT!(450); +pub const DDERR_SURFACENOTATTACHED: HRESULT = MAKE_DDHRESULT!(460); +pub const DDERR_TOOBIGHEIGHT: HRESULT = MAKE_DDHRESULT!(470); +pub const DDERR_TOOBIGSIZE: HRESULT = MAKE_DDHRESULT!(480); +pub const DDERR_TOOBIGWIDTH: HRESULT = MAKE_DDHRESULT!(490); +pub const DDERR_UNSUPPORTED: HRESULT = E_NOTIMPL; +pub const DDERR_UNSUPPORTEDFORMAT: HRESULT = MAKE_DDHRESULT!(510); +pub const DDERR_UNSUPPORTEDMASK: HRESULT = MAKE_DDHRESULT!(520); +pub const DDERR_INVALIDSTREAM: HRESULT = MAKE_DDHRESULT!(521); +pub const DDERR_VERTICALBLANKINPROGRESS: HRESULT = MAKE_DDHRESULT!(537); +pub const DDERR_WASSTILLDRAWING: HRESULT = MAKE_DDHRESULT!(540); +pub const DDERR_DDSCAPSCOMPLEXREQUIRED: HRESULT = MAKE_DDHRESULT!(542); +pub const DDERR_XALIGN: HRESULT = MAKE_DDHRESULT!(560); +pub const DDERR_INVALIDDIRECTDRAWGUID: HRESULT = MAKE_DDHRESULT!(561); +pub const DDERR_DIRECTDRAWALREADYCREATED: HRESULT = MAKE_DDHRESULT!(562); +pub const DDERR_NODIRECTDRAWHW: HRESULT = MAKE_DDHRESULT!(563); +pub const DDERR_PRIMARYSURFACEALREADYEXISTS: HRESULT = MAKE_DDHRESULT!(564); +pub const DDERR_NOEMULATION: HRESULT = MAKE_DDHRESULT!(565); +pub const DDERR_REGIONTOOSMALL: HRESULT = MAKE_DDHRESULT!(566); +pub const DDERR_CLIPPERISUSINGHWND: HRESULT = MAKE_DDHRESULT!(567); +pub const DDERR_NOCLIPPERATTACHED: HRESULT = MAKE_DDHRESULT!(568); +pub const DDERR_NOHWND: HRESULT = MAKE_DDHRESULT!(569); +pub const DDERR_HWNDSUBCLASSED: HRESULT = MAKE_DDHRESULT!(570); +pub const DDERR_HWNDALREADYSET: HRESULT = MAKE_DDHRESULT!(571); +pub const DDERR_NOPALETTEATTACHED: HRESULT = MAKE_DDHRESULT!(572); +pub const DDERR_NOPALETTEHW: HRESULT = MAKE_DDHRESULT!(573); +pub const DDERR_BLTFASTCANTCLIP: HRESULT = MAKE_DDHRESULT!(574); +pub const DDERR_NOBLTHW: HRESULT = MAKE_DDHRESULT!(575); +pub const DDERR_NODDROPSHW: HRESULT = MAKE_DDHRESULT!(576); +pub const DDERR_OVERLAYNOTVISIBLE: HRESULT = MAKE_DDHRESULT!(577); +pub const DDERR_NOOVERLAYDEST: HRESULT = MAKE_DDHRESULT!(578); +pub const DDERR_INVALIDPOSITION: HRESULT = MAKE_DDHRESULT!(579); +pub const DDERR_NOTAOVERLAYSURFACE: HRESULT = MAKE_DDHRESULT!(580); +pub const DDERR_EXCLUSIVEMODEALREADYSET: HRESULT = MAKE_DDHRESULT!(581); +pub const DDERR_NOTFLIPPABLE: HRESULT = MAKE_DDHRESULT!(582); +pub const DDERR_CANTDUPLICATE: HRESULT = MAKE_DDHRESULT!(583); +pub const DDERR_NOTLOCKED: HRESULT = MAKE_DDHRESULT!(584); +pub const DDERR_CANTCREATEDC: HRESULT = MAKE_DDHRESULT!(585); +pub const DDERR_NODC: HRESULT = MAKE_DDHRESULT!(586); +pub const DDERR_WRONGMODE: HRESULT = MAKE_DDHRESULT!(587); +pub const DDERR_IMPLICITLYCREATED: HRESULT = MAKE_DDHRESULT!(588); +pub const DDERR_NOTPALETTIZED: HRESULT = MAKE_DDHRESULT!(589); +pub const DDERR_UNSUPPORTEDMODE: HRESULT = MAKE_DDHRESULT!(590); +pub const DDERR_NOMIPMAPHW: HRESULT = MAKE_DDHRESULT!(591); +pub const DDERR_INVALIDSURFACETYPE: HRESULT = MAKE_DDHRESULT!(592); +pub const DDERR_NOOPTIMIZEHW: HRESULT = MAKE_DDHRESULT!(600); +pub const DDERR_NOTLOADED: HRESULT = MAKE_DDHRESULT!(601); +pub const DDERR_NOFOCUSWINDOW: HRESULT = MAKE_DDHRESULT!(602); +pub const DDERR_NOTONMIPMAPSUBLEVEL: HRESULT = MAKE_DDHRESULT!(603); +pub const DDERR_DCALREADYCREATED: HRESULT = MAKE_DDHRESULT!(620); +pub const DDERR_NONONLOCALVIDMEM: HRESULT = MAKE_DDHRESULT!(630); +pub const DDERR_CANTPAGELOCK: HRESULT = MAKE_DDHRESULT!(640); +pub const DDERR_CANTPAGEUNLOCK: HRESULT = MAKE_DDHRESULT!(660); +pub const DDERR_NOTPAGELOCKED: HRESULT = MAKE_DDHRESULT!(680); +pub const DDERR_MOREDATA: HRESULT = MAKE_DDHRESULT!(690); +pub const DDERR_EXPIRED: HRESULT = MAKE_DDHRESULT!(691); +pub const DDERR_TESTFINISHED: HRESULT = MAKE_DDHRESULT!(692); +pub const DDERR_NEWMODE: HRESULT = MAKE_DDHRESULT!(693); +pub const DDERR_D3DNOTINITIALIZED: HRESULT = MAKE_DDHRESULT!(694); +pub const DDERR_VIDEONOTACTIVE: HRESULT = MAKE_DDHRESULT!(695); +pub const DDERR_NOMONITORINFORMATION: HRESULT = MAKE_DDHRESULT!(696); +pub const DDERR_NODRIVERSUPPORT: HRESULT = MAKE_DDHRESULT!(697); +pub const DDERR_DEVICEDOESNTOWNSURFACE: HRESULT = MAKE_DDHRESULT!(699); +pub const DDERR_NOTINITIALIZED: HRESULT = CO_E_NOTINITIALIZED; diff --git a/src/um/gdipluscolor.rs b/src/um/gdipluscolor.rs new file mode 100644 index 000000000..8a8b8dc23 --- /dev/null +++ b/src/um/gdipluscolor.rs @@ -0,0 +1,236 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use shared::minwindef::BYTE; +use shared::windef::COLORREF; +use um::gdipluspixelformats::ARGB; +use um::wingdi::{GetBValue, GetGValue, GetRValue, RGB}; +ENUM!{enum ColorMode { + ColorModeARGB32 = 0, + ColorModeARGB64 = 1, +}} +ENUM!{enum ColorChannelFlags { + ColorChannelFlagsC = 0, + ColorChannelFlagsM, + ColorChannelFlagsY, + ColorChannelFlagsK, + ColorChannelFlagsLast, +}} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct Color { + Argb: ARGB, +} +impl Color { + pub fn new() -> Self { + Color { Argb: Black } + } + pub fn from_rgb_parts(r: BYTE, g: BYTE, b: BYTE) -> Self { + Color { Argb: Self::MakeARGB(255, r, g, b) } + } + pub fn from_argb_parts(a: BYTE, r: BYTE, g: BYTE, b: BYTE) -> Self { + Color { Argb: Self::MakeARGB(a, r, g, b) } + } + pub fn from_argb(argb: ARGB) -> Self { + Color { Argb: argb } + } + pub fn GetAlpha(&self) -> BYTE { + (self.Argb >> AlphaShift) as BYTE + } + pub fn GetRed(&self) -> BYTE { + (self.Argb >> RedShift) as BYTE + } + pub fn GetGreen(&self) -> BYTE { + (self.Argb >> GreenShift) as BYTE + } + pub fn GetBlue(&self) -> BYTE { + (self.Argb >> BlueShift) as BYTE + } + pub fn GetA(&self) -> BYTE { + self.GetAlpha() + } + pub fn GetR(&self) -> BYTE { + self.GetRed() + } + pub fn GetG(&self) -> BYTE { + self.GetGreen() + } + pub fn GetB(&self) -> BYTE { + self.GetBlue() + } + pub fn GetValue(&self) -> ARGB { + self.Argb + } + pub fn SetValue(&mut self, argb: ARGB) { + self.Argb = argb; + } + pub fn SetFromCOLORREF(&mut self, rgb: COLORREF) { + self.Argb = Self::MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); + } + pub fn ToCOLORREF(&self) -> COLORREF { + RGB(self.GetRed(), self.GetGreen(), self.GetBlue()) + } + pub fn MakeARGB(a: BYTE, r: BYTE, g: BYTE, b: BYTE) -> ARGB { + ((b as ARGB) << BlueShift) | + ((g as ARGB) << GreenShift) | + ((r as ARGB) << RedShift) | + ((a as ARGB) << AlphaShift) + } +} +impl Default for Color { + fn default() -> Self { + Color::new() + } +} +pub const AliceBlue: ARGB = 0xFFF0F8FF; +pub const AntiqueWhite: ARGB = 0xFFFAEBD7; +pub const Aqua: ARGB = 0xFF00FFFF; +pub const Aquamarine: ARGB = 0xFF7FFFD4; +pub const Azure: ARGB = 0xFFF0FFFF; +pub const Beige: ARGB = 0xFFF5F5DC; +pub const Bisque: ARGB = 0xFFFFE4C4; +pub const Black: ARGB = 0xFF000000; +pub const BlanchedAlmond: ARGB = 0xFFFFEBCD; +pub const Blue: ARGB = 0xFF0000FF; +pub const BlueViolet: ARGB = 0xFF8A2BE2; +pub const Brown: ARGB = 0xFFA52A2A; +pub const BurlyWood: ARGB = 0xFFDEB887; +pub const CadetBlue: ARGB = 0xFF5F9EA0; +pub const Chartreuse: ARGB = 0xFF7FFF00; +pub const Chocolate: ARGB = 0xFFD2691E; +pub const Coral: ARGB = 0xFFFF7F50; +pub const CornflowerBlue: ARGB = 0xFF6495ED; +pub const Cornsilk: ARGB = 0xFFFFF8DC; +pub const Crimson: ARGB = 0xFFDC143C; +pub const Cyan: ARGB = 0xFF00FFFF; +pub const DarkBlue: ARGB = 0xFF00008B; +pub const DarkCyan: ARGB = 0xFF008B8B; +pub const DarkGoldenrod: ARGB = 0xFFB8860B; +pub const DarkGray: ARGB = 0xFFA9A9A9; +pub const DarkGreen: ARGB = 0xFF006400; +pub const DarkKhaki: ARGB = 0xFFBDB76B; +pub const DarkMagenta: ARGB = 0xFF8B008B; +pub const DarkOliveGreen: ARGB = 0xFF556B2F; +pub const DarkOrange: ARGB = 0xFFFF8C00; +pub const DarkOrchid: ARGB = 0xFF9932CC; +pub const DarkRed: ARGB = 0xFF8B0000; +pub const DarkSalmon: ARGB = 0xFFE9967A; +pub const DarkSeaGreen: ARGB = 0xFF8FBC8B; +pub const DarkSlateBlue: ARGB = 0xFF483D8B; +pub const DarkSlateGray: ARGB = 0xFF2F4F4F; +pub const DarkTurquoise: ARGB = 0xFF00CED1; +pub const DarkViolet: ARGB = 0xFF9400D3; +pub const DeepPink: ARGB = 0xFFFF1493; +pub const DeepSkyBlue: ARGB = 0xFF00BFFF; +pub const DimGray: ARGB = 0xFF696969; +pub const DodgerBlue: ARGB = 0xFF1E90FF; +pub const Firebrick: ARGB = 0xFFB22222; +pub const FloralWhite: ARGB = 0xFFFFFAF0; +pub const ForestGreen: ARGB = 0xFF228B22; +pub const Fuchsia: ARGB = 0xFFFF00FF; +pub const Gainsboro: ARGB = 0xFFDCDCDC; +pub const GhostWhite: ARGB = 0xFFF8F8FF; +pub const Gold: ARGB = 0xFFFFD700; +pub const Goldenrod: ARGB = 0xFFDAA520; +pub const Gray: ARGB = 0xFF808080; +pub const Green: ARGB = 0xFF008000; +pub const GreenYellow: ARGB = 0xFFADFF2F; +pub const Honeydew: ARGB = 0xFFF0FFF0; +pub const HotPink: ARGB = 0xFFFF69B4; +pub const IndianRed: ARGB = 0xFFCD5C5C; +pub const Indigo: ARGB = 0xFF4B0082; +pub const Ivory: ARGB = 0xFFFFFFF0; +pub const Khaki: ARGB = 0xFFF0E68C; +pub const Lavender: ARGB = 0xFFE6E6FA; +pub const LavenderBlush: ARGB = 0xFFFFF0F5; +pub const LawnGreen: ARGB = 0xFF7CFC00; +pub const LemonChiffon: ARGB = 0xFFFFFACD; +pub const LightBlue: ARGB = 0xFFADD8E6; +pub const LightCoral: ARGB = 0xFFF08080; +pub const LightCyan: ARGB = 0xFFE0FFFF; +pub const LightGoldenrodYellow: ARGB = 0xFFFAFAD2; +pub const LightGray: ARGB = 0xFFD3D3D3; +pub const LightGreen: ARGB = 0xFF90EE90; +pub const LightPink: ARGB = 0xFFFFB6C1; +pub const LightSalmon: ARGB = 0xFFFFA07A; +pub const LightSeaGreen: ARGB = 0xFF20B2AA; +pub const LightSkyBlue: ARGB = 0xFF87CEFA; +pub const LightSlateGray: ARGB = 0xFF778899; +pub const LightSteelBlue: ARGB = 0xFFB0C4DE; +pub const LightYellow: ARGB = 0xFFFFFFE0; +pub const Lime: ARGB = 0xFF00FF00; +pub const LimeGreen: ARGB = 0xFF32CD32; +pub const Linen: ARGB = 0xFFFAF0E6; +pub const Magenta: ARGB = 0xFFFF00FF; +pub const Maroon: ARGB = 0xFF800000; +pub const MediumAquamarine: ARGB = 0xFF66CDAA; +pub const MediumBlue: ARGB = 0xFF0000CD; +pub const MediumOrchid: ARGB = 0xFFBA55D3; +pub const MediumPurple: ARGB = 0xFF9370DB; +pub const MediumSeaGreen: ARGB = 0xFF3CB371; +pub const MediumSlateBlue: ARGB = 0xFF7B68EE; +pub const MediumSpringGreen: ARGB = 0xFF00FA9A; +pub const MediumTurquoise: ARGB = 0xFF48D1CC; +pub const MediumVioletRed: ARGB = 0xFFC71585; +pub const MidnightBlue: ARGB = 0xFF191970; +pub const MintCream: ARGB = 0xFFF5FFFA; +pub const MistyRose: ARGB = 0xFFFFE4E1; +pub const Moccasin: ARGB = 0xFFFFE4B5; +pub const NavajoWhite: ARGB = 0xFFFFDEAD; +pub const Navy: ARGB = 0xFF000080; +pub const OldLace: ARGB = 0xFFFDF5E6; +pub const Olive: ARGB = 0xFF808000; +pub const OliveDrab: ARGB = 0xFF6B8E23; +pub const Orange: ARGB = 0xFFFFA500; +pub const OrangeRed: ARGB = 0xFFFF4500; +pub const Orchid: ARGB = 0xFFDA70D6; +pub const PaleGoldenrod: ARGB = 0xFFEEE8AA; +pub const PaleGreen: ARGB = 0xFF98FB98; +pub const PaleTurquoise: ARGB = 0xFFAFEEEE; +pub const PaleVioletRed: ARGB = 0xFFDB7093; +pub const PapayaWhip: ARGB = 0xFFFFEFD5; +pub const PeachPuff: ARGB = 0xFFFFDAB9; +pub const Peru: ARGB = 0xFFCD853F; +pub const Pink: ARGB = 0xFFFFC0CB; +pub const Plum: ARGB = 0xFFDDA0DD; +pub const PowderBlue: ARGB = 0xFFB0E0E6; +pub const Purple: ARGB = 0xFF800080; +pub const Red: ARGB = 0xFFFF0000; +pub const RosyBrown: ARGB = 0xFFBC8F8F; +pub const RoyalBlue: ARGB = 0xFF4169E1; +pub const SaddleBrown: ARGB = 0xFF8B4513; +pub const Salmon: ARGB = 0xFFFA8072; +pub const SandyBrown: ARGB = 0xFFF4A460; +pub const SeaGreen: ARGB = 0xFF2E8B57; +pub const SeaShell: ARGB = 0xFFFFF5EE; +pub const Sienna: ARGB = 0xFFA0522D; +pub const Silver: ARGB = 0xFFC0C0C0; +pub const SkyBlue: ARGB = 0xFF87CEEB; +pub const SlateBlue: ARGB = 0xFF6A5ACD; +pub const SlateGray: ARGB = 0xFF708090; +pub const Snow: ARGB = 0xFFFFFAFA; +pub const SpringGreen: ARGB = 0xFF00FF7F; +pub const SteelBlue: ARGB = 0xFF4682B4; +pub const Tan: ARGB = 0xFFD2B48C; +pub const Teal: ARGB = 0xFF008080; +pub const Thistle: ARGB = 0xFFD8BFD8; +pub const Tomato: ARGB = 0xFFFF6347; +pub const Transparent: ARGB = 0x00FFFFFF; +pub const Turquoise: ARGB = 0xFF40E0D0; +pub const Violet: ARGB = 0xFFEE82EE; +pub const Wheat: ARGB = 0xFFF5DEB3; +pub const White: ARGB = 0xFFFFFFFF; +pub const WhiteSmoke: ARGB = 0xFFF5F5F5; +pub const Yellow: ARGB = 0xFFFFFF00; +pub const YellowGreen: ARGB = 0xFF9ACD32; +pub const AlphaShift: ARGB = 24; +pub const RedShift: ARGB = 16; +pub const GreenShift: ARGB = 8; +pub const BlueShift: ARGB = 0; +pub const AlphaMask: ARGB = 0xff000000; +pub const RedMask: ARGB = 0x00ff0000; +pub const GreenMask: ARGB = 0x0000ff00; +pub const BlueMask: ARGB = 0x000000ff; diff --git a/src/um/gdipluscolormatrix.rs b/src/um/gdipluscolormatrix.rs new file mode 100644 index 000000000..2a8e9d16a --- /dev/null +++ b/src/um/gdipluscolormatrix.rs @@ -0,0 +1,41 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use shared::minwindef::BYTE; +use um::gdipluscolor::Color; +use um::gdiplustypes::REAL; +pub type ColorChannelLUT = [BYTE; 256]; +ENUM!{enum HistogramFormat { + HistogramFormatARGB, + HistogramFormatPARGB, + HistogramFormatRGB, + HistogramFormatGray, + HistogramFormatB, + HistogramFormatG, + HistogramFormatR, + HistogramFormatA, +}} +STRUCT!{struct ColorMatrix { + m: [[REAL; 5]; 5], +}} +ENUM!{enum ColorMatrixFlags { + ColorMatrixFlagsDefault = 0, + ColorMatrixFlagsSkipGrays = 1, + ColorMatrixFlagsAltGray = 2, +}} +ENUM!{enum ColorAdjustType { + ColorAdjustTypeDefault, + ColorAdjustTypeBitmap, + ColorAdjustTypeBrush, + ColorAdjustTypePen, + ColorAdjustTypeText, + ColorAdjustTypeCount, + ColorAdjustTypeAny, +}} +STRUCT!{struct ColorMap { + oldColor: Color, + newColor: Color, +}} diff --git a/src/um/gdipluseffects.rs b/src/um/gdipluseffects.rs new file mode 100644 index 000000000..e30ad3eb4 --- /dev/null +++ b/src/um/gdipluseffects.rs @@ -0,0 +1,121 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use ctypes::c_float; +use shared::guiddef::GUID; +use shared::minwindef::{BOOL, INT, UINT}; +use shared::windef::RECT; +use um::gdipluscolormatrix::ColorChannelLUT; +use um::gdiplustypes::Status; +use um::winnt::VOID; +DEFINE_GUID!{BlurEffectGuid, + 0x633c80a4, 0x1843, 0x482b, 0x9e, 0xf2, 0xbe, 0x28, 0x34, 0xc5, 0xfd, 0xd4} +DEFINE_GUID!{SharpenEffectGuid, + 0x63cbf3ee, 0xc526, 0x402c, 0x8f, 0x71, 0x62, 0xc5, 0x40, 0xbf, 0x51, 0x42} +DEFINE_GUID!{ColorMatrixEffectGuid, + 0x718f2615, 0x7933, 0x40e3, 0xa5, 0x11, 0x5f, 0x68, 0xfe, 0x14, 0xdd, 0x74} +DEFINE_GUID!{ColorLUTEffectGuid, + 0xa7ce72a9, 0xf7f, 0x40d7, 0xb3, 0xcc, 0xd0, 0xc0, 0x2d, 0x5c, 0x32, 0x12} +DEFINE_GUID!{BrightnessContrastEffectGuid, + 0xd3a1dbe1, 0x8ec4, 0x4c17, 0x9f, 0x4c, 0xea, 0x97, 0xad, 0x1c, 0x34, 0x3d} +DEFINE_GUID!{HueSaturationLightnessEffectGuid, + 0x8b2dd6c3, 0xeb07, 0x4d87, 0xa5, 0xf0, 0x71, 0x8, 0xe2, 0x6a, 0x9c, 0x5f} +DEFINE_GUID!{LevelsEffectGuid, + 0x99c354ec, 0x2a31, 0x4f3a, 0x8c, 0x34, 0x17, 0xa8, 0x3, 0xb3, 0x3a, 0x25} +DEFINE_GUID!{TintEffectGuid, + 0x1077af00, 0x2848, 0x4441, 0x94, 0x89, 0x44, 0xad, 0x4c, 0x2d, 0x7a, 0x2c} +DEFINE_GUID!{ColorBalanceEffectGuid, + 0x537e597d, 0x251e, 0x48da, 0x96, 0x64, 0x29, 0xca, 0x49, 0x6b, 0x70, 0xf8} +DEFINE_GUID!{RedEyeCorrectionEffectGuid, + 0x74d29d05, 0x69a4, 0x4266, 0x95, 0x49, 0x3c, 0xc5, 0x28, 0x36, 0xb6, 0x32} +DEFINE_GUID!{ColorCurveEffectGuid, + 0xdd6a0022, 0x58e4, 0x4a67, 0x9d, 0x9b, 0xd4, 0x8e, 0xb8, 0x81, 0xa5, 0x3d} +STRUCT!{struct SharpenParams { + radius: c_float, + amount: c_float, +}} +STRUCT!{struct BlurParams { + radius: c_float, + expandEdge: BOOL, +}} +STRUCT!{struct BrightnessContrastParams { + brightnessLevel: INT, + contrastLevel: INT, +}} +STRUCT!{struct RedEyeCorrectionParams { + numberOfAreas: UINT, + areas: *mut RECT, +}} +STRUCT!{struct HueSaturationLightnessParams { + hueLevel: INT, + saturationLevel: INT, + lightnessLevel: INT, +}} +STRUCT!{struct TintParams { + hue: INT, + amount: INT, +}} +STRUCT!{struct LevelsParams { + highlight: INT, + midtone: INT, + shadow: INT, +}} +STRUCT!{struct ColorBalanceParams { + cyanRed: INT, + magentaGreen: INT, + yellowBlue: INT, +}} +STRUCT!{struct ColorLUTParams { + lutB: ColorChannelLUT, + lutG: ColorChannelLUT, + lutR: ColorChannelLUT, + lutA: ColorChannelLUT, +}} +ENUM!{enum CurveAdjustments { + AdjustExposure, + AdjustDensity, + AdjustContrast, + AdjustHighlight, + AdjustShadow, + AdjustMidtone, + AdjustWhiteSaturation, + AdjustBlackSaturation, +}} +ENUM!{enum CurveChannel { + CurveChannelAll, + CurveChannelRed, + CurveChannelGreen, + CurveChannelBlue, +}} +STRUCT!{struct ColorCurveParams { + adjustment: CurveAdjustments, + channel: CurveChannel, + adjustValue: INT, +}} +pub enum CGpEffect {} +extern "system" { + pub fn GdipCreateEffect( + guid: GUID, + effect: *mut *mut CGpEffect, + ) -> Status; + pub fn GdipDeleteEffect( + effect: *mut CGpEffect, + ) -> Status; + pub fn GdipGetEffectParameterSize( + effect: *mut CGpEffect, + size: *mut UINT, + ) -> Status; + pub fn GdipSetEffectParameters( + effect: *mut CGpEffect, + params: *const VOID, + size: UINT, + ) -> Status; + pub fn GdipGetEffectParameters( + effect: *mut CGpEffect, + size: *mut UINT, + params: *mut VOID, + ) -> Status; +} diff --git a/src/um/gdiplusenums.rs b/src/um/gdiplusenums.rs new file mode 100644 index 000000000..f89e46b81 --- /dev/null +++ b/src/um/gdiplusenums.rs @@ -0,0 +1,709 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use shared::minwindef::{DWORD, UINT}; +use um::wingdi::{ + EMR_ABORTPATH, EMR_ANGLEARC, EMR_ARC, EMR_ARCTO, EMR_BEGINPATH, EMR_BITBLT, EMR_CHORD, + EMR_CLOSEFIGURE, EMR_CREATEBRUSHINDIRECT, EMR_CREATEDIBPATTERNBRUSHPT, EMR_CREATEMONOBRUSH, + EMR_CREATEPALETTE, EMR_CREATEPEN, EMR_DELETEOBJECT, EMR_ELLIPSE, EMR_ENDPATH, EMR_EOF, + EMR_EXCLUDECLIPRECT, EMR_EXTCREATEFONTINDIRECTW, EMR_EXTCREATEPEN, EMR_EXTFLOODFILL, + EMR_EXTSELECTCLIPRGN, EMR_EXTTEXTOUTA, EMR_EXTTEXTOUTW, EMR_FILLPATH, EMR_FILLRGN, + EMR_FLATTENPATH, EMR_FRAMERGN, EMR_GDICOMMENT, EMR_HEADER, EMR_INTERSECTCLIPRECT, + EMR_INVERTRGN, EMR_LINETO, EMR_MASKBLT, EMR_MODIFYWORLDTRANSFORM, EMR_MOVETOEX, + EMR_OFFSETCLIPRGN, EMR_PAINTRGN, EMR_PIE, EMR_PLGBLT, EMR_POLYBEZIER, EMR_POLYBEZIER16, + EMR_POLYBEZIERTO, EMR_POLYBEZIERTO16, EMR_POLYDRAW, EMR_POLYDRAW16, EMR_POLYGON, EMR_POLYGON16, + EMR_POLYLINE, EMR_POLYLINE16, EMR_POLYLINETO, EMR_POLYLINETO16, EMR_POLYPOLYGON, + EMR_POLYPOLYGON16, EMR_POLYPOLYLINE, EMR_POLYPOLYLINE16, EMR_POLYTEXTOUTA, EMR_POLYTEXTOUTW, + EMR_REALIZEPALETTE, EMR_RECTANGLE, EMR_RESIZEPALETTE, EMR_RESTOREDC, EMR_ROUNDRECT, EMR_SAVEDC, + EMR_SCALEVIEWPORTEXTEX, EMR_SCALEWINDOWEXTEX, EMR_SELECTCLIPPATH, EMR_SELECTOBJECT, + EMR_SELECTPALETTE, EMR_SETARCDIRECTION, EMR_SETBKCOLOR, EMR_SETBKMODE, EMR_SETBRUSHORGEX, + EMR_SETCOLORADJUSTMENT, EMR_SETDIBITSTODEVICE, EMR_SETMAPMODE, EMR_SETMAPPERFLAGS, + EMR_SETMETARGN, EMR_SETMITERLIMIT, EMR_SETPALETTEENTRIES, EMR_SETPIXELV, EMR_SETPOLYFILLMODE, + EMR_SETROP2, EMR_SETSTRETCHBLTMODE,EMR_SETTEXTALIGN,EMR_SETTEXTCOLOR, EMR_SETVIEWPORTEXTEX, + EMR_SETVIEWPORTORGEX, EMR_SETWINDOWEXTEX, EMR_SETWINDOWORGEX, EMR_SETWORLDTRANSFORM, + EMR_STRETCHBLT, EMR_STRETCHDIBITS, EMR_STROKEANDFILLPATH, EMR_STROKEPATH, EMR_WIDENPATH, + META_ANIMATEPALETTE, META_ARC, META_BITBLT, META_CHORD, META_CREATEBRUSHINDIRECT, + META_CREATEFONTINDIRECT, META_CREATEPALETTE, META_CREATEPATTERNBRUSH, META_CREATEPENINDIRECT, + META_CREATEREGION, META_DELETEOBJECT, META_DIBBITBLT, META_DIBCREATEPATTERNBRUSH, + META_DIBSTRETCHBLT, META_ELLIPSE, META_ESCAPE, META_EXCLUDECLIPRECT, META_EXTFLOODFILL, + META_EXTTEXTOUT, META_FILLREGION, META_FLOODFILL, META_FRAMEREGION, META_INTERSECTCLIPRECT, + META_INVERTREGION, META_LINETO, META_MOVETO, META_OFFSETCLIPRGN, META_OFFSETVIEWPORTORG, + META_OFFSETWINDOWORG, META_PAINTREGION, META_PATBLT, META_PIE, META_POLYGON, META_POLYLINE, + META_POLYPOLYGON, META_REALIZEPALETTE, META_RECTANGLE, META_RESIZEPALETTE, META_RESTOREDC, + META_ROUNDRECT, META_SAVEDC, META_SCALEVIEWPORTEXT, META_SCALEWINDOWEXT, META_SELECTCLIPREGION, + META_SELECTOBJECT, META_SELECTPALETTE, META_SETBKCOLOR, META_SETBKMODE, META_SETDIBTODEV, + META_SETMAPMODE, META_SETMAPPERFLAGS, META_SETPALENTRIES, META_SETPIXEL, META_SETPOLYFILLMODE, + META_SETRELABS, META_SETROP2, META_SETSTRETCHBLTMODE, META_SETTEXTALIGN, META_SETTEXTCHAREXTRA, + META_SETTEXTCOLOR, META_SETTEXTJUSTIFICATION, META_SETVIEWPORTEXT, META_SETVIEWPORTORG, + META_SETWINDOWEXT, META_SETWINDOWORG, META_STRETCHBLT, META_STRETCHDIB, META_TEXTOUT +}; +pub const FlatnessDefault: f32 = 1.0f32 / 4.0f32; +pub type GraphicsState = UINT; +pub type GraphicsContainer = UINT; +ENUM!{enum FillMode { + FillModeAlternate, + FillModeWinding, +}} +ENUM!{enum QualityMode { + QualityModeInvalid = -1i32 as u32, + QualityModeDefault = 0, + QualityModeLow = 1, + QualityModeHigh = 2, +}} +ENUM!{enum CompositingMode { + CompositingModeSourceOver, + CompositingModeSourceCopy, +}} +ENUM!{enum CompositingQuality { + CompositingQualityInvalid = QualityModeInvalid, + CompositingQualityDefault = QualityModeDefault, + CompositingQualityHighSpeed = QualityModeLow, + CompositingQualityHighQuality = QualityModeHigh, + CompositingQualityGammaCorrected, + CompositingQualityAssumeLinear, +}} +ENUM!{enum Unit { + UnitWorld, + UnitDisplay, + UnitPixel, + UnitPoint, + UnitInch, + UnitDocument, + UnitMillimeter, +}} +ENUM!{enum MetafileFrameUnit { + MetafileFrameUnitPixel = UnitPixel, + MetafileFrameUnitPoint = UnitPoint, + MetafileFrameUnitInch = UnitInch, + MetafileFrameUnitDocument = UnitDocument, + MetafileFrameUnitMillimeter = UnitMillimeter, + MetafileFrameUnitGdi, +}} +ENUM!{enum CoordinateSpace { + CoordinateSpaceWorld, + CoordinateSpacePage, + CoordinateSpaceDevice, +}} +ENUM!{enum WrapMode { + WrapModeTile, + WrapModeTileFlipX, + WrapModeTileFlipY, + WrapModeTileFlipXY, + WrapModeClamp, +}} +ENUM!{enum HatchStyle { + HatchStyleHorizontal, + HatchStyleVertical, + HatchStyleForwardDiagonal, + HatchStyleBackwardDiagonal, + HatchStyleCross, + HatchStyleDiagonalCross, + HatchStyle05Percent, + HatchStyle10Percent, + HatchStyle20Percent, + HatchStyle25Percent, + HatchStyle30Percent, + HatchStyle40Percent, + HatchStyle50Percent, + HatchStyle60Percent, + HatchStyle70Percent, + HatchStyle75Percent, + HatchStyle80Percent, + HatchStyle90Percent, + HatchStyleLightDownwardDiagonal, + HatchStyleLightUpwardDiagonal, + HatchStyleDarkDownwardDiagonal, + HatchStyleDarkUpwardDiagonal, + HatchStyleWideDownwardDiagonal, + HatchStyleWideUpwardDiagonal, + HatchStyleLightVertical, + HatchStyleLightHorizontal, + HatchStyleNarrowVertical, + HatchStyleNarrowHorizontal, + HatchStyleDarkVertical, + HatchStyleDarkHorizontal, + HatchStyleDashedDownwardDiagonal, + HatchStyleDashedUpwardDiagonal, + HatchStyleDashedHorizontal, + HatchStyleDashedVertical, + HatchStyleSmallConfetti, + HatchStyleLargeConfetti, + HatchStyleZigZag, + HatchStyleWave, + HatchStyleDiagonalBrick, + HatchStyleHorizontalBrick, + HatchStyleWeave, + HatchStylePlaid, + HatchStyleDivot, + HatchStyleDottedGrid, + HatchStyleDottedDiamond, + HatchStyleShingle, + HatchStyleTrellis, + HatchStyleSphere, + HatchStyleSmallGrid, + HatchStyleSmallCheckerBoard, + HatchStyleLargeCheckerBoard, + HatchStyleOutlinedDiamond, + HatchStyleSolidDiamond, + HatchStyleTotal, + HatchStyleLargeGrid = HatchStyleCross, + HatchStyleMin = HatchStyleHorizontal, + HatchStyleMax = HatchStyleTotal - 1, +}} +ENUM!{enum DashStyle { + DashStyleSolid, + DashStyleDash, + DashStyleDot, + DashStyleDashDot, + DashStyleDashDotDot, + DashStyleCustom, +}} +ENUM!{enum DashCap { + DashCapFlat = 0, + DashCapRound = 2, + DashCapTriangle = 3, +}} +ENUM!{enum LineCap { + LineCapFlat = 0, + LineCapSquare = 1, + LineCapRound = 2, + LineCapTriangle = 3, + LineCapNoAnchor = 0x10, + LineCapSquareAnchor = 0x11, + LineCapRoundAnchor = 0x12, + LineCapDiamondAnchor = 0x13, + LineCapArrowAnchor = 0x14, + LineCapCustom = 0xff, + LineCapAnchorMask = 0xf0, +}} +ENUM!{enum CustomLineCapType { + CustomLineCapTypeDefault = 0, + CustomLineCapTypeAdjustableArrow = 1, +}} +ENUM!{enum LineJoin { + LineJoinMiter = 0, + LineJoinBevel = 1, + LineJoinRound = 2, + LineJoinMiterClipped = 3, +}} +ENUM!{enum PathPointType { + PathPointTypeStart = 0, + PathPointTypeLine = 1, + PathPointTypeBezier = 3, + PathPointTypePathTypeMask = 0x07, + PathPointTypeDashMode = 0x10, + PathPointTypePathMarker = 0x20, + PathPointTypeCloseSubpath = 0x80, + PathPointTypeBezier3 = 3, +}} +ENUM!{enum WarpMode { + WarpModePerspective, + WarpModeBilinear, +}} +ENUM!{enum LinearGradientMode { + LinearGradientModeHorizontal, + LinearGradientModeVertical, + LinearGradientModeForwardDiagonal, + LinearGradientModeBackwardDiagonal, +}} +ENUM!{enum CombineMode { + CombineModeReplace, + CombineModeIntersect, + CombineModeUnion, + CombineModeXor, + CombineModeExclude, + CombineModeComplement, +}} +ENUM!{enum ImageType { + ImageTypeUnknown, + ImageTypeBitmap, + ImageTypeMetafile, +}} +ENUM!{enum InterpolationMode { + InterpolationModeInvalid = QualityModeInvalid, + InterpolationModeDefault = QualityModeDefault, + InterpolationModeLowQuality = QualityModeLow, + InterpolationModeHighQuality = QualityModeHigh, + InterpolationModeBilinear, + InterpolationModeBicubic, + InterpolationModeNearestNeighbor, + InterpolationModeHighQualityBilinear, + InterpolationModeHighQualityBicubic, +}} +ENUM!{enum PenAlignment { + PenAlignmentCenter = 0, + PenAlignmentInset = 1, +}} +ENUM!{enum BrushType { + BrushTypeSolidColor = 0, + BrushTypeHatchFill = 1, + BrushTypeTextureFill = 2, + BrushTypePathGradient = 3, + BrushTypeLinearGradient = 4, +}} +ENUM!{enum PenType { + PenTypeSolidColor = BrushTypeSolidColor, + PenTypeHatchFill = BrushTypeHatchFill, + PenTypeTextureFill = BrushTypeTextureFill, + PenTypePathGradient = BrushTypePathGradient, + PenTypeLinearGradient = BrushTypeLinearGradient, + PenTypeUnknown = -1i32 as u32, +}} +ENUM!{enum MatrixOrder { + MatrixOrderPrepend = 0, + MatrixOrderAppend = 1, +}} +ENUM!{enum GenericFontFamily { + GenericFontFamilySerif, + GenericFontFamilySansSerif, + GenericFontFamilyMonospace, +}} +ENUM!{enum FontStyle { + FontStyleRegular = 0, + FontStyleBold = 1, + FontStyleItalic = 2, + FontStyleBoldItalic = 3, + FontStyleUnderline = 4, + FontStyleStrikeout = 8, +}} +ENUM!{enum SmoothingMode { + SmoothingModeInvalid = QualityModeInvalid, + SmoothingModeDefault = QualityModeDefault, + SmoothingModeHighSpeed = QualityModeLow, + SmoothingModeHighQuality = QualityModeHigh, + SmoothingModeNone, + SmoothingModeAntiAlias, + SmoothingModeAntiAlias8x4 = SmoothingModeAntiAlias, + SmoothingModeAntiAlias8x8, +}} +ENUM!{enum PixelOffsetMode { + PixelOffsetModeInvalid = QualityModeInvalid, + PixelOffsetModeDefault = QualityModeDefault, + PixelOffsetModeHighSpeed = QualityModeLow, + PixelOffsetModeHighQuality = QualityModeHigh, + PixelOffsetModeNone, + PixelOffsetModeHalf, +}} +ENUM!{enum TextRenderingHint { + TextRenderingHintSystemDefault = 0, + TextRenderingHintSingleBitPerPixelGridFit, + TextRenderingHintSingleBitPerPixel, + TextRenderingHintAntiAliasGridFit, + TextRenderingHintAntiAlias, + TextRenderingHintClearTypeGridFit, +}} +ENUM!{enum MetafileType { + MetafileTypeInvalid, + MetafileTypeWmf, + MetafileTypeWmfPlaceable, + MetafileTypeEmf, + MetafileTypeEmfPlusOnly, + MetafileTypeEmfPlusDual, +}} +ENUM!{enum EmfType { + EmfTypeEmfOnly = MetafileTypeEmf, + EmfTypeEmfPlusOnly = MetafileTypeEmfPlusOnly, + EmfTypeEmfPlusDual = MetafileTypeEmfPlusDual, +}} +ENUM!{enum ObjectType { + ObjectTypeInvalid, + ObjectTypeBrush, + ObjectTypePen, + ObjectTypePath, + ObjectTypeRegion, + ObjectTypeImage, + ObjectTypeFont, + ObjectTypeStringFormat, + ObjectTypeImageAttributes, + ObjectTypeCustomLineCap, + ObjectTypeGraphics, + ObjectTypeMax = ObjectTypeGraphics, + ObjectTypeMin = ObjectTypeBrush, +}} +#[inline] +pub fn ObjectTypeIsValid(ty: ObjectType) -> bool { + (ty >= ObjectTypeMin) && (ty <= ObjectTypeMax) +} +pub const GDIP_EMFPLUS_RECORD_BASE: DWORD = 0x00004000; +pub const GDIP_WMF_RECORD_BASE: DWORD = 0x00010000; +macro_rules! GDIP_WMF_RECORD_TO_EMFPLUS { + ($n:expr) => ($n as u32 | GDIP_WMF_RECORD_BASE) +} +macro_rules! GDIP_EMFPLUS_RECORD_TO_WMF { + ($n:expr) => ($n as u32 & (~GDIP_WMF_RECORD_BASE)) +} +macro_rules! GDIP_IS_WMF_RECORDTYPE { + ($n:expr) => ((n as u32 & GDIP_WMF_RECORD_BASE) != 0) +} +ENUM!{enum EmfPlusRecordType { + WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETBKCOLOR), + WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETBKMODE), + WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETMAPMODE), + WmfRecordTypeSetROP2 = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETROP2), + WmfRecordTypeSetRelAbs = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETRELABS), + WmfRecordTypeSetPolyFillMode = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETPOLYFILLMODE), + WmfRecordTypeSetStretchBltMode = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETSTRETCHBLTMODE), + WmfRecordTypeSetTextCharExtra = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETTEXTCHAREXTRA), + WmfRecordTypeSetTextColor = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETTEXTCOLOR), + WmfRecordTypeSetTextJustification = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETTEXTJUSTIFICATION), + WmfRecordTypeSetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETWINDOWORG), + WmfRecordTypeSetWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETWINDOWEXT), + WmfRecordTypeSetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETVIEWPORTORG), + WmfRecordTypeSetViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETVIEWPORTEXT), + WmfRecordTypeOffsetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS!(META_OFFSETWINDOWORG), + WmfRecordTypeScaleWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SCALEWINDOWEXT), + WmfRecordTypeOffsetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS!(META_OFFSETVIEWPORTORG), + WmfRecordTypeScaleViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SCALEVIEWPORTEXT), + WmfRecordTypeLineTo = GDIP_WMF_RECORD_TO_EMFPLUS!(META_LINETO), + WmfRecordTypeMoveTo = GDIP_WMF_RECORD_TO_EMFPLUS!(META_MOVETO), + WmfRecordTypeExcludeClipRect = GDIP_WMF_RECORD_TO_EMFPLUS!(META_EXCLUDECLIPRECT), + WmfRecordTypeIntersectClipRect = GDIP_WMF_RECORD_TO_EMFPLUS!(META_INTERSECTCLIPRECT), + WmfRecordTypeArc = GDIP_WMF_RECORD_TO_EMFPLUS!(META_ARC), + WmfRecordTypeEllipse = GDIP_WMF_RECORD_TO_EMFPLUS!(META_ELLIPSE), + WmfRecordTypeFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS!(META_FLOODFILL), + WmfRecordTypePie = GDIP_WMF_RECORD_TO_EMFPLUS!(META_PIE), + WmfRecordTypeRectangle = GDIP_WMF_RECORD_TO_EMFPLUS!(META_RECTANGLE), + WmfRecordTypeRoundRect = GDIP_WMF_RECORD_TO_EMFPLUS!(META_ROUNDRECT), + WmfRecordTypePatBlt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_PATBLT), + WmfRecordTypeSaveDC = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SAVEDC), + WmfRecordTypeSetPixel = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETPIXEL), + WmfRecordTypeOffsetClipRgn = GDIP_WMF_RECORD_TO_EMFPLUS!(META_OFFSETCLIPRGN), + WmfRecordTypeTextOut = GDIP_WMF_RECORD_TO_EMFPLUS!(META_TEXTOUT), + WmfRecordTypeBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_BITBLT), + WmfRecordTypeStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_STRETCHBLT), + WmfRecordTypePolygon = GDIP_WMF_RECORD_TO_EMFPLUS!(META_POLYGON), + WmfRecordTypePolyline = GDIP_WMF_RECORD_TO_EMFPLUS!(META_POLYLINE), + WmfRecordTypeEscape = GDIP_WMF_RECORD_TO_EMFPLUS!(META_ESCAPE), + WmfRecordTypeRestoreDC = GDIP_WMF_RECORD_TO_EMFPLUS!(META_RESTOREDC), + WmfRecordTypeFillRegion = GDIP_WMF_RECORD_TO_EMFPLUS!(META_FILLREGION), + WmfRecordTypeFrameRegion = GDIP_WMF_RECORD_TO_EMFPLUS!(META_FRAMEREGION), + WmfRecordTypeInvertRegion = GDIP_WMF_RECORD_TO_EMFPLUS!(META_INVERTREGION), + WmfRecordTypePaintRegion = GDIP_WMF_RECORD_TO_EMFPLUS!(META_PAINTREGION), + WmfRecordTypeSelectClipRegion = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SELECTCLIPREGION), + WmfRecordTypeSelectObject = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SELECTOBJECT), + WmfRecordTypeSetTextAlign = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETTEXTALIGN), + WmfRecordTypeDrawText = GDIP_WMF_RECORD_TO_EMFPLUS!(0x062F), + WmfRecordTypeChord = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CHORD), + WmfRecordTypeSetMapperFlags = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETMAPPERFLAGS), + WmfRecordTypeExtTextOut = GDIP_WMF_RECORD_TO_EMFPLUS!(META_EXTTEXTOUT), + WmfRecordTypeSetDIBToDev = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETDIBTODEV), + WmfRecordTypeSelectPalette = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SELECTPALETTE), + WmfRecordTypeRealizePalette = GDIP_WMF_RECORD_TO_EMFPLUS!(META_REALIZEPALETTE), + WmfRecordTypeAnimatePalette = GDIP_WMF_RECORD_TO_EMFPLUS!(META_ANIMATEPALETTE), + WmfRecordTypeSetPalEntries = GDIP_WMF_RECORD_TO_EMFPLUS!(META_SETPALENTRIES), + WmfRecordTypePolyPolygon = GDIP_WMF_RECORD_TO_EMFPLUS!(META_POLYPOLYGON), + WmfRecordTypeResizePalette = GDIP_WMF_RECORD_TO_EMFPLUS!(META_RESIZEPALETTE), + WmfRecordTypeDIBBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_DIBBITBLT), + WmfRecordTypeDIBStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS!(META_DIBSTRETCHBLT), + WmfRecordTypeDIBCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS!(META_DIBCREATEPATTERNBRUSH), + WmfRecordTypeStretchDIB = GDIP_WMF_RECORD_TO_EMFPLUS!(META_STRETCHDIB), + WmfRecordTypeExtFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS!(META_EXTFLOODFILL), + WmfRecordTypeSetLayout = GDIP_WMF_RECORD_TO_EMFPLUS!(0x0149), + WmfRecordTypeResetDC = GDIP_WMF_RECORD_TO_EMFPLUS!(0x014C), + WmfRecordTypeStartDoc = GDIP_WMF_RECORD_TO_EMFPLUS!(0x014D), + WmfRecordTypeStartPage = GDIP_WMF_RECORD_TO_EMFPLUS!(0x004F), + WmfRecordTypeEndPage = GDIP_WMF_RECORD_TO_EMFPLUS!(0x0050), + WmfRecordTypeAbortDoc = GDIP_WMF_RECORD_TO_EMFPLUS!(0x0052), + WmfRecordTypeEndDoc = GDIP_WMF_RECORD_TO_EMFPLUS!(0x005E), + WmfRecordTypeDeleteObject = GDIP_WMF_RECORD_TO_EMFPLUS!(META_DELETEOBJECT), + WmfRecordTypeCreatePalette = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CREATEPALETTE), + WmfRecordTypeCreateBrush = GDIP_WMF_RECORD_TO_EMFPLUS!(0x00F8), + WmfRecordTypeCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CREATEPATTERNBRUSH), + WmfRecordTypeCreatePenIndirect = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CREATEPENINDIRECT), + WmfRecordTypeCreateFontIndirect = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CREATEFONTINDIRECT), + WmfRecordTypeCreateBrushIndirect = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CREATEBRUSHINDIRECT), + WmfRecordTypeCreateBitmapIndirect = GDIP_WMF_RECORD_TO_EMFPLUS!(0x02FD), + WmfRecordTypeCreateBitmap = GDIP_WMF_RECORD_TO_EMFPLUS!(0x06FE), + WmfRecordTypeCreateRegion = GDIP_WMF_RECORD_TO_EMFPLUS!(META_CREATEREGION), + EmfRecordTypeHeader = EMR_HEADER, + EmfRecordTypePolyBezier = EMR_POLYBEZIER, + EmfRecordTypePolygon = EMR_POLYGON, + EmfRecordTypePolyline = EMR_POLYLINE, + EmfRecordTypePolyBezierTo = EMR_POLYBEZIERTO, + EmfRecordTypePolyLineTo = EMR_POLYLINETO, + EmfRecordTypePolyPolyline = EMR_POLYPOLYLINE, + EmfRecordTypePolyPolygon = EMR_POLYPOLYGON, + EmfRecordTypeSetWindowExtEx = EMR_SETWINDOWEXTEX, + EmfRecordTypeSetWindowOrgEx = EMR_SETWINDOWORGEX, + EmfRecordTypeSetViewportExtEx = EMR_SETVIEWPORTEXTEX, + EmfRecordTypeSetViewportOrgEx = EMR_SETVIEWPORTORGEX, + EmfRecordTypeSetBrushOrgEx = EMR_SETBRUSHORGEX, + EmfRecordTypeEOF = EMR_EOF, + EmfRecordTypeSetPixelV = EMR_SETPIXELV, + EmfRecordTypeSetMapperFlags = EMR_SETMAPPERFLAGS, + EmfRecordTypeSetMapMode = EMR_SETMAPMODE, + EmfRecordTypeSetBkMode = EMR_SETBKMODE, + EmfRecordTypeSetPolyFillMode = EMR_SETPOLYFILLMODE, + EmfRecordTypeSetROP2 = EMR_SETROP2, + EmfRecordTypeSetStretchBltMode = EMR_SETSTRETCHBLTMODE, + EmfRecordTypeSetTextAlign = EMR_SETTEXTALIGN, + EmfRecordTypeSetColorAdjustment = EMR_SETCOLORADJUSTMENT, + EmfRecordTypeSetTextColor = EMR_SETTEXTCOLOR, + EmfRecordTypeSetBkColor = EMR_SETBKCOLOR, + EmfRecordTypeOffsetClipRgn = EMR_OFFSETCLIPRGN, + EmfRecordTypeMoveToEx = EMR_MOVETOEX, + EmfRecordTypeSetMetaRgn = EMR_SETMETARGN, + EmfRecordTypeExcludeClipRect = EMR_EXCLUDECLIPRECT, + EmfRecordTypeIntersectClipRect = EMR_INTERSECTCLIPRECT, + EmfRecordTypeScaleViewportExtEx = EMR_SCALEVIEWPORTEXTEX, + EmfRecordTypeScaleWindowExtEx = EMR_SCALEWINDOWEXTEX, + EmfRecordTypeSaveDC = EMR_SAVEDC, + EmfRecordTypeRestoreDC = EMR_RESTOREDC, + EmfRecordTypeSetWorldTransform = EMR_SETWORLDTRANSFORM, + EmfRecordTypeModifyWorldTransform = EMR_MODIFYWORLDTRANSFORM, + EmfRecordTypeSelectObject = EMR_SELECTOBJECT, + EmfRecordTypeCreatePen = EMR_CREATEPEN, + EmfRecordTypeCreateBrushIndirect = EMR_CREATEBRUSHINDIRECT, + EmfRecordTypeDeleteObject = EMR_DELETEOBJECT, + EmfRecordTypeAngleArc = EMR_ANGLEARC, + EmfRecordTypeEllipse = EMR_ELLIPSE, + EmfRecordTypeRectangle = EMR_RECTANGLE, + EmfRecordTypeRoundRect = EMR_ROUNDRECT, + EmfRecordTypeArc = EMR_ARC, + EmfRecordTypeChord = EMR_CHORD, + EmfRecordTypePie = EMR_PIE, + EmfRecordTypeSelectPalette = EMR_SELECTPALETTE, + EmfRecordTypeCreatePalette = EMR_CREATEPALETTE, + EmfRecordTypeSetPaletteEntries = EMR_SETPALETTEENTRIES, + EmfRecordTypeResizePalette = EMR_RESIZEPALETTE, + EmfRecordTypeRealizePalette = EMR_REALIZEPALETTE, + EmfRecordTypeExtFloodFill = EMR_EXTFLOODFILL, + EmfRecordTypeLineTo = EMR_LINETO, + EmfRecordTypeArcTo = EMR_ARCTO, + EmfRecordTypePolyDraw = EMR_POLYDRAW, + EmfRecordTypeSetArcDirection = EMR_SETARCDIRECTION, + EmfRecordTypeSetMiterLimit = EMR_SETMITERLIMIT, + EmfRecordTypeBeginPath = EMR_BEGINPATH, + EmfRecordTypeEndPath = EMR_ENDPATH, + EmfRecordTypeCloseFigure = EMR_CLOSEFIGURE, + EmfRecordTypeFillPath = EMR_FILLPATH, + EmfRecordTypeStrokeAndFillPath = EMR_STROKEANDFILLPATH, + EmfRecordTypeStrokePath = EMR_STROKEPATH, + EmfRecordTypeFlattenPath = EMR_FLATTENPATH, + EmfRecordTypeWidenPath = EMR_WIDENPATH, + EmfRecordTypeSelectClipPath = EMR_SELECTCLIPPATH, + EmfRecordTypeAbortPath = EMR_ABORTPATH, + EmfRecordTypeReserved_069 = 69, + EmfRecordTypeGdiComment = EMR_GDICOMMENT, + EmfRecordTypeFillRgn = EMR_FILLRGN, + EmfRecordTypeFrameRgn = EMR_FRAMERGN, + EmfRecordTypeInvertRgn = EMR_INVERTRGN, + EmfRecordTypePaintRgn = EMR_PAINTRGN, + EmfRecordTypeExtSelectClipRgn = EMR_EXTSELECTCLIPRGN, + EmfRecordTypeBitBlt = EMR_BITBLT, + EmfRecordTypeStretchBlt = EMR_STRETCHBLT, + EmfRecordTypeMaskBlt = EMR_MASKBLT, + EmfRecordTypePlgBlt = EMR_PLGBLT, + EmfRecordTypeSetDIBitsToDevice = EMR_SETDIBITSTODEVICE, + EmfRecordTypeStretchDIBits = EMR_STRETCHDIBITS, + EmfRecordTypeExtCreateFontIndirect = EMR_EXTCREATEFONTINDIRECTW, + EmfRecordTypeExtTextOutA = EMR_EXTTEXTOUTA, + EmfRecordTypeExtTextOutW = EMR_EXTTEXTOUTW, + EmfRecordTypePolyBezier16 = EMR_POLYBEZIER16, + EmfRecordTypePolygon16 = EMR_POLYGON16, + EmfRecordTypePolyline16 = EMR_POLYLINE16, + EmfRecordTypePolyBezierTo16 = EMR_POLYBEZIERTO16, + EmfRecordTypePolylineTo16 = EMR_POLYLINETO16, + EmfRecordTypePolyPolyline16 = EMR_POLYPOLYLINE16, + EmfRecordTypePolyPolygon16 = EMR_POLYPOLYGON16, + EmfRecordTypePolyDraw16 = EMR_POLYDRAW16, + EmfRecordTypeCreateMonoBrush = EMR_CREATEMONOBRUSH, + EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT, + EmfRecordTypeExtCreatePen = EMR_EXTCREATEPEN, + EmfRecordTypePolyTextOutA = EMR_POLYTEXTOUTA, + EmfRecordTypePolyTextOutW = EMR_POLYTEXTOUTW, + EmfRecordTypeSetICMMode = 98, + EmfRecordTypeCreateColorSpace = 99, + EmfRecordTypeSetColorSpace = 100, + EmfRecordTypeDeleteColorSpace = 101, + EmfRecordTypeGLSRecord = 102, + EmfRecordTypeGLSBoundedRecord = 103, + EmfRecordTypePixelFormat = 104, + EmfRecordTypeDrawEscape = 105, + EmfRecordTypeExtEscape = 106, + EmfRecordTypeStartDoc = 107, + EmfRecordTypeSmallTextOut = 108, + EmfRecordTypeForceUFIMapping = 109, + EmfRecordTypeNamedEscape = 110, + EmfRecordTypeColorCorrectPalette = 111, + EmfRecordTypeSetICMProfileA = 112, + EmfRecordTypeSetICMProfileW = 113, + EmfRecordTypeAlphaBlend = 114, + EmfRecordTypeSetLayout = 115, + EmfRecordTypeTransparentBlt = 116, + EmfRecordTypeReserved_117 = 117, + EmfRecordTypeGradientFill = 118, + EmfRecordTypeSetLinkedUFIs = 119, + EmfRecordTypeSetTextJustification = 120, + EmfRecordTypeColorMatchToTargetW = 121, + EmfRecordTypeCreateColorSpaceW = 122, + EmfRecordTypeMax = 122, + EmfRecordTypeMin = 1, + EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE, + EmfPlusRecordTypeHeader, + EmfPlusRecordTypeEndOfFile, + EmfPlusRecordTypeComment, + EmfPlusRecordTypeGetDC, + EmfPlusRecordTypeMultiFormatStart, + EmfPlusRecordTypeMultiFormatSection, + EmfPlusRecordTypeMultiFormatEnd, + EmfPlusRecordTypeObject, + EmfPlusRecordTypeClear, + EmfPlusRecordTypeFillRects, + EmfPlusRecordTypeDrawRects, + EmfPlusRecordTypeFillPolygon, + EmfPlusRecordTypeDrawLines, + EmfPlusRecordTypeFillEllipse, + EmfPlusRecordTypeDrawEllipse, + EmfPlusRecordTypeFillPie, + EmfPlusRecordTypeDrawPie, + EmfPlusRecordTypeDrawArc, + EmfPlusRecordTypeFillRegion, + EmfPlusRecordTypeFillPath, + EmfPlusRecordTypeDrawPath, + EmfPlusRecordTypeFillClosedCurve, + EmfPlusRecordTypeDrawClosedCurve, + EmfPlusRecordTypeDrawCurve, + EmfPlusRecordTypeDrawBeziers, + EmfPlusRecordTypeDrawImage, + EmfPlusRecordTypeDrawImagePoints, + EmfPlusRecordTypeDrawString, + EmfPlusRecordTypeSetRenderingOrigin, + EmfPlusRecordTypeSetAntiAliasMode, + EmfPlusRecordTypeSetTextRenderingHint, + EmfPlusRecordTypeSetTextContrast, + EmfPlusRecordTypeSetInterpolationMode, + EmfPlusRecordTypeSetPixelOffsetMode, + EmfPlusRecordTypeSetCompositingMode, + EmfPlusRecordTypeSetCompositingQuality, + EmfPlusRecordTypeSave, + EmfPlusRecordTypeRestore, + EmfPlusRecordTypeBeginContainer, + EmfPlusRecordTypeBeginContainerNoParams, + EmfPlusRecordTypeEndContainer, + EmfPlusRecordTypeSetWorldTransform, + EmfPlusRecordTypeResetWorldTransform, + EmfPlusRecordTypeMultiplyWorldTransform, + EmfPlusRecordTypeTranslateWorldTransform, + EmfPlusRecordTypeScaleWorldTransform, + EmfPlusRecordTypeRotateWorldTransform, + EmfPlusRecordTypeSetPageTransform, + EmfPlusRecordTypeResetClip, + EmfPlusRecordTypeSetClipRect, + EmfPlusRecordTypeSetClipPath, + EmfPlusRecordTypeSetClipRegion, + EmfPlusRecordTypeOffsetClip, + EmfPlusRecordTypeDrawDriverString, + EmfPlusRecordTypeStrokeFillPath, + EmfPlusRecordTypeSerializableObject, + EmfPlusRecordTypeSetTSGraphics, + EmfPlusRecordTypeSetTSClip, + EmfPlusRecordTotal, + EmfPlusRecordTypeMax = EmfPlusRecordTotal - 1, + EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader, +}} +ENUM!{enum StringFormatFlags { + StringFormatFlagsDirectionRightToLeft = 0x00000001, + StringFormatFlagsDirectionVertical = 0x00000002, + StringFormatFlagsNoFitBlackBox = 0x00000004, + StringFormatFlagsDisplayFormatControl = 0x00000020, + StringFormatFlagsNoFontFallback = 0x00000400, + StringFormatFlagsMeasureTrailingSpaces = 0x00000800, + StringFormatFlagsNoWrap = 0x00001000, + StringFormatFlagsLineLimit = 0x00002000, + StringFormatFlagsNoClip = 0x00004000, + StringFormatFlagsBypassGDI = 0x80000000, +}} +ENUM!{enum StringTrimming { + StringTrimmingNone = 0, + StringTrimmingCharacter = 1, + StringTrimmingWord = 2, + StringTrimmingEllipsisCharacter = 3, + StringTrimmingEllipsisWord = 4, + StringTrimmingEllipsisPath = 5, +}} +ENUM!{enum StringDigitSubstitute { + StringDigitSubstituteUser = 0, + StringDigitSubstituteNone = 1, + StringDigitSubstituteNational = 2, + StringDigitSubstituteTraditional = 3, +}} +ENUM!{enum HotkeyPrefix { + HotkeyPrefixNone = 0, + HotkeyPrefixShow = 1, + HotkeyPrefixHide = 2, +}} +ENUM!{enum StringAlignment { + StringAlignmentNear = 0, + StringAlignmentCenter = 1, + StringAlignmentFar = 2, +}} +ENUM!{enum DriverStringOptions { + DriverStringOptionsCmapLookup = 1, + DriverStringOptionsVertical = 2, + DriverStringOptionsRealizedAdvance = 4, + DriverStringOptionsLimitSubpixel = 8, +}} +ENUM!{enum FlushIntention { + FlushIntentionFlush = 0, + FlushIntentionSync = 1, +}} +ENUM!{enum EncoderParameterValueType { + EncoderParameterValueTypeByte = 1, + EncoderParameterValueTypeASCII = 2, + EncoderParameterValueTypeShort = 3, + EncoderParameterValueTypeLong = 4, + EncoderParameterValueTypeRational = 5, + EncoderParameterValueTypeLongRange = 6, + EncoderParameterValueTypeUndefined = 7, + EncoderParameterValueTypeRationalRange = 8, + EncoderParameterValueTypePointer = 9, +}} +ENUM!{enum EncoderValue { + EncoderValueColorTypeCMYK, + EncoderValueColorTypeYCCK, + EncoderValueCompressionLZW, + EncoderValueCompressionCCITT3, + EncoderValueCompressionCCITT4, + EncoderValueCompressionRle, + EncoderValueCompressionNone, + EncoderValueScanMethodInterlaced, + EncoderValueScanMethodNonInterlaced, + EncoderValueVersionGif87, + EncoderValueVersionGif89, + EncoderValueRenderProgressive, + EncoderValueRenderNonProgressive, + EncoderValueTransformRotate90, + EncoderValueTransformRotate180, + EncoderValueTransformRotate270, + EncoderValueTransformFlipHorizontal, + EncoderValueTransformFlipVertical, + EncoderValueMultiFrame, + EncoderValueLastFrame, + EncoderValueFlush, + EncoderValueFrameDimensionTime, + EncoderValueFrameDimensionResolution, + EncoderValueFrameDimensionPage, + EncoderValueColorTypeGray, + EncoderValueColorTypeRGB, +}} +ENUM!{enum EmfToWmfBitsFlags { + EmfToWmfBitsFlagsDefault = 0x00000000, + EmfToWmfBitsFlagsEmbedEmf = 0x00000001, + EmfToWmfBitsFlagsIncludePlaceable = 0x00000002, + EmfToWmfBitsFlagsNoXORClip = 0x00000004, +}} +ENUM!{enum ConvertToEmfPlusFlags { + ConvertToEmfPlusFlagsDefault = 0x00000000, + ConvertToEmfPlusFlagsRopUsed = 0x00000001, + ConvertToEmfPlusFlagsText = 0x00000002, + ConvertToEmfPlusFlagsInvalidRecord = 0x00000004, +}} +ENUM!{enum GpTestControlEnum { + TestControlForceBilinear = 0, + TestControlNoICM = 1, + TestControlGetBuildNumber = 2, +}} diff --git a/src/um/gdiplusflat.rs b/src/um/gdiplusflat.rs new file mode 100644 index 000000000..b65b47f56 --- /dev/null +++ b/src/um/gdiplusflat.rs @@ -0,0 +1,3396 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use ctypes::c_void; +use shared::basetsd::{UINT16, ULONG_PTR}; +use shared::guiddef::{CLSID, GUID}; +use shared::minwindef::{BOOL, BYTE, HINSTANCE, HMETAFILE, HRGN, INT, LPBYTE, UINT}; +use shared::windef::{HBITMAP, HDC, HENHMETAFILE, HICON, HPALETTE, HWND, RECT}; +use shared::wtypes::PROPID; +use um::ddraw::IDirectDrawSurface7; +use um::gdipluscolor::ColorChannelFlags; +use um::gdipluscolormatrix::{ + ColorAdjustType, ColorMap, ColorMatrix, ColorMatrixFlags, HistogramFormat +}; +use um::gdipluseffects::CGpEffect; +use um::gdiplusenums::{ + CombineMode, CompositingMode, CompositingQuality, CustomLineCapType, EmfPlusRecordType, + EmfType, GpTestControlEnum, GraphicsContainer, GraphicsState, ImageType, InterpolationMode, + LinearGradientMode, MetafileFrameUnit, PixelOffsetMode, SmoothingMode, StringAlignment, + StringDigitSubstitute, StringTrimming, TextRenderingHint, Unit, WarpMode, WrapMode +}; +use um::gdiplusgpstubs::{ + GpAdjustableArrowCap, GpBitmap, GpBrush, GpBrushType, GpCachedBitmap, GpCoordinateSpace, + GpCustomLineCap, GpDashCap, GpDashStyle, GpFillMode, GpFlushIntention, GpFont, + GpFontCollection, GpFontFamily, GpGraphics, GpHatch, GpHatchStyle, GpImage, GpImageAttributes, + GpLineCap, GpLineGradient, GpLineJoin, GpMatrix, GpMatrixOrder, GpMetafile, GpPath, GpPathData, + GpPathGradient, GpPathIterator, GpPen, GpPenAlignment, GpPenType, GpPoint, GpPointF, GpRect, + GpRectF, GpRegion, GpSolidFill, GpStatus, GpStringFormat, GpTexture, GpUnit, GpWrapMode +}; +use um::gdiplusimaging::{ + BitmapData, EncoderParameters, ImageCodecInfo, ImageItemData, PropertyItem, RotateFlipType +}; +use um::gdiplusmetaheader::{MetafileHeader, WmfPlaceableFileHeader}; +use um::gdipluspixelformats::{ARGB, ColorPalette, DitherType, PaletteType, PixelFormat}; +use um::gdiplustypes::{ + CharacterRange, DrawImageAbort, EnumerateMetafileProc, GetThumbnailImageAbort, Point, PointF, + REAL, Rect, RectF +}; +use um::objidlbase::IStream; +use um::wingdi::{BITMAPINFO, LOGFONTA, LOGFONTW}; +use um::winnt::{HANDLE, LANGID, LPWSTR, VOID, WCHAR}; +extern "system" { + pub fn GdipCreatePath( + brushMode: GpFillMode, + path: *mut *mut GpPath, + ) -> GpStatus; + pub fn GdipCreatePath2( + _: *const GpPointF, + _: *const BYTE, + _: INT, + _: GpFillMode, + path: *mut *mut GpPath, + ) -> GpStatus; + pub fn GdipCreatePath2I( + _: *const GpPoint, + _: *const BYTE, + _: INT, + _: GpFillMode, + path: *mut *mut GpPath, + ) -> GpStatus; + pub fn GdipClonePath( + path: *mut GpPath, + clonePath: *mut *mut GpPath, + ) -> GpStatus; + pub fn GdipDeletePath( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipResetPath( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipGetPointCount( + path: *mut GpPath, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetPathTypes( + path: *mut GpPath, + types: *mut BYTE, + count: INT, + ) -> GpStatus; + pub fn GdipGetPathPoints( + _: *mut GpPath, + points: *mut GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipGetPathPointsI( + _: *mut GpPath, + points: *mut GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipGetPathFillMode( + path: *mut GpPath, + fillmode: *mut GpFillMode, + ) -> GpStatus; + pub fn GdipSetPathFillMode( + path: *mut GpPath, + fillmode: GpFillMode, + ) -> GpStatus; + pub fn GdipGetPathData( + path: *mut GpPath, + pathData: *mut GpPathData, + ) -> GpStatus; + pub fn GdipStartPathFigure( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipClosePathFigure( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipClosePathFigures( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipSetPathMarker( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipClearPathMarkers( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipReversePath( + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipGetPathLastPoint( + path: *mut GpPath, + lastPoint: *mut GpPointF, + ) -> GpStatus; + pub fn GdipAddPathLine( + path: *mut GpPath, + x1: REAL, + y1: REAL, + x2: REAL, + y2: REAL, + ) -> GpStatus; + pub fn GdipAddPathLine2( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathArc( + path: *mut GpPath, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipAddPathBezier( + path: *mut GpPath, + x1: REAL, + y1: REAL, + x2: REAL, + y2: REAL, + x3: REAL, + y3: REAL, + x4: REAL, + y4: REAL, + ) -> GpStatus; + pub fn GdipAddPathBeziers( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathCurve( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathCurve2( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipAddPathCurve3( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + offset: INT, + numberOfSegments: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipAddPathClosedCurve( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathClosedCurve2( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipAddPathRectangle( + path: *mut GpPath, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipAddPathRectangles( + path: *mut GpPath, + rects: *const GpRectF, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathEllipse( + path: *mut GpPath, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipAddPathPie( + path: *mut GpPath, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipAddPathPolygon( + path: *mut GpPath, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathPath( + path: *mut GpPath, + addingPath: *const GpPath, + connect: BOOL, + ) -> GpStatus; + pub fn GdipAddPathString( + path: *mut GpPath, + string: *const WCHAR, + length: INT, + family: *const GpFontFamily, + style: INT, + emSize: REAL, + layoutRect: *const RectF, + format: *const GpStringFormat, + ) -> GpStatus; + pub fn GdipAddPathStringI( + path: *mut GpPath, + string: *const WCHAR, + length: INT, + family: *const GpFontFamily, + style: INT, + emSize: REAL, + layoutRect: *const Rect, + format: *const GpStringFormat, + ) -> GpStatus; + pub fn GdipAddPathLineI( + path: *mut GpPath, + x1: INT, + y1: INT, + x2: INT, + y2: INT, + ) -> GpStatus; + pub fn GdipAddPathLine2I( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathArcI( + path: *mut GpPath, + x: INT, + y: INT, + width: INT, + height: INT, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipAddPathBezierI( + path: *mut GpPath, + x1: INT, + y1: INT, + x2: INT, + y2: INT, + x3: INT, + y3: INT, + x4: INT, + y4: INT, + ) -> GpStatus; + pub fn GdipAddPathBeziersI( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathCurveI( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathCurve2I( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipAddPathCurve3I( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + offset: INT, + numberOfSegments: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipAddPathClosedCurveI( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathClosedCurve2I( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipAddPathRectangleI( + path: *mut GpPath, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipAddPathRectanglesI( + path: *mut GpPath, + rects: *const GpRect, + count: INT, + ) -> GpStatus; + pub fn GdipAddPathEllipseI( + path: *mut GpPath, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipAddPathPieI( + path: *mut GpPath, + x: INT, + y: INT, + width: INT, + height: INT, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipAddPathPolygonI( + path: *mut GpPath, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipFlattenPath( + path: *mut GpPath, + matrix: *mut GpMatrix, + flatness: REAL, + ) -> GpStatus; + pub fn GdipWindingModeOutline( + path: *mut GpPath, + matrix: *mut GpMatrix, + flatness: REAL, + ) -> GpStatus; + pub fn GdipWidenPath( + nativePath: *mut GpPath, + pen: *mut GpPen, + matrix: *mut GpMatrix, + flatness: REAL, + ) -> GpStatus; + pub fn GdipWarpPath( + path: *mut GpPath, + matrix: *mut GpMatrix, + points: *const GpPointF, + count: INT, + srcx: REAL, + srcy: REAL, + srcwidth: REAL, + srcheight: REAL, + warpMode: WarpMode, + flatness: REAL, + ) -> GpStatus; + pub fn GdipTransformPath( + path: *mut GpPath, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipGetPathWorldBounds( + path: *mut GpPath, + bounds: *mut GpRectF, + matrix: *const GpMatrix, + pen: *const GpPen, + ) -> GpStatus; + pub fn GdipGetPathWorldBoundsI( + path: *mut GpPath, + bounds: *mut GpRect, + matrix: *const GpMatrix, + pen: *const GpPen, + ) -> GpStatus; + pub fn GdipIsVisiblePathPoint( + path: *mut GpPath, + x: REAL, + y: REAL, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisiblePathPointI( + path: *mut GpPath, + x: INT, + y: INT, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsOutlineVisiblePathPoint( + path: *mut GpPath, + x: REAL, + y: REAL, + pen: *mut GpPen, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsOutlineVisiblePathPointI( + path: *mut GpPath, + x: INT, + y: INT, + pen: *mut GpPen, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipCreatePathIter( + iterator: *mut *mut GpPathIterator, + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipDeletePathIter( + iterator: *mut GpPathIterator, + ) -> GpStatus; + pub fn GdipPathIterNextSubpath( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + startIndex: *mut INT, + endIndex: *mut INT, + isClosed: *mut BOOL, + ) -> GpStatus; + pub fn GdipPathIterNextSubpathPath( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + path: *mut GpPath, + isClosed: *mut BOOL, + ) -> GpStatus; + pub fn GdipPathIterNextPathType( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + pathType: *mut BYTE, + startIndex: *mut INT, + endIndex: *mut INT, + ) -> GpStatus; + pub fn GdipPathIterNextMarker( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + startIndex: *mut INT, + endIndex: *mut INT, + ) -> GpStatus; + pub fn GdipPathIterNextMarkerPath( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipPathIterGetCount( + iterator: *mut GpPathIterator, + count: *mut INT, + ) -> GpStatus; + pub fn GdipPathIterGetSubpathCount( + iterator: *mut GpPathIterator, + count: *mut INT, + ) -> GpStatus; + pub fn GdipPathIterIsValid( + iterator: *mut GpPathIterator, + valid: *mut BOOL, + ) -> GpStatus; + pub fn GdipPathIterHasCurve( + iterator: *mut GpPathIterator, + hasCurve: *mut BOOL, + ) -> GpStatus; + pub fn GdipPathIterRewind( + iterator: *mut GpPathIterator, + ) -> GpStatus; + pub fn GdipPathIterEnumerate( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + points: *mut GpPointF, + types: *mut BYTE, + count: INT, + ) -> GpStatus; + pub fn GdipPathIterCopyData( + iterator: *mut GpPathIterator, + resultCount: *mut INT, + points: *mut GpPointF, + types: *mut BYTE, + startIndex: INT, + endIndex: INT, + ) -> GpStatus; + pub fn GdipCreateMatrix( + matrix: *mut *mut GpMatrix, + ) -> GpStatus; + pub fn GdipCreateMatrix2( + m11: REAL, + m12: REAL, + m21: REAL, + m22: REAL, + dx: REAL, + dy: REAL, + matrix: *mut *mut GpMatrix, + ) -> GpStatus; + pub fn GdipCreateMatrix3( + rect: *const GpRectF, + dstplg: *const GpPointF, + matrix: *mut *mut GpMatrix, + ) -> GpStatus; + pub fn GdipCreateMatrix3I( + rect: *const GpRect, + dstplg: *const GpPoint, + matrix: *mut *mut GpMatrix, + ) -> GpStatus; + pub fn GdipCloneMatrix( + matrix: *mut GpMatrix, + cloneMatrix: *mut *mut GpMatrix, + ) -> GpStatus; + pub fn GdipDeleteMatrix( + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipSetMatrixElements( + matrix: *mut GpMatrix, + m11: REAL, + m12: REAL, + m21: REAL, + m22: REAL, + dx: REAL, + dy: REAL, + ) -> GpStatus; + pub fn GdipMultiplyMatrix( + matrix: *mut GpMatrix, + matrix2: *mut GpMatrix, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipTranslateMatrix( + matrix: *mut GpMatrix, + offsetX: REAL, + offsetY: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipScaleMatrix( + matrix: *mut GpMatrix, + scaleX: REAL, + scaleY: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipRotateMatrix( + matrix: *mut GpMatrix, + angle: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipShearMatrix( + matrix: *mut GpMatrix, + shearX: REAL, + shearY: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipInvertMatrix( + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipTransformMatrixPoints( + matrix: *mut GpMatrix, + pts: *mut GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipTransformMatrixPointsI( + matrix: *mut GpMatrix, + pts: *mut GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipVectorTransformMatrixPoints( + matrix: *mut GpMatrix, + pts: *mut GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipVectorTransformMatrixPointsI( + matrix: *mut GpMatrix, + pts: *mut GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipGetMatrixElements( + matrix: *const GpMatrix, + matrixOut: *mut REAL, + ) -> GpStatus; + pub fn GdipIsMatrixInvertible( + matrix: *const GpMatrix, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsMatrixIdentity( + matrix: *const GpMatrix, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsMatrixEqual( + matrix: *const GpMatrix, + matrix2: *const GpMatrix, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipCreateRegion( + region: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipCreateRegionRect( + rect: *const GpRectF, + region: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipCreateRegionRectI( + rect: *const GpRect, + region: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipCreateRegionPath( + path: *mut GpPath, + region: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipCreateRegionRgnData( + regionData: *const BYTE, + size: INT, + region: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipCreateRegionHrgn( + hRgn: HRGN, + region: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipCloneRegion( + region: *mut GpRegion, + cloneRegion: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipDeleteRegion( + region: *mut GpRegion, + ) -> GpStatus; + pub fn GdipSetInfinite( + region: *mut GpRegion, + ) -> GpStatus; + pub fn GdipSetEmpty( + region: *mut GpRegion, + ) -> GpStatus; + pub fn GdipCombineRegionRect( + region: *mut GpRegion, + rect: *const GpRectF, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipCombineRegionRectI( + region: *mut GpRegion, + rect: *const GpRect, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipCombineRegionPath( + region: *mut GpRegion, + path: *mut GpPath, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipCombineRegionRegion( + region: *mut GpRegion, + region2: *mut GpRegion, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipTranslateRegion( + region: *mut GpRegion, + dx: REAL, + dy: REAL, + ) -> GpStatus; + pub fn GdipTranslateRegionI( + region: *mut GpRegion, + dx: INT, + dy: INT, + ) -> GpStatus; + pub fn GdipTransformRegion( + region: *mut GpRegion, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipGetRegionBounds( + region: *mut GpRegion, + graphics: *mut GpGraphics, + rect: *mut GpRectF, + ) -> GpStatus; + pub fn GdipGetRegionBoundsI( + region: *mut GpRegion, + graphics: *mut GpGraphics, + rect: *mut GpRect, + ) -> GpStatus; + pub fn GdipGetRegionHRgn( + region: *mut GpRegion, + graphics: *mut GpGraphics, + hRgn: *mut HRGN, + ) -> GpStatus; + pub fn GdipIsEmptyRegion( + region: *mut GpRegion, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsInfiniteRegion( + region: *mut GpRegion, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsEqualRegion( + region: *mut GpRegion, + region2: *mut GpRegion, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipGetRegionDataSize( + region: *mut GpRegion, + bufferSize: *mut UINT, + ) -> GpStatus; + pub fn GdipGetRegionData( + region: *mut GpRegion, + buffer: *mut BYTE, + bufferSize: UINT, + sizeFilled: *mut UINT, + ) -> GpStatus; + pub fn GdipIsVisibleRegionPoint( + region: *mut GpRegion, + x: REAL, + y: REAL, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisibleRegionPointI( + region: *mut GpRegion, + x: INT, + y: INT, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisibleRegionRect( + region: *mut GpRegion, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisibleRegionRectI( + region: *mut GpRegion, + x: INT, + y: INT, + width: INT, + height: INT, + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipGetRegionScansCount( + region: *mut GpRegion, + count: *mut UINT, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipGetRegionScans( + region: *mut GpRegion, + rects: *mut GpRectF, + count: *mut INT, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipGetRegionScansI( + region: *mut GpRegion, + rects: *mut GpRect, + count: *mut INT, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipCloneBrush( + brush: *mut GpBrush, + cloneBrush: *mut *mut GpBrush, + ) -> GpStatus; + pub fn GdipDeleteBrush( + brush: *mut GpBrush, + ) -> GpStatus; + pub fn GdipGetBrushType( + brush: *mut GpBrush, + type_: *mut GpBrushType, + ) -> GpStatus; + pub fn GdipCreateHatchBrush( + hatchstyle: GpHatchStyle, + forecol: ARGB, + backcol: ARGB, + brush: *mut *mut GpHatch, + ) -> GpStatus; + pub fn GdipGetHatchStyle( + brush: *mut GpHatch, + hatchstyle: *mut GpHatchStyle, + ) -> GpStatus; + pub fn GdipGetHatchForegroundColor( + brush: *mut GpHatch, + forecol: *mut ARGB, + ) -> GpStatus; + pub fn GdipGetHatchBackgroundColor( + brush: *mut GpHatch, + backcol: *mut ARGB, + ) -> GpStatus; + pub fn GdipCreateTexture( + image: *mut GpImage, + wrapmode: GpWrapMode, + texture: *mut *mut GpTexture, + ) -> GpStatus; + pub fn GdipCreateTexture2( + image: *mut GpImage, + wrapmode: GpWrapMode, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + texture: *mut *mut GpTexture, + ) -> GpStatus; + pub fn GdipCreateTextureIA( + image: *mut GpImage, + imageAttributes: *const GpImageAttributes, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + texture: *mut *mut GpTexture, + ) -> GpStatus; + pub fn GdipCreateTexture2I( + image: *mut GpImage, + wrapmode: GpWrapMode, + x: INT, + y: INT, + width: INT, + height: INT, + texture: *mut *mut GpTexture, + ) -> GpStatus; + pub fn GdipCreateTextureIAI( + image: *mut GpImage, + imageAttributes: *const GpImageAttributes, + x: INT, + y: INT, + width: INT, + height: INT, + texture: *mut *mut GpTexture, + ) -> GpStatus; + pub fn GdipGetTextureTransform( + brush: *mut GpTexture, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipSetTextureTransform( + brush: *mut GpTexture, + matrix: *const GpMatrix, + ) -> GpStatus; + pub fn GdipResetTextureTransform( + brush: *mut GpTexture, + ) -> GpStatus; + pub fn GdipMultiplyTextureTransform( + brush: *mut GpTexture, + matrix: *const GpMatrix, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipTranslateTextureTransform( + brush: *mut GpTexture, + dx: REAL, + dy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipScaleTextureTransform( + brush: *mut GpTexture, + sx: REAL, + sy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipRotateTextureTransform( + brush: *mut GpTexture, + angle: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipSetTextureWrapMode( + brush: *mut GpTexture, + wrapmode: GpWrapMode, + ) -> GpStatus; + pub fn GdipGetTextureWrapMode( + brush: *mut GpTexture, + wrapmode: *mut GpWrapMode, + ) -> GpStatus; + pub fn GdipGetTextureImage( + brush: *mut GpTexture, + image: *mut *mut GpImage, + ) -> GpStatus; + pub fn GdipCreateSolidFill( + color: ARGB, + brush: *mut *mut GpSolidFill, + ) -> GpStatus; + pub fn GdipSetSolidFillColor( + brush: *mut GpSolidFill, + color: ARGB, + ) -> GpStatus; + pub fn GdipGetSolidFillColor( + brush: *mut GpSolidFill, + color: *mut ARGB, + ) -> GpStatus; + pub fn GdipCreateLineBrush( + point1: *const GpPointF, + point2: *const GpPointF, + color1: ARGB, + color2: ARGB, + wrapMode: GpWrapMode, + lineGradient: *mut *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipCreateLineBrushI( + point1: *const GpPoint, + point2: *const GpPoint, + color1: ARGB, + color2: ARGB, + wrapMode: GpWrapMode, + lineGradient: *mut *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipCreateLineBrushFromRect( + rect: *const GpRectF, + color1: ARGB, + color2: ARGB, + mode: LinearGradientMode, + wrapMode: GpWrapMode, + lineGradient: *mut *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipCreateLineBrushFromRectI( + rect: *const GpRect, + color1: ARGB, + color2: ARGB, + mode: LinearGradientMode, + wrapMode: GpWrapMode, + lineGradient: *mut *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipCreateLineBrushFromRectWithAngle( + rect: *const GpRectF, + color1: ARGB, + color2: ARGB, + angle: REAL, + isAngleScalable: BOOL, + wrapMode: GpWrapMode, + lineGradient: *mut *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipCreateLineBrushFromRectWithAngleI( + rect: *const GpRect, + color1: ARGB, + color2: ARGB, + angle: REAL, + isAngleScalable: BOOL, + wrapMode: GpWrapMode, + lineGradient: *mut *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipSetLineColors( + brush: *mut GpLineGradient, + color1: ARGB, + color2: ARGB, + ) -> GpStatus; + pub fn GdipGetLineColors( + brush: *mut GpLineGradient, + colors: *mut ARGB, + ) -> GpStatus; + pub fn GdipGetLineRect( + brush: *mut GpLineGradient, + rect: *mut GpRectF, + ) -> GpStatus; + pub fn GdipGetLineRectI( + brush: *mut GpLineGradient, + rect: *mut GpRect, + ) -> GpStatus; + pub fn GdipSetLineGammaCorrection( + brush: *mut GpLineGradient, + useGammaCorrection: BOOL, + ) -> GpStatus; + pub fn GdipGetLineGammaCorrection( + brush: *mut GpLineGradient, + useGammaCorrection: *mut BOOL, + ) -> GpStatus; + pub fn GdipGetLineBlendCount( + brush: *mut GpLineGradient, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetLineBlend( + brush: *mut GpLineGradient, + blend: *mut REAL, + positions: *mut REAL, + count: INT, + ) -> GpStatus; + pub fn GdipSetLineBlend( + brush: *mut GpLineGradient, + blend: *const REAL, + positions: *const REAL, + count: INT, + ) -> GpStatus; + pub fn GdipGetLinePresetBlendCount( + brush: *mut GpLineGradient, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetLinePresetBlend( + brush: *mut GpLineGradient, + blend: *mut ARGB, + positions: *mut REAL, + count: INT, + ) -> GpStatus; + pub fn GdipSetLinePresetBlend( + brush: *mut GpLineGradient, + blend: *const ARGB, + positions: *const REAL, + count: INT, + ) -> GpStatus; + pub fn GdipSetLineSigmaBlend( + brush: *mut GpLineGradient, + focus: REAL, + scale: REAL, + ) -> GpStatus; + pub fn GdipSetLineLinearBlend( + brush: *mut GpLineGradient, + focus: REAL, + scale: REAL, + ) -> GpStatus; + pub fn GdipSetLineWrapMode( + brush: *mut GpLineGradient, + wrapmode: GpWrapMode, + ) -> GpStatus; + pub fn GdipGetLineWrapMode( + brush: *mut GpLineGradient, + wrapmode: *mut GpWrapMode, + ) -> GpStatus; + pub fn GdipGetLineTransform( + brush: *mut GpLineGradient, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipSetLineTransform( + brush: *mut GpLineGradient, + matrix: *const GpMatrix, + ) -> GpStatus; + pub fn GdipResetLineTransform( + brush: *mut GpLineGradient, + ) -> GpStatus; + pub fn GdipMultiplyLineTransform( + brush: *mut GpLineGradient, + matrix: *const GpMatrix, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipTranslateLineTransform( + brush: *mut GpLineGradient, + dx: REAL, + dy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipScaleLineTransform( + brush: *mut GpLineGradient, + sx: REAL, + sy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipRotateLineTransform( + brush: *mut GpLineGradient, + angle: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipCreatePathGradient( + points: *const GpPointF, + count: INT, + wrapMode: GpWrapMode, + polyGradient: *mut *mut GpPathGradient, + ) -> GpStatus; + pub fn GdipCreatePathGradientI( + points: *const GpPoint, + count: INT, + wrapMode: GpWrapMode, + polyGradient: *mut *mut GpPathGradient, + ) -> GpStatus; + pub fn GdipCreatePathGradientFromPath( + path: *const GpPath, + polyGradient: *mut *mut GpPathGradient, + ) -> GpStatus; + pub fn GdipGetPathGradientCenterColor( + brush: *mut GpPathGradient, + colors: *mut ARGB, + ) -> GpStatus; + pub fn GdipSetPathGradientCenterColor( + brush: *mut GpPathGradient, + colors: ARGB, + ) -> GpStatus; + pub fn GdipGetPathGradientSurroundColorsWithCount( + brush: *mut GpPathGradient, + color: *mut ARGB, + count: *mut INT, + ) -> GpStatus; + pub fn GdipSetPathGradientSurroundColorsWithCount( + brush: *mut GpPathGradient, + color: *const ARGB, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetPathGradientPath( + brush: *mut GpPathGradient, + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipSetPathGradientPath( + brush: *mut GpPathGradient, + path: *const GpPath, + ) -> GpStatus; + pub fn GdipGetPathGradientCenterPoint( + brush: *mut GpPathGradient, + points: *mut GpPointF, + ) -> GpStatus; + pub fn GdipGetPathGradientCenterPointI( + brush: *mut GpPathGradient, + points: *mut GpPoint, + ) -> GpStatus; + pub fn GdipSetPathGradientCenterPoint( + brush: *mut GpPathGradient, + points: *const GpPointF, + ) -> GpStatus; + pub fn GdipSetPathGradientCenterPointI( + brush: *mut GpPathGradient, + points: *const GpPoint, + ) -> GpStatus; + pub fn GdipGetPathGradientRect( + brush: *mut GpPathGradient, + rect: *mut GpRectF, + ) -> GpStatus; + pub fn GdipGetPathGradientRectI( + brush: *mut GpPathGradient, + rect: *mut GpRect, + ) -> GpStatus; + pub fn GdipGetPathGradientPointCount( + brush: *mut GpPathGradient, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetPathGradientSurroundColorCount( + brush: *mut GpPathGradient, + count: *mut INT, + ) -> GpStatus; + pub fn GdipSetPathGradientGammaCorrection( + brush: *mut GpPathGradient, + useGammaCorrection: BOOL, + ) -> GpStatus; + pub fn GdipGetPathGradientGammaCorrection( + brush: *mut GpPathGradient, + useGammaCorrection: *mut BOOL, + ) -> GpStatus; + pub fn GdipGetPathGradientBlendCount( + brush: *mut GpPathGradient, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetPathGradientBlend( + brush: *mut GpPathGradient, + blend: *mut REAL, + positions: *mut REAL, + count: INT, + ) -> GpStatus; + pub fn GdipSetPathGradientBlend( + brush: *mut GpPathGradient, + blend: *const REAL, + positions: *const REAL, + count: INT, + ) -> GpStatus; + pub fn GdipGetPathGradientPresetBlendCount( + brush: *mut GpPathGradient, + count: *mut INT, + ) -> GpStatus; + pub fn GdipGetPathGradientPresetBlend( + brush: *mut GpPathGradient, + blend: *mut ARGB, + positions: *mut REAL, + count: INT, + ) -> GpStatus; + pub fn GdipSetPathGradientPresetBlend( + brush: *mut GpPathGradient, + blend: *const ARGB, + positions: *const REAL, + count: INT, + ) -> GpStatus; + pub fn GdipSetPathGradientSigmaBlend( + brush: *mut GpPathGradient, + focus: REAL, + scale: REAL, + ) -> GpStatus; + pub fn GdipSetPathGradientLinearBlend( + brush: *mut GpPathGradient, + focus: REAL, + scale: REAL, + ) -> GpStatus; + pub fn GdipGetPathGradientWrapMode( + brush: *mut GpPathGradient, + wrapmode: *mut GpWrapMode, + ) -> GpStatus; + pub fn GdipSetPathGradientWrapMode( + brush: *mut GpPathGradient, + wrapmode: GpWrapMode, + ) -> GpStatus; + pub fn GdipGetPathGradientTransform( + brush: *mut GpPathGradient, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipSetPathGradientTransform( + brush: *mut GpPathGradient, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipResetPathGradientTransform( + brush: *mut GpPathGradient, + ) -> GpStatus; + pub fn GdipMultiplyPathGradientTransform( + brush: *mut GpPathGradient, + matrix: *const GpMatrix, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipTranslatePathGradientTransform( + brush: *mut GpPathGradient, + dx: REAL, + dy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipScalePathGradientTransform( + brush: *mut GpPathGradient, + sx: REAL, + sy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipRotatePathGradientTransform( + brush: *mut GpPathGradient, + angle: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipGetPathGradientFocusScales( + brush: *mut GpPathGradient, + xScale: *mut REAL, + yScale: *mut REAL, + ) -> GpStatus; + pub fn GdipSetPathGradientFocusScales( + brush: *mut GpPathGradient, + xScale: REAL, + yScale: REAL, + ) -> GpStatus; + pub fn GdipCreatePen1( + color: ARGB, + width: REAL, + unit: GpUnit, + pen: *mut *mut GpPen, + ) -> GpStatus; + pub fn GdipCreatePen2( + brush: *mut GpBrush, + width: REAL, + unit: GpUnit, + pen: *mut *mut GpPen, + ) -> GpStatus; + pub fn GdipClonePen( + pen: *mut GpPen, + clonepen: *mut *mut GpPen, + ) -> GpStatus; + pub fn GdipDeletePen( + pen: *mut GpPen, + ) -> GpStatus; + pub fn GdipSetPenWidth( + pen: *mut GpPen, + width: REAL, + ) -> GpStatus; + pub fn GdipGetPenWidth( + pen: *mut GpPen, + width: *mut REAL, + ) -> GpStatus; + pub fn GdipSetPenUnit( + pen: *mut GpPen, + unit: GpUnit, + ) -> GpStatus; + pub fn GdipGetPenUnit( + pen: *mut GpPen, + unit: *mut GpUnit, + ) -> GpStatus; + pub fn GdipSetPenLineCap197819( + pen: *mut GpPen, + startCap: GpLineCap, + endCap: GpLineCap, + dashCap: GpDashCap, + ) -> GpStatus; + pub fn GdipSetPenStartCap( + pen: *mut GpPen, + startCap: GpLineCap, + ) -> GpStatus; + pub fn GdipSetPenEndCap( + pen: *mut GpPen, + endCap: GpLineCap, + ) -> GpStatus; + pub fn GdipSetPenDashCap197819( + pen: *mut GpPen, + dashCap: GpDashCap, + ) -> GpStatus; + pub fn GdipGetPenStartCap( + pen: *mut GpPen, + startCap: *mut GpLineCap, + ) -> GpStatus; + pub fn GdipGetPenEndCap( + pen: *mut GpPen, + endCap: *mut GpLineCap, + ) -> GpStatus; + pub fn GdipGetPenDashCap197819( + pen: *mut GpPen, + dashCap: *mut GpDashCap, + ) -> GpStatus; + pub fn GdipSetPenLineJoin( + pen: *mut GpPen, + lineJoin: GpLineJoin, + ) -> GpStatus; + pub fn GdipGetPenLineJoin( + pen: *mut GpPen, + lineJoin: *mut GpLineJoin, + ) -> GpStatus; + pub fn GdipSetPenCustomStartCap( + pen: *mut GpPen, + customCap: *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipGetPenCustomStartCap( + pen: *mut GpPen, + customCap: *mut *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipSetPenCustomEndCap( + pen: *mut GpPen, + customCap: *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipGetPenCustomEndCap( + pen: *mut GpPen, + customCap: *mut *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipSetPenMiterLimit( + pen: *mut GpPen, + miterLimit: REAL, + ) -> GpStatus; + pub fn GdipGetPenMiterLimit( + pen: *mut GpPen, + miterLimit: *mut REAL, + ) -> GpStatus; + pub fn GdipSetPenMode( + pen: *mut GpPen, + penMode: GpPenAlignment, + ) -> GpStatus; + pub fn GdipGetPenMode( + pen: *mut GpPen, + penMode: *mut GpPenAlignment, + ) -> GpStatus; + pub fn GdipSetPenTransform( + pen: *mut GpPen, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipGetPenTransform( + pen: *mut GpPen, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipResetPenTransform( + pen: *mut GpPen, + ) -> GpStatus; + pub fn GdipMultiplyPenTransform( + pen: *mut GpPen, + matrix: *const GpMatrix, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipTranslatePenTransform( + pen: *mut GpPen, + dx: REAL, + dy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipScalePenTransform( + pen: *mut GpPen, + sx: REAL, + sy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipRotatePenTransform( + pen: *mut GpPen, + angle: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipSetPenColor( + pen: *mut GpPen, + argb: ARGB, + ) -> GpStatus; + pub fn GdipGetPenColor( + pen: *mut GpPen, + argb: *mut ARGB, + ) -> GpStatus; + pub fn GdipSetPenBrushFill( + pen: *mut GpPen, + brush: *mut GpBrush, + ) -> GpStatus; + pub fn GdipGetPenBrushFill( + pen: *mut GpPen, + brush: *mut *mut GpBrush, + ) -> GpStatus; + pub fn GdipGetPenFillType( + pen: *mut GpPen, + type_: *mut GpPenType, + ) -> GpStatus; + pub fn GdipGetPenDashStyle( + pen: *mut GpPen, + dashstyle: *mut GpDashStyle, + ) -> GpStatus; + pub fn GdipSetPenDashStyle( + pen: *mut GpPen, + dashstyle: GpDashStyle, + ) -> GpStatus; + pub fn GdipGetPenDashOffset( + pen: *mut GpPen, + offset: *mut REAL, + ) -> GpStatus; + pub fn GdipSetPenDashOffset( + pen: *mut GpPen, + offset: REAL, + ) -> GpStatus; + pub fn GdipGetPenDashCount( + pen: *mut GpPen, + count: *mut INT, + ) -> GpStatus; + pub fn GdipSetPenDashArray( + pen: *mut GpPen, + dash: *const REAL, + count: INT, + ) -> GpStatus; + pub fn GdipGetPenDashArray( + pen: *mut GpPen, + dash: *mut REAL, + count: INT, + ) -> GpStatus; + pub fn GdipGetPenCompoundCount( + pen: *mut GpPen, + count: *mut INT, + ) -> GpStatus; + pub fn GdipSetPenCompoundArray( + pen: *mut GpPen, + dash: *const REAL, + count: INT, + ) -> GpStatus; + pub fn GdipGetPenCompoundArray( + pen: *mut GpPen, + dash: *mut REAL, + count: INT, + ) -> GpStatus; + pub fn GdipCreateCustomLineCap( + fillPath: *mut GpPath, + strokePath: *mut GpPath, + baseCap: GpLineCap, + baseInset: REAL, + customCap: *mut *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipDeleteCustomLineCap( + customCap: *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipCloneCustomLineCap( + customCap: *mut GpCustomLineCap, + clonedCap: *mut *mut GpCustomLineCap, + ) -> GpStatus; + pub fn GdipGetCustomLineCapType( + customCap: *mut GpCustomLineCap, + capType: *mut CustomLineCapType, + ) -> GpStatus; + pub fn GdipSetCustomLineCapStrokeCaps( + customCap: *mut GpCustomLineCap, + startCap: GpLineCap, + endCap: GpLineCap, + ) -> GpStatus; + pub fn GdipGetCustomLineCapStrokeCaps( + customCap: *mut GpCustomLineCap, + startCap: *mut GpLineCap, + endCap: *mut GpLineCap, + ) -> GpStatus; + pub fn GdipSetCustomLineCapStrokeJoin( + customCap: *mut GpCustomLineCap, + lineJoin: GpLineJoin, + ) -> GpStatus; + pub fn GdipGetCustomLineCapStrokeJoin( + customCap: *mut GpCustomLineCap, + lineJoin: *mut GpLineJoin, + ) -> GpStatus; + pub fn GdipSetCustomLineCapBaseCap( + customCap: *mut GpCustomLineCap, + baseCap: GpLineCap, + ) -> GpStatus; + pub fn GdipGetCustomLineCapBaseCap( + customCap: *mut GpCustomLineCap, + baseCap: *mut GpLineCap, + ) -> GpStatus; + pub fn GdipSetCustomLineCapBaseInset( + customCap: *mut GpCustomLineCap, + inset: REAL, + ) -> GpStatus; + pub fn GdipGetCustomLineCapBaseInset( + customCap: *mut GpCustomLineCap, + inset: *mut REAL, + ) -> GpStatus; + pub fn GdipSetCustomLineCapWidthScale( + customCap: *mut GpCustomLineCap, + widthScale: REAL, + ) -> GpStatus; + pub fn GdipGetCustomLineCapWidthScale( + customCap: *mut GpCustomLineCap, + widthScale: *mut REAL, + ) -> GpStatus; + pub fn GdipCreateAdjustableArrowCap( + height: REAL, + width: REAL, + isFilled: BOOL, + cap: *mut *mut GpAdjustableArrowCap, + ) -> GpStatus; + pub fn GdipSetAdjustableArrowCapHeight( + cap: *mut GpAdjustableArrowCap, + height: REAL, + ) -> GpStatus; + pub fn GdipGetAdjustableArrowCapHeight( + cap: *mut GpAdjustableArrowCap, + height: *mut REAL, + ) -> GpStatus; + pub fn GdipSetAdjustableArrowCapWidth( + cap: *mut GpAdjustableArrowCap, + width: REAL, + ) -> GpStatus; + pub fn GdipGetAdjustableArrowCapWidth( + cap: *mut GpAdjustableArrowCap, + width: *mut REAL, + ) -> GpStatus; + pub fn GdipSetAdjustableArrowCapMiddleInset( + cap: *mut GpAdjustableArrowCap, + middleInset: REAL, + ) -> GpStatus; + pub fn GdipGetAdjustableArrowCapMiddleInset( + cap: *mut GpAdjustableArrowCap, + middleInset: *mut REAL, + ) -> GpStatus; + pub fn GdipSetAdjustableArrowCapFillState( + cap: *mut GpAdjustableArrowCap, + fillState: BOOL, + ) -> GpStatus; + pub fn GdipGetAdjustableArrowCapFillState( + cap: *mut GpAdjustableArrowCap, + fillState: *mut BOOL, + ) -> GpStatus; + pub fn GdipLoadImageFromStream( + stream: *mut IStream, + image: *mut *mut GpImage, + ) -> GpStatus; + pub fn GdipLoadImageFromFile( + filename: *const WCHAR, + image: *mut *mut GpImage, + ) -> GpStatus; + pub fn GdipLoadImageFromStreamICM( + stream: *mut IStream, + image: *mut *mut GpImage, + ) -> GpStatus; + pub fn GdipLoadImageFromFileICM( + filename: *const WCHAR, + image: *mut *mut GpImage, + ) -> GpStatus; + pub fn GdipCloneImage( + image: *mut GpImage, + cloneImage: *mut *mut GpImage, + ) -> GpStatus; + pub fn GdipDisposeImage( + image: *mut GpImage, + ) -> GpStatus; + pub fn GdipSaveImageToFile( + image: *mut GpImage, + filename: *const WCHAR, + clsidEncoder: *const CLSID, + encoderParams: *const EncoderParameters, + ) -> GpStatus; + pub fn GdipSaveImageToStream( + image: *mut GpImage, + stream: *mut IStream, + clsidEncoder: *const CLSID, + encoderParams: *const EncoderParameters, + ) -> GpStatus; + pub fn GdipSaveAdd( + image: *mut GpImage, + encoderParams: *const EncoderParameters, + ) -> GpStatus; + pub fn GdipSaveAddImage( + image: *mut GpImage, + newImage: *mut GpImage, + encoderParams: *const EncoderParameters, + ) -> GpStatus; + pub fn GdipGetImageGraphicsContext( + image: *mut GpImage, + graphics: *mut *mut GpGraphics, + ) -> GpStatus; + pub fn GdipGetImageBounds( + image: *mut GpImage, + srcRect: *mut GpRectF, + srcUnit: *mut GpUnit, + ) -> GpStatus; + pub fn GdipGetImageDimension( + image: *mut GpImage, + width: *mut REAL, + height: *mut REAL, + ) -> GpStatus; + pub fn GdipGetImageType( + image: *mut GpImage, + type_: *mut ImageType, + ) -> GpStatus; + pub fn GdipGetImageWidth( + image: *mut GpImage, + width: *mut UINT, + ) -> GpStatus; + pub fn GdipGetImageHeight( + image: *mut GpImage, + height: *mut UINT, + ) -> GpStatus; + pub fn GdipGetImageHorizontalResolution( + image: *mut GpImage, + resolution: *mut REAL, + ) -> GpStatus; + pub fn GdipGetImageVerticalResolution( + image: *mut GpImage, + resolution: *mut REAL, + ) -> GpStatus; + pub fn GdipGetImageFlags( + image: *mut GpImage, + flags: *mut UINT, + ) -> GpStatus; + pub fn GdipGetImageRawFormat( + image: *mut GpImage, + format: *mut GUID, + ) -> GpStatus; + pub fn GdipGetImagePixelFormat( + image: *mut GpImage, + format: *mut PixelFormat, + ) -> GpStatus; + pub fn GdipGetImageThumbnail( + image: *mut GpImage, + thumbWidth: UINT, + thumbHeight: UINT, + thumbImage: *mut *mut GpImage, + callback: GetThumbnailImageAbort, + callbackData: *mut VOID, + ) -> GpStatus; + pub fn GdipGetEncoderParameterListSize( + image: *mut GpImage, + clsidEncoder: *const CLSID, + size: *mut UINT, + ) -> GpStatus; + pub fn GdipGetEncoderParameterList( + image: *mut GpImage, + clsidEncoder: *const CLSID, + size: UINT, + buffer: *mut EncoderParameters, + ) -> GpStatus; + pub fn GdipImageGetFrameDimensionsCount( + image: *mut GpImage, + count: *mut UINT, + ) -> GpStatus; + pub fn GdipImageGetFrameDimensionsList( + image: *mut GpImage, + dimensionIDs: *mut GUID, + count: UINT, + ) -> GpStatus; + pub fn GdipImageGetFrameCount( + image: *mut GpImage, + dimensionID: *const GUID, + count: *mut UINT, + ) -> GpStatus; + pub fn GdipImageSelectActiveFrame( + image: *mut GpImage, + dimensionID: *const GUID, + frameIndex: UINT, + ) -> GpStatus; + pub fn GdipImageRotateFlip( + image: *mut GpImage, + rfType: RotateFlipType, + ) -> GpStatus; + pub fn GdipGetImagePalette( + image: *mut GpImage, + palette: *mut ColorPalette, + size: INT, + ) -> GpStatus; + pub fn GdipSetImagePalette( + image: *mut GpImage, + palette: *const ColorPalette, + ) -> GpStatus; + pub fn GdipGetImagePaletteSize( + image: *mut GpImage, + size: *mut INT, + ) -> GpStatus; + pub fn GdipGetPropertyCount( + image: *mut GpImage, + numOfProperty: *mut UINT, + ) -> GpStatus; + pub fn GdipGetPropertyIdList( + image: *mut GpImage, + numOfProperty: UINT, + list: *mut PROPID, + ) -> GpStatus; + pub fn GdipGetPropertyItemSize( + image: *mut GpImage, + propId: PROPID, + size: *mut UINT, + ) -> GpStatus; + pub fn GdipGetPropertyItem( + image: *mut GpImage, + propId: PROPID, + propSize: UINT, + buffer: *mut PropertyItem, + ) -> GpStatus; + pub fn GdipGetPropertySize( + image: *mut GpImage, + totalBufferSize: *mut UINT, + numProperties: *mut UINT, + ) -> GpStatus; + pub fn GdipGetAllPropertyItems( + image: *mut GpImage, + totalBufferSize: UINT, + numProperties: UINT, + allItems: *mut PropertyItem, + ) -> GpStatus; + pub fn GdipRemovePropertyItem( + image: *mut GpImage, + propId: PROPID, + ) -> GpStatus; + pub fn GdipSetPropertyItem( + image: *mut GpImage, + item: *const PropertyItem, + ) -> GpStatus; + pub fn GdipFindFirstImageItem( + image: *mut GpImage, + item: *mut ImageItemData, + ) -> GpStatus; + pub fn GdipFindNextImageItem( + image: *mut GpImage, + item: *mut ImageItemData, + ) -> GpStatus; + pub fn GdipGetImageItemData( + image: *mut GpImage, + item: *mut ImageItemData, + ) -> GpStatus; + pub fn GdipImageForceValidation( + image: *mut GpImage, + ) -> GpStatus; + pub fn GdipCreateBitmapFromStream( + stream: *mut IStream, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromFile( + filename: *const WCHAR, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromStreamICM( + stream: *mut IStream, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromFileICM( + filename: *const WCHAR, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromScan0( + width: INT, + height: INT, + stride: INT, + format: PixelFormat, + scan0: *mut BYTE, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromGraphics( + width: INT, + height: INT, + target: *mut GpGraphics, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromDirectDrawSurface( + surface: *mut IDirectDrawSurface7, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromGdiDib( + gdiBitmapInfo: *const BITMAPINFO, + gdiBitmapData: *mut VOID, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateBitmapFromHBITMAP( + hbm: HBITMAP, + hpal: HPALETTE, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateHBITMAPFromBitmap( + bitmap: *mut GpBitmap, + hbmReturn: *mut HBITMAP, + background: ARGB, + ) -> GpStatus; + pub fn GdipCreateBitmapFromHICON( + hicon: HICON, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCreateHICONFromBitmap( + bitmap: *mut GpBitmap, + hbmReturn: *mut HICON, + ) -> GpStatus; + pub fn GdipCreateBitmapFromResource( + hInstance: HINSTANCE, + lpBitmapName: *const WCHAR, + bitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCloneBitmapArea( + x: REAL, + y: REAL, + width: REAL, + height: REAL, + format: PixelFormat, + srcBitmap: *mut GpBitmap, + dstBitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipCloneBitmapAreaI( + x: INT, + y: INT, + width: INT, + height: INT, + format: PixelFormat, + srcBitmap: *mut GpBitmap, + dstBitmap: *mut *mut GpBitmap, + ) -> GpStatus; + pub fn GdipBitmapLockBits( + bitmap: *mut GpBitmap, + rect: *const GpRect, + flags: UINT, + format: PixelFormat, + lockedBitmapData: *mut BitmapData, + ) -> GpStatus; + pub fn GdipBitmapUnlockBits( + bitmap: *mut GpBitmap, + lockedBitmapData: *mut BitmapData, + ) -> GpStatus; + pub fn GdipBitmapGetPixel( + bitmap: *mut GpBitmap, + x: INT, + y: INT, + color: *mut ARGB, + ) -> GpStatus; + pub fn GdipBitmapSetPixel( + bitmap: *mut GpBitmap, + x: INT, + y: INT, + color: ARGB, + ) -> GpStatus; + // pub fn GdipImageSetAbort( + // pImage: *mut GpImage, + // pIAbort: *mut GdiplusAbort, + // ) -> GpStatus; + // pub fn GdipGraphicsSetAbort( + // pGraphics: *mut GpGraphics, + // pIAbort: *mut GdiplusAbort, + // ) -> GpStatus; + pub fn GdipBitmapConvertFormat( + pInputBitmap: *mut GpBitmap, + format: PixelFormat, + dithertype: DitherType, + palettetype: PaletteType, + palette: *mut ColorPalette, + alphaThresholdPercent: REAL, + ) -> GpStatus; + pub fn GdipInitializePalette( + palette: *mut ColorPalette, + palettetype: PaletteType, + optimalColors: INT, + useTransparentColor: BOOL, + bitmap: *mut GpBitmap, + ) -> GpStatus; + pub fn GdipBitmapApplyEffect( + bitmap: *mut GpBitmap, + effect: *mut CGpEffect, + roi: *mut RECT, + useAuxData: BOOL, + auxData: *mut *mut VOID, + auxDataSize: *mut INT, + ) -> GpStatus; + pub fn GdipBitmapCreateApplyEffect( + inputBitmaps: *mut *mut GpBitmap, + numInputs: INT, + effect: *mut CGpEffect, + roi: *mut RECT, + outputRect: *mut RECT, + outputBitmap: *mut *mut GpBitmap, + useAuxData: BOOL, + auxData: *mut *mut VOID, + auxDataSize: *mut INT, + ) -> GpStatus; + pub fn GdipBitmapGetHistogram( + bitmap: *mut GpBitmap, + format: HistogramFormat, + NumberOfEntries: UINT, + channel0: *mut UINT, + channel1: *mut UINT, + channel2: *mut UINT, + channel3: *mut UINT, + ) -> GpStatus; + pub fn GdipBitmapGetHistogramSize( + format: HistogramFormat, + NumberOfEntries: *mut UINT, + ) -> GpStatus; + pub fn GdipBitmapSetResolution( + bitmap: *mut GpBitmap, + xdpi: REAL, + ydpi: REAL, + ) -> GpStatus; + pub fn GdipCreateImageAttributes( + imageattr: *mut *mut GpImageAttributes, + ) -> GpStatus; + pub fn GdipCloneImageAttributes( + imageattr: *const GpImageAttributes, + cloneImageattr: *mut *mut GpImageAttributes, + ) -> GpStatus; + pub fn GdipDisposeImageAttributes( + imageattr: *mut GpImageAttributes, + ) -> GpStatus; + pub fn GdipSetImageAttributesToIdentity( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + ) -> GpStatus; + pub fn GdipResetImageAttributes( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + ) -> GpStatus; + pub fn GdipSetImageAttributesColorMatrix( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + colorMatrix: *const ColorMatrix, + grayMatrix: *const ColorMatrix, + flags: ColorMatrixFlags, + ) -> GpStatus; + pub fn GdipSetImageAttributesThreshold( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + threshold: REAL, + ) -> GpStatus; + pub fn GdipSetImageAttributesGamma( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + gamma: REAL, + ) -> GpStatus; + pub fn GdipSetImageAttributesNoOp( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + ) -> GpStatus; + pub fn GdipSetImageAttributesColorKeys( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + colorLow: ARGB, + colorHigh: ARGB, + ) -> GpStatus; + pub fn GdipSetImageAttributesOutputChannel( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + channelFlags: ColorChannelFlags, + ) -> GpStatus; + pub fn GdipSetImageAttributesOutputChannelColorProfile( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + colorProfileFilename: *const WCHAR, + ) -> GpStatus; + pub fn GdipSetImageAttributesRemapTable( + imageattr: *mut GpImageAttributes, + type_: ColorAdjustType, + enableFlag: BOOL, + mapSize: UINT, + map: *const ColorMap, + ) -> GpStatus; + pub fn GdipSetImageAttributesWrapMode( + imageAttr: *mut GpImageAttributes, + wrap: WrapMode, + argb: ARGB, + clamp: BOOL, + ) -> GpStatus; + pub fn GdipSetImageAttributesICMMode( + imageAttr: *mut GpImageAttributes, + on: BOOL, + ) -> GpStatus; + pub fn GdipGetImageAttributesAdjustedPalette( + imageAttr: *mut GpImageAttributes, + colorPalette: *mut ColorPalette, + colorAdjustType: ColorAdjustType, + ) -> GpStatus; + pub fn GdipFlush( + graphics: *mut GpGraphics, + intention: GpFlushIntention, + ) -> GpStatus; + pub fn GdipCreateFromHDC( + hdc: HDC, + graphics: *mut *mut GpGraphics, + ) -> GpStatus; + pub fn GdipCreateFromHDC2( + hdc: HDC, + hDevice: HANDLE, + graphics: *mut *mut GpGraphics, + ) -> GpStatus; + pub fn GdipCreateFromHWND( + hwnd: HWND, + graphics: *mut *mut GpGraphics, + ) -> GpStatus; + pub fn GdipCreateFromHWNDICM( + hwnd: HWND, + graphics: *mut *mut GpGraphics, + ) -> GpStatus; + pub fn GdipDeleteGraphics( + graphics: *mut GpGraphics, + ) -> GpStatus; + pub fn GdipGetDC( + graphics: *mut GpGraphics, + hdc: *mut HDC, + ) -> GpStatus; + pub fn GdipReleaseDC( + graphics: *mut GpGraphics, + hdc: HDC, + ) -> GpStatus; + pub fn GdipSetCompositingMode( + graphics: *mut GpGraphics, + compositingMode: CompositingMode, + ) -> GpStatus; + pub fn GdipGetCompositingMode( + graphics: *mut GpGraphics, + compositingMode: *mut CompositingMode, + ) -> GpStatus; + pub fn GdipSetRenderingOrigin( + graphics: *mut GpGraphics, + x: INT, + y: INT, + ) -> GpStatus; + pub fn GdipGetRenderingOrigin( + graphics: *mut GpGraphics, + x: *mut INT, + y: *mut INT, + ) -> GpStatus; + pub fn GdipSetCompositingQuality( + graphics: *mut GpGraphics, + compositingQuality: CompositingQuality, + ) -> GpStatus; + pub fn GdipGetCompositingQuality( + graphics: *mut GpGraphics, + compositingQuality: *mut CompositingQuality, + ) -> GpStatus; + pub fn GdipSetSmoothingMode( + graphics: *mut GpGraphics, + smoothingMode: SmoothingMode, + ) -> GpStatus; + pub fn GdipGetSmoothingMode( + graphics: *mut GpGraphics, + smoothingMode: *mut SmoothingMode, + ) -> GpStatus; + pub fn GdipSetPixelOffsetMode( + graphics: *mut GpGraphics, + pixelOffsetMode: PixelOffsetMode, + ) -> GpStatus; + pub fn GdipGetPixelOffsetMode( + graphics: *mut GpGraphics, + pixelOffsetMode: *mut PixelOffsetMode, + ) -> GpStatus; + pub fn GdipSetTextRenderingHint( + graphics: *mut GpGraphics, + mode: TextRenderingHint, + ) -> GpStatus; + pub fn GdipGetTextRenderingHint( + graphics: *mut GpGraphics, + mode: *mut TextRenderingHint, + ) -> GpStatus; + pub fn GdipSetTextContrast( + graphics: *mut GpGraphics, + contrast: UINT, + ) -> GpStatus; + pub fn GdipGetTextContrast( + graphics: *mut GpGraphics, + contrast: *mut UINT, + ) -> GpStatus; + pub fn GdipSetInterpolationMode( + graphics: *mut GpGraphics, + interpolationMode: InterpolationMode, + ) -> GpStatus; + pub fn GdipGetInterpolationMode( + graphics: *mut GpGraphics, + interpolationMode: *mut InterpolationMode, + ) -> GpStatus; + pub fn GdipSetWorldTransform( + graphics: *mut GpGraphics, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipResetWorldTransform( + graphics: *mut GpGraphics, + ) -> GpStatus; + pub fn GdipMultiplyWorldTransform( + graphics: *mut GpGraphics, + matrix: *const GpMatrix, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipTranslateWorldTransform( + graphics: *mut GpGraphics, + dx: REAL, + dy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipScaleWorldTransform( + graphics: *mut GpGraphics, + sx: REAL, + sy: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipRotateWorldTransform( + graphics: *mut GpGraphics, + angle: REAL, + order: GpMatrixOrder, + ) -> GpStatus; + pub fn GdipGetWorldTransform( + graphics: *mut GpGraphics, + matrix: *mut GpMatrix, + ) -> GpStatus; + pub fn GdipResetPageTransform( + graphics: *mut GpGraphics, + ) -> GpStatus; + pub fn GdipGetPageUnit( + graphics: *mut GpGraphics, + unit: *mut GpUnit, + ) -> GpStatus; + pub fn GdipGetPageScale( + graphics: *mut GpGraphics, + scale: *mut REAL, + ) -> GpStatus; + pub fn GdipSetPageUnit( + graphics: *mut GpGraphics, + unit: GpUnit, + ) -> GpStatus; + pub fn GdipSetPageScale( + graphics: *mut GpGraphics, + scale: REAL, + ) -> GpStatus; + pub fn GdipGetDpiX( + graphics: *mut GpGraphics, + dpi: *mut REAL, + ) -> GpStatus; + pub fn GdipGetDpiY( + graphics: *mut GpGraphics, + dpi: *mut REAL, + ) -> GpStatus; + pub fn GdipTransformPoints( + graphics: *mut GpGraphics, + destSpace: GpCoordinateSpace, + srcSpace: GpCoordinateSpace, + points: *mut GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipTransformPointsI( + graphics: *mut GpGraphics, + destSpace: GpCoordinateSpace, + srcSpace: GpCoordinateSpace, + points: *mut GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipGetNearestColor( + graphics: *mut GpGraphics, + argb: *mut ARGB, + ) -> GpStatus; + pub fn GdipCreateHalftonePalette() -> HPALETTE; + pub fn GdipDrawLine( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x1: REAL, + y1: REAL, + x2: REAL, + y2: REAL, + ) -> GpStatus; + pub fn GdipDrawLineI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x1: INT, + y1: INT, + x2: INT, + y2: INT, + ) -> GpStatus; + pub fn GdipDrawLines( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawLinesI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipDrawArc( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipDrawArcI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: INT, + y: INT, + width: INT, + height: INT, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipDrawBezier( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x1: REAL, + y1: REAL, + x2: REAL, + y2: REAL, + x3: REAL, + y3: REAL, + x4: REAL, + y4: REAL, + ) -> GpStatus; + pub fn GdipDrawBezierI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x1: INT, + y1: INT, + x2: INT, + y2: INT, + x3: INT, + y3: INT, + x4: INT, + y4: INT, + ) -> GpStatus; + pub fn GdipDrawBeziers( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawBeziersI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipDrawRectangle( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipDrawRectangleI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipDrawRectangles( + graphics: *mut GpGraphics, + pen: *mut GpPen, + rects: *const GpRectF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawRectanglesI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + rects: *const GpRect, + count: INT, + ) -> GpStatus; + pub fn GdipDrawEllipse( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipDrawEllipseI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipDrawPie( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipDrawPieI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + x: INT, + y: INT, + width: INT, + height: INT, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipDrawPolygon( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawPolygonI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipDrawPath( + graphics: *mut GpGraphics, + pen: *mut GpPen, + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipDrawCurve( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawCurveI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipDrawCurve2( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipDrawCurve2I( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipDrawCurve3( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + offset: INT, + numberOfSegments: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipDrawCurve3I( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + offset: INT, + numberOfSegments: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipDrawClosedCurve( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawClosedCurveI( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipDrawClosedCurve2( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPointF, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipDrawClosedCurve2I( + graphics: *mut GpGraphics, + pen: *mut GpPen, + points: *const GpPoint, + count: INT, + tension: REAL, + ) -> GpStatus; + pub fn GdipGraphicsClear( + graphics: *mut GpGraphics, + color: ARGB, + ) -> GpStatus; + pub fn GdipFillRectangle( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipFillRectangleI( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipFillRectangles( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + rects: *const GpRectF, + count: INT, + ) -> GpStatus; + pub fn GdipFillRectanglesI( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + rects: *const GpRect, + count: INT, + ) -> GpStatus; + pub fn GdipFillPolygon( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPointF, + count: INT, + fillMode: GpFillMode, + ) -> GpStatus; + pub fn GdipFillPolygonI( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPoint, + count: INT, + fillMode: GpFillMode, + ) -> GpStatus; + pub fn GdipFillPolygon2( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipFillPolygon2I( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipFillEllipse( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipFillEllipseI( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipFillPie( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipFillPieI( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + x: INT, + y: INT, + width: INT, + height: INT, + startAngle: REAL, + sweepAngle: REAL, + ) -> GpStatus; + pub fn GdipFillPath( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + path: *mut GpPath, + ) -> GpStatus; + pub fn GdipFillClosedCurve( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipFillClosedCurveI( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipFillClosedCurve2( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPointF, + count: INT, + tension: REAL, + fillMode: GpFillMode, + ) -> GpStatus; + pub fn GdipFillClosedCurve2I( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + points: *const GpPoint, + count: INT, + tension: REAL, + fillMode: GpFillMode, + ) -> GpStatus; + pub fn GdipFillRegion( + graphics: *mut GpGraphics, + brush: *mut GpBrush, + region: *mut GpRegion, + ) -> GpStatus; + pub fn GdipDrawImageFX( + graphics: *mut GpGraphics, + image: *mut GpImage, + source: *mut GpRectF, + xForm: *mut GpMatrix, + effect: *mut CGpEffect, + imageAttributes: *mut GpImageAttributes, + srcUnit: GpUnit, + ) -> GpStatus; + pub fn GdipDrawImage( + graphics: *mut GpGraphics, + image: *mut GpImage, + x: REAL, + y: REAL, + ) -> GpStatus; + pub fn GdipDrawImageI( + graphics: *mut GpGraphics, + image: *mut GpImage, + x: INT, + y: INT, + ) -> GpStatus; + pub fn GdipDrawImageRect( + graphics: *mut GpGraphics, + image: *mut GpImage, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + ) -> GpStatus; + pub fn GdipDrawImageRectI( + graphics: *mut GpGraphics, + image: *mut GpImage, + x: INT, + y: INT, + width: INT, + height: INT, + ) -> GpStatus; + pub fn GdipDrawImagePoints( + graphics: *mut GpGraphics, + image: *mut GpImage, + dstpoints: *const GpPointF, + count: INT, + ) -> GpStatus; + pub fn GdipDrawImagePointsI( + graphics: *mut GpGraphics, + image: *mut GpImage, + dstpoints: *const GpPoint, + count: INT, + ) -> GpStatus; + pub fn GdipDrawImagePointRect( + graphics: *mut GpGraphics, + image: *mut GpImage, + x: REAL, + y: REAL, + srcx: REAL, + srcy: REAL, + srcwidth: REAL, + srcheight: REAL, + srcUnit: GpUnit, + ) -> GpStatus; + pub fn GdipDrawImagePointRectI( + graphics: *mut GpGraphics, + image: *mut GpImage, + x: INT, + y: INT, + srcx: INT, + srcy: INT, + srcwidth: INT, + srcheight: INT, + srcUnit: GpUnit, + ) -> GpStatus; + pub fn GdipDrawImageRectRect( + graphics: *mut GpGraphics, + image: *mut GpImage, + dstx: REAL, + dsty: REAL, + dstwidth: REAL, + dstheight: REAL, + srcx: REAL, + srcy: REAL, + srcwidth: REAL, + srcheight: REAL, + srcUnit: GpUnit, + imageAttributes: *const GpImageAttributes, + callback: DrawImageAbort, + callbackData: *mut VOID, + ) -> GpStatus; + pub fn GdipDrawImageRectRectI( + graphics: *mut GpGraphics, + image: *mut GpImage, + dstx: INT, + dsty: INT, + dstwidth: INT, + dstheight: INT, + srcx: INT, + srcy: INT, + srcwidth: INT, + srcheight: INT, + srcUnit: GpUnit, + imageAttributes: *const GpImageAttributes, + callback: DrawImageAbort, + callbackData: *mut VOID, + ) -> GpStatus; + pub fn GdipDrawImagePointsRect( + graphics: *mut GpGraphics, + image: *mut GpImage, + points: *const GpPointF, + count: INT, + srcx: REAL, + srcy: REAL, + srcwidth: REAL, + srcheight: REAL, + srcUnit: GpUnit, + imageAttributes: *const GpImageAttributes, + callback: DrawImageAbort, + callbackData: *mut VOID, + ) -> GpStatus; + pub fn GdipDrawImagePointsRectI( + graphics: *mut GpGraphics, + image: *mut GpImage, + points: *const GpPoint, + count: INT, + srcx: INT, + srcy: INT, + srcwidth: INT, + srcheight: INT, + srcUnit: GpUnit, + imageAttributes: *const GpImageAttributes, + callback: DrawImageAbort, + callbackData: *mut VOID, + ) -> GpStatus; + pub fn GdipEnumerateMetafileDestPoint( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoint: *const PointF, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileDestPointI( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoint: *const Point, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileDestRect( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destRect: *const RectF, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileDestRectI( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destRect: *const Rect, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileDestPoints( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoints: *const PointF, + count: INT, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileDestPointsI( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoints: *const Point, + count: INT, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileSrcRectDestPoint( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoint: *const PointF, + srcRect: *const RectF, + srcUnit: Unit, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileSrcRectDestPointI( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoint: *const Point, + srcRect: *const Rect, + srcUnit: Unit, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileSrcRectDestRect( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destRect: *const RectF, + srcRect: *const RectF, + srcUnit: Unit, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileSrcRectDestRectI( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destRect: *const Rect, + srcRect: *const Rect, + srcUnit: Unit, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileSrcRectDestPoints( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoints: *const PointF, + count: INT, + srcRect: *const RectF, + srcUnit: Unit, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipEnumerateMetafileSrcRectDestPointsI( + graphics: *mut GpGraphics, + metafile: *const GpMetafile, + destPoints: *const Point, + count: INT, + srcRect: *const Rect, + srcUnit: Unit, + callback: EnumerateMetafileProc, + callbackData: *mut VOID, + imageAttributes: *const GpImageAttributes, + ) -> GpStatus; + pub fn GdipPlayMetafileRecord( + metafile: *const GpMetafile, + recordType: EmfPlusRecordType, + flags: UINT, + dataSize: UINT, + data: *const BYTE, + ) -> GpStatus; + pub fn GdipSetClipGraphics( + graphics: *mut GpGraphics, + srcgraphics: *mut GpGraphics, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipSetClipRect( + graphics: *mut GpGraphics, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipSetClipRectI( + graphics: *mut GpGraphics, + x: INT, + y: INT, + width: INT, + height: INT, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipSetClipPath( + graphics: *mut GpGraphics, + path: *mut GpPath, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipSetClipRegion( + graphics: *mut GpGraphics, + region: *mut GpRegion, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipSetClipHrgn( + graphics: *mut GpGraphics, + hRgn: HRGN, + combineMode: CombineMode, + ) -> GpStatus; + pub fn GdipResetClip( + graphics: *mut GpGraphics, + ) -> GpStatus; + pub fn GdipTranslateClip( + graphics: *mut GpGraphics, + dx: REAL, + dy: REAL, + ) -> GpStatus; + pub fn GdipTranslateClipI( + graphics: *mut GpGraphics, + dx: INT, + dy: INT, + ) -> GpStatus; + pub fn GdipGetClip( + graphics: *mut GpGraphics, + region: *mut GpRegion, + ) -> GpStatus; + pub fn GdipGetClipBounds( + graphics: *mut GpGraphics, + rect: *mut GpRectF, + ) -> GpStatus; + pub fn GdipGetClipBoundsI( + graphics: *mut GpGraphics, + rect: *mut GpRect, + ) -> GpStatus; + pub fn GdipIsClipEmpty( + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipGetVisibleClipBounds( + graphics: *mut GpGraphics, + rect: *mut GpRectF, + ) -> GpStatus; + pub fn GdipGetVisibleClipBoundsI( + graphics: *mut GpGraphics, + rect: *mut GpRect, + ) -> GpStatus; + pub fn GdipIsVisibleClipEmpty( + graphics: *mut GpGraphics, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisiblePoint( + graphics: *mut GpGraphics, + x: REAL, + y: REAL, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisiblePointI( + graphics: *mut GpGraphics, + x: INT, + y: INT, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisibleRect( + graphics: *mut GpGraphics, + x: REAL, + y: REAL, + width: REAL, + height: REAL, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipIsVisibleRectI( + graphics: *mut GpGraphics, + x: INT, + y: INT, + width: INT, + height: INT, + result: *mut BOOL, + ) -> GpStatus; + pub fn GdipSaveGraphics( + graphics: *mut GpGraphics, + state: *mut GraphicsState, + ) -> GpStatus; + pub fn GdipRestoreGraphics( + graphics: *mut GpGraphics, + state: GraphicsState, + ) -> GpStatus; + pub fn GdipBeginContainer( + graphics: *mut GpGraphics, + dstrect: *const GpRectF, + srcrect: *const GpRectF, + unit: GpUnit, + state: *mut GraphicsContainer, + ) -> GpStatus; + pub fn GdipBeginContainerI( + graphics: *mut GpGraphics, + dstrect: *const GpRect, + srcrect: *const GpRect, + unit: GpUnit, + state: *mut GraphicsContainer, + ) -> GpStatus; + pub fn GdipBeginContainer2( + graphics: *mut GpGraphics, + state: *mut GraphicsContainer, + ) -> GpStatus; + pub fn GdipEndContainer( + graphics: *mut GpGraphics, + state: GraphicsContainer, + ) -> GpStatus; + pub fn GdipGetMetafileHeaderFromWmf( + hWmf: HMETAFILE, + wmfPlaceableFileHeader: *const WmfPlaceableFileHeader, + header: *mut MetafileHeader, + ) -> GpStatus; + pub fn GdipGetMetafileHeaderFromEmf( + hEmf: HENHMETAFILE, + header: *mut MetafileHeader, + ) -> GpStatus; + pub fn GdipGetMetafileHeaderFromFile( + filename: *const WCHAR, + header: *mut MetafileHeader, + ) -> GpStatus; + pub fn GdipGetMetafileHeaderFromStream( + stream: *mut IStream, + header: *mut MetafileHeader, + ) -> GpStatus; + pub fn GdipGetMetafileHeaderFromMetafile( + metafile: *mut GpMetafile, + header: *mut MetafileHeader, + ) -> GpStatus; + pub fn GdipGetHemfFromMetafile( + metafile: *mut GpMetafile, + hEmf: *mut HENHMETAFILE, + ) -> GpStatus; + pub fn GdipCreateStreamOnFile( + filename: *const WCHAR, + access: UINT, + stream: *mut *mut IStream, + ) -> GpStatus; + pub fn GdipCreateMetafileFromWmf( + hWmf: HMETAFILE, + deleteWmf: BOOL, + wmfPlaceableFileHeader: *const WmfPlaceableFileHeader, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipCreateMetafileFromEmf( + hEmf: HENHMETAFILE, + deleteEmf: BOOL, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipCreateMetafileFromFile( + file: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipCreateMetafileFromWmfFile( + file: *const WCHAR, + wmfPlaceableFileHeader: *const WmfPlaceableFileHeader, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipCreateMetafileFromStream( + stream: *mut IStream, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipRecordMetafile( + referenceHdc: HDC, + type_: EmfType, + frameRect: *const GpRectF, + frameUnit: MetafileFrameUnit, + description: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipRecordMetafileI( + referenceHdc: HDC, + type_: EmfType, + frameRect: *const GpRect, + frameUnit: MetafileFrameUnit, + description: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipRecordMetafileFileName( + fileName: *const WCHAR, + referenceHdc: HDC, + type_: EmfType, + frameRect: *const GpRectF, + frameUnit: MetafileFrameUnit, + description: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipRecordMetafileFileNameI( + fileName: *const WCHAR, + referenceHdc: HDC, + type_: EmfType, + frameRect: *const GpRect, + frameUnit: MetafileFrameUnit, + description: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipRecordMetafileStream( + stream: *mut IStream, + referenceHdc: HDC, + type_: EmfType, + frameRect: *const GpRectF, + frameUnit: MetafileFrameUnit, + description: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipRecordMetafileStreamI( + stream: *mut IStream, + referenceHdc: HDC, + type_: EmfType, + frameRect: *const GpRect, + frameUnit: MetafileFrameUnit, + description: *const WCHAR, + metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipSetMetafileDownLevelRasterizationLimit( + metafile: *mut GpMetafile, + metafileRasterizationLimitDpi: UINT, + ) -> GpStatus; + pub fn GdipGetMetafileDownLevelRasterizationLimit( + metafile: *const GpMetafile, + metafileRasterizationLimitDpi: *mut UINT, + ) -> GpStatus; + pub fn GdipGetImageDecodersSize( + numDecoders: *mut UINT, + size: *mut UINT, + ) -> GpStatus; + pub fn GdipGetImageDecoders( + numDecoders: UINT, + size: UINT, + decoders: *mut ImageCodecInfo, + ) -> GpStatus; + pub fn GdipGetImageEncodersSize( + numEncoders: *mut UINT, + size: *mut UINT, + ) -> GpStatus; + pub fn GdipGetImageEncoders( + numEncoders: UINT, + size: UINT, + encoders: *mut ImageCodecInfo, + ) -> GpStatus; + pub fn GdipComment( + graphics: *mut GpGraphics, + sizeData: UINT, + data: *const BYTE, + ) -> GpStatus; + pub fn GdipCreateFontFamilyFromName( + name: *const WCHAR, + fontCollection: *mut GpFontCollection, + fontFamily: *mut *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipDeleteFontFamily( + fontFamily: *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipCloneFontFamily( + fontFamily: *mut GpFontFamily, + clonedFontFamily: *mut *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipGetGenericFontFamilySansSerif( + nativeFamily: *mut *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipGetGenericFontFamilySerif( + nativeFamily: *mut *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipGetGenericFontFamilyMonospace( + nativeFamily: *mut *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipGetFamilyName( + family: *const GpFontFamily, + name: LPWSTR, + language: LANGID, + ) -> GpStatus; + pub fn GdipIsStyleAvailable( + family: *const GpFontFamily, + style: INT, + IsStyleAvailable: *mut BOOL, + ) -> GpStatus; + pub fn GdipFontCollectionEnumerable( + fontCollection: *mut GpFontCollection, + graphics: *mut GpGraphics, + numFound: *mut INT, + ) -> GpStatus; + pub fn GdipFontCollectionEnumerate( + fontCollection: *mut GpFontCollection, + numSought: INT, + gpfamilies: *mut *mut GpFontFamily, + numFound: *mut INT, + graphics: *mut GpGraphics, + ) -> GpStatus; + pub fn GdipGetEmHeight( + family: *const GpFontFamily, + style: INT, + EmHeight: *mut UINT16, + ) -> GpStatus; + pub fn GdipGetCellAscent( + family: *const GpFontFamily, + style: INT, + CellAscent: *mut UINT16, + ) -> GpStatus; + pub fn GdipGetCellDescent( + family: *const GpFontFamily, + style: INT, + CellDescent: *mut UINT16, + ) -> GpStatus; + pub fn GdipGetLineSpacing( + family: *const GpFontFamily, + style: INT, + LineSpacing: *mut UINT16, + ) -> GpStatus; + pub fn GdipCreateFontFromDC( + hdc: HDC, + font: *mut *mut GpFont, + ) -> GpStatus; + pub fn GdipCreateFontFromLogfontA( + hdc: HDC, + logfont: *const LOGFONTA, + font: *mut *mut GpFont, + ) -> GpStatus; + pub fn GdipCreateFontFromLogfontW( + hdc: HDC, + logfont: *const LOGFONTW, + font: *mut *mut GpFont, + ) -> GpStatus; + pub fn GdipCreateFont( + fontFamily: *const GpFontFamily, + emSize: REAL, + style: INT, + unit: Unit, + font: *mut *mut GpFont, + ) -> GpStatus; + pub fn GdipCloneFont( + font: *mut GpFont, + cloneFont: *mut *mut GpFont, + ) -> GpStatus; + pub fn GdipDeleteFont( + font: *mut GpFont, + ) -> GpStatus; + pub fn GdipGetFamily( + font: *mut GpFont, + family: *mut *mut GpFontFamily, + ) -> GpStatus; + pub fn GdipGetFontStyle( + font: *mut GpFont, + style: *mut INT, + ) -> GpStatus; + pub fn GdipGetFontSize( + font: *mut GpFont, + size: *mut REAL, + ) -> GpStatus; + pub fn GdipGetFontUnit( + font: *mut GpFont, + unit: *mut Unit, + ) -> GpStatus; + pub fn GdipGetFontHeight( + font: *const GpFont, + graphics: *const GpGraphics, + height: *mut REAL, + ) -> GpStatus; + pub fn GdipGetFontHeightGivenDPI( + font: *const GpFont, + dpi: REAL, + height: *mut REAL, + ) -> GpStatus; + pub fn GdipGetLogFontA( + font: *mut GpFont, + graphics: *mut GpGraphics, + logfontA: *mut LOGFONTA, + ) -> GpStatus; + pub fn GdipGetLogFontW( + font: *mut GpFont, + graphics: *mut GpGraphics, + logfontW: *mut LOGFONTW, + ) -> GpStatus; + pub fn GdipNewInstalledFontCollection( + fontCollection: *mut *mut GpFontCollection, + ) -> GpStatus; + pub fn GdipNewPrivateFontCollection( + fontCollection: *mut *mut GpFontCollection, + ) -> GpStatus; + pub fn GdipDeletePrivateFontCollection( + fontCollection: *mut *mut GpFontCollection, + ) -> GpStatus; + pub fn GdipGetFontCollectionFamilyCount( + fontCollection: *mut GpFontCollection, + numFound: *mut INT, + ) -> GpStatus; + pub fn GdipGetFontCollectionFamilyList( + fontCollection: *mut GpFontCollection, + numSought: INT, + gpfamilies: *mut *mut GpFontFamily, + numFound: *mut INT, + ) -> GpStatus; + pub fn GdipPrivateAddFontFile( + fontCollection: *mut GpFontCollection, + filename: *const WCHAR, + ) -> GpStatus; + pub fn GdipPrivateAddMemoryFont( + fontCollection: *mut GpFontCollection, + memory: *const c_void, + length: INT, + ) -> GpStatus; + pub fn GdipDrawString( + graphics: *mut GpGraphics, + string: *const WCHAR, + length: INT, + font: *const GpFont, + layoutRect: *const RectF, + stringFormat: *const GpStringFormat, + brush: *const GpBrush, + ) -> GpStatus; + pub fn GdipMeasureString( + graphics: *mut GpGraphics, + string: *const WCHAR, + length: INT, + font: *const GpFont, + layoutRect: *const RectF, + stringFormat: *const GpStringFormat, + boundingBox: *mut RectF, + codepointsFitted: *mut INT, + linesFilled: *mut INT, + ) -> GpStatus; + pub fn GdipMeasureCharacterRanges( + graphics: *mut GpGraphics, + string: *const WCHAR, + length: INT, + font: *const GpFont, + layoutRect: *const RectF, + stringFormat: *const GpStringFormat, + regionCount: INT, + regions: *mut *mut GpRegion, + ) -> GpStatus; + pub fn GdipDrawDriverString( + graphics: *mut GpGraphics, + text: *const UINT16, + length: INT, + font: *const GpFont, + brush: *const GpBrush, + positions: *const PointF, + flags: INT, + matrix: *const GpMatrix, + ) -> GpStatus; + pub fn GdipMeasureDriverString( + graphics: *mut GpGraphics, + text: *const UINT16, + length: INT, + font: *const GpFont, + positions: *const PointF, + flags: INT, + matrix: *const GpMatrix, + boundingBox: *mut RectF, + ) -> GpStatus; + pub fn GdipCreateStringFormat( + formatAttributes: INT, + language: LANGID, + format: *mut *mut GpStringFormat, + ) -> GpStatus; + pub fn GdipStringFormatGetGenericDefault( + format: *mut *mut GpStringFormat, + ) -> GpStatus; + pub fn GdipStringFormatGetGenericTypographic( + format: *mut *mut GpStringFormat, + ) -> GpStatus; + pub fn GdipDeleteStringFormat( + format: *mut GpStringFormat, + ) -> GpStatus; + pub fn GdipCloneStringFormat( + format: *const GpStringFormat, + newFormat: *mut *mut GpStringFormat, + ) -> GpStatus; + pub fn GdipSetStringFormatFlags( + format: *mut GpStringFormat, + flags: INT, + ) -> GpStatus; + pub fn GdipGetStringFormatFlags( + format: *const GpStringFormat, + flags: *mut INT, + ) -> GpStatus; + pub fn GdipSetStringFormatAlign( + format: *mut GpStringFormat, + align: StringAlignment, + ) -> GpStatus; + pub fn GdipGetStringFormatAlign( + format: *const GpStringFormat, + align: *mut StringAlignment, + ) -> GpStatus; + pub fn GdipSetStringFormatLineAlign( + format: *mut GpStringFormat, + align: StringAlignment, + ) -> GpStatus; + pub fn GdipGetStringFormatLineAlign( + format: *const GpStringFormat, + align: *mut StringAlignment, + ) -> GpStatus; + pub fn GdipSetStringFormatTrimming( + format: *mut GpStringFormat, + trimming: StringTrimming, + ) -> GpStatus; + pub fn GdipGetStringFormatTrimming( + format: *const GpStringFormat, + trimming: *mut StringTrimming, + ) -> GpStatus; + pub fn GdipSetStringFormatHotkeyPrefix( + format: *mut GpStringFormat, + hotkeyPrefix: INT, + ) -> GpStatus; + pub fn GdipGetStringFormatHotkeyPrefix( + format: *const GpStringFormat, + hotkeyPrefix: *mut INT, + ) -> GpStatus; + pub fn GdipSetStringFormatTabStops( + format: *mut GpStringFormat, + firstTabOffset: REAL, + count: INT, + tabStops: *const REAL, + ) -> GpStatus; + pub fn GdipGetStringFormatTabStops( + format: *const GpStringFormat, + count: INT, + firstTabOffset: *mut REAL, + tabStops: *mut REAL, + ) -> GpStatus; + pub fn GdipGetStringFormatTabStopCount( + format: *const GpStringFormat, + count: *mut INT, + ) -> GpStatus; + pub fn GdipSetStringFormatDigitSubstitution( + format: *mut GpStringFormat, + language: LANGID, + substitute: StringDigitSubstitute, + ) -> GpStatus; + pub fn GdipGetStringFormatDigitSubstitution( + format: *const GpStringFormat, + language: *mut LANGID, + substitute: *mut StringDigitSubstitute, + ) -> GpStatus; + pub fn GdipGetStringFormatMeasurableCharacterRangeCount( + format: *const GpStringFormat, + count: *mut INT, + ) -> GpStatus; + pub fn GdipSetStringFormatMeasurableCharacterRanges( + format: *mut GpStringFormat, + rangeCount: INT, + ranges: *const CharacterRange, + ) -> GpStatus; + pub fn GdipCreateCachedBitmap( + bitmap: *mut GpBitmap, + graphics: *mut GpGraphics, + cachedBitmap: *mut *mut GpCachedBitmap, + ) -> GpStatus; + pub fn GdipDeleteCachedBitmap( + cachedBitmap: *mut GpCachedBitmap, + ) -> GpStatus; + pub fn GdipDrawCachedBitmap( + graphics: *mut GpGraphics, + cachedBitmap: *mut GpCachedBitmap, + x: INT, + y: INT, + ) -> GpStatus; + pub fn GdipEmfToWmfBits( + hemf: HENHMETAFILE, + cbData16: UINT, + pData16: LPBYTE, + iMapMode: INT, + eFlags: INT, + ) -> UINT; + pub fn GdipSetImageAttributesCachedBackground( + imageattr: *mut GpImageAttributes, + enableFlag: BOOL, + ) -> GpStatus; + pub fn GdipTestControl( + control: GpTestControlEnum, + param: *mut c_void, + ) -> GpStatus; + pub fn GdiplusNotificationHook( + token: *mut ULONG_PTR, + ) -> GpStatus; + pub fn GdiplusNotificationUnhook( + token: ULONG_PTR, + ); + pub fn GdipConvertToEmfPlus( + refGraphics: *const GpGraphics, + metafile: *mut GpMetafile, + conversionFailureFlag: *mut INT, + emfType: EmfType, + description: *const WCHAR, + out_metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipConvertToEmfPlusToFile( + refGraphics: *const GpGraphics, + metafile: *mut GpMetafile, + conversionFailureFlag: *mut INT, + filename: *const WCHAR, + emfType: EmfType, + description: *const WCHAR, + out_metafile: *mut *mut GpMetafile, + ) -> GpStatus; + pub fn GdipConvertToEmfPlusToStream( + refGraphics: *const GpGraphics, + metafile: *mut GpMetafile, + conversionFailureFlag: *mut INT, + stream: *mut IStream, + emfType: EmfType, + description: *const WCHAR, + out_metafile: *mut *mut GpMetafile, + ) -> GpStatus; +} diff --git a/src/um/gdiplusgpstubs.rs b/src/um/gdiplusgpstubs.rs new file mode 100644 index 000000000..0f023aa37 --- /dev/null +++ b/src/um/gdiplusgpstubs.rs @@ -0,0 +1,57 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use um::gdiplusenums::{ + BrushType, CoordinateSpace, DashCap, DashStyle, FillMode, FlushIntention, HatchStyle, LineCap, + LineJoin, MatrixOrder, PenAlignment, PenType, Unit, WrapMode +}; +use um::gdiplustypes::{PathData, Point, PointF, Rect, RectF, SizeF, Status}; +pub enum GpGraphics {} +pub enum GpBrush {} +pub enum GpTexture {} +pub enum GpSolidFill {} +pub enum GpLineGradient {} +pub enum GpPathGradient {} +pub enum GpHatch {} +pub enum GpPen {} +pub enum GpCustomLineCap {} +pub enum GpAdjustableArrowCap {} +pub enum GpImage {} +pub enum GpBitmap {} +pub enum GpMetafile {} +pub enum GpImageAttributes {} +pub enum GpPath {} +pub enum GpRegion {} +pub enum GpPathIterator {} +pub enum GpFontFamily {} +pub enum GpFont {} +pub enum GpStringFormat {} +pub enum GpFontCollection {} +pub enum GpInstalledFontCollection {} +pub enum GpPrivateFontCollection {} +pub enum GpCachedBitmap {} +pub type GpStatus = Status; +pub type GpFillMode = FillMode; +pub type GpWrapMode = WrapMode; +pub type GpUnit = Unit; +pub type GpCoordinateSpace = CoordinateSpace; +pub type GpPointF = PointF; +pub type GpPoint = Point; +pub type GpRectF = RectF; +pub type GpRect = Rect; +pub type GpSizeF = SizeF; +pub type GpHatchStyle = HatchStyle; +pub type GpDashStyle = DashStyle; +pub type GpLineCap = LineCap; +pub type GpDashCap = DashCap; +pub type GpPenAlignment = PenAlignment; +pub type GpLineJoin = LineJoin; +pub type GpPenType = PenType; +pub enum GpMatrix {} +pub type GpBrushType = BrushType; +pub type GpMatrixOrder = MatrixOrder; +pub type GpFlushIntention = FlushIntention; +pub type GpPathData = PathData; diff --git a/src/um/gdiplusimaging.rs b/src/um/gdiplusimaging.rs new file mode 100644 index 000000000..e96250cc5 --- /dev/null +++ b/src/um/gdiplusimaging.rs @@ -0,0 +1,436 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use shared::basetsd::UINT_PTR; +use shared::guiddef::{CLSID, GUID}; +use shared::minwindef::{BYTE, DWORD, INT, UINT, ULONG, WORD}; +use shared::winerror::HRESULT; +use shared::wtypes::PROPID; +use um::gdipluspixelformats::PixelFormat; +use um::unknwnbase::{IUnknown, IUnknownVtbl}; +use um::winnt::{VOID, WCHAR}; +DEFINE_GUID!{ImageFormatUndefined, + 0xb96b3ca9, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatMemoryBMP, + 0xb96b3caa, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatBMP, + 0xb96b3cab, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatEMF, + 0xb96b3cac, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatWMF, + 0xb96b3cad, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatJPEG, + 0xb96b3cae, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatPNG, + 0xb96b3caf, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatGIF, + 0xb96b3cb0, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatTIFF, + 0xb96b3cb1, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatEXIF, + 0xb96b3cb2, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{ImageFormatIcon, + 0xb96b3cb5, 0x0728, 0x11d3, 0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} +DEFINE_GUID!{FrameDimensionTime, + 0x6aedbd6d, 0x3fb5, 0x418a, 0x83, 0xa6, 0x7f, 0x45, 0x22, 0x9d, 0xc8, 0x72} +DEFINE_GUID!{FrameDimensionResolution, + 0x84236f7b, 0x3bd3, 0x428f, 0x8d, 0xab, 0x4e, 0xa1, 0x43, 0x9c, 0xa3, 0x15} +DEFINE_GUID!{FrameDimensionPage, + 0x7462dc86, 0x6180, 0x4c7e, 0x8e, 0x3f, 0xee, 0x73, 0x33, 0xa7, 0xa4, 0x83} +DEFINE_GUID!{FormatIDImageInformation, + 0xe5836cbe, 0x5eef, 0x4f1d, 0xac, 0xde, 0xae, 0x4c, 0x43, 0xb6, 0x08, 0xce} +DEFINE_GUID!{FormatIDJpegAppHeaders, + 0x1c4afdcd, 0x6177, 0x43cf, 0xab, 0xc7, 0x5f, 0x51, 0xaf, 0x39, 0xee, 0x85} +DEFINE_GUID!{EncoderCompression, + 0xe09d739d, 0xccd4, 0x44ee, 0x8e, 0xba, 0x3f, 0xbf, 0x8b, 0xe4, 0xfc, 0x58} +DEFINE_GUID!{EncoderColorDepth, + 0x66087055, 0xad66, 0x4c7c, 0x9a, 0x18, 0x38, 0xa2, 0x31, 0x0b, 0x83, 0x37} +DEFINE_GUID!{EncoderScanMethod, + 0x3a4e2661, 0x3109, 0x4e56, 0x85, 0x36, 0x42, 0xc1, 0x56, 0xe7, 0xdc, 0xfa} +DEFINE_GUID!{EncoderVersion, + 0x24d18c76, 0x814a, 0x41a4, 0xbf, 0x53, 0x1c, 0x21, 0x9c, 0xcc, 0xf7, 0x97} +DEFINE_GUID!{EncoderRenderMethod, + 0x6d42c53a, 0x229a, 0x4825, 0x8b, 0xb7, 0x5c, 0x99, 0xe2, 0xb9, 0xa8, 0xb8} +DEFINE_GUID!{EncoderQuality, + 0x1d5be4b5, 0xfa4a, 0x452d, 0x9c, 0xdd, 0x5d, 0xb3, 0x51, 0x05, 0xe7, 0xeb} +DEFINE_GUID!{EncoderTransformation, + 0x8d0eb2d1, 0xa58e, 0x4ea8, 0xaa, 0x14, 0x10, 0x80, 0x74, 0xb7, 0xb6, 0xf9} +DEFINE_GUID!{EncoderLuminanceTable, + 0xedb33bce, 0x0266, 0x4a77, 0xb9, 0x04, 0x27, 0x21, 0x60, 0x99, 0xe7, 0x17} +DEFINE_GUID!{EncoderChrominanceTable, + 0xf2e455dc, 0x09b3, 0x4316, 0x82, 0x60, 0x67, 0x6a, 0xda, 0x32, 0x48, 0x1c} +DEFINE_GUID!{EncoderSaveFlag, + 0x292266fc, 0xac40, 0x47bf, 0x8c, 0xfc, 0xa8, 0x5b, 0x89, 0xa6, 0x55, 0xde} +DEFINE_GUID!{EncoderColorSpace, + 0xae7a62a0, 0xee2c, 0x49d8, 0x9d, 0x7, 0x1b, 0xa8, 0xa9, 0x27, 0x59, 0x6e} +DEFINE_GUID!{EncoderImageItems, + 0x63875e13, 0x1f1d, 0x45ab, 0x91, 0x95, 0xa2, 0x9b, 0x60, 0x66, 0xa6, 0x50} +DEFINE_GUID!{EncoderSaveAsCMYK, + 0xa219bbc9, 0xa9d, 0x4005, 0xa3, 0xee, 0x3a, 0x42, 0x1b, 0x8b, 0xb0, 0x6c} +DEFINE_GUID!{CodecIImageBytes, + 0x025d1823, 0x6c7d, 0x447b, 0xbb, 0xdb, 0xa3, 0xcb, 0xc3, 0xdf, 0xa2, 0xfc} +RIDL!{#[uuid(0x025D1823, 0x6C7D, 0x447B, 0xBB, 0xDB, 0xA3, 0xCB, 0xC3, 0xDF, 0xA2, 0xFC)] +interface IImageBytes(IImageBytesVtbl): IUnknown(IUnknownVtbl) { + fn CountBytes( + pcd: *mut UINT, + ) -> HRESULT, + fn LockBytes( + cb: UINT, + ulOffset: ULONG, + ppvBytes: *mut *const VOID, + ) -> HRESULT, + fn UnlockBytes( + pvBytes: *const VOID, + cb: UINT, + ulOffset: ULONG, + ) -> HRESULT, +}} +STRUCT!{struct ImageCodecInfo { + Clsid: CLSID, + FormatID: GUID, + CodecName: *const WCHAR, + DllName: *const WCHAR, + FormatDescription: *const WCHAR, + FilenameExtension: *const WCHAR, + MimeType: *const WCHAR, + Flags: DWORD, + Version: DWORD, + SigCount: DWORD, + SigSize: DWORD, + SigPattern: *const BYTE, + SigMask: *const BYTE, +}} +ENUM!{enum ImageCodecFlags { + ImageCodecFlagsEncoder = 0x00000001, + ImageCodecFlagsDecoder = 0x00000002, + ImageCodecFlagsSupportBitmap = 0x00000004, + ImageCodecFlagsSupportVector = 0x00000008, + ImageCodecFlagsSeekableEncode = 0x00000010, + ImageCodecFlagsBlockingDecode = 0x00000020, + ImageCodecFlagsBuiltin = 0x00010000, + ImageCodecFlagsSystem = 0x00020000, + ImageCodecFlagsUser = 0x00040000, +}} +ENUM!{enum ImageLockMode { + ImageLockModeRead = 0x0001, + ImageLockModeWrite = 0x0002, + ImageLockModeUserInputBuf = 0x0004, +}} +STRUCT!{struct BitmapData { + Width: UINT, + Height: UINT, + Stride: INT, + PixelFormat: PixelFormat, + Scan0: *mut VOID, + Reserved: UINT_PTR, +}} +ENUM!{enum ImageFlags { + ImageFlagsNone = 0, + ImageFlagsScalable = 0x0001, + ImageFlagsHasAlpha = 0x0002, + ImageFlagsHasTranslucent = 0x0004, + ImageFlagsPartiallyScalable = 0x0008, + ImageFlagsColorSpaceRGB = 0x0010, + ImageFlagsColorSpaceCMYK = 0x0020, + ImageFlagsColorSpaceGRAY = 0x0040, + ImageFlagsColorSpaceYCBCR = 0x0080, + ImageFlagsColorSpaceYCCK = 0x0100, + ImageFlagsHasRealDPI = 0x1000, + ImageFlagsHasRealPixelSize = 0x2000, + ImageFlagsReadOnly = 0x00010000, + ImageFlagsCaching = 0x00020000, +}} +ENUM!{enum RotateFlipType { + RotateNoneFlipNone = 0, + Rotate90FlipNone = 1, + Rotate180FlipNone = 2, + Rotate270FlipNone = 3, + RotateNoneFlipX = 4, + Rotate90FlipX = 5, + Rotate180FlipX = 6, + Rotate270FlipX = 7, + RotateNoneFlipY = Rotate180FlipX, + Rotate90FlipY = Rotate270FlipX, + Rotate180FlipY = RotateNoneFlipX, + Rotate270FlipY = Rotate90FlipX, + RotateNoneFlipXY = Rotate180FlipNone, + Rotate90FlipXY = Rotate270FlipNone, + Rotate180FlipXY = RotateNoneFlipNone, + Rotate270FlipXY = Rotate90FlipNone, +}} +STRUCT!{struct EncoderParameter { + Guid: GUID, + NumberOfValues: ULONG, + Type: ULONG, + Value: *mut VOID, +}} +STRUCT!{struct EncoderParameters { + Count: UINT, + Parameter: [EncoderParameter; 1], +}} +ENUM!{enum ItemDataPosition { + ItemDataPositionAfterHeader = 0x0, + ItemDataPositionAfterPalette = 0x1, + ItemDataPositionAfterBits = 0x2, +}} +STRUCT!{struct ImageItemData { + Size: UINT, + Position: UINT, + Desc: *mut VOID, + DescSize: UINT, + Data: *mut VOID, + DataSize: UINT, + Cookie: UINT, +}} +STRUCT!{struct PropertyItem { + id: PROPID, + length: ULONG, + type_: WORD, + value: *mut VOID, +}} +pub const PropertyTagTypeByte: WORD = 1; +pub const PropertyTagTypeASCII: WORD = 2; +pub const PropertyTagTypeShort: WORD = 3; +pub const PropertyTagTypeLong: WORD = 4; +pub const PropertyTagTypeRational: WORD = 5; +pub const PropertyTagTypeUndefined: WORD = 7; +pub const PropertyTagTypeSLONG: WORD = 9; +pub const PropertyTagTypeSRational: WORD = 10; +pub const PropertyTagExifIFD: PROPID = 0x8769; +pub const PropertyTagGpsIFD: PROPID = 0x8825; +pub const PropertyTagNewSubfileType: PROPID = 0x00FE; +pub const PropertyTagSubfileType: PROPID = 0x00FF; +pub const PropertyTagImageWidth: PROPID = 0x0100; +pub const PropertyTagImageHeight: PROPID = 0x0101; +pub const PropertyTagBitsPerSample: PROPID = 0x0102; +pub const PropertyTagCompression: PROPID = 0x0103; +pub const PropertyTagPhotometricInterp: PROPID = 0x0106; +pub const PropertyTagThreshHolding: PROPID = 0x0107; +pub const PropertyTagCellWidth: PROPID = 0x0108; +pub const PropertyTagCellHeight: PROPID = 0x0109; +pub const PropertyTagFillOrder: PROPID = 0x010A; +pub const PropertyTagDocumentName: PROPID = 0x010D; +pub const PropertyTagImageDescription: PROPID = 0x010E; +pub const PropertyTagEquipMake: PROPID = 0x010F; +pub const PropertyTagEquipModel: PROPID = 0x0110; +pub const PropertyTagStripOffsets: PROPID = 0x0111; +pub const PropertyTagOrientation: PROPID = 0x0112; +pub const PropertyTagSamplesPerPixel: PROPID = 0x0115; +pub const PropertyTagRowsPerStrip: PROPID = 0x0116; +pub const PropertyTagStripBytesCount: PROPID = 0x0117; +pub const PropertyTagMinSampleValue: PROPID = 0x0118; +pub const PropertyTagMaxSampleValue: PROPID = 0x0119; +pub const PropertyTagXResolution: PROPID = 0x011A; +pub const PropertyTagYResolution: PROPID = 0x011B; +pub const PropertyTagPlanarConfig: PROPID = 0x011C; +pub const PropertyTagPageName: PROPID = 0x011D; +pub const PropertyTagXPosition: PROPID = 0x011E; +pub const PropertyTagYPosition: PROPID = 0x011F; +pub const PropertyTagFreeOffset: PROPID = 0x0120; +pub const PropertyTagFreeByteCounts: PROPID = 0x0121; +pub const PropertyTagGrayResponseUnit: PROPID = 0x0122; +pub const PropertyTagGrayResponseCurve: PROPID = 0x0123; +pub const PropertyTagT4Option: PROPID = 0x0124; +pub const PropertyTagT6Option: PROPID = 0x0125; +pub const PropertyTagResolutionUnit: PROPID = 0x0128; +pub const PropertyTagPageNumber: PROPID = 0x0129; +pub const PropertyTagTransferFuncition: PROPID = 0x012D; +pub const PropertyTagSoftwareUsed: PROPID = 0x0131; +pub const PropertyTagDateTime: PROPID = 0x0132; +pub const PropertyTagArtist: PROPID = 0x013B; +pub const PropertyTagHostComputer: PROPID = 0x013C; +pub const PropertyTagPredictor: PROPID = 0x013D; +pub const PropertyTagWhitePoint: PROPID = 0x013E; +pub const PropertyTagPrimaryChromaticities: PROPID = 0x013F; +pub const PropertyTagColorMap: PROPID = 0x0140; +pub const PropertyTagHalftoneHints: PROPID = 0x0141; +pub const PropertyTagTileWidth: PROPID = 0x0142; +pub const PropertyTagTileLength: PROPID = 0x0143; +pub const PropertyTagTileOffset: PROPID = 0x0144; +pub const PropertyTagTileByteCounts: PROPID = 0x0145; +pub const PropertyTagInkSet: PROPID = 0x014C; +pub const PropertyTagInkNames: PROPID = 0x014D; +pub const PropertyTagNumberOfInks: PROPID = 0x014E; +pub const PropertyTagDotRange: PROPID = 0x0150; +pub const PropertyTagTargetPrinter: PROPID = 0x0151; +pub const PropertyTagExtraSamples: PROPID = 0x0152; +pub const PropertyTagSampleFormat: PROPID = 0x0153; +pub const PropertyTagSMinSampleValue: PROPID = 0x0154; +pub const PropertyTagSMaxSampleValue: PROPID = 0x0155; +pub const PropertyTagTransferRange: PROPID = 0x0156; +pub const PropertyTagJPEGProc: PROPID = 0x0200; +pub const PropertyTagJPEGInterFormat: PROPID = 0x0201; +pub const PropertyTagJPEGInterLength: PROPID = 0x0202; +pub const PropertyTagJPEGRestartInterval: PROPID = 0x0203; +pub const PropertyTagJPEGLosslessPredictors: PROPID = 0x0205; +pub const PropertyTagJPEGPointTransforms: PROPID = 0x0206; +pub const PropertyTagJPEGQTables: PROPID = 0x0207; +pub const PropertyTagJPEGDCTables: PROPID = 0x0208; +pub const PropertyTagJPEGACTables: PROPID = 0x0209; +pub const PropertyTagYCbCrCoefficients: PROPID = 0x0211; +pub const PropertyTagYCbCrSubsampling: PROPID = 0x0212; +pub const PropertyTagYCbCrPositioning: PROPID = 0x0213; +pub const PropertyTagREFBlackWhite: PROPID = 0x0214; +pub const PropertyTagICCProfile: PROPID = 0x8773; +pub const PropertyTagGamma: PROPID = 0x0301; +pub const PropertyTagICCProfileDescriptor: PROPID = 0x0302; +pub const PropertyTagSRGBRenderingIntent: PROPID = 0x0303; +pub const PropertyTagImageTitle: PROPID = 0x0320; +pub const PropertyTagCopyright: PROPID = 0x8298; +pub const PropertyTagResolutionXUnit: PROPID = 0x5001; +pub const PropertyTagResolutionYUnit: PROPID = 0x5002; +pub const PropertyTagResolutionXLengthUnit: PROPID = 0x5003; +pub const PropertyTagResolutionYLengthUnit: PROPID = 0x5004; +pub const PropertyTagPrintFlags: PROPID = 0x5005; +pub const PropertyTagPrintFlagsVersion: PROPID = 0x5006; +pub const PropertyTagPrintFlagsCrop: PROPID = 0x5007; +pub const PropertyTagPrintFlagsBleedWidth: PROPID = 0x5008; +pub const PropertyTagPrintFlagsBleedWidthScale: PROPID = 0x5009; +pub const PropertyTagHalftoneLPI: PROPID = 0x500A; +pub const PropertyTagHalftoneLPIUnit: PROPID = 0x500B; +pub const PropertyTagHalftoneDegree: PROPID = 0x500C; +pub const PropertyTagHalftoneShape: PROPID = 0x500D; +pub const PropertyTagHalftoneMisc: PROPID = 0x500E; +pub const PropertyTagHalftoneScreen: PROPID = 0x500F; +pub const PropertyTagJPEGQuality: PROPID = 0x5010; +pub const PropertyTagGridSize: PROPID = 0x5011; +pub const PropertyTagThumbnailFormat: PROPID = 0x5012; +pub const PropertyTagThumbnailWidth: PROPID = 0x5013; +pub const PropertyTagThumbnailHeight: PROPID = 0x5014; +pub const PropertyTagThumbnailColorDepth: PROPID = 0x5015; +pub const PropertyTagThumbnailPlanes: PROPID = 0x5016; +pub const PropertyTagThumbnailRawBytes: PROPID = 0x5017; +pub const PropertyTagThumbnailSize: PROPID = 0x5018; +pub const PropertyTagThumbnailCompressedSize: PROPID = 0x5019; +pub const PropertyTagColorTransferFunction: PROPID = 0x501A; +pub const PropertyTagThumbnailData: PROPID = 0x501B; +pub const PropertyTagThumbnailImageWidth: PROPID = 0x5020; +pub const PropertyTagThumbnailImageHeight: PROPID = 0x5021; +pub const PropertyTagThumbnailBitsPerSample: PROPID = 0x5022; +pub const PropertyTagThumbnailCompression: PROPID = 0x5023; +pub const PropertyTagThumbnailPhotometricInterp: PROPID = 0x5024; +pub const PropertyTagThumbnailImageDescription: PROPID = 0x5025; +pub const PropertyTagThumbnailEquipMake: PROPID = 0x5026; +pub const PropertyTagThumbnailEquipModel: PROPID = 0x5027; +pub const PropertyTagThumbnailStripOffsets: PROPID = 0x5028; +pub const PropertyTagThumbnailOrientation: PROPID = 0x5029; +pub const PropertyTagThumbnailSamplesPerPixel: PROPID = 0x502A; +pub const PropertyTagThumbnailRowsPerStrip: PROPID = 0x502B; +pub const PropertyTagThumbnailStripBytesCount: PROPID = 0x502C; +pub const PropertyTagThumbnailResolutionX: PROPID = 0x502D; +pub const PropertyTagThumbnailResolutionY: PROPID = 0x502E; +pub const PropertyTagThumbnailPlanarConfig: PROPID = 0x502F; +pub const PropertyTagThumbnailResolutionUnit: PROPID = 0x5030; +pub const PropertyTagThumbnailTransferFunction: PROPID = 0x5031; +pub const PropertyTagThumbnailSoftwareUsed: PROPID = 0x5032; +pub const PropertyTagThumbnailDateTime: PROPID = 0x5033; +pub const PropertyTagThumbnailArtist: PROPID = 0x5034; +pub const PropertyTagThumbnailWhitePoint: PROPID = 0x5035; +pub const PropertyTagThumbnailPrimaryChromaticities: PROPID = 0x5036; +pub const PropertyTagThumbnailYCbCrCoefficients: PROPID = 0x5037; +pub const PropertyTagThumbnailYCbCrSubsampling: PROPID = 0x5038; +pub const PropertyTagThumbnailYCbCrPositioning: PROPID = 0x5039; +pub const PropertyTagThumbnailRefBlackWhite: PROPID = 0x503A; +pub const PropertyTagThumbnailCopyRight: PROPID = 0x503B; +pub const PropertyTagLuminanceTable: PROPID = 0x5090; +pub const PropertyTagChrominanceTable: PROPID = 0x5091; +pub const PropertyTagFrameDelay: PROPID = 0x5100; +pub const PropertyTagLoopCount: PROPID = 0x5101; +pub const PropertyTagGlobalPalette: PROPID = 0x5102; +pub const PropertyTagIndexBackground: PROPID = 0x5103; +pub const PropertyTagIndexTransparent: PROPID = 0x5104; +pub const PropertyTagPixelUnit: PROPID = 0x5110; +pub const PropertyTagPixelPerUnitX: PROPID = 0x5111; +pub const PropertyTagPixelPerUnitY: PROPID = 0x5112; +pub const PropertyTagPaletteHistogram: PROPID = 0x5113; +pub const PropertyTagExifExposureTime: PROPID = 0x829A; +pub const PropertyTagExifFNumber: PROPID = 0x829D; +pub const PropertyTagExifExposureProg: PROPID = 0x8822; +pub const PropertyTagExifSpectralSense: PROPID = 0x8824; +pub const PropertyTagExifISOSpeed: PROPID = 0x8827; +pub const PropertyTagExifOECF: PROPID = 0x8828; +pub const PropertyTagExifVer: PROPID = 0x9000; +pub const PropertyTagExifDTOrig: PROPID = 0x9003; +pub const PropertyTagExifDTDigitized: PROPID = 0x9004; +pub const PropertyTagExifCompConfig: PROPID = 0x9101; +pub const PropertyTagExifCompBPP: PROPID = 0x9102; +pub const PropertyTagExifShutterSpeed: PROPID = 0x9201; +pub const PropertyTagExifAperture: PROPID = 0x9202; +pub const PropertyTagExifBrightness: PROPID = 0x9203; +pub const PropertyTagExifExposureBias: PROPID = 0x9204; +pub const PropertyTagExifMaxAperture: PROPID = 0x9205; +pub const PropertyTagExifSubjectDist: PROPID = 0x9206; +pub const PropertyTagExifMeteringMode: PROPID = 0x9207; +pub const PropertyTagExifLightSource: PROPID = 0x9208; +pub const PropertyTagExifFlash: PROPID = 0x9209; +pub const PropertyTagExifFocalLength: PROPID = 0x920A; +pub const PropertyTagExifSubjectArea: PROPID = 0x9214; +pub const PropertyTagExifMakerNote: PROPID = 0x927C; +pub const PropertyTagExifUserComment: PROPID = 0x9286; +pub const PropertyTagExifDTSubsec: PROPID = 0x9290; +pub const PropertyTagExifDTOrigSS: PROPID = 0x9291; +pub const PropertyTagExifDTDigSS: PROPID = 0x9292; +pub const PropertyTagExifFPXVer: PROPID = 0xA000; +pub const PropertyTagExifColorSpace: PROPID = 0xA001; +pub const PropertyTagExifPixXDim: PROPID = 0xA002; +pub const PropertyTagExifPixYDim: PROPID = 0xA003; +pub const PropertyTagExifRelatedWav: PROPID = 0xA004; +pub const PropertyTagExifInterop: PROPID = 0xA005; +pub const PropertyTagExifFlashEnergy: PROPID = 0xA20B; +pub const PropertyTagExifSpatialFR: PROPID = 0xA20C; +pub const PropertyTagExifFocalXRes: PROPID = 0xA20E; +pub const PropertyTagExifFocalYRes: PROPID = 0xA20F; +pub const PropertyTagExifFocalResUnit: PROPID = 0xA210; +pub const PropertyTagExifSubjectLoc: PROPID = 0xA214; +pub const PropertyTagExifExposureIndex: PROPID = 0xA215; +pub const PropertyTagExifSensingMethod: PROPID = 0xA217; +pub const PropertyTagExifFileSource: PROPID = 0xA300; +pub const PropertyTagExifSceneType: PROPID = 0xA301; +pub const PropertyTagExifCfaPattern: PROPID = 0xA302; +pub const PropertyTagExifCustomRendered: PROPID = 0xA401; +pub const PropertyTagExifExposureMode: PROPID = 0xA402; +pub const PropertyTagExifWhiteBalance: PROPID = 0xA403; +pub const PropertyTagExifDigitalZoomRatio: PROPID = 0xA404; +pub const PropertyTagExifFocalLengthIn35mmFilm: PROPID = 0xA405; +pub const PropertyTagExifSceneCaptureType: PROPID = 0xA406; +pub const PropertyTagExifGainControl: PROPID = 0xA407; +pub const PropertyTagExifContrast: PROPID = 0xA408; +pub const PropertyTagExifSaturation: PROPID = 0xA409; +pub const PropertyTagExifSharpness: PROPID = 0xA40A; +pub const PropertyTagExifDeviceSettingDesc: PROPID = 0xA40B; +pub const PropertyTagExifSubjectDistanceRange: PROPID = 0xA40C; +pub const PropertyTagExifUniqueImageID: PROPID = 0xA420; +pub const PropertyTagGpsVer: PROPID = 0x0000; +pub const PropertyTagGpsLatitudeRef: PROPID = 0x0001; +pub const PropertyTagGpsLatitude: PROPID = 0x0002; +pub const PropertyTagGpsLongitudeRef: PROPID = 0x0003; +pub const PropertyTagGpsLongitude: PROPID = 0x0004; +pub const PropertyTagGpsAltitudeRef: PROPID = 0x0005; +pub const PropertyTagGpsAltitude: PROPID = 0x0006; +pub const PropertyTagGpsGpsTime: PROPID = 0x0007; +pub const PropertyTagGpsGpsSatellites: PROPID = 0x0008; +pub const PropertyTagGpsGpsStatus: PROPID = 0x0009; +pub const PropertyTagGpsGpsMeasureMode: PROPID = 0x00A; +pub const PropertyTagGpsGpsDop: PROPID = 0x000B; +pub const PropertyTagGpsSpeedRef: PROPID = 0x000C; +pub const PropertyTagGpsSpeed: PROPID = 0x000D; +pub const PropertyTagGpsTrackRef: PROPID = 0x000E; +pub const PropertyTagGpsTrack: PROPID = 0x000F; +pub const PropertyTagGpsImgDirRef: PROPID = 0x0010; +pub const PropertyTagGpsImgDir: PROPID = 0x0011; +pub const PropertyTagGpsMapDatum: PROPID = 0x0012; +pub const PropertyTagGpsDestLatRef: PROPID = 0x0013; +pub const PropertyTagGpsDestLat: PROPID = 0x0014; +pub const PropertyTagGpsDestLongRef: PROPID = 0x0015; +pub const PropertyTagGpsDestLong: PROPID = 0x0016; +pub const PropertyTagGpsDestBearRef: PROPID = 0x0017; +pub const PropertyTagGpsDestBear: PROPID = 0x0018; +pub const PropertyTagGpsDestDistRef: PROPID = 0x0019; +pub const PropertyTagGpsDestDist: PROPID = 0x001A; +pub const PropertyTagGpsProcessingMethod: PROPID = 0x001B; +pub const PropertyTagGpsAreaInformation: PROPID = 0x001C; +pub const PropertyTagGpsDate: PROPID = 0x001D; +pub const PropertyTagGpsDifferential: PROPID = 0x001E; diff --git a/src/um/gdiplusinit.rs b/src/um/gdiplusinit.rs new file mode 100644 index 000000000..154c615c7 --- /dev/null +++ b/src/um/gdiplusinit.rs @@ -0,0 +1,93 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use _core::ops; +use shared::basetsd::{UINT32, ULONG_PTR}; +use shared::minwindef::{BOOL, INT}; +use um::gdiplustypes::Status; +use um::winnt::CHAR; +ENUM!{enum DebugEventLevel { + DebugEventLevelFatal, + DebugEventLevelWarning, +}} +FN!{stdcall DebugEventProc( + level: DebugEventLevel, + message: *mut CHAR, +) -> ()} +FN!{stdcall NotificationHookProc( + token: *mut ULONG_PTR, +) -> Status} +FN!{stdcall NotificationUnhookProc( + token: ULONG_PTR, +) -> ()} +STRUCT!{struct GdiplusStartupInput { + GdiplusVersion: UINT32, + DebugEventCallback: DebugEventProc, + SuppressBackgroundThread: BOOL, + SuppressExternalCodecs: BOOL, +}} +impl GdiplusStartupInput { + pub fn new( + debugEventCallback: DebugEventProc, + suppressBackgroundThread: BOOL, + suppressExternalCodecs: BOOL, + ) -> Self { + GdiplusStartupInput { + GdiplusVersion: 1, + DebugEventCallback: debugEventCallback, + SuppressBackgroundThread: suppressBackgroundThread, + SuppressExternalCodecs: suppressExternalCodecs, + } + } +} +STRUCT!{struct GdiplusStartupInputEx { + parent: GdiplusStartupInput, + StartupParameters: INT, +}} +impl GdiplusStartupInputEx { + pub fn new( + startupParameters: INT, + debugEventCallback: DebugEventProc, + suppressBackgroundThread: BOOL, + suppressExternalCodecs: BOOL, + ) -> Self { + GdiplusStartupInputEx { + parent: GdiplusStartupInput { + GdiplusVersion: 2, + DebugEventCallback: debugEventCallback, + SuppressBackgroundThread: suppressBackgroundThread, + SuppressExternalCodecs: suppressExternalCodecs, + }, + StartupParameters: startupParameters, + } + } +} +impl ops::Deref for GdiplusStartupInputEx { + type Target = GdiplusStartupInput; + fn deref(&self) -> &Self::Target { + &self.parent + } +} +ENUM!{enum GdiplusStartupParams { + GdiplusStartupDefault = 0, + GdiplusStartupNoSetRound = 1, + GdiplusStartupSetPSValue = 2, + GdiplusStartupTransparencyMask = 0xFF000000, +}} +STRUCT!{struct GdiplusStartupOutput { + NotificationHook: NotificationHookProc, + NotificationUnhook: NotificationUnhookProc, +}} +extern "system" { + pub fn GdiplusStartup( + token: *mut ULONG_PTR, + input: *const GdiplusStartupInput, + output: *mut GdiplusStartupOutput, + ) -> Status; + pub fn GdiplusShutdown( + token: ULONG_PTR, + ); +} diff --git a/src/um/gdiplusmem.rs b/src/um/gdiplusmem.rs new file mode 100644 index 000000000..df3709ba7 --- /dev/null +++ b/src/um/gdiplusmem.rs @@ -0,0 +1,11 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use ctypes::c_void; +extern "system" { + pub fn GdipAlloc(size: usize) -> *mut c_void; + pub fn GdipFree(ptr: *mut c_void); +} diff --git a/src/um/gdiplusmetaheader.rs b/src/um/gdiplusmetaheader.rs new file mode 100644 index 000000000..b93f96d2f --- /dev/null +++ b/src/um/gdiplusmetaheader.rs @@ -0,0 +1,135 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use shared::basetsd::{INT16, UINT32}; +use shared::minwindef::{DWORD, INT, UINT, WORD}; +use shared::windef::{RECTL, SIZEL}; +use um::gdiplusenums::{ + MetafileType, MetafileTypeEmf, MetafileTypeEmfPlusDual, MetafileTypeEmfPlusOnly, + MetafileTypeWmf, MetafileTypeWmfPlaceable +}; +use um::gdiplustypes::{REAL, Rect}; +use um::wingdi::METAHEADER; +STRUCT!{struct ENHMETAHEADER3 { + iType: DWORD, + nSize: DWORD, + rclBounds: RECTL, + rclFrame: RECTL, + dSignature: DWORD, + nVersion: DWORD, + nBytes: DWORD, + nRecords: DWORD, + nHandles: WORD, + sReserved: WORD, + nDescription: DWORD, + offDescription: DWORD, + nPalEntries: DWORD, + szlDevice: SIZEL, + szlMillimeters: SIZEL, +}} +STRUCT!{struct PWMFRect16 { + Left: INT16, + Top: INT16, + Right: INT16, + Bottom: INT16, +}} +// #[align(2)] +STRUCT!{struct WmfPlaceableFileHeader { + Key: UINT32, + Hmf: INT16, + BoundingBox: PWMFRect16, + Inch: INT16, + Reserved: UINT32, + Checksum: INT16, +}} +pub const GDIP_EMFPLUSFLAGS_DISPLAY: DWORD = 0x00000001; +UNION!{union MetafileHeader_u { + [u32; 22], + WmfHeader WmfHeader_mut: METAHEADER, + EmfHeader EmfHeader_mut: ENHMETAHEADER3, +}} +STRUCT!{struct MetafileHeader { + Type: MetafileType, + Size: UINT, + Version: UINT, + EmfPlusFlags: UINT, + DpiX: REAL, + DpiY: REAL, + X: INT, + Y: INT, + Width: INT, + Height: INT, + u: MetafileHeader_u, + EmfPlusHeaderSize: INT, + LogicalDpiX: INT, + LogicalDpiY: INT, +}} +impl MetafileHeader { + pub fn GetType(&self) -> MetafileType { + self.Type + } + pub fn GetMetafileSize(&self) -> UINT { + self.Size + } + pub fn GetVersion(&self) -> UINT { + self.Version + } + pub fn GetEmfPlusFlags(&self) -> UINT { + self.EmfPlusFlags + } + pub fn GetDpiX(&self) -> REAL { + self.DpiX + } + pub fn GetDpiY(&self) -> REAL { + self.DpiY + } + pub fn GetBounds(&self) -> Rect { + Rect { + X: self.X, + Y: self.Y, + Width: self.Width, + Height: self.Height, + } + } + pub fn IsWmf(&self) -> bool { + self.Type == MetafileTypeWmf || self.Type == MetafileTypeWmfPlaceable + } + pub fn IsWmfPlaceable(&self) -> bool { + self.Type == MetafileTypeWmfPlaceable + } + pub fn IsEmf(&self) -> bool { + self.Type == MetafileTypeEmf + } + pub fn IsEmfOrEmfPlus(&self) -> bool { + self.Type >= MetafileTypeEmf + } + pub fn IsEmfPlus(&self) -> bool { + self.Type >= MetafileTypeEmfPlusOnly + } + pub fn IsEmfPlusDual(&self) -> bool { + self.Type == MetafileTypeEmfPlusDual + } + pub fn IsEmfPlusOnly(&self) -> bool { + self.Type == MetafileTypeEmfPlusOnly + } + pub fn IsDisplay(&self) -> bool { + self.IsEmfPlus() && (self.EmfPlusFlags & GDIP_EMFPLUSFLAGS_DISPLAY) != 0 + } + pub fn GetWmfHeader(&self) -> Option<&METAHEADER> { + if self.IsWmf() { + Some(unsafe { self.u.WmfHeader() }) + } else { + None + } + } + pub fn GetEmfHeader(&self) -> Option<&ENHMETAHEADER3> { + if self.IsEmfOrEmfPlus() { + Some(unsafe { self.u.EmfHeader() }) + } else { + None + } + } +} diff --git a/src/um/gdipluspixelformats.rs b/src/um/gdipluspixelformats.rs new file mode 100644 index 000000000..3a850630c --- /dev/null +++ b/src/um/gdipluspixelformats.rs @@ -0,0 +1,104 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use shared::minwindef::{DWORD, INT, UINT}; +use um::winnt::DWORDLONG; +pub type ARGB = DWORD; +pub type ARGB64 = DWORDLONG; +pub const ALPHA_SHIFT: DWORD = 24; +pub const RED_SHIFT: DWORD = 16; +pub const GREEN_SHIFT: DWORD = 8; +pub const BLUE_SHIFT: DWORD = 0; +pub const ALPHA_MASK: ARGB = 0xff << ALPHA_SHIFT; +pub type PixelFormat = INT; +pub const PixelFormatIndexed: PixelFormat = 0x00010000; +pub const PixelFormatGDI: PixelFormat = 0x00020000; +pub const PixelFormatAlpha: PixelFormat = 0x00040000; +pub const PixelFormatPAlpha: PixelFormat = 0x00080000; +pub const PixelFormatExtended: PixelFormat = 0x00100000; +pub const PixelFormatCanonical: PixelFormat = 0x00200000; +pub const PixelFormatUndefined: PixelFormat = 0; +pub const PixelFormatDontCare: PixelFormat = 0; +pub const PixelFormat1bppIndexed: PixelFormat = + 1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI; +pub const PixelFormat4bppIndexed: PixelFormat = + 2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI; +pub const PixelFormat8bppIndexed: PixelFormat = + 3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI; +pub const PixelFormat16bppGrayScale: PixelFormat = 4 | (16 << 8) | PixelFormatExtended; +pub const PixelFormat16bppRGB555: PixelFormat = 5 | (16 << 8) | PixelFormatGDI; +pub const PixelFormat16bppRGB565: PixelFormat = 6 | (16 << 8) | PixelFormatGDI; +pub const PixelFormat16bppARGB1555: PixelFormat = + 7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI; +pub const PixelFormat24bppRGB: PixelFormat = 8 | (24 << 8) | PixelFormatGDI; +pub const PixelFormat32bppRGB: PixelFormat = 9 | (32 << 8) | PixelFormatGDI; +pub const PixelFormat32bppARGB: PixelFormat = + 10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical; +pub const PixelFormat32bppPARGB: PixelFormat = + 11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI; +pub const PixelFormat48bppRGB: PixelFormat = + 12 | (48 << 8) | PixelFormatExtended; +pub const PixelFormat64bppARGB: PixelFormat = + 13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended; +pub const PixelFormat64bppPARGB: PixelFormat = + 14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended; +pub const PixelFormat32bppCMYK: PixelFormat = 15 | (32 << 8); +pub const PixelFormatMax: PixelFormat = 16; +#[inline] +pub fn GetPixelFormatSize(pixfmt: PixelFormat) -> UINT { + (pixfmt as UINT >> 8) & 0xff +} +#[inline] +pub fn IsIndexedPixelFormat(pixfmt: PixelFormat) -> bool { + (pixfmt & PixelFormatIndexed) != 0 +} +#[inline] +pub fn IsAlphaPixelFormat(pixfmt: PixelFormat) -> bool { + (pixfmt & PixelFormatAlpha) != 0 +} +#[inline] +pub fn IsExtendedPixelFormat(pixfmt: PixelFormat) -> bool { + (pixfmt & PixelFormatExtended) != 0 +} +#[inline] +pub fn IsCanonicalPixelFormat(pixfmt: PixelFormat) -> bool { + (pixfmt & PixelFormatCanonical) != 0 +} +ENUM!{enum PaletteType { + PaletteTypeCustom = 0, + PaletteTypeOptimal = 1, + PaletteTypeFixedBW = 2, + PaletteTypeFixedHalftone8 = 3, + PaletteTypeFixedHalftone27 = 4, + PaletteTypeFixedHalftone64 = 5, + PaletteTypeFixedHalftone125 = 6, + PaletteTypeFixedHalftone216 = 7, + PaletteTypeFixedHalftone252 = 8, + PaletteTypeFixedHalftone256 = 9, +}} +ENUM!{enum DitherType { + DitherTypeNone = 0, + DitherTypeSolid = 1, + DitherTypeOrdered4x4 = 2, + DitherTypeOrdered8x8 = 3, + DitherTypeOrdered16x16 = 4, + DitherTypeSpiral4x4 = 5, + DitherTypeSpiral8x8 = 6, + DitherTypeDualSpiral4x4 = 7, + DitherTypeDualSpiral8x8 = 8, + DitherTypeErrorDiffusion = 9, + DitherTypeMax = 10, +}} +ENUM!{enum PaletteFlags { + PaletteFlagsHasAlpha = 0x0001, + PaletteFlagsGrayScale = 0x0002, + PaletteFlagsHalftone = 0x0004, +}} +STRUCT!{struct ColorPalette { + Flags: UINT, + Count: UINT, + Entries: [ARGB; 1], +}} diff --git a/src/um/gdiplustypes.rs b/src/um/gdiplustypes.rs new file mode 100644 index 000000000..ddd189df8 --- /dev/null +++ b/src/um/gdiplustypes.rs @@ -0,0 +1,530 @@ +// Copyright © 2018 winapi-rs developers +// Licensed under the Apache License, Version 2.0 +// or the MIT license +// , at your option. +// All files in the project carrying such notice may not be copied, modified, or distributed +// except according to those terms. +use _core::{cmp, f32, ops}; +use ctypes::c_float; +use shared::minwindef::{BOOL, BYTE, INT, UINT}; +use um::gdiplusenums::EmfPlusRecordType; +use um::winnt::VOID; +fn min(x: f32, y: f32) -> f32 { + if y < x { y } else { x } +} +fn max(x: f32, y: f32) -> f32 { + if x < y { y } else { x } +} +FN!{stdcall ImageAbort( + *mut VOID, +) -> BOOL} +pub type DrawImageAbort = ImageAbort; +pub type GetThumbnailImageAbort = ImageAbort; +FN!{stdcall EnumerateMetafileProc( + EmfPlusRecordType, + UINT, + UINT, + *const BYTE, + *mut VOID, +) -> BOOL} +// struct __declspec(novtable) GdiplusAbort +// { +// virtual HRESULT __stdcall Abort(void) = 0; +// }; +pub type REAL = c_float; +pub const REAL_MAX: REAL = f32::MAX; +pub const REAL_MIN: REAL = f32::MIN_POSITIVE; +pub const REAL_TOLERANCE: REAL = f32::MIN_POSITIVE * 100.0; +pub const REAL_EPSILON: REAL = 1.192092896e-07f32; +ENUM!{enum Status { + Ok = 0, + GenericError = 1, + InvalidParameter = 2, + OutOfMemory = 3, + ObjectBusy = 4, + InsufficientBuffer = 5, + NotImplemented = 6, + Win32Error = 7, + WrongState = 8, + Aborted = 9, + FileNotFound = 10, + ValueOverflow = 11, + AccessDenied = 12, + UnknownImageFormat = 13, + FontFamilyNotFound = 14, + FontStyleNotFound = 15, + NotTrueTypeFont = 16, + UnsupportedGdiplusVersion = 17, + GdiplusNotInitialized = 18, + PropertyNotFound = 19, + PropertyNotSupported = 20, + ProfileNotFound = 21, +}} +STRUCT!{#[derive(PartialEq)] struct SizeF { + Width: REAL, + Height: REAL, +}} +impl SizeF { + pub fn new(width: REAL, height: REAL) -> Self { + SizeF { + Width: width, + Height: height, + } + } + pub fn Equals(&self, other: &SizeF) -> bool { + self == other + } + pub fn Empty(&self) -> bool { + self.Width == 0.0 && self.Height == 0.0 + } +} +impl ops::Add for SizeF { + type Output = Self; + fn add(self, rhs: Self) -> Self::Output { + SizeF { + Width: self.Width + rhs.Width, + Height: self.Height + rhs.Height, + } + } +} +impl<'a> ops::Add<&'a SizeF> for SizeF { + type Output = Self; + fn add(self, rhs: &'a SizeF) -> Self::Output { + self + *rhs + } +} +impl<'a, 'b> ops::Add<&'a SizeF> for &'b SizeF { + type Output = SizeF; + fn add(self, rhs: &'a SizeF) -> Self::Output { + *self + *rhs + } +} +impl<'a> ops::Add for &'a SizeF { + type Output = SizeF; + fn add(self, rhs: SizeF) -> Self::Output { + *self + rhs + } +} +impl ops::Sub for SizeF { + type Output = Self; + fn sub(self, rhs: Self) -> Self::Output { + SizeF { + Width: self.Width - rhs.Width, + Height: self.Height - rhs.Height, + } + } +} +impl<'a> ops::Sub<&'a SizeF> for SizeF { + type Output = Self; + fn sub(self, rhs: &'a SizeF) -> Self::Output { + self - *rhs + } +} +impl<'a, 'b> ops::Sub<&'a SizeF> for &'b SizeF { + type Output = SizeF; + fn sub(self, rhs: &'a SizeF) -> Self::Output { + *self - *rhs + } +} +impl<'a> ops::Sub for &'a SizeF { + type Output = SizeF; + fn sub(self, rhs: SizeF) -> Self::Output { + *self - rhs + } +} +STRUCT!{#[derive(PartialEq, Eq)] struct Size { + Width: INT, + Height: INT, +}} +impl Size { + pub fn new(width: INT, height: INT) -> Self { + Size { + Width: width, + Height: height, + } + } + pub fn Equals(&self, other: &Size) -> bool { + self == other + } + pub fn Empty(&self) -> bool { + self.Width == 0 && self.Height == 0 + } +} +impl ops::Add for Size { + type Output = Self; + fn add(self, rhs: Self) -> Self::Output { + Size { + Width: self.Width + rhs.Width, + Height: self.Height + rhs.Height, + } + } +} +impl<'a> ops::Add<&'a Size> for Size { + type Output = Self; + fn add(self, rhs: &'a Size) -> Self::Output { + self + *rhs + } +} +impl<'a, 'b> ops::Add<&'a Size> for &'b Size { + type Output = Size; + fn add(self, rhs: &'a Size) -> Self::Output { + *self + *rhs + } +} +impl<'a> ops::Add for &'a Size { + type Output = Size; + fn add(self, rhs: Size) -> Self::Output { + *self + rhs + } +} +impl ops::Sub for Size { + type Output = Self; + fn sub(self, rhs: Self) -> Self::Output { + Size { + Width: self.Width - rhs.Width, + Height: self.Height - rhs.Height, + } + } +} +impl<'a> ops::Sub<&'a Size> for Size { + type Output = Self; + fn sub(self, rhs: &'a Size) -> Self::Output { + self - *rhs + } +} +impl<'a, 'b> ops::Sub<&'a Size> for &'b Size { + type Output = Size; + fn sub(self, rhs: &'a Size) -> Self::Output { + *self - *rhs + } +} +impl<'a> ops::Sub for &'a Size { + type Output = Size; + fn sub(self, rhs: Size) -> Self::Output { + *self - rhs + } +} +STRUCT!{#[derive(PartialEq)] struct PointF { + X: REAL, + Y: REAL, +}} +impl PointF { + pub fn new(x: REAL, y: REAL) -> Self { + PointF { + X: x, + Y: y, + } + } + pub fn Equals(&self, other: &PointF) -> bool { + self == other + } +} +impl ops::Add for PointF { + type Output = Self; + fn add(self, rhs: Self) -> Self::Output { + PointF { + X: self.X + rhs.X, + Y: self.Y + rhs.Y, + } + } +} +impl<'a> ops::Add<&'a PointF> for PointF { + type Output = Self; + fn add(self, rhs: &'a PointF) -> Self::Output { + self + *rhs + } +} +impl<'a, 'b> ops::Add<&'a PointF> for &'b PointF { + type Output = PointF; + fn add(self, rhs: &'a PointF) -> Self::Output { + *self + *rhs + } +} +impl<'a> ops::Add for &'a PointF { + type Output = PointF; + fn add(self, rhs: PointF) -> Self::Output { + *self + rhs + } +} +impl ops::Sub for PointF { + type Output = Self; + fn sub(self, rhs: Self) -> Self::Output { + PointF { + X: self.X - rhs.X, + Y: self.Y - rhs.Y, + } + } +} +impl<'a> ops::Sub<&'a PointF> for PointF { + type Output = Self; + fn sub(self, rhs: &'a PointF) -> Self::Output { + self - *rhs + } +} +impl<'a, 'b> ops::Sub<&'a PointF> for &'b PointF { + type Output = PointF; + fn sub(self, rhs: &'a PointF) -> Self::Output { + *self - *rhs + } +} +impl<'a> ops::Sub for &'a PointF { + type Output = PointF; + fn sub(self, rhs: PointF) -> Self::Output { + *self - rhs + } +} +STRUCT!{#[derive(PartialEq, Eq)] struct Point { + X: INT, + Y: INT, +}} +impl Point { + pub fn new(x: INT, y: INT) -> Self { + Point { + X: x, + Y: y, + } + } + pub fn Equals(&self, other: &Point) -> bool { + self == other + } +} +impl ops::Add for Point { + type Output = Self; + fn add(self, rhs: Self) -> Self::Output { + Point { + X: self.X + rhs.X, + Y: self.Y + rhs.Y, + } + } +} +impl<'a> ops::Add<&'a Point> for Point { + type Output = Self; + fn add(self, rhs: &'a Point) -> Self::Output { + self + *rhs + } +} +impl<'a, 'b> ops::Add<&'a Point> for &'b Point { + type Output = Point; + fn add(self, rhs: &'a Point) -> Self::Output { + *self + *rhs + } +} +impl<'a> ops::Add for &'a Point { + type Output = Point; + fn add(self, rhs: Point) -> Self::Output { + *self + rhs + } +} +impl ops::Sub for Point { + type Output = Self; + fn sub(self, rhs: Self) -> Self::Output { + Point { + X: self.X - rhs.X, + Y: self.Y - rhs.Y, + } + } +} +impl<'a> ops::Sub<&'a Point> for Point { + type Output = Self; + fn sub(self, rhs: &'a Point) -> Self::Output { + self - *rhs + } +} +impl<'a, 'b> ops::Sub<&'a Point> for &'b Point { + type Output = Point; + fn sub(self, rhs: &'a Point) -> Self::Output { + *self - *rhs + } +} +impl<'a> ops::Sub for &'a Point { + type Output = Point; + fn sub(self, rhs: Point) -> Self::Output { + *self - rhs + } +} +STRUCT!{#[derive(PartialEq)] struct RectF { + X: REAL, + Y: REAL, + Width: REAL, + Height: REAL, +}} +impl RectF { + pub fn new(location: PointF, size: SizeF) -> Self { + RectF { + X: location.X, + Y: location.Y, + Width: size.Width, + Height: size.Height, + } + } + pub fn GetLocation(&self) -> PointF { + PointF { + X: self.X, + Y: self.Y, + } + } + pub fn GetSize(&self) -> SizeF { + SizeF { + Width: self.Width, + Height: self.Height, + } + } + pub fn GetLeft(&self) -> REAL { + self.X + } + pub fn GetTop(&self) -> REAL { + self.Y + } + pub fn GetRight(&self) -> REAL { + self.X + self.Width + } + pub fn GetBottom(&self) -> REAL { + self.Y + self.Height + } + pub fn IsEmptyArea(&self) -> bool { + self.Width <= REAL_EPSILON || self.Height <= REAL_EPSILON + } + pub fn Equals(&self, other: &Self) -> bool { + self == other + } + pub fn Contains(&self, p: PointF) -> bool { + p.X >= self.GetLeft() && p.X < self.GetRight() && + p.Y >= self.GetTop() && p.Y < self.GetBottom() + } + pub fn Inflate(&mut self, x: REAL, y: REAL) { + self.X -= x; + self.Y -= y; + self.Width += x * 2.0; + self.Height += y * 2.0; + } + pub fn Intersect(&mut self, other: &Self) -> bool { + let r = min(self.GetRight(), other.GetRight()); + let b = min(self.GetBottom(), other.GetBottom()); + let l = min(self.GetLeft(), other.GetLeft()); + let t = min(self.GetTop(), other.GetTop()); + self.X = l; + self.Y = t; + self.Width = r - l; + self.Height = b - t; + !self.IsEmptyArea() + } + pub fn IntersectsWith(&self, other: &Self) -> bool { + self.GetLeft() < other.GetRight() && + self.GetTop() < other.GetBottom() && + self.GetRight() > other.GetLeft() && + self.GetBottom() > other.GetTop() + } + pub fn Union(&mut self, other: &Self) -> bool { + let r = max(self.GetRight(), other.GetRight()); + let b = max(self.GetBottom(), other.GetBottom()); + let l = min(self.GetLeft(), other.GetLeft()); + let t = min(self.GetTop(), other.GetTop()); + self.X = l; + self.Y = t; + self.Width = r - l; + self.Height = b - t; + !self.IsEmptyArea() + } + pub fn Offset(&mut self, x: REAL, y: REAL) { + self.X += x; + self.Y += y; + } +} +STRUCT!{#[derive(PartialEq, Eq)] struct Rect { + X: INT, + Y: INT, + Width: INT, + Height: INT, +}} +impl Rect { + pub fn new(location: Point, size: Size) -> Self { + Rect { + X: location.X, + Y: location.Y, + Width: size.Width, + Height: size.Height, + } + } + pub fn GetLocation(&self) -> Point { + Point { + X: self.X, + Y: self.Y, + } + } + pub fn GetSize(&self) -> Size { + Size { + Width: self.Width, + Height: self.Height, + } + } + pub fn GetLeft(&self) -> INT { + self.X + } + pub fn GetTop(&self) -> INT { + self.Y + } + pub fn GetRight(&self) -> INT { + self.X + self.Width + } + pub fn GetBottom(&self) -> INT { + self.Y + self.Height + } + pub fn IsEmptyArea(&self) -> bool { + self.Width <= 0 || self.Height <= 0 + } + pub fn Equals(&self, other: &Self) -> bool { + self == other + } + pub fn Contains(&self, p: Point) -> bool { + p.X >= self.GetLeft() && p.X < self.GetRight() && + p.Y >= self.GetTop() && p.Y < self.GetBottom() + } + pub fn Inflate(&mut self, x: INT, y: INT) { + self.X -= x; + self.Y -= y; + self.Width += x * 2; + self.Height += y * 2; + } + pub fn Intersect(&mut self, other: &Self) -> bool { + let r = cmp::min(self.GetRight(), other.GetRight()); + let b = cmp::min(self.GetBottom(), other.GetBottom()); + let l = cmp::min(self.GetLeft(), other.GetLeft()); + let t = cmp::min(self.GetTop(), other.GetTop()); + self.X = l; + self.Y = t; + self.Width = r - l; + self.Height = b - t; + !self.IsEmptyArea() + } + pub fn IntersectsWith(&self, other: &Self) -> bool { + self.GetLeft() < other.GetRight() && + self.GetTop() < other.GetBottom() && + self.GetRight() > other.GetLeft() && + self.GetBottom() > other.GetTop() + } + pub fn Union(&mut self, other: &Self) -> bool { + let r = cmp::max(self.GetRight(), other.GetRight()); + let b = cmp::max(self.GetBottom(), other.GetBottom()); + let l = cmp::min(self.GetLeft(), other.GetLeft()); + let t = cmp::min(self.GetTop(), other.GetTop()); + self.X = l; + self.Y = t; + self.Width = r - l; + self.Height = b - t; + !self.IsEmptyArea() + } + pub fn Offset(&mut self, x: INT, y: INT) { + self.X += x; + self.Y += y; + } +} +#[repr(C)] +pub struct PathData { + pub Count: INT, + pub Points: *mut PointF, + pub Types: *mut BYTE, +} +STRUCT!{struct CharacterRange { + First: INT, + Length: INT, +}} diff --git a/src/um/mod.rs b/src/um/mod.rs index b7f0bca4e..bbed0679d 100644 --- a/src/um/mod.rs +++ b/src/um/mod.rs @@ -116,6 +116,18 @@ pub mod gl; #[cfg(feature = "fibersapi")] pub mod fibersapi; #[cfg(feature = "fileapi")] pub mod fileapi; #[cfg(feature = "functiondiscoverykeys_devpkey")] pub mod functiondiscoverykeys_devpkey; +#[cfg(feature = "gdipluscolor")] pub mod gdipluscolor; +#[cfg(feature = "gdipluscolormatrix")] pub mod gdipluscolormatrix; +#[cfg(feature = "gdipluseffects")] pub mod gdipluseffects; +#[cfg(feature = "gdiplusenums")] pub mod gdiplusenums; +#[cfg(feature = "gdiplusflat")] pub mod gdiplusflat; +#[cfg(feature = "gdiplusgpstubs")] pub mod gdiplusgpstubs; +#[cfg(feature = "gdiplusimaging")] pub mod gdiplusimaging; +#[cfg(feature = "gdiplusinit")] pub mod gdiplusinit; +#[cfg(feature = "gdiplusmem")] pub mod gdiplusmem; +#[cfg(feature = "gdiplusmetaheader")] pub mod gdiplusmetaheader; +#[cfg(feature = "gdipluspixelformats")] pub mod gdipluspixelformats; +#[cfg(feature = "gdiplustypes")] pub mod gdiplustypes; #[cfg(feature = "handleapi")] pub mod handleapi; #[cfg(feature = "heapapi")] pub mod heapapi; #[cfg(feature = "highlevelmonitorconfigurationapi")] pub mod highlevelmonitorconfigurationapi; diff --git a/tests/structs_x86.rs b/tests/structs_x86.rs index dd211bca0..0059857eb 100644 --- a/tests/structs_x86.rs +++ b/tests/structs_x86.rs @@ -4255,6 +4255,101 @@ fn um_fileapi() { assert_eq!(size_of::(), 24); assert_eq!(align_of::(), 8); } +#[cfg(feature = "gdipluscolormatrix")] #[test] +fn um_gdipluscolormatrix() { + use winapi::um::gdipluscolormatrix::*; + assert_eq!(size_of::(), 100); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdipluseffects")] #[test] +fn um_gdipluseffects() { + use winapi::um::gdipluseffects::*; + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 1024); + assert_eq!(align_of::(), 1); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdiplusimaging")] #[test] +fn um_gdiplusimaging() { + use winapi::um::gdiplusimaging::*; + assert_eq!(size_of::(), 76); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 24); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 28); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 32); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 28); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdiplusinit")] #[test] +fn um_gdiplusinit() { + use winapi::um::gdiplusinit::*; + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 20); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdiplusmetaheader")] #[test] +fn um_gdiplusmetaheader() { + use winapi::um::gdiplusmetaheader::*; + assert_eq!(size_of::(), 88); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 2); + // packed = 2 + // assert_eq!(size_of::(), 22); + // assert_eq!(align_of::(), 2); + assert_eq!(size_of::(), 140); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdipluspixelformats")] #[test] +fn um_gdipluspixelformats() { + use winapi::um::gdipluspixelformats::*; + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdiplustypes")] #[test] +fn um_gdiplustypes() { + use winapi::um::gdiplustypes::*; + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); +} #[cfg(feature = "heapapi")] #[test] fn um_heapapi() { use winapi::um::heapapi::*; diff --git a/tests/structs_x86_64.rs b/tests/structs_x86_64.rs index f267b2855..bfa307a32 100644 --- a/tests/structs_x86_64.rs +++ b/tests/structs_x86_64.rs @@ -4270,6 +4270,101 @@ fn um_fileapi() { assert_eq!(size_of::(), 24); assert_eq!(align_of::(), 8); } +#[cfg(feature = "gdipluscolormatrix")] #[test] +fn um_gdipluscolormatrix() { + use winapi::um::gdipluscolormatrix::*; + assert_eq!(size_of::(), 100); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdipluseffects")] #[test] +fn um_gdipluseffects() { + use winapi::um::gdipluseffects::*; + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 1024); + assert_eq!(align_of::(), 1); + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdiplusimaging")] #[test] +fn um_gdiplusimaging() { + use winapi::um::gdiplusimaging::*; + assert_eq!(size_of::(), 104); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 32); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 32); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 40); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 40); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 24); + assert_eq!(align_of::(), 8); +} +#[cfg(feature = "gdiplusinit")] #[test] +fn um_gdiplusinit() { + use winapi::um::gdiplusinit::*; + assert_eq!(size_of::(), 24); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 32); + assert_eq!(align_of::(), 8); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 8); +} +#[cfg(feature = "gdiplusmetaheader")] #[test] +fn um_gdiplusmetaheader() { + use winapi::um::gdiplusmetaheader::*; + assert_eq!(size_of::(), 88); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 2); + // packed = 2 + // assert_eq!(size_of::(), 22); + // assert_eq!(align_of::(), 2); + assert_eq!(size_of::(), 140); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdipluspixelformats")] #[test] +fn um_gdipluspixelformats() { + use winapi::um::gdipluspixelformats::*; + assert_eq!(size_of::(), 12); + assert_eq!(align_of::(), 4); +} +#[cfg(feature = "gdiplustypes")] #[test] +fn um_gdiplustypes() { + use winapi::um::gdiplustypes::*; + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 16); + assert_eq!(align_of::(), 4); + assert_eq!(size_of::(), 8); + assert_eq!(align_of::(), 4); +} #[cfg(feature = "heapapi")] #[test] fn um_heapapi() { use winapi::um::heapapi::*;