// ------------------------------------------------------------------------------ // <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,SYSLIB1092,CS3021,CS3019 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("2360C714-4BF1-4B26-BA65-9B21316127EB")] [CLSCompliant(false)] [SupportedOSPlatform("windows5.1.2600")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IScrollItemProvider :winmdroot.IVTable<IScrollItemProvider,IScrollItemProvider.Vtbl>,IComIID { /// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] 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]<IScrollItemProvider*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IScrollItemProvider*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IScrollItemProvider*,uint>)lpVtbl[1])((IScrollItemProvider*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IScrollItemProvider*,uint>)lpVtbl[2])((IScrollItemProvider*)Unsafe.AsPointer(ref this)); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT ScrollIntoView(IScrollItemProvider* pThis) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.ScrollIntoView(); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Scrolls the content area of a container object in order to display the control within the visible region (viewport) of the container.</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>This method will not guarantee the position of the control within the visible region (viewport) of the container.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iscrollitemprovider-scrollintoview#">Read more on learn.microsoft.com</see>.</para> /// </remarks> public void ScrollIntoView() { ((delegate *unmanaged [Stdcall]<IScrollItemProvider*,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IScrollItemProvider*)Unsafe.AsPointer(ref this)).ThrowOnFailure(); } internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv) where T : unmanaged { Guid guid = typeof(T).GUID; void* pv; var hr = this.QueryInterface(&guid, &pv); if (hr.Succeeded) { ppv = (T*)pv; } else { ppv = null; } return hr; } internal struct Vtbl { internal delegate *unmanaged [Stdcall]<IScrollItemProvider*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IScrollItemProvider*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IScrollItemProvider*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IScrollItemProvider*,winmdroot.Foundation.HRESULT> ScrollIntoView_4; } public static void PopulateVTable(Vtbl* vtable) { vtable->ScrollIntoView_4 = &ScrollIntoView; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{2360c714-4bf1-4b26-ba65-9b21316127eb}</value> internal static readonly Guid IID_Guid = new Guid(0x2360C714, 0x4BF1, 0x4B26, 0xBA, 0x65, 0x9B, 0x21, 0x31, 0x61, 0x27, 0xEB); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0x14,0xC7,0x60,0x23,0xF1,0x4B,0x26,0x4B,0xBA,0x65,0x9B,0x21,0x31,0x61,0x27,0xEB }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("2360C714-4BF1-4B26-BA65-9B21316127EB"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows5.1.2600")] internal interface Interface { [PreserveSig()] winmdroot.Foundation.HRESULT ScrollIntoView(); } } } }