public unsafe Result SetDevice(IDXGIDevice device) { Result result = LocalInterop.CalliStdCallint(_nativePointer, device.NativePointer.ToPointer(), (*(void ***)_nativePointer)[3]); GC.KeepAlive(device); return(result); }
public unsafe Result SetSwapChain(IDXGISwapChain swapChain) { Result result = LocalInterop.CalliStdCallint(_nativePointer, (void *)swapChain.NativePointer.ToPointer(), (*(void ***)_nativePointer)[3]); GC.KeepAlive(swapChain); return(result); }
/// <summary> /// No documentation. /// </summary> /// <param name = "callback">No documentation.</param> /// <returns>No documentation.</returns> /// <unmanaged>HRESULT IVirtualSurfaceImageSourceNative::RegisterForUpdatesNeeded([In, Optional] IVirtualSurfaceUpdatesCallbackNative* callback)</unmanaged> /// <unmanaged-short>IVirtualSurfaceImageSourceNative::RegisterForUpdatesNeeded</unmanaged-short> public unsafe void RegisterForUpdatesNeeded(Vortice.DXGI.IVirtualSurfaceUpdatesCallbackNative callback) { Result result = LocalInterop.CalliStdCallint(_nativePointer, (void *)callback.NativePointer.ToPointer(), (*(void ***)_nativePointer)[10]); System.GC.KeepAlive(callback); result.CheckError(); }
private unsafe int GetCountNative(out int propertyCount) { fixed(void *ppc = &propertyCount) { return(LocalInterop.Calli(UnsafeBasePtr, ppc, ((void **)(*(void **)UnsafeBasePtr))[3])); } }
private unsafe int GetValueNative(PropertyKey key, out PropertyVariant value) { fixed(void *pvalue = &value) { return(LocalInterop.Calli(UnsafeBasePtr, &key, pvalue, ((void **)(*(void **)UnsafeBasePtr))[5])); } }
public unsafe Result SetDevice(IUnknown device) { IntPtr devicePtr = CppObject.ToCallbackPtr <SharpGen.Runtime.IUnknown>(device); Result result = LocalInterop.CalliStdCallint(_nativePointer, devicePtr.ToPointer(), (*(void ***)_nativePointer)[3]); GC.KeepAlive(device); return(result); }
private unsafe int GetAtNative(int propertyIndex, out PropertyKey propertyKey) { propertyKey = new PropertyKey(); fixed(void *ppk = &propertyKey) { return(LocalInterop.Calli(UnsafeBasePtr, propertyIndex, ppk, ((void **)(*(void **)UnsafeBasePtr))[4])); } }
public unsafe Result FlushAllSurfacesWithDevice(IUnknown device) { IntPtr devicePtr = ToCallbackPtr <IUnknown>(device); Result result = LocalInterop.CalliStdCallint(_nativePointer, devicePtr.ToPointer(), (*(void ***)_nativePointer)[3]); GC.KeepAlive(device); return(result); }
private unsafe Result GetUpdateRects(RawRect[] updates, int count) { Result result; fixed(void *updates_ = updates) { result = LocalInterop.CalliStdCallint(_nativePointer, updates_, count, (*(void ***)_nativePointer)[8]); } return(result); }
private unsafe Result GetUpdateRectCount(out int count) { Result result; fixed(void *count_ = &count) { result = LocalInterop.CalliStdCallint(_nativePointer, count_, (*(void ***)_nativePointer)[7]); } return(result); }
private unsafe void GetVisibleBounds(out RawRect bounds) { bounds = default; Result result; fixed(void *bounds_ = &bounds) { result = LocalInterop.CalliStdCallint(_nativePointer, bounds_, (*(void ***)_nativePointer)[9]); } result.CheckError(); }
/// <summary> /// Sets the effects parameters. /// <seealso cref="Parameters"/> /// </summary> /// <param name="parameters">Object that contains the new parameters of the effect.</param> /// <returns>HRESULT</returns> /// <remarks>Use the <see cref="Parameters"/> property instead.</remarks> public unsafe int SetAllParametersNative(T parameters) { IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(T))); try { Marshal.StructureToPtr(parameters, p, true); return(LocalInterop.CalliMethodPtr(UnsafeBasePtr, p.ToPointer(), ((void **)(*(void **)UnsafeBasePtr))[3])); } finally { Marshal.FreeCoTaskMem(p); } }
/// <summary> /// Retrieves the effects parameters. /// <seealso cref="Parameters"/> /// </summary> /// <param name="parameters">A variable which retrieves the set parameters of the effect.</param> /// <returns>HRESULT</returns> /// <remarks>Use the <see cref="Parameters"/> property instead.</remarks> public unsafe int GetAllParametersNative(out T parameters) { IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(T))); try { int hresult = LocalInterop.CalliMethodPtr(UnsafeBasePtr, p.ToPointer(), ((void **)(*(void **)UnsafeBasePtr))[4]); parameters = (T)Marshal.PtrToStructure(p, typeof(T)); return(hresult); } finally { Marshal.FreeCoTaskMem(p); } }
private unsafe Result BeginDraw(RawRect?updateRect, Guid iid, out IntPtr updateObject, out Point offset) { RawRect updateRectCall = updateRect.GetValueOrDefault(); offset = default; Result result; fixed(void *offset_ = &offset) { fixed(void *updateObject_ = &updateObject) { result = LocalInterop.CalliStdCallint(_nativePointer, updateRect.HasValue ? &updateRectCall : (void *)0, &iid, updateObject_, offset_, (*(void ***)_nativePointer)[4]); } } return(result); }
public unsafe Result BeginDraw(RawRect updateRect, out IDXGISurface surface, out Point offset) { IntPtr surfacePtr = IntPtr.Zero; Result result; fixed(void *offset_ = &offset) { result = LocalInterop.CalliStdCallint0(_nativePointer, updateRect, &surfacePtr, offset_, (*(void ***)_nativePointer)[4]); } if (result.Failure) { surface = default; offset = default; return(result); } surface = new IDXGISurface(surfacePtr); return(result); }
protected override void UpdateBackgroundColor(bool initialize) { if (Element.BackgroundColor != default(Xamarin.Forms.Color)) { _roundRectangle.Color = Element.BackgroundColor.ToNative(); } var pancake = Element as PancakeView; if ((pancake.BackgroundGradientStartColor != default(Xamarin.Forms.Color) && pancake.BackgroundGradientEndColor != default(Xamarin.Forms.Color))) { _evasMap = LocalInterop.evas_map_new(4); LocalInterop.evas_map_util_points_populate_from_object_full(_evasMap, _roundRectangle.Handle, 0); ElmSharp.Color startColor = pancake.BackgroundGradientStartColor.ToNative(); ElmSharp.Color endColor = pancake.BackgroundGradientEndColor.ToNative(); LocalInterop.evas_map_point_color_set(_evasMap, 0, startColor.R, startColor.G, startColor.B, startColor.A); LocalInterop.evas_map_point_color_set(_evasMap, 1, startColor.R, startColor.G, startColor.B, startColor.A); LocalInterop.evas_map_point_color_set(_evasMap, 2, endColor.R, endColor.G, endColor.B, endColor.A); LocalInterop.evas_map_point_color_set(_evasMap, 3, endColor.R, endColor.G, endColor.B, endColor.A); //LocalInterop.evas_map_util_points_color_set(_evasMap, 255, 0, 0, 255); LocalInterop.evas_object_map_set(_roundRectangle.Handle, _evasMap); LocalInterop.evas_object_map_enable_set(_roundRectangle.Handle, true); } }
public unsafe Result Invalidate(RawRect updateRect) { return(LocalInterop.CalliStdCallint0(_nativePointer, updateRect, (*(void ***)_nativePointer)[6])); }
public unsafe Result Resize(int newWidth, int newHeight) { return(LocalInterop.CalliStdCallint(_nativePointer, newWidth, newHeight, (*(void ***)_nativePointer)[11])); }
private unsafe int SetValueNative(PropertyKey key, PropertyVariant value) { return(LocalInterop.Calli(UnsafeBasePtr, &key, &value, ((void **)(*(void **)UnsafeBasePtr))[6])); }
public unsafe Result SetSwapChainHandle(IntPtr swapChainHandle) { return(LocalInterop.CalliStdCallint(_nativePointer, (void *)swapChainHandle, (*(void ***)_nativePointer)[4])); }
public unsafe Result EndDraw() { return(LocalInterop.CalliStdCallint(_nativePointer, (*(void ***)_nativePointer)[5])); }
private unsafe int CommitNative() { return(LocalInterop.Calli(UnsafeBasePtr, ((void **)(*(void **)UnsafeBasePtr))[7])); }
public unsafe Result UpdatesNeeded() { return(LocalInterop.CalliStdCallint(_nativePointer, (*(void ***)_nativePointer)[3])); }