- Overview
- Files
- Related Pages
- Modules

- File List
- Globals

tanvastouch_errors.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 *
3 * Tanvas, Inc
4 * http://www.tanvas.co
5 *
6 * Copyright(c) 2019. All Rights Reserved
7 *
8 * Source code from Tanvas is supplied under the terms of a license agreement
9 * and may not be copied or disclosed except in accordance with the terms of that agreement.
10 * The various license agreements may be found at the Tanvas web site.
11 *
12 *********************************************************************************************************************/
13
14 #ifndef TANVAS_TANVASTOUCH_ERRORS_H
15 #define TANVAS_TANVASTOUCH_ERRORS_H
16
27 #ifdef __cplusplus
28 #ifdef __cpp_initializer_lists
29 #define TANVASTOUCH_AS(t, v) (t{v})
30 #else
31 #define TANVASTOUCH_AS(t, v) (t(v))
32 #endif
33 #else
34 #define TANVASTOUCH_AS(t, v) ((t)v)
35 #endif
36
42 #define TANVASTOUCH_INVALID_RESOURCE_ID TANVASTOUCH_AS(tanvastouch_resource_id, 0)
43
49 #define TANVASTOUCH_OK TANVASTOUCH_AS(int, 0)
50
51 /* clang-format off */
52
58 #define TANVASTOUCH_ERROR (1u << 16u)
59
65 #define TANVASTOUCH_ERROR_RESOURCE (2u << 16u)
66
72 #define TANVASTOUCH_ERROR_ENGINE (3u << 16u)
73
79 #define TANVASTOUCH_ERROR_CLIENT (4u << 16u)
80
87 #define TANVASTOUCH_ERROR_WRAPPER (5u << 16u)
88
95 #define TANVASTOUCH_ERROR_TEXTURE (6u << 16u)
96
103 #define TANVASTOUCH_ERROR_MATERIAL (7u << 16u)
104
110 #define TANVASTOUCH_ERROR_GENERAL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR | 65535u))
111
118 #define TANVASTOUCH_ERROR_RESOURCE_UNKNOWN TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 1u))
119
125 #define TANVASTOUCH_ERROR_RESOURCE_CANNOT_CREATE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 2u))
126
132 #define TANVASTOUCH_ERROR_RESOURCE_DATA_REQUIRED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 3u))
133
148 #define TANVASTOUCH_ERROR_TEXTURE_OFFSET_TOO_LARGE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 1u))
149
155 #define TANVASTOUCH_ERROR_TEXTURE_SIZE_MISMATCH TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 2u))
156
162 #define TANVASTOUCH_ERROR_TEXTURE_NEGATIVE_WIDTH TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 3u))
163
169 #define TANVASTOUCH_ERROR_TEXTURE_NEGATIVE_HEIGHT TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 4u))
170
184 #define TANVASTOUCH_ERROR_MATERIAL_TOO_FEW_UVS TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_MATERIAL | 1u))
185
194 #define TANVASTOUCH_ERROR_MATERIAL_INVALID_TEXTURE_INDEX \
195 TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_MATERIAL | 2u))
196
205 #define TANVASTOUCH_ERROR_ENGINE_UNKNOWN_CALL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 1u))
206
213 #define TANVASTOUCH_ERROR_ENGINE_FAILED_VERIFICATION TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 2u))
214
220 #define TANVASTOUCH_ERROR_ENGINE_INVALID_REQUEST TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 3u))
221
227 #define TANVASTOUCH_ERROR_ENGINE_OPERATION_FAILED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 4u))
228
234 #define TANVASTOUCH_ERROR_ENGINE_ALREADY_RUNNING TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 5u))
235
241 #define TANVASTOUCH_ERROR_CLIENT_INVALID_RESPONSE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 1u))
242
248 #define TANVASTOUCH_ERROR_CLIENT_INVALID_SEQUENCE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 2u))
249
255 #define TANVASTOUCH_ERROR_CLIENT_FAILED_VERIFICATION TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 3u))
256
263 #define TANVASTOUCH_ERROR_CLIENT_CANNOT_FIND_ENGINE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 4u))
264
270 #define TANVASTOUCH_ERROR_CLIENT_PERMISSION_DENIED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 5u))
271
278 #define TANVASTOUCH_ERROR_CLIENT_INCOMPATIBLE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 6u))
279
288 #define TANVASTOUCH_ERROR_CLIENT_UNLICENSED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 7u))
289
295 #define TANVASTOUCH_ERROR_CLIENT_NOT_INITIALIZED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 8u))
296
302 #define TANVASTOUCH_ERROR_CLIENT_GENERAL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 65535u))
303 /* clang-format on */
304
305 #endif /* TANVAS_TANVASTOUCH_ERRORS_H */