include: Add SoftwareBitmap runtimeclass in windows.graphics.imaging.idl.
This commit is contained in:
parent
af4838321e
commit
fbe99509d6
1 changed files with 157 additions and 0 deletions
|
@ -29,11 +29,63 @@ import "windows.graphics.directx.direct3d11.idl";
|
||||||
import "windows.storage.streams.idl";
|
import "windows.storage.streams.idl";
|
||||||
|
|
||||||
namespace Windows.Graphics.Imaging {
|
namespace Windows.Graphics.Imaging {
|
||||||
|
typedef enum BitmapAlphaMode BitmapAlphaMode;
|
||||||
|
typedef enum BitmapBufferAccessMode BitmapBufferAccessMode;
|
||||||
|
typedef enum BitmapPixelFormat BitmapPixelFormat;
|
||||||
typedef struct BitmapPlaneDescription BitmapPlaneDescription;
|
typedef struct BitmapPlaneDescription BitmapPlaneDescription;
|
||||||
|
|
||||||
interface IBitmapBuffer;
|
interface IBitmapBuffer;
|
||||||
|
interface ISoftwareBitmap;
|
||||||
|
interface ISoftwareBitmapFactory;
|
||||||
|
interface ISoftwareBitmapStatics;
|
||||||
|
|
||||||
runtimeclass BitmapBuffer;
|
runtimeclass BitmapBuffer;
|
||||||
|
runtimeclass SoftwareBitmap;
|
||||||
|
|
||||||
|
declare {
|
||||||
|
interface Windows.Foundation.Collections.IIterable<Windows.Graphics.Imaging.BitmapPixelFormat>;
|
||||||
|
interface Windows.Foundation.Collections.IIterable<Windows.Graphics.Imaging.SoftwareBitmap *>;
|
||||||
|
interface Windows.Foundation.Collections.IIterator<Windows.Graphics.Imaging.BitmapPixelFormat>;
|
||||||
|
interface Windows.Foundation.Collections.IIterator<Windows.Graphics.Imaging.SoftwareBitmap *>;
|
||||||
|
interface Windows.Foundation.Collections.IVectorView<Windows.Graphics.Imaging.BitmapPixelFormat>;
|
||||||
|
interface Windows.Foundation.IAsyncOperation<Windows.Graphics.Imaging.SoftwareBitmap *>;
|
||||||
|
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Graphics.Imaging.SoftwareBitmap *>;
|
||||||
|
}
|
||||||
|
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
enum BitmapAlphaMode
|
||||||
|
{
|
||||||
|
Premultiplied = 0,
|
||||||
|
Straight = 1,
|
||||||
|
Ignore = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
enum BitmapBufferAccessMode
|
||||||
|
{
|
||||||
|
Read = 0,
|
||||||
|
ReadWrite = 1,
|
||||||
|
Write = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
enum BitmapPixelFormat
|
||||||
|
{
|
||||||
|
Unknown = 0,
|
||||||
|
Rgba16 = 12,
|
||||||
|
Rgba8 = 30,
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
Gray16 = 57,
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
Gray8 = 62,
|
||||||
|
Bgra8 = 87,
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
Nv12 = 103,
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 6.0)]
|
||||||
|
P010 = 104,
|
||||||
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
|
Yuy2 = 107,
|
||||||
|
};
|
||||||
|
|
||||||
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
|
||||||
struct BitmapPlaneDescription
|
struct BitmapPlaneDescription
|
||||||
|
@ -56,6 +108,98 @@ namespace Windows.Graphics.Imaging {
|
||||||
HRESULT GetPlaneDescription([in] INT32 index, [out, retval] Windows.Graphics.Imaging.BitmapPlaneDescription *value);
|
HRESULT GetPlaneDescription([in] INT32 index, [out, retval] Windows.Graphics.Imaging.BitmapPlaneDescription *value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
contract(Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
|
exclusiveto(Windows.Graphics.Imaging.SoftwareBitmap),
|
||||||
|
uuid(689e0708-7eef-483f-963f-da938818e073)
|
||||||
|
]
|
||||||
|
interface ISoftwareBitmap : IInspectable
|
||||||
|
requires Windows.Foundation.IClosable
|
||||||
|
{
|
||||||
|
[propget] HRESULT BitmapPixelFormat([out, retval] Windows.Graphics.Imaging.BitmapPixelFormat *value);
|
||||||
|
[propget] HRESULT BitmapAlphaMode([out, retval] Windows.Graphics.Imaging.BitmapAlphaMode *value);
|
||||||
|
[propget] HRESULT PixelWidth([out, retval] INT32 *value);
|
||||||
|
[propget] HRESULT PixelHeight([out, retval] INT32 *value);
|
||||||
|
[propget] HRESULT IsReadOnly([out, retval] boolean *value);
|
||||||
|
[propput] HRESULT DpiX([in] DOUBLE value);
|
||||||
|
[propget] HRESULT DpiX([out, retval] DOUBLE *value);
|
||||||
|
[propput] HRESULT DpiY([in] DOUBLE value);
|
||||||
|
[propget] HRESULT DpiY([out, retval] DOUBLE *value);
|
||||||
|
HRESULT LockBuffer([in] Windows.Graphics.Imaging.BitmapBufferAccessMode mode,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.BitmapBuffer **value);
|
||||||
|
HRESULT CopyTo([in] Windows.Graphics.Imaging.SoftwareBitmap *bitmap);
|
||||||
|
HRESULT CopyFromBuffer([in] Windows.Storage.Streams.IBuffer *buffer);
|
||||||
|
HRESULT CopyToBuffer([in] Windows.Storage.Streams.IBuffer *buffer);
|
||||||
|
HRESULT GetReadOnlyView([out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
contract(Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
|
exclusiveto(Windows.Graphics.Imaging.SoftwareBitmap),
|
||||||
|
uuid(c99feb69-2d62-4d47-a6b3-4fdb6a07fdf8)
|
||||||
|
]
|
||||||
|
interface ISoftwareBitmapFactory : IInspectable
|
||||||
|
{
|
||||||
|
HRESULT Create(
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapPixelFormat format,
|
||||||
|
[in] INT32 width,
|
||||||
|
[in] INT32 height,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
HRESULT CreateWithAlpha(
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapPixelFormat format,
|
||||||
|
[in] INT32 width,
|
||||||
|
[in] INT32 height,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapAlphaMode alpha,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
contract(Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
|
exclusiveto(Windows.Graphics.Imaging.SoftwareBitmap),
|
||||||
|
uuid(df0385db-672f-4a9d-806e-c2442f343e86)
|
||||||
|
]
|
||||||
|
interface ISoftwareBitmapStatics : IInspectable
|
||||||
|
{
|
||||||
|
HRESULT Copy(
|
||||||
|
[in] Windows.Graphics.Imaging.SoftwareBitmap *source,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
[overload("Convert")]
|
||||||
|
HRESULT Convert(
|
||||||
|
[in] Windows.Graphics.Imaging.SoftwareBitmap *source,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapPixelFormat format,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
[overload("Convert")]
|
||||||
|
HRESULT ConvertWithAlpha(
|
||||||
|
[in] Windows.Graphics.Imaging.SoftwareBitmap *source,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapPixelFormat format,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapAlphaMode alpha,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
[overload("CreateCopyFromBuffer")]
|
||||||
|
HRESULT CreateCopyFromBuffer(
|
||||||
|
[in] Windows.Storage.Streams.IBuffer *source,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapPixelFormat format,
|
||||||
|
[in] INT32 width,
|
||||||
|
[in] INT32 height,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
[overload("CreateCopyFromBuffer")]
|
||||||
|
HRESULT CreateCopyWithAlphaFromBuffer(
|
||||||
|
[in] Windows.Storage.Streams.IBuffer *source,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapPixelFormat format,
|
||||||
|
[in] INT32 width,
|
||||||
|
[in] INT32 height,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapAlphaMode alpha,
|
||||||
|
[out, retval] Windows.Graphics.Imaging.SoftwareBitmap **value);
|
||||||
|
[overload("CreateCopyFromSurfaceAsync")]
|
||||||
|
HRESULT CreateCopyFromSurfaceAsync(
|
||||||
|
[in] Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface *surface,
|
||||||
|
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Graphics.Imaging.SoftwareBitmap *> **value);
|
||||||
|
[overload("CreateCopyFromSurfaceAsync")]
|
||||||
|
HRESULT CreateCopyWithAlphaFromSurfaceAsync(
|
||||||
|
[in] Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface *surface,
|
||||||
|
[in] Windows.Graphics.Imaging.BitmapAlphaMode alpha,
|
||||||
|
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Graphics.Imaging.SoftwareBitmap *> **value);
|
||||||
|
}
|
||||||
|
|
||||||
[
|
[
|
||||||
contract(Windows.Foundation.UniversalApiContract, 1.0),
|
contract(Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
marshaling_behavior(agile),
|
marshaling_behavior(agile),
|
||||||
|
@ -67,4 +211,17 @@ namespace Windows.Graphics.Imaging {
|
||||||
interface Windows.Foundation.IMemoryBuffer;
|
interface Windows.Foundation.IMemoryBuffer;
|
||||||
interface Windows.Foundation.IClosable;
|
interface Windows.Foundation.IClosable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
activatable(Windows.Graphics.Imaging.ISoftwareBitmapFactory, Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
|
contract(Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
|
marshaling_behavior(agile),
|
||||||
|
static(Windows.Graphics.Imaging.ISoftwareBitmapStatics, Windows.Foundation.UniversalApiContract, 1.0),
|
||||||
|
threading(both)
|
||||||
|
]
|
||||||
|
runtimeclass SoftwareBitmap
|
||||||
|
{
|
||||||
|
[default] interface Windows.Graphics.Imaging.ISoftwareBitmap;
|
||||||
|
interface Windows.Foundation.IClosable;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue