diff --git a/generator.json b/generator.json index 7257ad76a3..aa5cf6929b 100644 --- a/generator.json +++ b/generator.json @@ -1219,7 +1219,6 @@ "IOleControlSite", "IOleInPlaceObjectWindowless", "IDummyHICONIncluder", - "IMessageFilter", "tagVARIANT", "tagVARIANTUnion", "tagVARIANTUnionUnion", @@ -1470,7 +1469,8 @@ "HICON__": "IntPtr", "HFONT__": "IntPtr", "HRGN__": "IntPtr", - "HACCEL__": "IntPtr" + "HACCEL__": "IntPtr", + "HTASK__": "IntPtr" }, { "$include.dxTypemap": "build/dx_typemap.json", diff --git a/src/Core/Silk.NET.Core.Win32Extras/Structs/IMessageFilter.gen.cs b/src/Core/Silk.NET.Core.Win32Extras/Structs/IMessageFilter.gen.cs new file mode 100644 index 0000000000..f9ff8d5485 --- /dev/null +++ b/src/Core/Silk.NET.Core.Win32Extras/Structs/IMessageFilter.gen.cs @@ -0,0 +1,222 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + + +using System; +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; +using System.Text; +using Silk.NET.Core; +using Silk.NET.Core.Native; +using Silk.NET.Core.Attributes; +using Silk.NET.Core.Contexts; +using Silk.NET.Core.Loader; + +#pragma warning disable 1591 + +namespace Silk.NET.Core.Win32Extras +{ + [Guid("00000016-0000-0000-c000-000000000046")] + [NativeName("Name", "IMessageFilter")] + public unsafe partial struct IMessageFilter : IComVtbl, IComVtbl + { + public static readonly Guid Guid = new("00000016-0000-0000-c000-000000000046"); + + void*** IComVtbl.AsVtblPtr() + => (void***) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + + public static implicit operator Silk.NET.Core.Native.IUnknown(IMessageFilter val) + => Unsafe.As(ref val); + + public IMessageFilter + ( + void** lpVtbl = null + ) : this() + { + if (lpVtbl is not null) + { + LpVtbl = lpVtbl; + } + } + + + [NativeName("Type", "")] + [NativeName("Type.Name", "")] + [NativeName("Name", "lpVtbl")] + public void** LpVtbl; + /// To be documented. + public readonly unsafe int QueryInterface(Guid* riid, void** ppvObject) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + int ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riid, ppvObject); + return ret; + } + + /// To be documented. + public readonly unsafe int QueryInterface(Guid* riid, ref void* ppvObject) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + int ret = default; + fixed (void** ppvObjectPtr = &ppvObject) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riid, ppvObjectPtr); + } + return ret; + } + + /// To be documented. + public readonly unsafe int QueryInterface(ref Guid riid, void** ppvObject) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + int ret = default; + fixed (Guid* riidPtr = &riid) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riidPtr, ppvObject); + } + return ret; + } + + /// To be documented. + public readonly unsafe int QueryInterface(ref Guid riid, ref void* ppvObject) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + int ret = default; + fixed (Guid* riidPtr = &riid) + { + fixed (void** ppvObjectPtr = &ppvObject) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riidPtr, ppvObjectPtr); + } + } + return ret; + } + + /// To be documented. + public readonly uint AddRef() + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[1])(@this); + return ret; + } + + /// To be documented. + public readonly uint Release() + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[2])(@this); + return ret; + } + + /// To be documented. + public readonly unsafe uint HandleInComingCall(uint dwCallType, IntPtr* htaskCaller, uint dwTickCount, InterfaceInfo* lpInterfaceInfo) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCaller, dwTickCount, lpInterfaceInfo); + return ret; + } + + /// To be documented. + public readonly unsafe uint HandleInComingCall(uint dwCallType, IntPtr* htaskCaller, uint dwTickCount, ref InterfaceInfo lpInterfaceInfo) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + fixed (InterfaceInfo* lpInterfaceInfoPtr = &lpInterfaceInfo) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCaller, dwTickCount, lpInterfaceInfoPtr); + } + return ret; + } + + /// To be documented. + public readonly unsafe uint HandleInComingCall(uint dwCallType, ref IntPtr htaskCaller, uint dwTickCount, InterfaceInfo* lpInterfaceInfo) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + fixed (IntPtr* htaskCallerPtr = &htaskCaller) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCallerPtr, dwTickCount, lpInterfaceInfo); + } + return ret; + } + + /// To be documented. + public readonly uint HandleInComingCall(uint dwCallType, ref IntPtr htaskCaller, uint dwTickCount, ref InterfaceInfo lpInterfaceInfo) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + fixed (IntPtr* htaskCallerPtr = &htaskCaller) + { + fixed (InterfaceInfo* lpInterfaceInfoPtr = &lpInterfaceInfo) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCallerPtr, dwTickCount, lpInterfaceInfoPtr); + } + } + return ret; + } + + /// To be documented. + public readonly unsafe uint RetryRejectedCall(IntPtr* htaskCallee, uint dwTickCount, uint dwRejectType) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[4])(@this, htaskCallee, dwTickCount, dwRejectType); + return ret; + } + + /// To be documented. + public readonly uint RetryRejectedCall(ref IntPtr htaskCallee, uint dwTickCount, uint dwRejectType) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + fixed (IntPtr* htaskCalleePtr = &htaskCallee) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[4])(@this, htaskCalleePtr, dwTickCount, dwRejectType); + } + return ret; + } + + /// To be documented. + public readonly unsafe uint MessagePending(IntPtr* htaskCallee, uint dwTickCount, uint dwPendingType) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[5])(@this, htaskCallee, dwTickCount, dwPendingType); + return ret; + } + + /// To be documented. + public readonly uint MessagePending(ref IntPtr htaskCallee, uint dwTickCount, uint dwPendingType) + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + uint ret = default; + fixed (IntPtr* htaskCalleePtr = &htaskCallee) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[5])(@this, htaskCalleePtr, dwTickCount, dwPendingType); + } + return ret; + } + + /// To be documented. + public readonly int QueryInterface(out ComPtr ppvObject) where TI0 : unmanaged, IComVtbl + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + // ComPtrOverloader + ppvObject = default; + return @this->QueryInterface(SilkMarshal.GuidPtrOf(), (void**) ppvObject.GetAddressOf()); + } + + /// To be documented. + public readonly ComPtr QueryInterface() where TI0 : unmanaged, IComVtbl + { + var @this = (IMessageFilter*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + // NonKhrReturnTypeOverloader + SilkMarshal.ThrowHResult(@this->QueryInterface(out ComPtr silkRet)); + return silkRet; + } + + } +} diff --git a/src/Core/Silk.NET.Core.Win32Extras/Structs/MessageFilterVtblExtensions.gen.cs b/src/Core/Silk.NET.Core.Win32Extras/Structs/MessageFilterVtblExtensions.gen.cs new file mode 100644 index 0000000000..37d7024aa7 --- /dev/null +++ b/src/Core/Silk.NET.Core.Win32Extras/Structs/MessageFilterVtblExtensions.gen.cs @@ -0,0 +1,251 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + + +using System; +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; +using System.Text; +using Silk.NET.Core; +using Silk.NET.Core.Native; +using Silk.NET.Core.Attributes; +using Silk.NET.Core.Contexts; +using Silk.NET.Core.Loader; + +#pragma warning disable 1591 + +namespace Silk.NET.Core.Win32Extras; + +public unsafe static class MessageFilterVtblExtensions +{ + /// To be documented. + public static unsafe int QueryInterface(this ComPtr thisVtbl, Guid* riid, void** ppvObject) + { + var @this = thisVtbl.Handle; + int ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riid, ppvObject); + return ret; + } + + /// To be documented. + public static unsafe int QueryInterface(this ComPtr thisVtbl, Guid* riid, ref void* ppvObject) + { + var @this = thisVtbl.Handle; + int ret = default; + fixed (void** ppvObjectPtr = &ppvObject) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riid, ppvObjectPtr); + } + return ret; + } + + /// To be documented. + public static unsafe int QueryInterface(this ComPtr thisVtbl, ref Guid riid, void** ppvObject) + { + var @this = thisVtbl.Handle; + int ret = default; + fixed (Guid* riidPtr = &riid) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riidPtr, ppvObject); + } + return ret; + } + + /// To be documented. + public static unsafe int QueryInterface(this ComPtr thisVtbl, ref Guid riid, ref void* ppvObject) + { + var @this = thisVtbl.Handle; + int ret = default; + fixed (Guid* riidPtr = &riid) + { + fixed (void** ppvObjectPtr = &ppvObject) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[0])(@this, riidPtr, ppvObjectPtr); + } + } + return ret; + } + + /// To be documented. + public static uint AddRef(this ComPtr thisVtbl) + { + var @this = thisVtbl.Handle; + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[1])(@this); + return ret; + } + + /// To be documented. + public static uint Release(this ComPtr thisVtbl) + { + var @this = thisVtbl.Handle; + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[2])(@this); + return ret; + } + + /// To be documented. + public static unsafe uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, IntPtr* htaskCaller, uint dwTickCount, InterfaceInfo* lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCaller, dwTickCount, lpInterfaceInfo); + return ret; + } + + /// To be documented. + public static unsafe uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, IntPtr* htaskCaller, uint dwTickCount, ref InterfaceInfo lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + uint ret = default; + fixed (InterfaceInfo* lpInterfaceInfoPtr = &lpInterfaceInfo) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCaller, dwTickCount, lpInterfaceInfoPtr); + } + return ret; + } + + /// To be documented. + public static unsafe uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, ref IntPtr htaskCaller, uint dwTickCount, InterfaceInfo* lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + uint ret = default; + fixed (IntPtr* htaskCallerPtr = &htaskCaller) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCallerPtr, dwTickCount, lpInterfaceInfo); + } + return ret; + } + + /// To be documented. + public static uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, ref IntPtr htaskCaller, uint dwTickCount, ref InterfaceInfo lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + uint ret = default; + fixed (IntPtr* htaskCallerPtr = &htaskCaller) + { + fixed (InterfaceInfo* lpInterfaceInfoPtr = &lpInterfaceInfo) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[3])(@this, dwCallType, htaskCallerPtr, dwTickCount, lpInterfaceInfoPtr); + } + } + return ret; + } + + /// To be documented. + public static unsafe uint RetryRejectedCall(this ComPtr thisVtbl, IntPtr* htaskCallee, uint dwTickCount, uint dwRejectType) + { + var @this = thisVtbl.Handle; + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[4])(@this, htaskCallee, dwTickCount, dwRejectType); + return ret; + } + + /// To be documented. + public static uint RetryRejectedCall(this ComPtr thisVtbl, ref IntPtr htaskCallee, uint dwTickCount, uint dwRejectType) + { + var @this = thisVtbl.Handle; + uint ret = default; + fixed (IntPtr* htaskCalleePtr = &htaskCallee) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[4])(@this, htaskCalleePtr, dwTickCount, dwRejectType); + } + return ret; + } + + /// To be documented. + public static unsafe uint MessagePending(this ComPtr thisVtbl, IntPtr* htaskCallee, uint dwTickCount, uint dwPendingType) + { + var @this = thisVtbl.Handle; + uint ret = default; + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[5])(@this, htaskCallee, dwTickCount, dwPendingType); + return ret; + } + + /// To be documented. + public static uint MessagePending(this ComPtr thisVtbl, ref IntPtr htaskCallee, uint dwTickCount, uint dwPendingType) + { + var @this = thisVtbl.Handle; + uint ret = default; + fixed (IntPtr* htaskCalleePtr = &htaskCallee) + { + ret = ((delegate* unmanaged[Cdecl])@this->LpVtbl[5])(@this, htaskCalleePtr, dwTickCount, dwPendingType); + } + return ret; + } + + /// To be documented. + public static int QueryInterface(this ComPtr thisVtbl, out ComPtr ppvObject) where TI0 : unmanaged, IComVtbl + { + var @this = thisVtbl.Handle; + // ComPtrOverloader + ppvObject = default; + return @this->QueryInterface(SilkMarshal.GuidPtrOf(), (void**) ppvObject.GetAddressOf()); + } + + /// To be documented. + public static unsafe int QueryInterface(this ComPtr thisVtbl, Span riid, void** ppvObject) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->QueryInterface(ref riid.GetPinnableReference(), ppvObject); + } + + /// To be documented. + public static unsafe int QueryInterface(this ComPtr thisVtbl, Span riid, ref void* ppvObject) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->QueryInterface(ref riid.GetPinnableReference(), ref ppvObject); + } + + /// To be documented. + public static unsafe uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, IntPtr* htaskCaller, uint dwTickCount, Span lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->HandleInComingCall(dwCallType, htaskCaller, dwTickCount, ref lpInterfaceInfo.GetPinnableReference()); + } + + /// To be documented. + public static unsafe uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, Span htaskCaller, uint dwTickCount, InterfaceInfo* lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->HandleInComingCall(dwCallType, ref htaskCaller.GetPinnableReference(), dwTickCount, lpInterfaceInfo); + } + + /// To be documented. + public static uint HandleInComingCall(this ComPtr thisVtbl, uint dwCallType, Span htaskCaller, uint dwTickCount, Span lpInterfaceInfo) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->HandleInComingCall(dwCallType, ref htaskCaller.GetPinnableReference(), dwTickCount, ref lpInterfaceInfo.GetPinnableReference()); + } + + /// To be documented. + public static uint RetryRejectedCall(this ComPtr thisVtbl, Span htaskCallee, uint dwTickCount, uint dwRejectType) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->RetryRejectedCall(ref htaskCallee.GetPinnableReference(), dwTickCount, dwRejectType); + } + + /// To be documented. + public static uint MessagePending(this ComPtr thisVtbl, Span htaskCallee, uint dwTickCount, uint dwPendingType) + { + var @this = thisVtbl.Handle; + // SpanOverloader + return @this->MessagePending(ref htaskCallee.GetPinnableReference(), dwTickCount, dwPendingType); + } + + /// To be documented. + public static ComPtr QueryInterface(this ComPtr thisVtbl) where TI0 : unmanaged, IComVtbl + { + var @this = thisVtbl.Handle; + // NonKhrReturnTypeOverloader + SilkMarshal.ThrowHResult(@this->QueryInterface(out ComPtr silkRet)); + return silkRet; + } + +}