comparison include/SDL_types.h @ 1330:450721ad5436

It's now possible to build SDL without any C runtime at all on Windows, using Visual C++ 2005
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Feb 2006 08:28:51 +0000
parents c9b51268668f
children 7f32b9bede06
comparison
equal deleted inserted replaced
1329:bc67bbf87818 1330:450721ad5436
23 /* General data types used by the SDL library */ 23 /* General data types used by the SDL library */
24 24
25 #ifndef _SDL_types_h 25 #ifndef _SDL_types_h
26 #define _SDL_types_h 26 #define _SDL_types_h
27 27
28 /* The number of elements in a table */ 28 #include <sys/types.h>
29 #define SDL_TABLESIZE(table) (sizeof(table)/sizeof(table[0])) 29 #ifdef _MSC_VER
30 #include <crtdefs.h> /* For size_t */
31 #endif
32
33 /* The number of elements in an array */
34 #define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
35 #define SDL_TABLESIZE(table) SDL_arraysize(table)
30 36
31 /* Basic data types */ 37 /* Basic data types */
32 typedef enum { 38 typedef enum SDL_bool {
33 SDL_FALSE = 0, 39 SDL_FALSE = 0,
34 SDL_TRUE = 1 40 SDL_TRUE = 1
35 } SDL_bool; 41 } SDL_bool;
36 42
37 #ifdef H_MMBASIC /* mmbasic.h (Tru64 MME) */ 43 #ifdef H_MMBASIC /* mmbasic.h (Tru64 MME) */
105 DUMMY_ENUM_VALUE 111 DUMMY_ENUM_VALUE
106 } SDL_DUMMY_ENUM; 112 } SDL_DUMMY_ENUM;
107 113
108 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); 114 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
109 115
110 #undef SDL_COMPILE_TIME_ASSERT
111
112 /* General keyboard/mouse state definitions */
113 enum { SDL_PRESSED = 0x01, SDL_RELEASED = 0x00 };
114
115 #endif 116 #endif