|
// ------------------------------------------------------------------------------
// <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("5347AD7B-C355-46F8-AFF5-909033582F63")]
[SupportedOSPlatform("windows5.1.2600")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct ITextRangeProvider
:IVTable<ITextRangeProvider,ITextRangeProvider.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]<ITextRangeProvider*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((ITextRangeProvider*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<ITextRangeProvider*,uint>)lpVtbl[1])((ITextRangeProvider*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<ITextRangeProvider*,uint>)lpVtbl[2])((ITextRangeProvider*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Clone(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.ITextRangeProvider** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Clone(pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a new ITextRangeProvider identical to the original ITextRangeProvider and inheriting all properties of the original.</summary>
/// <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>The new range can be manipulated independently from the original.</remarks>
public unsafe winmdroot.UI.Accessibility.ITextRangeProvider* Clone()
{
winmdroot.UI.Accessibility.ITextRangeProvider* __retVal = default(winmdroot.UI.Accessibility.ITextRangeProvider*);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.ITextRangeProvider** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((ITextRangeProvider*)Unsafe.AsPointer(ref this), &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Compare(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.ITextRangeProvider* range, winmdroot.Foundation.BOOL* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Compare(range, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a value that specifies whether this text range has the same endpoints as another text range. (ITextRangeProvider.Compare)</summary>
/// <param name="range">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-itextrangeprovider">ITextRangeProvider</a>*</b> The text range to compare with this one.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-compare#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>This method compares the endpoints of the two text ranges, not the text in the ranges. The ranges are identical if they share the same endpoints. If two text ranges have different endpoints, they are not identical even if the text in both ranges is exactly the same.</remarks>
public unsafe winmdroot.Foundation.BOOL Compare(winmdroot.UI.Accessibility.ITextRangeProvider* range)
{
winmdroot.Foundation.BOOL __retVal = default(winmdroot.Foundation.BOOL);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.ITextRangeProvider* ,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((ITextRangeProvider*)Unsafe.AsPointer(ref this), range, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT CompareEndpoints(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.ITextRangeProvider* targetRange, winmdroot.UI.Accessibility.TextPatternRangeEndpoint targetEndpoint, int* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.CompareEndpoints(endpoint, targetRange, targetEndpoint, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a value that specifies whether two text ranges have identical endpoints.</summary>
/// <param name="targetRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-itextrangeprovider">ITextRangeProvider</a>*</b> The text range to be compared.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-compareendpoints#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>Returns a negative value if the caller's endpoint occurs earlier in the text than the target endpoint.</para>
/// <para>Returns zero if the caller's endpoint is at the same location as the target endpoint.</para>
/// <para>Returns a positive value if the caller's endpoint occurs later in the text than the target endpoint.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-compareendpoints#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe int CompareEndpoints(winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.ITextRangeProvider* targetRange, winmdroot.UI.Accessibility.TextPatternRangeEndpoint targetEndpoint)
{
int __retVal = default(int);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.UI.Accessibility.ITextRangeProvider* ,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((ITextRangeProvider*)Unsafe.AsPointer(ref this), endpoint, targetRange, targetEndpoint, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT ExpandToEnclosingUnit(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.TextUnit unit)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.ExpandToEnclosingUnit(unit);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Normalizes the text range by the specified text unit. The range is expanded if it is smaller than the specified unit, or shortened if it is longer than the specified unit. (ITextRangeProvider.ExpandToEnclosingUnit)</summary>
/// <param name="unit">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-textunit">TextUnit</a></b> The type of text units, such as character, word, paragraph, and so on.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-expandtoenclosingunit#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>Client applications such as screen readers use this method to retrieve the full word, sentence, or paragraph that exists at the insertion point or caret position. Despite its name, the <b>ITextRangeProvider::ExpandToEnclosingUnit</b> method does not necessarily expand a text range. Instead, it "normalizes" a text range by moving the endpoints so that the range encompasses the specified text unit. The range is expanded if it is smaller than the specified unit, or shortened if it is longer than the specified unit. If the range is already an exact quantity of the specified units, it remains unchanged. It is critical that the <b>ExpandToEnclosingUnit</b> method always normalizes text ranges in a consistent manner; otherwise, other aspects of text range manipulation by text unit would be unpredictable. The following diagram shows how <b>ExpandToEnclosingUnit</b> normalizes a text range by moving the endpoints of the range.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-expandtoenclosingunit#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void ExpandToEnclosingUnit(winmdroot.UI.Accessibility.TextUnit unit)
{
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextUnit ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((ITextRangeProvider*)Unsafe.AsPointer(ref this), unit).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT FindAttribute(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID attributeId, winmdroot.System.Variant.VARIANT val, winmdroot.Foundation.BOOL backward, winmdroot.UI.Accessibility.ITextRangeProvider** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.FindAttribute(attributeId, val, backward, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a text range subset that has the specified text attribute value.</summary>
/// <param name="attributeId">
/// <para>Type: <b>TEXTATTRIBUTEID</b> The identifier of the text attribute. For a list of text attribute IDs, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-textattribute-ids">Text Attribute Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-findattribute#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="val">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinAuto/variant-structure">VARIANT</a></b> The attribute value to search for. This value must match the type specified for the attribute.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-findattribute#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="backward">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> <b>TRUE</b> if the last occurring text range should be returned instead of the first; otherwise <b>FALSE</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-findattribute#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>The <b>FindAttribute</b> method retrieves matching text regardless of whether the text is hidden or visible. Clients can use <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-textattribute-ids">UIA_IsHiddenAttributeId</a> to check text visibility.</remarks>
public unsafe winmdroot.UI.Accessibility.ITextRangeProvider* FindAttribute(winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID attributeId, winmdroot.System.Variant.VARIANT val, winmdroot.Foundation.BOOL backward)
{
winmdroot.UI.Accessibility.ITextRangeProvider* __retVal = default(winmdroot.UI.Accessibility.ITextRangeProvider*);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID ,winmdroot.System.Variant.VARIANT ,winmdroot.Foundation.BOOL ,winmdroot.UI.Accessibility.ITextRangeProvider** ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((ITextRangeProvider*)Unsafe.AsPointer(ref this), attributeId, val, backward, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT FindText(ITextRangeProvider* pThis, winmdroot.Foundation.BSTR text, winmdroot.Foundation.BOOL backward, winmdroot.Foundation.BOOL ignoreCase, winmdroot.UI.Accessibility.ITextRangeProvider** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.FindText(text, backward, ignoreCase, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a text range subset that contains the specified text.</summary>
/// <param name="text">
/// <para>Type: <b>BSTR</b> The text string to search for.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-findtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="backward">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> <b>TRUE</b> if the last occurring text range should be returned instead of the first; otherwise <b>FALSE</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-findtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ignoreCase">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> <b>TRUE</b> if case should be ignored; otherwise <b>FALSE</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-findtext#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>There is no differentiation between hidden and visible text.</remarks>
public unsafe winmdroot.UI.Accessibility.ITextRangeProvider* FindText(winmdroot.Foundation.BSTR text, winmdroot.Foundation.BOOL backward, winmdroot.Foundation.BOOL ignoreCase)
{
winmdroot.UI.Accessibility.ITextRangeProvider* __retVal = default(winmdroot.UI.Accessibility.ITextRangeProvider*);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.BOOL ,winmdroot.Foundation.BOOL ,winmdroot.UI.Accessibility.ITextRangeProvider** ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((ITextRangeProvider*)Unsafe.AsPointer(ref this), text, backward, ignoreCase, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetAttributeValue(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID attributeId, winmdroot.System.Variant.VARIANT* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetAttributeValue(attributeId, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the value of the specified text attribute across the text range.</summary>
/// <param name="attributeId">
/// <para>Type: <b>TEXTATTRIBUTEID</b> The identifier of the text attribute. For a list of text attribute IDs, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-textattribute-ids">Text Attribute Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-getattributevalue#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>The <b>GetAttributeValue</b> method should retrieve the attribute value regardless of whether the text is hidden or visible.</remarks>
public winmdroot.System.Variant.VARIANT GetAttributeValue(winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID attributeId)
{
winmdroot.System.Variant.VARIANT __retVal = default(winmdroot.System.Variant.VARIANT);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((ITextRangeProvider*)Unsafe.AsPointer(ref this), attributeId, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetBoundingRectangles(ITextRangeProvider* pThis, winmdroot.System.Com.SAFEARRAY** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetBoundingRectangles(pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a collection of bounding rectangles for each fully or partially visible line of text in a text range. (ITextRangeProvider.GetBoundingRectangles)</summary>
/// <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-itextrangeprovider-getboundingrectangles">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.System.Com.SAFEARRAY* GetBoundingRectangles()
{
winmdroot.System.Com.SAFEARRAY* __retVal = default(winmdroot.System.Com.SAFEARRAY*);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.System.Com.SAFEARRAY** ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((ITextRangeProvider*)Unsafe.AsPointer(ref this), &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetEnclosingElement(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetEnclosingElement(pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns the innermost element that encloses the text range.</summary>
/// <returns>
/// <para>Type: **[HRESULT](/windows/desktop/WinProg/windows-data-types)** If this method succeeds, it returns **S_OK**. Otherwise, it returns an **HRESULT** error code.</para>
/// </returns>
/// <remarks></remarks>
public unsafe winmdroot.UI.Accessibility.IRawElementProviderSimple* GetEnclosingElement()
{
winmdroot.UI.Accessibility.IRawElementProviderSimple* __retVal = default(winmdroot.UI.Accessibility.IRawElementProviderSimple*);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((ITextRangeProvider*)Unsafe.AsPointer(ref this), &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetText(ITextRangeProvider* pThis, int maxLength, winmdroot.Foundation.BSTR* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetText(maxLength, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the plain text of the range.</summary>
/// <param name="maxLength">
/// <para>Type: <b>int</b> The maximum length of the string to return. Use -1 if no limit is required.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-gettext#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><b>ITextRangeProvider::GetText</b> retrieves both hidden and visible text. If <i>maxLength</i> is greater than the length of the text span of the caller, the string returned will be the plain text of the text range. <b>ITextRangeProvider::GetText</b> will not be affected by the order of endpoints in the text flow; it will always return the text between the start and end endpoints of the text range in the logical text flow order.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-gettext#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public winmdroot.Foundation.BSTR GetText(int maxLength)
{
winmdroot.Foundation.BSTR __retVal = default(winmdroot.Foundation.BSTR);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,int ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((ITextRangeProvider*)Unsafe.AsPointer(ref this), maxLength, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Move(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.TextUnit unit, int count, int* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Move(unit, count, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the text range forward or backward by the specified number of text units.</summary>
/// <param name="count">
/// <para>Type: <b>int</b> The number of text units to move. A positive value moves the text range forward. A negative value moves the text range backward. Zero has no effect.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-move#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><b>ITextRangeProvider::Move</b> should only move the text range to span a different part of the text, it should not alter the text in any way.</para>
/// <para>For a non-degenerate (non-empty) text range, <b>ITextRangeProvider::Move</b> should normalize and move the text range by performing the following steps.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-move#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public int Move(winmdroot.UI.Accessibility.TextUnit unit, int count)
{
int __retVal = default(int);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextUnit ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((ITextRangeProvider*)Unsafe.AsPointer(ref this), unit, count, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveEndpointByUnit(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.TextUnit unit, int count, int* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveEndpointByUnit(endpoint, unit, count, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves one endpoint of the text range the specified number of TextUnit units within the document range.</summary>
/// <param name="count">
/// <para>Type: <b>int</b> The number of units to move. A positive value moves the endpoint forward. A negative value moves backward. A value of 0 has no effect.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-moveendpointbyunit#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 <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-textpatternrangeendpoint">endpoint</a> is moved forward or backward, as specified, to the next available unit boundary. If the original <b>endpoint</b> was at the boundary of the specified text unit, the <b>endpoint</b> is moved to the next available text unit boundary, as shown in the following illustration. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-moveendpointbyunit#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public int MoveEndpointByUnit(winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.TextUnit unit, int count)
{
int __retVal = default(int);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.UI.Accessibility.TextUnit ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[14])((ITextRangeProvider*)Unsafe.AsPointer(ref this), endpoint, unit, count, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveEndpointByRange(ITextRangeProvider* pThis, winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.ITextRangeProvider* targetRange, winmdroot.UI.Accessibility.TextPatternRangeEndpoint targetEndpoint)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveEndpointByRange(endpoint, targetRange, targetEndpoint);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves one endpoint of the current text range to the specified endpoint of a second text range. (ITextRangeProvider.MoveEndpointByRange)</summary>
/// <param name="targetRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-itextrangeprovider">ITextRangeProvider</a>*</b> A second text range from the same text provider as the current text range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-moveendpointbyrange#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>If the endpoint being moved crosses the other endpoint of the same text range, that other endpoint is moved also, resulting in a degenerate (empty) range and ensuring the correct ordering of the endpoints (that is, the start is always less than or equal to the end).</remarks>
public unsafe void MoveEndpointByRange(winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.ITextRangeProvider* targetRange, winmdroot.UI.Accessibility.TextPatternRangeEndpoint targetEndpoint)
{
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.UI.Accessibility.ITextRangeProvider* ,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.Foundation.HRESULT>)lpVtbl[15])((ITextRangeProvider*)Unsafe.AsPointer(ref this), endpoint, targetRange, targetEndpoint).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Select(ITextRangeProvider* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Select();
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Selects the span of text that corresponds to this text range, and removes any previous selection. (ITextRangeProvider.Select)</summary>
/// <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>Providing a degenerate text range will move the text insertion point.</remarks>
public void Select()
{
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.HRESULT>)lpVtbl[16])((ITextRangeProvider*)Unsafe.AsPointer(ref this)).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT AddToSelection(ITextRangeProvider* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.AddToSelection();
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Adds the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text. (ITextRangeProvider.AddToSelection)</summary>
/// <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 text insertion point moves to the area of the new selection.</para>
/// <para>If this method is called on a degenerate text range, the text insertion point moves to the location of the text range but no text is selected.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-addtoselection#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void AddToSelection()
{
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.HRESULT>)lpVtbl[17])((ITextRangeProvider*)Unsafe.AsPointer(ref this)).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT RemoveFromSelection(ITextRangeProvider* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.RemoveFromSelection();
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Removes the text range from the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text.</summary>
/// <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 text insertion point moves to the area of the removed selection.</para>
/// <para>If this method is called on a degenerate text range, the text insertion point moves to the location of the text range but no text is selected.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-removefromselection#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void RemoveFromSelection()
{
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.HRESULT>)lpVtbl[18])((ITextRangeProvider*)Unsafe.AsPointer(ref this)).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT ScrollIntoView(ITextRangeProvider* pThis, winmdroot.Foundation.BOOL alignToTop)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.ScrollIntoView(alignToTop);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Causes the text control to scroll vertically until the text range is visible in the viewport.</summary>
/// <param name="alignToTop">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> TRUE if the text control should be scrolled so the text range is flush with the top of the viewport; FALSE if it should be flush with the bottom of the viewport.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-scrollintoview#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><b>ITextRangeProvider::ScrollIntoView</b> respects both hidden and visible text. If the text range is hidden, the text control will scroll only if the hidden text has an anchor in the viewport.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-scrollintoview#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void ScrollIntoView(winmdroot.Foundation.BOOL alignToTop)
{
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[19])((ITextRangeProvider*)Unsafe.AsPointer(ref this), alignToTop).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetChildren(ITextRangeProvider* pThis, winmdroot.System.Com.SAFEARRAY** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetChildren(pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a collection of all embedded objects that fall within the text range. (ITextRangeProvider.GetChildren)</summary>
/// <returns>
/// <para>Type: **[HRESULT](/windows/desktop/WinProg/windows-data-types)** If this method succeeds, it returns **S_OK**. Otherwise, it returns an **HRESULT** error code.</para>
/// </returns>
/// <remarks>Each element retrieved with [ITextRangeProvider::GetChildren]() has a valid text range that can be retrieved through [RangeFromChild](nf-uiautomationcore-itextprovider-rangefromchild.md). This includes any elements in the UI Automation tree between the [ITextProvider](nn-uiautomationcore-itextprovider.md) and the child element.</remarks>
public unsafe winmdroot.System.Com.SAFEARRAY* GetChildren()
{
winmdroot.System.Com.SAFEARRAY* __retVal = default(winmdroot.System.Com.SAFEARRAY*);
((delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.System.Com.SAFEARRAY** ,winmdroot.Foundation.HRESULT>)lpVtbl[20])((ITextRangeProvider*)Unsafe.AsPointer(ref this), &__retVal).ThrowOnFailure();
return __retVal;
}
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]<ITextRangeProvider*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.ITextRangeProvider** ,winmdroot.Foundation.HRESULT> Clone_4;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.ITextRangeProvider* ,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> Compare_5;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.UI.Accessibility.ITextRangeProvider* ,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,int* ,winmdroot.Foundation.HRESULT> CompareEndpoints_6;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextUnit ,winmdroot.Foundation.HRESULT> ExpandToEnclosingUnit_7;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID ,winmdroot.System.Variant.VARIANT ,winmdroot.Foundation.BOOL ,winmdroot.UI.Accessibility.ITextRangeProvider** ,winmdroot.Foundation.HRESULT> FindAttribute_8;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.BOOL ,winmdroot.Foundation.BOOL ,winmdroot.UI.Accessibility.ITextRangeProvider** ,winmdroot.Foundation.HRESULT> FindText_9;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> GetAttributeValue_10;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.System.Com.SAFEARRAY** ,winmdroot.Foundation.HRESULT> GetBoundingRectangles_11;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT> GetEnclosingElement_12;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,int ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetText_13;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextUnit ,int ,int* ,winmdroot.Foundation.HRESULT> Move_14;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.UI.Accessibility.TextUnit ,int ,int* ,winmdroot.Foundation.HRESULT> MoveEndpointByUnit_15;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.UI.Accessibility.ITextRangeProvider* ,winmdroot.UI.Accessibility.TextPatternRangeEndpoint ,winmdroot.Foundation.HRESULT> MoveEndpointByRange_16;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.HRESULT> Select_17;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.HRESULT> AddToSelection_18;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.HRESULT> RemoveFromSelection_19;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> ScrollIntoView_20;
internal delegate *unmanaged [Stdcall]<ITextRangeProvider*,winmdroot.System.Com.SAFEARRAY** ,winmdroot.Foundation.HRESULT> GetChildren_21;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->Clone_4 = &Clone;
vtable->Compare_5 = &Compare;
vtable->CompareEndpoints_6 = &CompareEndpoints;
vtable->ExpandToEnclosingUnit_7 = &ExpandToEnclosingUnit;
vtable->FindAttribute_8 = &FindAttribute;
vtable->FindText_9 = &FindText;
vtable->GetAttributeValue_10 = &GetAttributeValue;
vtable->GetBoundingRectangles_11 = &GetBoundingRectangles;
vtable->GetEnclosingElement_12 = &GetEnclosingElement;
vtable->GetText_13 = &GetText;
vtable->Move_14 = &Move;
vtable->MoveEndpointByUnit_15 = &MoveEndpointByUnit;
vtable->MoveEndpointByRange_16 = &MoveEndpointByRange;
vtable->Select_17 = &Select;
vtable->AddToSelection_18 = &AddToSelection;
vtable->RemoveFromSelection_19 = &RemoveFromSelection;
vtable->ScrollIntoView_20 = &ScrollIntoView;
vtable->GetChildren_21 = &GetChildren;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{5347ad7b-c355-46f8-aff5-909033582f63}</value>
internal static readonly Guid IID_Guid = new Guid(0x5347AD7B, 0xC355, 0x46F8, 0xAF, 0xF5, 0x90, 0x90, 0x33, 0x58, 0x2F, 0x63);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x7B,0xAD,0x47,0x53,0x55,0xC3,0xF8,0x46,0xAF,0xF5,0x90,0x90,0x33,0x58,0x2F,0x63 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("5347AD7B-C355-46F8-AFF5-909033582F63"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.1.2600")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Clone(winmdroot.UI.Accessibility.ITextRangeProvider** pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Compare(winmdroot.UI.Accessibility.ITextRangeProvider* range, winmdroot.Foundation.BOOL* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT CompareEndpoints(winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.ITextRangeProvider* targetRange, winmdroot.UI.Accessibility.TextPatternRangeEndpoint targetEndpoint, int* pRetVal);
[PreserveSig()]
winmdroot.Foundation.HRESULT ExpandToEnclosingUnit(winmdroot.UI.Accessibility.TextUnit unit);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT FindAttribute(winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID attributeId, winmdroot.System.Variant.VARIANT val, winmdroot.Foundation.BOOL backward, winmdroot.UI.Accessibility.ITextRangeProvider** pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT FindText(winmdroot.Foundation.BSTR text, winmdroot.Foundation.BOOL backward, winmdroot.Foundation.BOOL ignoreCase, winmdroot.UI.Accessibility.ITextRangeProvider** pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetAttributeValue(winmdroot.UI.Accessibility.UIA_TEXTATTRIBUTE_ID attributeId, winmdroot.System.Variant.VARIANT* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetBoundingRectangles(winmdroot.System.Com.SAFEARRAY** pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetEnclosingElement(winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetText(int maxLength, winmdroot.Foundation.BSTR* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Move(winmdroot.UI.Accessibility.TextUnit unit, int count, int* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveEndpointByUnit(winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.TextUnit unit, int count, int* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveEndpointByRange(winmdroot.UI.Accessibility.TextPatternRangeEndpoint endpoint, winmdroot.UI.Accessibility.ITextRangeProvider* targetRange, winmdroot.UI.Accessibility.TextPatternRangeEndpoint targetEndpoint);
[PreserveSig()]
winmdroot.Foundation.HRESULT Select();
[PreserveSig()]
winmdroot.Foundation.HRESULT AddToSelection();
[PreserveSig()]
winmdroot.Foundation.HRESULT RemoveFromSelection();
[PreserveSig()]
winmdroot.Foundation.HRESULT ScrollIntoView(winmdroot.Foundation.BOOL alignToTop);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetChildren(winmdroot.System.Com.SAFEARRAY** pRetVal);
}
}
}
}
|