+++ /dev/null
-/*\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
-namespace SlimDX\r
-{\r
- namespace Direct2D\r
- {\r
- /// <summary>Defines result codes that are returned by Direct2D functions.</summary>\r
- /// <unmanaged href="ms679692">HRESULT</unmanaged>\r
- public ref class ResultCode sealed\r
- {\r
- private:\r
- ResultCode();\r
- \r
- public:\r
- /// <summary>\r
- /// Invalid number.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_BAD_NUMBER</unmanaged>\r
- property static Result BadNumber\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The display format needed to render is not supported by the hardware device.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED</unmanaged>\r
- property static Result DisplayFormatNotSupported\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// A valid display state could not be determined.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_DISPLAY_STATE_INVALID</unmanaged>\r
- property static Result DisplayStateInvalid\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Represents a generic failure result.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged href="aa378137">E_FAIL</unmanaged>\r
- property static Result Failure\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The brush types are incompatible for the call.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_INCOMPATIBLE_BRUSH_TYPES</unmanaged>\r
- property static Result IncompatibleBrushTypes\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The supplied buffer was too small to accomodate the data.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_INSUFFICIENT_BUFFER</unmanaged>\r
- property static Result InsufficientBuffer\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The object has not yet been initialized.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_NOT_INITIALIZED</unmanaged>\r
- property static Result NotInitialized\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// An internal error (D2D bug) occurred. On checked builds, we would assert.\r
- /// The application should close this instance of D2D and should consider restarting its process.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_INTERNAL_ERROR</unmanaged>\r
- property static Result InternalError\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// A call to this method is invalid.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_INVALID_CALL</unmanaged>\r
- property static Result InvalidCall\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// A layer resource was used more than once.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_LAYER_ALREADY_IN_USE</unmanaged>\r
- property static Result LayerAlreadyInUse\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Requested DX surface size exceeded maximum texture size.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_MAX_TEXTURE_SIZE_EXCEEDED</unmanaged>\r
- property static Result MaxTextureSizeExceeded\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// No HW rendering device is available for this operation.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_NO_HARDWARE_DEVICE</unmanaged>\r
- property static Result NoHardwareDevice\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The pop call did not match the corresponding push call.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_POP_CALL_DID_NOT_MATCH_PUSH</unmanaged>\r
- property static Result PopCallDidNotMatchPush\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The push and pop calls were unbalanced.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_PUSH_POP_UNBALANCED</unmanaged>\r
- property static Result PushPopUnbalanced\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// There has been a presentation error that may be recoverable. The caller\r
- /// needs to recreate, rerender the entire frame, and reattempt present.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_RECREATE_TARGET</unmanaged>\r
- property static Result RecreateTarget\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Attempted to copy from a render target while a layer or clip rect is applied.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT</unmanaged>\r
- property static Result RenderTargetHasLayerOrClippingRectangle\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The geometry scanner failed to process the data.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_SCANNER_FAILED</unmanaged>\r
- property static Result ScannerFailed\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// D2D could not access the screen.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_SCREEN_ACCESS_DENIED</unmanaged>\r
- property static Result ScreenAccessDenied\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Shader compilation failed.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_SHADER_COMPILE_FAILED</unmanaged>\r
- property static Result ShaderCompileFailed\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Represents the result of a successful operation.\r
- /// </summary>\r
- /// <remarks>This is a successful result.</remarks>\r
- /// <unmanaged href="aa378137">E_FAIL</unmanaged>\r
- property static Result Success\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The render target is not compatible with GDI.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_TARGET_NOT_GDI_COMPATIBLE</unmanaged>\r
- property static Result TargetNotGdiCompatible\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// A text client drawing effect object is of the wrong type.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_TEXT_EFFECT_IS_WRONG_TYPE</unmanaged>\r
- property static Result TextEffectIsWrongType\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The application is holding a reference to the IDWriteTextRenderer interface \r
- /// after the corresponding DrawText or DrawTextLayout call has returned.\r
- /// The TextRenderer instance will be zombied.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_TEXT_RENDERER_NOT_RELEASED</unmanaged>\r
- property static Result TextRendererNotReleased\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Shader construction failed because it was too complex.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_TOO_MANY_SHADER_ELEMENTS</unmanaged>\r
- property static Result TooManyShaderElements\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The requested opertion is not supported.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_UNSUPPORTED_OPERATION</unmanaged>\r
- property static Result UnsupportedOperation\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The requested D2D version is not supported.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_UNSUPPORTED_VERSION</unmanaged>\r
- property static Result UnsupportedVersion\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// An unknown Win32 failure occurred.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_WIN32_ERROR</unmanaged>\r
- property static Result Win32Error\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// Objects used together must be created from the same factory instance.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_WRONG_FACTORY</unmanaged>\r
- property static Result WrongFactory\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The resource was realized on the wrong render target.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_WRONG_RESOURCE_DOMAIN</unmanaged>\r
- property static Result WrongResourceDomain\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The object was not in the correct state to process the method.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_WRONG_STATE</unmanaged>\r
- property static Result WrongState\r
- {\r
- Result get();\r
- };\r
-\r
- /// <summary>\r
- /// The supplied vector is vero.\r
- /// </summary>\r
- /// <remarks>This is a failed result.</remarks>\r
- /// <unmanaged>D2DERR_ZERO_VECTOR</unmanaged>\r
- property static Result ZeroVector\r
- {\r
- Result get();\r
- };\r
- };\r
- }\r
-}
\ No newline at end of file