OSDN Git Service

Merge branch 'feature/#36529_SlimDXからSharpDXへの移行' into develop
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d9 / Surface.h
diff --git a/SlimDXc_Jun2010(VC++2008)/source/direct3d9/Surface.h b/SlimDXc_Jun2010(VC++2008)/source/direct3d9/Surface.h
deleted file mode 100644 (file)
index 66480aa..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-#include "Resource.h"\r
-#include "../DataRectangle.h"\r
-\r
-#include "SurfaceDescription9.h"\r
-\r
-using System::Runtime::InteropServices::OutAttribute;\r
-\r
-namespace SlimDX\r
-{\r
-       ref class DataStream;\r
-\r
-       namespace Direct3D9\r
-       {\r
-               value class ImageInformation;\r
-               ref class DeviceEx;\r
-\r
-               /// <summary>Applications use the methods of the Surface class to query and prepare surfaces.</summary>\r
-               /// <unmanaged>IDirect3DSurface9</unmanaged>\r
-               public ref class Surface : public Resource\r
-               {\r
-                       COMOBJECT(IDirect3DSurface9, Surface);\r
-\r
-               private:\r
-                       static Result FromMemory_Internal( Surface^ surface, const void* memory, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, const RECT* sourceRectangle, const RECT* destinationRectangle, array<PaletteEntry>^ sourcePalette, array<PaletteEntry>^ destinationPalette );\r
-                       static Result FromFileInMemory_Internal( Surface^ surface, const void* memory, UINT size, Filter filter, int colorKey, const RECT* sourceRectangle, const RECT* destinationRectangle, array<PaletteEntry>^ palette, ImageInformation* imageInformation );\r
-\r
-                       int ComputeLockedSize(const D3DLOCKED_RECT& lockedRect);\r
-\r
-               public:\r
-                       virtual ~Surface() { }\r
-\r
-                       /// <summary>Creates a render target surface.</summary>\r
-                       /// <param name="device">The device to use when creating the surface.</param>\r
-                       /// <param name="width">The width of the render target surface, in pixels.</param>\r
-                       /// <param name="height">The height of the render target surface, in pixels.</param>\r
-                       /// <param name="format">The format to use for this render target.</param>\r
-                       /// <param name="multisampleType">The multisample type of the buffer.</param>\r
-                       /// <param name="multisampleQuality">The multisampling quality level.</param>\r
-                       /// <param name="lockable">Specifies whether this surface should be lockable.</param>\r
-                       /// <returns>A newly created render target surface.</returns>\r
-                       /// <unmanaged>IDirect3DDevice9::CreateRenderTarget</unmanaged>\r
-                       static Surface^ CreateRenderTarget( SlimDX::Direct3D9::Device^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool lockable );\r
-                       \r
-                       /// <summary>Creates an offscreen surface.</summary>\r
-                       /// <param name="device">The device to use when creating the surface.</param>\r
-                       /// <param name="width">The width of the surface, in pixels.</param>\r
-                       /// <param name="height">The height of the surface, in pixels.</param>\r
-                       /// <param name="format">Describes the format to use.</param>\r
-                       /// <param name="pool">The memory pool to create the surface in.</param>\r
-                       /// <returns>A newly created offscreen surface..</returns>\r
-                       /// <unmanaged>IDirect3DDevice9::CreateOffscreenPlainSurface</unmanaged>\r
-                       static Surface^ CreateOffscreenPlain( SlimDX::Direct3D9::Device^ device, int width, int height, Format format, Pool pool );\r
-                       \r
-                       /// <summary>Creates a depth stencil surface.</summary>\r
-                       /// <param name="device">The device to use when creating the surface.</param>\r
-                       /// <param name="width">The width of the surface, in pixels.</param>\r
-                       /// <param name="height">The height of the surface, in pixels.</param>\r
-                       /// <param name="format">Describes the format to use.</param>\r
-                       /// <param name="multisampleType">The multisample type of the buffer.</param>\r
-                       /// <param name="multisampleQuality">The multisampling quality level.</param>\r
-                       /// <param name="discard">Whether or not the contents of the surface should be discarded after use.</param>\r
-                       /// <returns>A newly created depth-stencil surface.</returns>\r
-                       /// <unmanaged>IDirect3DDevice9::CreateDepthStencilSurface</unmanaged>\r
-                       static Surface^ CreateDepthStencil( SlimDX::Direct3D9::Device^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool discard );\r
-\r
-                       /// <summary>Creates a render target surface that can optionally be shared.</summary>\r
-                       /// <param name="device">The device to use when creating the surface.</param>\r
-                       /// <param name="width">The width of the render target surface, in pixels.</param>\r
-                       /// <param name="height">The height of the render target surface, in pixels.</param>\r
-                       /// <param name="format">The format to use for this render target.</param>\r
-                       /// <param name="multisampleType">The multisample type of the buffer.</param>\r
-                       /// <param name="multisampleQuality">The multisampling quality level.</param>\r
-                       /// <param name="lockable">Specifies whether this surface should be lockable.</param>\r
-                       /// <returns>A newly created render target surface.</returns>\r
-                       /// <unmanaged>IDirect3DDevice9::CreateRenderTarget</unmanaged>\r
-                       static Surface^ CreateRenderTarget( SlimDX::Direct3D9::Device^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool lockable, [Out] System::IntPtr% sharedHandle );\r
-                       \r
-                       /// <summary>Creates an offscreen surface that can optionally be shared.</summary>\r
-                       /// <param name="device">The device to use when creating the surface.</param>\r
-                       /// <param name="width">The width of the surface, in pixels.</param>\r
-                       /// <param name="height">The height of the surface, in pixels.</param>\r
-                       /// <param name="format">Describes the format to use.</param>\r
-                       /// <param name="pool">The memory pool to create the surface in.</param>\r
-                       /// <returns>A newly created offscreen surface..</returns>\r
-                       /// <unmanaged>IDirect3DDevice9::CreateOffscreenPlainSurface</unmanaged>\r
-                       static Surface^ CreateOffscreenPlain( SlimDX::Direct3D9::Device^ device, int width, int height, Format format, Pool pool, [Out] System::IntPtr% sharedHandle );\r
-                       \r
-                       /// <summary>Creates a depth stencil surface that can optionally be shared.</summary>\r
-                       /// <param name="device">The device to use when creating the surface.</param>\r
-                       /// <param name="width">The width of the surface, in pixels.</param>\r
-                       /// <param name="height">The height of the surface, in pixels.</param>\r
-                       /// <param name="format">Describes the format to use.</param>\r
-                       /// <param name="multisampleType">The multisample type of the buffer.</param>\r
-                       /// <param name="multisampleQuality">The multisampling quality level.</param>\r
-                       /// <param name="discard">Whether or not the contents of the surface should be discarded after use.</param>\r
-                       /// <returns>A newly created depth-stencil surface.</returns>\r
-                       /// <unmanaged>IDirect3DDevice9::CreateDepthStencilSurface</unmanaged>\r
-                       static Surface^ CreateDepthStencil( SlimDX::Direct3D9::Device^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool discard, [Out] System::IntPtr% sharedHandle );\r
-\r
-                       static Surface^ CreateRenderTargetEx( SlimDX::Direct3D9::DeviceEx^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool lockable, Usage usage );\r
-                       static Surface^ CreateRenderTargetEx( SlimDX::Direct3D9::DeviceEx^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool lockable, Usage usage, [Out] System::IntPtr% sharedHandle );\r
-                       static Surface^ CreateOffscreenPlainEx( SlimDX::Direct3D9::DeviceEx^ device, int width, int height, Format format, Pool pool, Usage usage );\r
-                       static Surface^ CreateOffscreenPlainEx( SlimDX::Direct3D9::DeviceEx^ device, int width, int height, Format format, Pool pool, Usage usage, [Out] System::IntPtr% sharedHandle );\r
-                       static Surface^ CreateDepthStencilEx( SlimDX::Direct3D9::DeviceEx^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool discard, Usage usage );\r
-                       static Surface^ CreateDepthStencilEx( SlimDX::Direct3D9::DeviceEx^ device, int width, int height, Format format, MultisampleType multisampleType, int multisampleQuality, bool discard, Usage usage, [Out] System::IntPtr% sharedHandle );\r
-\r
-                       /// <summary>Loads a surface from memory.</summary>\r
-                       /// <param name="surface">The destination surface that will receive the image.</param>\r
-                       /// <param name="memory">The array containing the surface data</param>\r
-                       /// <param name="filter">Combination of one or more flags controlling how the image is filtered.</param>\r
-                       /// <param name="colorKey">A color value to replace with transparent black, or 0 to disable colorkey.</param>\r
-                       /// <param name="sourceFormat">Pixel format of the source image.</param>\r
-                       /// <param name="sourcePitch">Surface pitch of the source image, in bytes.</param>\r
-                       /// <param name="sourceRectangle">Specifies the dimensions of the source image.</param>\r
-                       /// <param name="destinationRectangle">Specifies the destination rectangle to use.</param>\r
-                       /// <param name="sourcePalette">The source image palette (256 colors).</param>\r
-                       /// <param name="destinationPalette">The destination palette (256 colors).</param>\r
-                       /// <returns>A result code indicating success or failure.</returns>\r
-                       static Result FromMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, array<PaletteEntry>^ sourcePalette, array<PaletteEntry>^ destinationPalette );\r
-                       \r
-                       /// <summary>Loads a surface from memory.</summary>\r
-                       /// <param name="surface">The destination surface that will receive the image.</param>\r
-                       /// <param name="memory">The array containing the surface data</param>\r
-                       /// <param name="filter">Combination of one or more flags controlling how the image is filtered.</param>\r
-                       /// <param name="colorKey">A color value to replace with transparent black, or 0 to disable colorkey.</param>\r
-                       /// <param name="sourceFormat">Pixel format of the source image.</param>\r
-                       /// <param name="sourcePitch">Surface pitch of the source image, in bytes.</param>\r
-                       /// <param name="sourceRectangle">Specifies the dimensions of the source image.</param>\r
-                       /// <param name="sourcePalette">The source image palette (256 colors).</param>\r
-                       /// <param name="destinationPalette">The destination palette (256 colors).</param>\r
-                       /// <returns>A result code indicating success or failure.</returns>\r
-                       static Result FromMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle, array<PaletteEntry>^ sourcePalette, array<PaletteEntry>^ destinationPalette );\r
-                       \r
-                       /// <summary>Loads a surface from memory.</summary>\r
-                       /// <param name="surface">The destination surface that will receive the image.</param>\r
-                       /// <param name="memory">The array containing the surface data</param>\r
-                       /// <param name="filter">Combination of one or more flags controlling how the image is filtered.</param>\r
-                       /// <param name="colorKey">A color value to replace with transparent black, or 0 to disable colorkey.</param>\r
-                       /// <param name="sourceFormat">Pixel format of the source image.</param>\r
-                       /// <param name="sourcePitch">Surface pitch of the source image, in bytes.</param>\r
-                       /// <param name="sourceRectangle">Specifies the dimensions of the source image.</param>\r
-                       /// <param name="destinationRectangle">Specifies the destination rectangle to use.</param>\r
-                       /// <returns>A result code indicating success or failure.</returns>\r
-                       static Result FromMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
-                       \r
-                       /// <summary>Loads a surface from memory.</summary>\r
-                       /// <param name="surface">The destination surface that will receive the image.</param>\r
-                       /// <param name="memory">The array containing the surface data</param>\r
-                       /// <param name="filter">Combination of one or more flags controlling how the image is filtered.</param>\r
-                       /// <param name="colorKey">A color value to replace with transparent black, or 0 to disable colorkey.</param>\r
-                       /// <param name="sourceFormat">Pixel format of the source image.</param>\r
-                       /// <param name="sourcePitch">Surface pitch of the source image, in bytes.</param>\r
-                       /// <param name="sourceRectangle">Specifies the dimensions of the source image.</param>\r
-                       /// <returns>A result code indicating success or failure..</returns>\r
-                       static Result FromMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle );\r
-\r
-                       /// <summary></summary>\r
-                       /// <param name="surface">                         </param>\r
-                       /// <param name="stream">                          </param>\r
-                       /// <param name="filter">                          </param>\r
-                       /// <param name="colorKey">                        </param>\r
-                       /// <param name="sourceFormat">            </param>\r
-                       /// <param name="sourcePitch">             </param>\r
-                       /// <param name="sourceRectangle">         </param>\r
-                       /// <param name="destinationRectangle"></param>\r
-                       /// <param name="sourcePalette">           </param>\r
-                       /// <param name="destinationPalette">  </param>\r
-                       /// <returns>.</returns>\r
-                       static Result FromStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, array<PaletteEntry>^ sourcePalette, array<PaletteEntry>^ destinationPalette );\r
-                       static Result FromStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle, array<PaletteEntry>^ sourcePalette, array<PaletteEntry>^ destinationPalette );\r
-                       static Result FromStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
-                       static Result FromStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, Format sourceFormat, int sourcePitch, System::Drawing::Rectangle sourceRectangle );\r
-\r
-                       static Result FromFileInMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, array<PaletteEntry>^ palette, [Out] ImageInformation% imageInformation );\r
-                       static Result FromFileInMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, [Out] ImageInformation% imageInformation );\r
-                       static Result FromFileInMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
-                       static Result FromFileInMemory( Surface^ surface, array<System::Byte>^ memory, Filter filter, int colorKey );\r
-\r
-                       static Result FromFileInStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, array<PaletteEntry>^ palette, [Out] ImageInformation% imageInformation );\r
-                       static Result FromFileInStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, [Out] ImageInformation% imageInformation );\r
-                       static Result FromFileInStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
-                       static Result FromFileInStream( Surface^ surface, System::IO::Stream^ stream, Filter filter, int colorKey );\r
-\r
-                       static Result FromFile( Surface^ surface, System::String^ fileName, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, array<PaletteEntry>^ palette, [Out] ImageInformation% imageInformation );\r
-                       static Result FromFile( Surface^ surface, System::String^ fileName, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, [Out] ImageInformation% imageInformation );\r
-                       static Result FromFile( Surface^ surface, System::String^ fileName, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
-                       static Result FromFile( Surface^ surface, System::String^ fileName, Filter filter, int colorKey );\r
-\r
-                       static Result FromSurface( Surface^ destinationSurface, Surface^ sourceSurface, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, array<PaletteEntry>^ destinationPalette, array<PaletteEntry>^ sourcePalette );\r
-                       static Result FromSurface( Surface^ destinationSurface, Surface^ sourceSurface, Filter filter, int colorKey, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
-                       static Result FromSurface( Surface^ destinationSurface, Surface^ sourceSurface, Filter filter, int colorKey );\r
-\r
-                       static DataStream^ ToStream( Surface^ surface, ImageFileFormat format, System::Drawing::Rectangle rectangle, array<PaletteEntry>^ palette );\r
-                       static DataStream^ ToStream( Surface^ surface, ImageFileFormat format, System::Drawing::Rectangle rectangle );\r
-                       static DataStream^ ToStream( Surface^ surface, ImageFileFormat format );\r
-\r
-                       static Result ToFile( Surface^ surface, System::String^ fileName, ImageFileFormat format, System::Drawing::Rectangle rectangle, array<PaletteEntry>^ palette );\r
-                       static Result ToFile( Surface^ surface, System::String^ fileName, ImageFileFormat format, System::Drawing::Rectangle rectangle );\r
-                       static Result ToFile( Surface^ surface, System::String^ fileName, ImageFileFormat format );\r
-\r
-                       /// <summary>Locks a rectangle on the surface. </summary>\r
-                       /// <param name="flags">Combination of flags describing the type of lock to perform.</param>\r
-                       /// <returns>Data describing the locked area.</returns>\r
-                       DataRectangle^ LockRectangle( LockFlags flags );\r
-\r
-                       /// <summary>Locks a rectangle on the surface.</summary>\r
-                       /// <param name="rect">The area to lock.</param>\r
-                       /// <param name="flags">Combination of flags describing the type of lock to perform.</param>\r
-                       /// <returns>Data describing the locked area.</returns>\r
-                       DataRectangle^ LockRectangle( System::Drawing::Rectangle rect, LockFlags flags );\r
-                       \r
-                       /// <summary>Unlocks a rectangle on the surface.</summary>\r
-                       /// <returns>A result code indicating whether the unlock was successful.</returns>\r
-                       Result UnlockRectangle();\r
-\r
-                       System::IntPtr GetDC();\r
-                       Result ReleaseDC( System::IntPtr hdc );\r
-\r
-                       generic<typename TContainer> where TContainer : ComObject\r
-                               TContainer GetContainer();\r
-\r
-                       /// <summary>Returns a description of the surface.</summary>\r
-                       property SurfaceDescription Description\r
-                       {\r
-                               SurfaceDescription get();\r
-                       }\r
-               };\r
-       }\r
-}\r