|
// ------------------------------------------------------------------------------
// <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("E81D1B4E-11C5-42F8-9754-E7036C79F054")]
[SupportedOSPlatform("windows6.1")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IUIAutomationStructureChangedEventHandler
:IVTable<IUIAutomationStructureChangedEventHandler,IUIAutomationStructureChangedEventHandler.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]<IUIAutomationStructureChangedEventHandler*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IUIAutomationStructureChangedEventHandler*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IUIAutomationStructureChangedEventHandler*,uint>)lpVtbl[1])((IUIAutomationStructureChangedEventHandler*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IUIAutomationStructureChangedEventHandler*,uint>)lpVtbl[2])((IUIAutomationStructureChangedEventHandler*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT HandleStructureChangedEvent(IUIAutomationStructureChangedEventHandler* pThis, winmdroot.UI.Accessibility.IUIAutomationElement* sender, winmdroot.UI.Accessibility.StructureChangeType changeType, winmdroot.System.Com.SAFEARRAY* runtimeId)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.HandleStructureChangedEvent(sender, changeType, runtimeId);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Handles an event that is raised when the Microsoft UI Automation tree structure has changed.</summary>
/// <param name="sender">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationelement">IUIAutomationElement</a>*</b> A pointer to the element that raised the event.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationstructurechangedeventhandler-handlestructurechangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="runtimeId">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/oaidl/ns-oaidl-safearray">SAFEARRAY</a>*</b> Receives the runtime identifier of the element. This parameter is used only when <i>changeType</i> is <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-structurechangetype">StructureChangeType_ChildRemoved</a>; it is <b>NULL</b> for all other structure-change events.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationstructurechangedeventhandler-handlestructurechangedevent#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>This method is implemented by the application to handle events that it has subscribed to by using <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomation-addstructurechangedeventhandler">AddStructureChangedEventHandler</a></para>
/// <para>Adjusting an event handler from within this method is not supported.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationstructurechangedeventhandler-handlestructurechangedevent#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void HandleStructureChangedEvent(winmdroot.UI.Accessibility.IUIAutomationElement* sender, winmdroot.UI.Accessibility.StructureChangeType changeType, winmdroot.System.Com.SAFEARRAY* runtimeId)
{
((delegate *unmanaged [Stdcall]<IUIAutomationStructureChangedEventHandler*,winmdroot.UI.Accessibility.IUIAutomationElement* ,winmdroot.UI.Accessibility.StructureChangeType ,winmdroot.System.Com.SAFEARRAY* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IUIAutomationStructureChangedEventHandler*)Unsafe.AsPointer(ref this), sender, changeType, runtimeId).ThrowOnFailure();
}
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]<IUIAutomationStructureChangedEventHandler*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IUIAutomationStructureChangedEventHandler*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IUIAutomationStructureChangedEventHandler*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IUIAutomationStructureChangedEventHandler*,winmdroot.UI.Accessibility.IUIAutomationElement* ,winmdroot.UI.Accessibility.StructureChangeType ,winmdroot.System.Com.SAFEARRAY* ,winmdroot.Foundation.HRESULT> HandleStructureChangedEvent_4;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->HandleStructureChangedEvent_4 = &HandleStructureChangedEvent;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{e81d1b4e-11c5-42f8-9754-e7036c79f054}</value>
internal static readonly Guid IID_Guid = new Guid(0xE81D1B4E, 0x11C5, 0x42F8, 0x97, 0x54, 0xE7, 0x03, 0x6C, 0x79, 0xF0, 0x54);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x4E,0x1B,0x1D,0xE8,0xC5,0x11,0xF8,0x42,0x97,0x54,0xE7,0x03,0x6C,0x79,0xF0,0x54 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("E81D1B4E-11C5-42F8-9754-E7036C79F054"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows6.1")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT HandleStructureChangedEvent(winmdroot.UI.Accessibility.IUIAutomationElement* sender, winmdroot.UI.Accessibility.StructureChangeType changeType, winmdroot.System.Com.SAFEARRAY* runtimeId);
}
}
}
}
|