RetroArch
d2derr.h
Go to the documentation of this file.
1 /*=========================================================================*\
2 
3  Copyright (c) Microsoft Corporation. All rights reserved.
4 
5 \*=========================================================================*/
6 
7 #pragma once
8 
9 /*#include <winapifamily.h>*/
10 
11 /*#pragma region Desktop Family*/
12 /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)*/
13 
14 /*=========================================================================*\
15  D2D Status Codes
16 \*=========================================================================*/
17 
18 #define FACILITY_D2D 0x899
19 
20 #define MAKE_D2DHR( sev, code )\
21  MAKE_HRESULT( sev, FACILITY_D2D, (code) )
22 
23 #define MAKE_D2DHR_ERR( code )\
24  MAKE_D2DHR( 1, code )
25 
26 
27 //+----------------------------------------------------------------------------
28 //
29 // D2D error codes
30 //
31 //------------------------------------------------------------------------------
32 
33 //
34 // Error codes shared with WINCODECS
35 //
36 
37 //
38 // The pixel format is not supported.
39 //
40 #define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT
41 
42 //
43 // Error codes that were already returned in prior versions and were part of the
44 // MIL facility.
45 
46 //
47 // Error codes mapped from WIN32 where there isn't already another HRESULT based
48 // define
49 //
50 
51 //
52 // The supplied buffer was too small to accommodate the data.
53 //
54 #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
55 
56 
57 //
58 // The file specified was not found.
59 //
60 #define D2DERR_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)
61 
62 
63 #ifndef D2DERR_WRONG_STATE
64 
65 //
66 // D2D specific codes
67 //
68 
69 //
70 // The object was not in the correct state to process the method.
71 //
72 #define D2DERR_WRONG_STATE MAKE_D2DHR_ERR(0x001)
73 
74 //
75 // The object has not yet been initialized.
76 //
77 #define D2DERR_NOT_INITIALIZED MAKE_D2DHR_ERR(0x002)
78 
79 //
80 // The requested opertion is not supported.
81 //
82 #define D2DERR_UNSUPPORTED_OPERATION MAKE_D2DHR_ERR(0x003)
83 
84 //
85 // The geomery scanner failed to process the data.
86 //
87 #define D2DERR_SCANNER_FAILED MAKE_D2DHR_ERR(0x004)
88 
89 //
90 // D2D could not access the screen.
91 //
92 #define D2DERR_SCREEN_ACCESS_DENIED MAKE_D2DHR_ERR(0x005)
93 
94 //
95 // A valid display state could not be determined.
96 //
97 #define D2DERR_DISPLAY_STATE_INVALID MAKE_D2DHR_ERR(0x006)
98 
99 //
100 // The supplied vector is vero.
101 //
102 #define D2DERR_ZERO_VECTOR MAKE_D2DHR_ERR(0x007)
103 
104 //
105 // An internal error (D2D bug) occurred. On checked builds, we would assert.
106 //
107 // The application should close this instance of D2D and should consider
108 // restarting its process.
109 //
110 #define D2DERR_INTERNAL_ERROR MAKE_D2DHR_ERR(0x008)
111 
112 //
113 // The display format we need to render is not supported by the
114 // hardware device.
115 //
116 #define D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED MAKE_D2DHR_ERR(0x009)
117 
118 //
119 // A call to this method is invalid.
120 //
121 #define D2DERR_INVALID_CALL MAKE_D2DHR_ERR(0x00A)
122 
123 //
124 // No HW rendering device is available for this operation.
125 //
126 #define D2DERR_NO_HARDWARE_DEVICE MAKE_D2DHR_ERR(0x00B)
127 
128 //
129 // There has been a presentation error that may be recoverable. The caller
130 // needs to recreate, rerender the entire frame, and reattempt present.
131 //
132 #define D2DERR_RECREATE_TARGET MAKE_D2DHR_ERR(0x00C)
133 
134 //
135 // Shader construction failed because it was too complex.
136 //
137 #define D2DERR_TOO_MANY_SHADER_ELEMENTS MAKE_D2DHR_ERR(0x00D)
138 
139 //
140 // Shader compilation failed.
141 //
142 #define D2DERR_SHADER_COMPILE_FAILED MAKE_D2DHR_ERR(0x00E)
143 
144 //
145 // Requested DX surface size exceeded maximum texture size.
146 //
147 #define D2DERR_MAX_TEXTURE_SIZE_EXCEEDED MAKE_D2DHR_ERR(0x00F)
148 
149 //
150 // The requested D2D version is not supported.
151 //
152 #define D2DERR_UNSUPPORTED_VERSION MAKE_D2DHR_ERR(0x010)
153 
154 //
155 // Invalid number.
156 //
157 #define D2DERR_BAD_NUMBER MAKE_D2DHR_ERR(0x0011)
158 
159 //
160 // Objects used together must be created from the same factory instance.
161 //
162 #define D2DERR_WRONG_FACTORY MAKE_D2DHR_ERR(0x012)
163 
164 //
165 // A layer resource can only be in use once at any point in time.
166 //
167 #define D2DERR_LAYER_ALREADY_IN_USE MAKE_D2DHR_ERR(0x013)
168 
169 //
170 // The pop call did not match the corresponding push call
171 //
172 #define D2DERR_POP_CALL_DID_NOT_MATCH_PUSH MAKE_D2DHR_ERR(0x014)
173 
174 //
175 // The resource was realized on the wrong render target
176 //
177 #define D2DERR_WRONG_RESOURCE_DOMAIN MAKE_D2DHR_ERR(0x015)
178 
179 //
180 // The push and pop calls were unbalanced
181 //
182 #define D2DERR_PUSH_POP_UNBALANCED MAKE_D2DHR_ERR(0x016)
183 
184 //
185 // Attempt to copy from a render target while a layer or clip rect is applied
186 //
187 #define D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT MAKE_D2DHR_ERR(0x017)
188 
189 //
190 // The brush types are incompatible for the call.
191 //
192 #define D2DERR_INCOMPATIBLE_BRUSH_TYPES MAKE_D2DHR_ERR(0x018)
193 
194 //
195 // An unknown win32 failure occurred.
196 //
197 #define D2DERR_WIN32_ERROR MAKE_D2DHR_ERR(0x019)
198 
199 //
200 // The render target is not compatible with GDI
201 //
202 #define D2DERR_TARGET_NOT_GDI_COMPATIBLE MAKE_D2DHR_ERR(0x01A)
203 
204 //
205 // A text client drawing effect object is of the wrong type
206 //
207 #define D2DERR_TEXT_EFFECT_IS_WRONG_TYPE MAKE_D2DHR_ERR(0x01B)
208 
209 //
210 // The application is holding a reference to the IDWriteTextRenderer interface
211 // after the corresponding DrawText or DrawTextLayout call has returned. The
212 // IDWriteTextRenderer instance will be zombied.
213 //
214 #define D2DERR_TEXT_RENDERER_NOT_RELEASED MAKE_D2DHR_ERR(0x01C)
215 
216 //
217 // The requested size is larger than the guaranteed supported texture size.
218 //
219 #define D2DERR_EXCEEDS_MAX_BITMAP_SIZE MAKE_D2DHR_ERR(0x01D)
220 
221 #else /*D2DERR_WRONG_STATE*/
222 
223 //
224 // D2D specific codes now live in winerror.h
225 //
226 
227 #endif /*D2DERR_WRONG_STATE*/
228 
229 /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
230 /*#pragma endregion*/