kernelbase: Use nameless unions/structs for loader data.
[wine.git] / libs / vkd3d / include / vkd3d_types.h
blob12ceef42fc4f7834bab0a22414770ed9b256ac85
1 /*
2 * Copyright 2016-2018 Józef Kucia for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __VKD3D_TYPES_H
20 #define __VKD3D_TYPES_H
22 #include <stdarg.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
28 /**
29 * \file vkd3d_types.h
31 * This file contains definitions for basic types used by vkd3d libraries.
34 #define VKD3D_FORCE_32_BIT_ENUM(name) name##_FORCE_32BIT = 0x7fffffff
36 /**
37 * Result codes returned by some vkd3d functions. Error codes always have
38 * negative values; non-error codes never do.
40 enum vkd3d_result
42 /** Success. */
43 VKD3D_OK = 0,
44 /** An unspecified failure occurred. */
45 VKD3D_ERROR = -1,
46 /** There are not enough resources available to complete the operation. */
47 VKD3D_ERROR_OUT_OF_MEMORY = -2,
48 /** One or more parameters passed to a vkd3d function were invalid. */
49 VKD3D_ERROR_INVALID_ARGUMENT = -3,
50 /** A shader passed to a vkd3d function was invalid. */
51 VKD3D_ERROR_INVALID_SHADER = -4,
52 /** The operation is not implemented in this version of vkd3d. */
53 VKD3D_ERROR_NOT_IMPLEMENTED = -5,
55 VKD3D_FORCE_32_BIT_ENUM(VKD3D_RESULT),
58 typedef void (*PFN_vkd3d_log)(const char *format, va_list args);
60 #ifdef _WIN32
61 # define VKD3D_IMPORT
62 # define VKD3D_EXPORT
63 #elif defined(__GNUC__)
64 # define VKD3D_IMPORT
65 # define VKD3D_EXPORT __attribute__((visibility("default")))
66 #else
67 # define VKD3D_IMPORT
68 # define VKD3D_EXPORT
69 #endif
71 #ifdef __cplusplus
73 #endif /* __cplusplus */
75 #endif /* __VKD3D_TYPES_H */