Skip to content

Commit

Permalink
Merge branch 'main' into imapi
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding authored Feb 12, 2021
2 parents 6a08b77 + 4bb66be commit 9b67c61
Show file tree
Hide file tree
Showing 42 changed files with 1,758 additions and 1 deletion.
8 changes: 8 additions & 0 deletions TerraFX.Interop.Windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "imapi2fs", "imapi2fs", "{56
generation\um\imapi2fs\generate.rsp = generation\um\imapi2fs\generate.rsp
generation\um\imapi2fs\header.txt = generation\um\imapi2fs\header.txt
generation\um\imapi2fs\um-imapi2fs.h = generation\um\imapi2fs\um-imapi2fs.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xamlOM", "xamlOM", "{9337A17E-7551-48F3-B73D-AF8086062660}"
ProjectSection(SolutionItems) = preProject
generation\um\xamlOM\generate.rsp = generation\um\xamlOM\generate.rsp
generation\um\xamlOM\header.txt = generation\um\xamlOM\header.txt
generation\um\xamlOM\um-xamlOM.h = generation\um\xamlOM\um-xamlOM.h
EndProjectSection
EndProject
Global
Expand Down Expand Up @@ -2097,6 +2104,7 @@ Global
{BC069863-A717-4C9E-8D98-ACF9239E903A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{565AEC0D-94C9-46CB-8947-71E02C3C128D} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{56D9CA05-6CF6-458A-AB1D-C85FBC239634} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
{9337A17E-7551-48F3-B73D-AF8086062660} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461}
Expand Down
17 changes: 17 additions & 0 deletions generation/um/xamlOM/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@../../settings.rsp
@../../remap.rsp
--exclude
E_NOTFOUND
InitializeXamlDiagnostic
--file
um-xamlOM.h
--output
../../../sources/Interop/Windows/um/xamlOM
--test-output
../../../tests/Interop/Windows/um/xamlOM
--traverse
C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/xamlOM.h
--with-attribute
MetadataBit=Flags
--with-librarypath
*=Windows.UI.Xaml.dll
4 changes: 4 additions & 0 deletions generation/um/xamlOM/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
2 changes: 2 additions & 0 deletions generation/um/xamlOM/um-xamlOM.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <Windows.h>
#include <xamlOM.h>
2 changes: 1 addition & 1 deletion sources/Interop/Windows/other/dxcapi/Windows.Manual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static unsafe partial class Windows
public static readonly Guid CLSID_DxcCompilerArgs = new Guid(0x3e56ae82, 0x224d, 0x470f, 0xa1, 0xa1, 0xfe, 0x30, 0x16, 0xee, 0x9f, 0x9d);

[NativeTypeName("const GUID")]
public static readonly Guid CLSID_DxcUtils = CLSID_DxcLibrary;
public static readonly Guid CLSID_DxcUtils = new Guid(0x6245d6af, 0x66e0, 0x48fd, 0x80, 0xb4, 0x4d, 0x27, 0x17, 0x96, 0x74, 0x8c);

public static readonly Guid IID_IDxcResult = new Guid(0x58346CDA, 0xDDE7, 0x4497, 0x94, 0x61, 0x6F, 0x87, 0xAF, 0x5E, 0x06, 0x59);

Expand Down
26 changes: 26 additions & 0 deletions sources/Interop/Windows/um/xamlOM/BaseValueSource.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop
{
public enum BaseValueSource
{
BaseValueSourceUnknown = 0,
BaseValueSourceDefault = (BaseValueSourceUnknown + 1),
BaseValueSourceBuiltInStyle = (BaseValueSourceDefault + 1),
BaseValueSourceStyle = (BaseValueSourceBuiltInStyle + 1),
BaseValueSourceLocal = (BaseValueSourceStyle + 1),
Inherited = (BaseValueSourceLocal + 1),
DefaultStyleTrigger = (Inherited + 1),
TemplateTrigger = (DefaultStyleTrigger + 1),
StyleTrigger = (TemplateTrigger + 1),
ImplicitStyleReference = (StyleTrigger + 1),
ParentTemplate = (ImplicitStyleReference + 1),
ParentTemplateTrigger = (ParentTemplate + 1),
Animation = (ParentTemplateTrigger + 1),
Coercion = (Animation + 1),
BaseValueSourceVisualState = (Coercion + 1),
}
}
20 changes: 20 additions & 0 deletions sources/Interop/Windows/um/xamlOM/BitmapDescription.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop
{
public partial struct BitmapDescription
{
[NativeTypeName("unsigned int")]
public uint Width;

[NativeTypeName("unsigned int")]
public uint Height;

public DXGI_FORMAT Format;

public DXGI_ALPHA_MODE AlphaMode;
}
}
22 changes: 22 additions & 0 deletions sources/Interop/Windows/um/xamlOM/CollectionElementValue.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop
{
public unsafe partial struct CollectionElementValue
{
[NativeTypeName("unsigned int")]
public uint Index;

[NativeTypeName("BSTR")]
public ushort* ValueType;

[NativeTypeName("BSTR")]
public ushort* Value;

[NativeTypeName("long long")]
public long MetadataBits;
}
}
19 changes: 19 additions & 0 deletions sources/Interop/Windows/um/xamlOM/EnumType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop
{
public unsafe partial struct EnumType
{
[NativeTypeName("BSTR")]
public ushort* Name;

[NativeTypeName("SAFEARRAY *")]
public SAFEARRAY* ValueInts;

[NativeTypeName("SAFEARRAY *")]
public SAFEARRAY* ValueStrings;
}
}
67 changes: 67 additions & 0 deletions sources/Interop/Windows/um/xamlOM/IBitmapData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[Guid("D1A34EF2-CAD8-4635-A3D2-FCDA8D3F3CAF")]
[NativeTypeName("struct IBitmapData : IUnknown")]
public unsafe partial struct IBitmapData
{
public void** lpVtbl;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject)
{
return ((delegate* unmanaged<IBitmapData*, Guid*, void**, int>)(lpVtbl[0]))((IBitmapData*)Unsafe.AsPointer(ref this), riid, ppvObject);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged<IBitmapData*, uint>)(lpVtbl[1]))((IBitmapData*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged<IBitmapData*, uint>)(lpVtbl[2]))((IBitmapData*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int CopyBytesTo([NativeTypeName("unsigned int")] uint sourceOffsetInBytes, [NativeTypeName("unsigned int")] uint maxBytesToCopy, [NativeTypeName("byte *")] byte* pvBytes, [NativeTypeName("unsigned int *")] uint* numberOfBytesCopied)
{
return ((delegate* unmanaged<IBitmapData*, uint, uint, byte*, uint*, int>)(lpVtbl[3]))((IBitmapData*)Unsafe.AsPointer(ref this), sourceOffsetInBytes, maxBytesToCopy, pvBytes, numberOfBytesCopied);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetStride([NativeTypeName("unsigned int *")] uint* pStride)
{
return ((delegate* unmanaged<IBitmapData*, uint*, int>)(lpVtbl[4]))((IBitmapData*)Unsafe.AsPointer(ref this), pStride);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetBitmapDescription([NativeTypeName("BitmapDescription *")] BitmapDescription* pBitmapDescription)
{
return ((delegate* unmanaged<IBitmapData*, BitmapDescription*, int>)(lpVtbl[5]))((IBitmapData*)Unsafe.AsPointer(ref this), pBitmapDescription);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetSourceBitmapDescription([NativeTypeName("BitmapDescription *")] BitmapDescription* pBitmapDescription)
{
return ((delegate* unmanaged<IBitmapData*, BitmapDescription*, int>)(lpVtbl[6]))((IBitmapData*)Unsafe.AsPointer(ref this), pBitmapDescription);
}
}
}
123 changes: 123 additions & 0 deletions sources/Interop/Windows/um/xamlOM/IVisualTreeService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/xamlOM.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[Guid("A593B11A-D17F-48BB-8F66-83910731C8A5")]
[NativeTypeName("struct IVisualTreeService : IUnknown")]
public unsafe partial struct IVisualTreeService
{
public void** lpVtbl;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject)
{
return ((delegate* unmanaged<IVisualTreeService*, Guid*, void**, int>)(lpVtbl[0]))((IVisualTreeService*)Unsafe.AsPointer(ref this), riid, ppvObject);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged<IVisualTreeService*, uint>)(lpVtbl[1]))((IVisualTreeService*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged<IVisualTreeService*, uint>)(lpVtbl[2]))((IVisualTreeService*)Unsafe.AsPointer(ref this));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int AdviseVisualTreeChange([NativeTypeName("IVisualTreeServiceCallback *")] IVisualTreeServiceCallback* pCallback)
{
return ((delegate* unmanaged<IVisualTreeService*, IVisualTreeServiceCallback*, int>)(lpVtbl[3]))((IVisualTreeService*)Unsafe.AsPointer(ref this), pCallback);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int UnadviseVisualTreeChange([NativeTypeName("IVisualTreeServiceCallback *")] IVisualTreeServiceCallback* pCallback)
{
return ((delegate* unmanaged<IVisualTreeService*, IVisualTreeServiceCallback*, int>)(lpVtbl[4]))((IVisualTreeService*)Unsafe.AsPointer(ref this), pCallback);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetEnums([NativeTypeName("unsigned int *")] uint* pCount, [NativeTypeName("EnumType **")] EnumType** ppEnums)
{
return ((delegate* unmanaged<IVisualTreeService*, uint*, EnumType**, int>)(lpVtbl[5]))((IVisualTreeService*)Unsafe.AsPointer(ref this), pCount, ppEnums);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int CreateInstance([NativeTypeName("BSTR")] ushort* typeName, [NativeTypeName("BSTR")] ushort* value, [NativeTypeName("InstanceHandle *")] ulong* pInstanceHandle)
{
return ((delegate* unmanaged<IVisualTreeService*, ushort*, ushort*, ulong*, int>)(lpVtbl[6]))((IVisualTreeService*)Unsafe.AsPointer(ref this), typeName, value, pInstanceHandle);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetPropertyValuesChain([NativeTypeName("InstanceHandle")] ulong instanceHandle, [NativeTypeName("unsigned int *")] uint* pSourceCount, [NativeTypeName("PropertyChainSource **")] PropertyChainSource** ppPropertySources, [NativeTypeName("unsigned int *")] uint* pPropertyCount, [NativeTypeName("PropertyChainValue **")] PropertyChainValue** ppPropertyValues)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, uint*, PropertyChainSource**, uint*, PropertyChainValue**, int>)(lpVtbl[7]))((IVisualTreeService*)Unsafe.AsPointer(ref this), instanceHandle, pSourceCount, ppPropertySources, pPropertyCount, ppPropertyValues);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int SetProperty([NativeTypeName("InstanceHandle")] ulong instanceHandle, [NativeTypeName("InstanceHandle")] ulong value, [NativeTypeName("unsigned int")] uint propertyIndex)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, ulong, uint, int>)(lpVtbl[8]))((IVisualTreeService*)Unsafe.AsPointer(ref this), instanceHandle, value, propertyIndex);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int ClearProperty([NativeTypeName("InstanceHandle")] ulong instanceHandle, [NativeTypeName("unsigned int")] uint propertyIndex)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, uint, int>)(lpVtbl[9]))((IVisualTreeService*)Unsafe.AsPointer(ref this), instanceHandle, propertyIndex);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetCollectionCount([NativeTypeName("InstanceHandle")] ulong instanceHandle, [NativeTypeName("unsigned int *")] uint* pCollectionSize)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, uint*, int>)(lpVtbl[10]))((IVisualTreeService*)Unsafe.AsPointer(ref this), instanceHandle, pCollectionSize);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int GetCollectionElements([NativeTypeName("InstanceHandle")] ulong instanceHandle, [NativeTypeName("unsigned int")] uint startIndex, [NativeTypeName("unsigned int *")] uint* pElementCount, [NativeTypeName("CollectionElementValue **")] CollectionElementValue** ppElementValues)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, uint, uint*, CollectionElementValue**, int>)(lpVtbl[11]))((IVisualTreeService*)Unsafe.AsPointer(ref this), instanceHandle, startIndex, pElementCount, ppElementValues);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int AddChild([NativeTypeName("InstanceHandle")] ulong parent, [NativeTypeName("InstanceHandle")] ulong child, [NativeTypeName("unsigned int")] uint index)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, ulong, uint, int>)(lpVtbl[12]))((IVisualTreeService*)Unsafe.AsPointer(ref this), parent, child, index);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int RemoveChild([NativeTypeName("InstanceHandle")] ulong parent, [NativeTypeName("unsigned int")] uint index)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, uint, int>)(lpVtbl[13]))((IVisualTreeService*)Unsafe.AsPointer(ref this), parent, index);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NativeTypeName("HRESULT")]
public int ClearChildren([NativeTypeName("InstanceHandle")] ulong parent)
{
return ((delegate* unmanaged<IVisualTreeService*, ulong, int>)(lpVtbl[14]))((IVisualTreeService*)Unsafe.AsPointer(ref this), parent);
}
}
}
Loading

0 comments on commit 9b67c61

Please sign in to comment.