-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,758 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include <Windows.h> | ||
#include <xamlOM.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
22
sources/Interop/Windows/um/xamlOM/CollectionElementValue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
123
sources/Interop/Windows/um/xamlOM/IVisualTreeService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
Oops, something went wrong.