File: Windows.Win32.IRawElementProviderFragmentRoot.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
	namespace UI.Accessibility
	{
		[Guid("620CE2A5-AB8F-40A9-86CB-DE3C75599B58")]
		[SupportedOSPlatform("windows5.1.2600")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IRawElementProviderFragmentRoot
			:IVTable<IRawElementProviderFragmentRoot,IRawElementProviderFragmentRoot.Vtbl>,IComIID		{
			/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
			internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject)
			{
				fixed (void** ppvObjectLocal = &ppvObject)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						winmdroot.Foundation.HRESULT __result = this.QueryInterface(riidLocal, ppvObjectLocal);
						return __result;
					}
				}
			}

			public unsafe winmdroot.Foundation.HRESULT QueryInterface(global::System.Guid* riid, void** ppvObject)
			{
				return ((delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IRawElementProviderFragmentRoot*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

			public uint AddRef()
			{
				return ((delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,uint>)lpVtbl[1])((IRawElementProviderFragmentRoot*)Unsafe.AsPointer(ref this));
			}

			public uint Release()
			{
				return ((delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,uint>)lpVtbl[2])((IRawElementProviderFragmentRoot*)Unsafe.AsPointer(ref this));
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT ElementProviderFromPoint(IRawElementProviderFragmentRoot* pThis, double x, double y, winmdroot.UI.Accessibility.IRawElementProviderFragment** pRetVal)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.ElementProviderFromPoint(x, y, pRetVal);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves the provider of the element that is at the specified point in this fragment.</summary>
			/// <param name="x">
			/// <para>Type: <b>double</b> The horizontal screen coordinate.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragmentroot-elementproviderfrompoint#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="y">
			/// <para>Type: <b>double</b> The vertical screen coordinate.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragmentroot-elementproviderfrompoint#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pRetVal">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementproviderfragment">IRawElementProviderFragment</a>**</b> Receives a pointer to the provider of the element at (x, y),	or <b>NULL</b> if none exists. This parameter is passed uninitialized.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragmentroot-elementproviderfrompoint#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
			/// </returns>
			/// <remarks>
			/// <para>The returned provider should correspond to the element that would receive mouse input at the specified point. If the point is on this element but not on any child element, either <b>NULL</b> or the provider of the fragment root is returned. If the point is on an element in another framework that is hosted by this fragment, the method returns the element that hosts that fragment (as indicated by <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragment-getembeddedfragmentroots">IRawElementProviderFragment::GetEmbeddedFragmentRoots</a>).</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragmentroot-elementproviderfrompoint#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT ElementProviderFromPoint(double x, double y, winmdroot.UI.Accessibility.IRawElementProviderFragment** pRetVal)
			{
				return ((delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,double ,double ,winmdroot.UI.Accessibility.IRawElementProviderFragment** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IRawElementProviderFragmentRoot*)Unsafe.AsPointer(ref this), x, y, pRetVal);
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetFocus(IRawElementProviderFragmentRoot* pThis, winmdroot.UI.Accessibility.IRawElementProviderFragment** pRetVal)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetFocus(pRetVal);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves the element in this fragment that has the input focus.</summary>
			/// <param name="pRetVal">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementproviderfragment">IRawElementProviderFragment</a>**</b> Receives a pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementproviderfragment">IRawElementProviderFragment</a> interface of the element in this fragment that has the input focus, if any; otherwise <b>NULL</b>. This parameter is passed uninitialized.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragmentroot-getfocus#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderfragmentroot-getfocus">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT GetFocus(winmdroot.UI.Accessibility.IRawElementProviderFragment** pRetVal)
			{
				return ((delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,winmdroot.UI.Accessibility.IRawElementProviderFragment** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IRawElementProviderFragmentRoot*)Unsafe.AsPointer(ref this), pRetVal);
			}

			internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv)
where T : unmanaged

			{
				var hr = this.QueryInterface(typeof(T).GUID, out void* pv);
				if (hr.Succeeded)

				{
					ppv = (T*)pv;
				}
				else

				{
					ppv = null;
				}

				return hr;
			}

			internal struct Vtbl
			{
				internal delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

				internal delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,uint> AddRef_2;

				internal delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,uint> Release_3;

				internal delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,double ,double ,winmdroot.UI.Accessibility.IRawElementProviderFragment** ,winmdroot.Foundation.HRESULT> ElementProviderFromPoint_4;

				internal delegate *unmanaged [Stdcall]<IRawElementProviderFragmentRoot*,winmdroot.UI.Accessibility.IRawElementProviderFragment** ,winmdroot.Foundation.HRESULT> GetFocus_5;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->ElementProviderFromPoint_4 = &ElementProviderFromPoint;
				vtable->GetFocus_5 = &GetFocus;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{620ce2a5-ab8f-40a9-86cb-de3c75599b58}</value>
			internal static readonly Guid IID_Guid = new Guid(0x620CE2A5, 0xAB8F, 0x40A9, 0x86, 0xCB, 0xDE, 0x3C, 0x75, 0x59, 0x9B, 0x58);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0xA5,0xE2,0x0C,0x62,0x8F,0xAB,0xA9,0x40,0x86,0xCB,0xDE,0x3C,0x75,0x59,0x9B,0x58					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("620CE2A5-AB8F-40A9-86CB-DE3C75599B58"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows5.1.2600")]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT ElementProviderFromPoint(double x, double y, winmdroot.UI.Accessibility.IRawElementProviderFragment** pRetVal);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetFocus(winmdroot.UI.Accessibility.IRawElementProviderFragment** pRetVal);
			}
		}
	}
}