VSF Documented
SDL_error.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_SDL2_ERROR_H__
19#define __VSF_SDL2_ERROR_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../vsf_sdl2_cfg.h"
24
25#if VSF_USE_SDL2 == ENABLED
26
27#include "SDL_stdinc.h"
28
29#include "begin_code.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*============================ MACROS ========================================*/
36/*============================ MACROFIED FUNCTIONS ===========================*/
37
38#if VSF_SDL_CFG_WRAPPER == ENABLED
39#define SDL_Error VSF_SDL_WRAPPER(SDL_Error)
40#define SDL_GetError VSF_SDL_WRAPPER(SDL_GetError)
41#define SDL_SetError VSF_SDL_WRAPPER(SDL_SetError)
42#define SDL_ClearError VSF_SDL_WRAPPER(SDL_ClearError)
43#endif
44
45#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEN)
46
47/*============================ TYPES =========================================*/
48
49typedef enum SDL_errorcode {
57
58/*============================ GLOBAL VARIABLES ==============================*/
59/*============================ LOCAL VARIABLES ===============================*/
60/*============================ PROTOTYPES ====================================*/
61
62extern int SDL_Error(SDL_errorcode code);
63extern const char * SDL_GetError(void);
64extern int SDL_SetError(const char *fmt, ...);
65extern void SDL_ClearError(void);
66
67#ifdef __cplusplus
68}
69#endif
70#include "close_code.h"
71
72#endif // VSF_USE_SDL2
73#endif // __VSF_SDL2_ERROR_H__
74/* EOF */
#define SDL_SetError
Definition SDL_error.h:41
#define SDL_GetError
Definition SDL_error.h:40
#define SDL_Error
Definition SDL_error.h:39
SDL_errorcode
Definition SDL_error.h:49
@ SDL_ENOMEN
Definition SDL_error.h:50
@ SDL_EFSEEK
Definition SDL_error.h:53
@ SDL_LASTERROR
Definition SDL_error.h:55
@ SDL_EFWRITE
Definition SDL_error.h:52
@ SDL_UNSUPPORTED
Definition SDL_error.h:54
@ SDL_EFREAD
Definition SDL_error.h:51
#define SDL_ClearError
Definition SDL_error.h:42