Files
Xune/UIX.RenderApi.Skia/Microsoft/Iris/Render/Extensions/ExtensionsApi.cs
T

148 lines
4.2 KiB
C#
Raw Normal View History

2021-07-11 22:59:29 -05:00
// Decompiled with JetBrains decompiler
// Type: Microsoft.Iris.Render.Extensions.ExtensionsApi
// Assembly: UIX.RenderApi, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
using Microsoft.Iris.Render.Internal;
using System;
using System.Runtime.InteropServices;
using System.Security;
namespace Microsoft.Iris.Render.Extensions
{
2021-07-11 23:04:40 -05:00
[SuppressUnmanagedCodeSecurity]
public static class ExtensionsApi
2021-07-11 22:59:29 -05:00
{
2021-07-11 23:04:40 -05:00
internal const ushort WAVE_FORMAT_PCM = 1;
2021-07-15 22:00:36 -05:00
internal static HRESULT SpBitmapLoadFile(
2021-07-11 23:04:40 -05:00
string stFileName,
[MarshalAs(UnmanagedType.LPStruct), In] ImageRequirements req,
2021-07-15 22:00:36 -05:00
BitmapOptions nOptions,
2021-07-11 23:04:40 -05:00
out HSpBitmap hBmp,
2021-07-15 22:00:36 -05:00
out ImageInformation info)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
internal static HRESULT SpBitmapLoadRaw(
2021-07-11 23:04:40 -05:00
Size sizeActualPxl,
int nStride,
SurfaceFormat nFormat,
IntPtr pvData,
[MarshalAs(UnmanagedType.LPStruct), In] ImageRequirements req,
2021-07-15 22:00:36 -05:00
BitmapOptions nOptions,
2021-07-11 23:04:40 -05:00
out HSpBitmap hBmp,
2021-07-15 22:00:36 -05:00
out ImageInformation info)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
internal static HRESULT SpBitmapLoadResource(
2021-07-11 23:04:40 -05:00
Win32Api.HINSTANCE hinst,
string stName,
int nType,
[MarshalAs(UnmanagedType.LPStruct), In] ImageRequirements req,
2021-07-15 22:00:36 -05:00
BitmapOptions nOptions,
2021-07-11 23:04:40 -05:00
out HSpBitmap hBmp,
2021-07-15 22:00:36 -05:00
out ImageInformation info)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
internal static HRESULT SpBitmapLoadBuffer(
2021-07-11 23:04:40 -05:00
IntPtr pvSrc,
uint cbSize,
[MarshalAs(UnmanagedType.LPStruct), In] ImageRequirements req,
2021-07-15 22:00:36 -05:00
BitmapOptions nOptions,
2021-07-11 23:04:40 -05:00
out HSpBitmap hBmp,
2021-07-15 22:00:36 -05:00
out ImageInformation info)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
internal static HRESULT SpBitmapDelete(HSpBitmap hBmp)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
internal static HRESULT SpSoundLoadBuffer(
2021-07-11 23:04:40 -05:00
IntPtr pBuffer,
int dwSize,
2021-07-15 22:00:36 -05:00
SoundOptions options,
out HSpSound hSound,
out SoundInformation info)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
internal static HRESULT SpSoundDispose(
HSpSound hSound,
SoundInformation info)
{
throw new NotImplementedException();
}
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
[Flags]
2021-07-11 23:04:40 -05:00
internal enum BitmapOptions
{
None = 0,
Decode = 1,
Flip = 2,
Valid = Flip | Decode, // 0x00000003
}
2021-07-15 22:00:36 -05:00
[Flags]
2021-07-11 23:04:40 -05:00
internal enum SoundOptions
{
None = 0,
Decode = 1,
BigEndian = 2,
Valid = BigEndian | Decode, // 0x00000003
}
[ComVisible(false)]
public struct SoundHeader
{
public ushort wFormatTag;
public ushort nChannels;
public uint nSamplesPerSec;
public uint nAvgBytesPerSec;
public ushort nBlockAlign;
public ushort wBitsPerSample;
public ushort cbExtraData;
public uint cbDataSize;
}
[ComVisible(false)]
public struct SoundData
{
2021-07-15 22:00:36 -05:00
public byte[] rgData;
2021-07-11 23:04:40 -05:00
}
[ComVisible(false)]
public struct SoundInformation
{
2021-07-15 22:00:36 -05:00
public SoundHeader Header;
public SoundData Data;
public static SoundInformation NULL = new SoundInformation();
2021-07-11 23:04:40 -05:00
}
[ComVisible(false)]
public struct HSpSound
{
public IntPtr h;
2021-07-15 22:00:36 -05:00
public static readonly HSpSound NULL = new HSpSound();
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
public static bool operator ==(HSpSound hA, HSpSound hB) => hA.h == hB.h;
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
public static bool operator !=(HSpSound hA, HSpSound hB) => hA.h != hB.h;
2021-07-11 23:04:40 -05:00
2021-07-15 22:00:36 -05:00
public override bool Equals(object oCompare) => oCompare is HSpSound hspSound && this.h == hspSound.h;
2021-07-11 23:04:40 -05:00
public override int GetHashCode() => (int)this.h.ToInt64();
}
2021-07-11 22:59:29 -05:00
}
}