[from now] 2014/06/09 23:01:44

diff --git a/src/config/OMakefile b/src/config/OMakefile
index daca9f5..0e3293a 100644
--- a/src/config/OMakefile
+++ b/src/config/OMakefile
@@ -139,6 +139,8 @@ FLAG_FILES_NOT_VARIANT[] =
 	sdl_texture_access
 	sdl_texture_modulate
 	sdl_init_flags
+	sdl_event_type
+	sdl_hat

 FLAG_FILES_VARIANT[] =
 	sdl_window_flags
diff --git a/src/flags/sdl_blendmode.c b/src/flags/sdl_blendmode.c
deleted file mode 100644
index 832c74f..0000000
--- a/src/flags/sdl_blendmode.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "sdl_blendmode.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_blendmode_table[] = {
-  {0, 4}
-  ,{Val_int(MLTAG_SDL_BLENDMODE_MOD), SDL_BLENDMODE_MOD}
-  ,{Val_int(MLTAG_SDL_BLENDMODE_ADD), SDL_BLENDMODE_ADD}
-  ,{Val_int(MLTAG_SDL_BLENDMODE_BLEND), SDL_BLENDMODE_BLEND}
-  ,{Val_int(MLTAG_SDL_BLENDMODE_NONE), SDL_BLENDMODE_NONE}
-
-};
diff --git a/src/flags/sdl_blendmode.h b/src/flags/sdl_blendmode.h
deleted file mode 100644
index f4ff5b7..0000000
--- a/src/flags/sdl_blendmode.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __SDL_BLENDMODE_H__
-#define __SDL_BLENDMODE_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_BLENDMODE_MOD (0)
-#define MLTAG_SDL_BLENDMODE_ADD (1)
-#define MLTAG_SDL_BLENDMODE_BLEND (2)
-#define MLTAG_SDL_BLENDMODE_NONE (3)
-
-
-extern lookup_info ml_sdl_blendmode_table[];
-
-#endif
diff --git a/src/flags/sdl_gl_attr.c b/src/flags/sdl_gl_attr.c
deleted file mode 100644
index 2f24c68..0000000
--- a/src/flags/sdl_gl_attr.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "sdl_gl_attr.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_gl_attr_table[] = {
-  {0, 24}
-  ,{Val_int(MLTAG_SDL_GL_FRAMEBUFFER_SRGB_CAPABLE), SDL_GL_FRAMEBUFFER_SRGB_CAPABLE}
-  ,{Val_int(MLTAG_SDL_GL_SHARE_WITH_CURRENT_CONTEXT), SDL_GL_SHARE_WITH_CURRENT_CONTEXT}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_PROFILE_MASK), SDL_GL_CONTEXT_PROFILE_MASK}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_FLAGS), SDL_GL_CONTEXT_FLAGS}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_EGL), SDL_GL_CONTEXT_EGL}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_MINOR_VERSION), SDL_GL_CONTEXT_MINOR_VERSION}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_MAJOR_VERSION), SDL_GL_CONTEXT_MAJOR_VERSION}
-  ,{Val_int(MLTAG_SDL_GL_RETAINED_BACKING), SDL_GL_RETAINED_BACKING}
-  ,{Val_int(MLTAG_SDL_GL_ACCELERATED_VISUAL), SDL_GL_ACCELERATED_VISUAL}
-  ,{Val_int(MLTAG_SDL_GL_MULTISAMPLESAMPLES), SDL_GL_MULTISAMPLESAMPLES}
-  ,{Val_int(MLTAG_SDL_GL_MULTISAMPLEBUFFERS), SDL_GL_MULTISAMPLEBUFFERS}
-  ,{Val_int(MLTAG_SDL_GL_STEREO), SDL_GL_STEREO}
-  ,{Val_int(MLTAG_SDL_GL_ACCUM_ALPHA_SIZE), SDL_GL_ACCUM_ALPHA_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_ACCUM_BLUE_SIZE), SDL_GL_ACCUM_BLUE_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_ACCUM_GREEN_SIZE), SDL_GL_ACCUM_GREEN_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_ACCUM_RED_SIZE), SDL_GL_ACCUM_RED_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_STENCIL_SIZE), SDL_GL_STENCIL_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_DEPTH_SIZE), SDL_GL_DEPTH_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_DOUBLEBUFFER), SDL_GL_DOUBLEBUFFER}
-  ,{Val_int(MLTAG_SDL_GL_BUFFER_SIZE), SDL_GL_BUFFER_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_ALPHA_SIZE), SDL_GL_ALPHA_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_BLUE_SIZE), SDL_GL_BLUE_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_GREEN_SIZE), SDL_GL_GREEN_SIZE}
-  ,{Val_int(MLTAG_SDL_GL_RED_SIZE), SDL_GL_RED_SIZE}
-
-};
diff --git a/src/flags/sdl_gl_attr.h b/src/flags/sdl_gl_attr.h
deleted file mode 100644
index 0f198f7..0000000
--- a/src/flags/sdl_gl_attr.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __SDL_GL_ATTR_H__
-#define __SDL_GL_ATTR_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (0)
-#define MLTAG_SDL_GL_SHARE_WITH_CURRENT_CONTEXT (1)
-#define MLTAG_SDL_GL_CONTEXT_PROFILE_MASK (2)
-#define MLTAG_SDL_GL_CONTEXT_FLAGS (3)
-#define MLTAG_SDL_GL_CONTEXT_EGL (4)
-#define MLTAG_SDL_GL_CONTEXT_MINOR_VERSION (5)
-#define MLTAG_SDL_GL_CONTEXT_MAJOR_VERSION (6)
-#define MLTAG_SDL_GL_RETAINED_BACKING (7)
-#define MLTAG_SDL_GL_ACCELERATED_VISUAL (8)
-#define MLTAG_SDL_GL_MULTISAMPLESAMPLES (9)
-#define MLTAG_SDL_GL_MULTISAMPLEBUFFERS (10)
-#define MLTAG_SDL_GL_STEREO (11)
-#define MLTAG_SDL_GL_ACCUM_ALPHA_SIZE (12)
-#define MLTAG_SDL_GL_ACCUM_BLUE_SIZE (13)
-#define MLTAG_SDL_GL_ACCUM_GREEN_SIZE (14)
-#define MLTAG_SDL_GL_ACCUM_RED_SIZE (15)
-#define MLTAG_SDL_GL_STENCIL_SIZE (16)
-#define MLTAG_SDL_GL_DEPTH_SIZE (17)
-#define MLTAG_SDL_GL_DOUBLEBUFFER (18)
-#define MLTAG_SDL_GL_BUFFER_SIZE (19)
-#define MLTAG_SDL_GL_ALPHA_SIZE (20)
-#define MLTAG_SDL_GL_BLUE_SIZE (21)
-#define MLTAG_SDL_GL_GREEN_SIZE (22)
-#define MLTAG_SDL_GL_RED_SIZE (23)
-
-
-extern lookup_info ml_sdl_gl_attr_table[];
-
-#endif
diff --git a/src/flags/sdl_gl_context_flags.c b/src/flags/sdl_gl_context_flags.c
deleted file mode 100644
index 4507313..0000000
--- a/src/flags/sdl_gl_context_flags.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "sdl_gl_context_flags.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_gl_context_flags_table[] = {
-  {0, 4}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_RESET_ISOLATION_FLAG), SDL_GL_CONTEXT_RESET_ISOLATION_FLAG}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG), SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG), SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_DEBUG_FLAG), SDL_GL_CONTEXT_DEBUG_FLAG}
-
-};
diff --git a/src/flags/sdl_gl_context_flags.h b/src/flags/sdl_gl_context_flags.h
deleted file mode 100644
index ed297e5..0000000
--- a/src/flags/sdl_gl_context_flags.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __SDL_GL_CONTEXT_FLAGS_H__
-#define __SDL_GL_CONTEXT_FLAGS_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_GL_CONTEXT_RESET_ISOLATION_FLAG (0)
-#define MLTAG_SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG (1)
-#define MLTAG_SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG (2)
-#define MLTAG_SDL_GL_CONTEXT_DEBUG_FLAG (3)
-
-
-extern lookup_info ml_sdl_gl_context_flags_table[];
-
-#endif
diff --git a/src/flags/sdl_gl_profile.c b/src/flags/sdl_gl_profile.c
deleted file mode 100644
index d806470..0000000
--- a/src/flags/sdl_gl_profile.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "sdl_gl_profile.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_gl_profile_table[] = {
-  {0, 3}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_PROFILE_ES), SDL_GL_CONTEXT_PROFILE_ES}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_PROFILE_COMPATIBILITY), SDL_GL_CONTEXT_PROFILE_COMPATIBILITY}
-  ,{Val_int(MLTAG_SDL_GL_CONTEXT_PROFILE_CORE), SDL_GL_CONTEXT_PROFILE_CORE}
-
-};
diff --git a/src/flags/sdl_gl_profile.h b/src/flags/sdl_gl_profile.h
deleted file mode 100644
index 9790355..0000000
--- a/src/flags/sdl_gl_profile.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __SDL_GL_PROFILE_H__
-#define __SDL_GL_PROFILE_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_GL_CONTEXT_PROFILE_ES (0)
-#define MLTAG_SDL_GL_CONTEXT_PROFILE_COMPATIBILITY (1)
-#define MLTAG_SDL_GL_CONTEXT_PROFILE_CORE (2)
-
-
-extern lookup_info ml_sdl_gl_profile_table[];
-
-#endif
diff --git a/src/flags/sdl_init_flags.c b/src/flags/sdl_init_flags.c
deleted file mode 100644
index fd5ae22..0000000
--- a/src/flags/sdl_init_flags.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "sdl_init_flags.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_init_flags_table[] = {
-  {0, 9}
-  ,{Val_int(MLTAG_SDL_INIT_NOPARACHUTE), SDL_INIT_NOPARACHUTE}
-  ,{Val_int(MLTAG_SDL_INIT_EVERYTHING), SDL_INIT_EVERYTHING}
-  ,{Val_int(MLTAG_SDL_INIT_EVENTS), SDL_INIT_EVENTS}
-  ,{Val_int(MLTAG_SDL_INIT_GAMECONTROLLER), SDL_INIT_GAMECONTROLLER}
-  ,{Val_int(MLTAG_SDL_INIT_HAPTIC), SDL_INIT_HAPTIC}
-  ,{Val_int(MLTAG_SDL_INIT_JOYSTICK), SDL_INIT_JOYSTICK}
-  ,{Val_int(MLTAG_SDL_INIT_VIDEO), SDL_INIT_VIDEO}
-  ,{Val_int(MLTAG_SDL_INIT_AUDIO), SDL_INIT_AUDIO}
-  ,{Val_int(MLTAG_SDL_INIT_TIMER), SDL_INIT_TIMER}
-
-};
diff --git a/src/flags/sdl_init_flags.h b/src/flags/sdl_init_flags.h
deleted file mode 100644
index ed6a9f4..0000000
--- a/src/flags/sdl_init_flags.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __SDL_INIT_FLAGS_H__
-#define __SDL_INIT_FLAGS_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_INIT_NOPARACHUTE (0)
-#define MLTAG_SDL_INIT_EVERYTHING (1)
-#define MLTAG_SDL_INIT_EVENTS (2)
-#define MLTAG_SDL_INIT_GAMECONTROLLER (3)
-#define MLTAG_SDL_INIT_HAPTIC (4)
-#define MLTAG_SDL_INIT_JOYSTICK (5)
-#define MLTAG_SDL_INIT_VIDEO (6)
-#define MLTAG_SDL_INIT_AUDIO (7)
-#define MLTAG_SDL_INIT_TIMER (8)
-
-
-extern lookup_info ml_sdl_init_flags_table[];
-
-#endif
diff --git a/src/flags/sdl_log_category.c b/src/flags/sdl_log_category.c
deleted file mode 100644
index 28e6c83..0000000
--- a/src/flags/sdl_log_category.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "sdl_log_category.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_log_category_table[] = {
-  {0, 7}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_INPUT), SDL_LOG_CATEGORY_INPUT}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_RENDER), SDL_LOG_CATEGORY_RENDER}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_VIDEO), SDL_LOG_CATEGORY_VIDEO}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_AUDIO), SDL_LOG_CATEGORY_AUDIO}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_SYSTEM), SDL_LOG_CATEGORY_SYSTEM}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_ERROR), SDL_LOG_CATEGORY_ERROR}
-  ,{Val_int(MLTAG_SDL_LOG_CATEGORY_APPLICATION), SDL_LOG_CATEGORY_APPLICATION}
-
-};
diff --git a/src/flags/sdl_log_category.h b/src/flags/sdl_log_category.h
deleted file mode 100644
index 3fd7595..0000000
--- a/src/flags/sdl_log_category.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __SDL_LOG_CATEGORY_H__
-#define __SDL_LOG_CATEGORY_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_LOG_CATEGORY_INPUT (1007418346)
-#define MLTAG_SDL_LOG_CATEGORY_RENDER (934025046)
-#define MLTAG_SDL_LOG_CATEGORY_VIDEO (887770203)
-#define MLTAG_SDL_LOG_CATEGORY_AUDIO (628011190)
-#define MLTAG_SDL_LOG_CATEGORY_SYSTEM (627393263)
-#define MLTAG_SDL_LOG_CATEGORY_ERROR (-250084440)
-#define MLTAG_SDL_LOG_CATEGORY_APPLICATION (8042288)
-
-
-extern lookup_info ml_sdl_log_category_table[];
-
-#endif
diff --git a/src/flags/sdl_log_priority.c b/src/flags/sdl_log_priority.c
deleted file mode 100644
index ade3ddc..0000000
--- a/src/flags/sdl_log_priority.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "sdl_log_priority.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_log_priority_table[] = {
-  {0, 6}
-  ,{Val_int(MLTAG_SDL_LOG_PRIORITY_CRITICAL), SDL_LOG_PRIORITY_CRITICAL}
-  ,{Val_int(MLTAG_SDL_LOG_PRIORITY_ERROR), SDL_LOG_PRIORITY_ERROR}
-  ,{Val_int(MLTAG_SDL_LOG_PRIORITY_WARN), SDL_LOG_PRIORITY_WARN}
-  ,{Val_int(MLTAG_SDL_LOG_PRIORITY_INFO), SDL_LOG_PRIORITY_INFO}
-  ,{Val_int(MLTAG_SDL_LOG_PRIORITY_DEBUG), SDL_LOG_PRIORITY_DEBUG}
-  ,{Val_int(MLTAG_SDL_LOG_PRIORITY_VERBOSE), SDL_LOG_PRIORITY_VERBOSE}
-
-};
diff --git a/src/flags/sdl_log_priority.h b/src/flags/sdl_log_priority.h
deleted file mode 100644
index 27d193f..0000000
--- a/src/flags/sdl_log_priority.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __SDL_LOG_PRIORITY_H__
-#define __SDL_LOG_PRIORITY_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_LOG_PRIORITY_CRITICAL (138255519)
-#define MLTAG_SDL_LOG_PRIORITY_ERROR (-250084440)
-#define MLTAG_SDL_LOG_PRIORITY_WARN (968043078)
-#define MLTAG_SDL_LOG_PRIORITY_INFO (813432942)
-#define MLTAG_SDL_LOG_PRIORITY_DEBUG (-720532941)
-#define MLTAG_SDL_LOG_PRIORITY_VERBOSE (-242373790)
-
-
-extern lookup_info ml_sdl_log_priority_table[];
-
-#endif
diff --git a/src/flags/sdl_messagebox_flags.c b/src/flags/sdl_messagebox_flags.c
deleted file mode 100644
index 7969854..0000000
--- a/src/flags/sdl_messagebox_flags.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "sdl_messagebox_flags.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_messagebox_flags_table[] = {
-  {0, 3}
-  ,{Val_int(MLTAG_SDL_MESSAGEBOX_INFORMATION), SDL_MESSAGEBOX_INFORMATION}
-  ,{Val_int(MLTAG_SDL_MESSAGEBOX_WARNING), SDL_MESSAGEBOX_WARNING}
-  ,{Val_int(MLTAG_SDL_MESSAGEBOX_ERROR), SDL_MESSAGEBOX_ERROR}
-
-};
diff --git a/src/flags/sdl_messagebox_flags.h b/src/flags/sdl_messagebox_flags.h
deleted file mode 100644
index 6997964..0000000
--- a/src/flags/sdl_messagebox_flags.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __SDL_MESSAGEBOX_FLAGS_H__
-#define __SDL_MESSAGEBOX_FLAGS_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_MESSAGEBOX_INFORMATION (0)
-#define MLTAG_SDL_MESSAGEBOX_WARNING (1)
-#define MLTAG_SDL_MESSAGEBOX_ERROR (2)
-
-
-extern lookup_info ml_sdl_messagebox_flags_table[];
-
-#endif
diff --git a/src/flags/sdl_pixel_format_enum.c b/src/flags/sdl_pixel_format_enum.c
deleted file mode 100644
index 6ed9991..0000000
--- a/src/flags/sdl_pixel_format_enum.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "sdl_pixel_format_enum.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_pixel_format_enum_table[] = {
-  {0, 32}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_YVYU), SDL_PIXELFORMAT_YVYU}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_UYVY), SDL_PIXELFORMAT_UYVY}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_YUY2), SDL_PIXELFORMAT_YUY2}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_IYUV), SDL_PIXELFORMAT_IYUV}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_YV12), SDL_PIXELFORMAT_YV12}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_ARGB2101010), SDL_PIXELFORMAT_ARGB2101010}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGRA8888), SDL_PIXELFORMAT_BGRA8888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_ABGR8888), SDL_PIXELFORMAT_ABGR8888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGBA8888), SDL_PIXELFORMAT_RGBA8888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_ARGB8888), SDL_PIXELFORMAT_ARGB8888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGRX8888), SDL_PIXELFORMAT_BGRX8888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGR888), SDL_PIXELFORMAT_BGR888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGBX8888), SDL_PIXELFORMAT_RGBX8888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGB888), SDL_PIXELFORMAT_RGB888}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGR24), SDL_PIXELFORMAT_BGR24}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGB24), SDL_PIXELFORMAT_RGB24}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGR565), SDL_PIXELFORMAT_BGR565}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGB565), SDL_PIXELFORMAT_RGB565}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGRA5551), SDL_PIXELFORMAT_BGRA5551}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_ABGR4444), SDL_PIXELFORMAT_ABGR4444}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGBA4444), SDL_PIXELFORMAT_RGBA4444}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_ARGB4444), SDL_PIXELFORMAT_ARGB4444}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_BGR555), SDL_PIXELFORMAT_BGR555}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGB555), SDL_PIXELFORMAT_RGB555}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGB444), SDL_PIXELFORMAT_RGB444}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_RGB332), SDL_PIXELFORMAT_RGB332}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_INDEX8), SDL_PIXELFORMAT_INDEX8}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_INDEX4MSB), SDL_PIXELFORMAT_INDEX4MSB}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_INDEX4LSB), SDL_PIXELFORMAT_INDEX4LSB}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_INDEX1MSB), SDL_PIXELFORMAT_INDEX1MSB}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_INDEX1LSB), SDL_PIXELFORMAT_INDEX1LSB}
-  ,{Val_int(MLTAG_SDL_PIXELFORMAT_UNKNOWN), SDL_PIXELFORMAT_UNKNOWN}
-
-};
diff --git a/src/flags/sdl_pixel_format_enum.h b/src/flags/sdl_pixel_format_enum.h
deleted file mode 100644
index 9d62ec5..0000000
--- a/src/flags/sdl_pixel_format_enum.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef __SDL_PIXEL_FORMAT_ENUM_H__
-#define __SDL_PIXEL_FORMAT_ENUM_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_PIXELFORMAT_YVYU (0)
-#define MLTAG_SDL_PIXELFORMAT_UYVY (1)
-#define MLTAG_SDL_PIXELFORMAT_YUY2 (2)
-#define MLTAG_SDL_PIXELFORMAT_IYUV (3)
-#define MLTAG_SDL_PIXELFORMAT_YV12 (4)
-#define MLTAG_SDL_PIXELFORMAT_ARGB2101010 (5)
-#define MLTAG_SDL_PIXELFORMAT_BGRA8888 (6)
-#define MLTAG_SDL_PIXELFORMAT_ABGR8888 (7)
-#define MLTAG_SDL_PIXELFORMAT_RGBA8888 (8)
-#define MLTAG_SDL_PIXELFORMAT_ARGB8888 (9)
-#define MLTAG_SDL_PIXELFORMAT_BGRX8888 (10)
-#define MLTAG_SDL_PIXELFORMAT_BGR888 (11)
-#define MLTAG_SDL_PIXELFORMAT_RGBX8888 (12)
-#define MLTAG_SDL_PIXELFORMAT_RGB888 (13)
-#define MLTAG_SDL_PIXELFORMAT_BGR24 (14)
-#define MLTAG_SDL_PIXELFORMAT_RGB24 (15)
-#define MLTAG_SDL_PIXELFORMAT_BGR565 (16)
-#define MLTAG_SDL_PIXELFORMAT_RGB565 (17)
-#define MLTAG_SDL_PIXELFORMAT_BGRA5551 (18)
-#define MLTAG_SDL_PIXELFORMAT_ABGR4444 (19)
-#define MLTAG_SDL_PIXELFORMAT_RGBA4444 (20)
-#define MLTAG_SDL_PIXELFORMAT_ARGB4444 (21)
-#define MLTAG_SDL_PIXELFORMAT_BGR555 (22)
-#define MLTAG_SDL_PIXELFORMAT_RGB555 (23)
-#define MLTAG_SDL_PIXELFORMAT_RGB444 (24)
-#define MLTAG_SDL_PIXELFORMAT_RGB332 (25)
-#define MLTAG_SDL_PIXELFORMAT_INDEX8 (26)
-#define MLTAG_SDL_PIXELFORMAT_INDEX4MSB (27)
-#define MLTAG_SDL_PIXELFORMAT_INDEX4LSB (28)
-#define MLTAG_SDL_PIXELFORMAT_INDEX1MSB (29)
-#define MLTAG_SDL_PIXELFORMAT_INDEX1LSB (30)
-#define MLTAG_SDL_PIXELFORMAT_UNKNOWN (31)
-
-
-extern lookup_info ml_sdl_pixel_format_enum_table[];
-
-#endif
diff --git a/src/flags/sdl_renderer_flags.c b/src/flags/sdl_renderer_flags.c
deleted file mode 100644
index 94e218d..0000000
--- a/src/flags/sdl_renderer_flags.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "sdl_renderer_flags.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_renderer_flags_table[] = {
-  {0, 4}
-  ,{Val_int(MLTAG_SDL_RENDERER_TARGETTEXTURE), SDL_RENDERER_TARGETTEXTURE}
-  ,{Val_int(MLTAG_SDL_RENDERER_PRESENTVSYNC), SDL_RENDERER_PRESENTVSYNC}
-  ,{Val_int(MLTAG_SDL_RENDERER_ACCELERATED), SDL_RENDERER_ACCELERATED}
-  ,{Val_int(MLTAG_SDL_RENDERER_SOFTWARE), SDL_RENDERER_SOFTWARE}
-
-};
diff --git a/src/flags/sdl_renderer_flags.h b/src/flags/sdl_renderer_flags.h
deleted file mode 100644
index 1a2aa35..0000000
--- a/src/flags/sdl_renderer_flags.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __SDL_RENDERER_FLAGS_H__
-#define __SDL_RENDERER_FLAGS_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_RENDERER_TARGETTEXTURE (0)
-#define MLTAG_SDL_RENDERER_PRESENTVSYNC (1)
-#define MLTAG_SDL_RENDERER_ACCELERATED (2)
-#define MLTAG_SDL_RENDERER_SOFTWARE (3)
-
-
-extern lookup_info ml_sdl_renderer_flags_table[];
-
-#endif
diff --git a/src/flags/sdl_renderer_flip.c b/src/flags/sdl_renderer_flip.c
deleted file mode 100644
index 33750fe..0000000
--- a/src/flags/sdl_renderer_flip.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "sdl_renderer_flip.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_renderer_flip_table[] = {
-  {0, 3}
-  ,{Val_int(MLTAG_SDL_FLIP_VERTICAL), SDL_FLIP_VERTICAL}
-  ,{Val_int(MLTAG_SDL_FLIP_HORIZONTAL), SDL_FLIP_HORIZONTAL}
-  ,{Val_int(MLTAG_SDL_FLIP_NONE), SDL_FLIP_NONE}
-
-};
diff --git a/src/flags/sdl_renderer_flip.h b/src/flags/sdl_renderer_flip.h
deleted file mode 100644
index fa78b01..0000000
--- a/src/flags/sdl_renderer_flip.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __SDL_RENDERER_FLIP_H__
-#define __SDL_RENDERER_FLIP_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_FLIP_VERTICAL (0)
-#define MLTAG_SDL_FLIP_HORIZONTAL (1)
-#define MLTAG_SDL_FLIP_NONE (2)
-
-
-extern lookup_info ml_sdl_renderer_flip_table[];
-
-#endif
diff --git a/src/flags/sdl_syswm_type.c b/src/flags/sdl_syswm_type.c
deleted file mode 100644
index 7971654..0000000
--- a/src/flags/sdl_syswm_type.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "sdl_syswm_type.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_syswm_type_table[] = {
-  {0, 6}
-  ,{Val_int(MLTAG_SDL_SYSWM_UIKIT), SDL_SYSWM_UIKIT}
-  ,{Val_int(MLTAG_SDL_SYSWM_COCOA), SDL_SYSWM_COCOA}
-  ,{Val_int(MLTAG_SDL_SYSWM_DIRECTFB), SDL_SYSWM_DIRECTFB}
-  ,{Val_int(MLTAG_SDL_SYSWM_X11), SDL_SYSWM_X11}
-  ,{Val_int(MLTAG_SDL_SYSWM_WINDOWS), SDL_SYSWM_WINDOWS}
-  ,{Val_int(MLTAG_SDL_SYSWM_UNKNOWN), SDL_SYSWM_UNKNOWN}
-
-};
diff --git a/src/flags/sdl_syswm_type.h b/src/flags/sdl_syswm_type.h
deleted file mode 100644
index 4271e06..0000000
--- a/src/flags/sdl_syswm_type.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __SDL_SYSWM_TYPE_H__
-#define __SDL_SYSWM_TYPE_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_SYSWM_UIKIT (0)
-#define MLTAG_SDL_SYSWM_COCOA (1)
-#define MLTAG_SDL_SYSWM_DIRECTFB (2)
-#define MLTAG_SDL_SYSWM_X11 (3)
-#define MLTAG_SDL_SYSWM_WINDOWS (4)
-#define MLTAG_SDL_SYSWM_UNKNOWN (5)
-
-
-extern lookup_info ml_sdl_syswm_type_table[];
-
-#endif
diff --git a/src/flags/sdl_texture_access.c b/src/flags/sdl_texture_access.c
deleted file mode 100644
index ce68921..0000000
--- a/src/flags/sdl_texture_access.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "sdl_texture_access.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_texture_access_table[] = {
-  {0, 3}
-  ,{Val_int(MLTAG_SDL_TEXTUREACCESS_TARGET), SDL_TEXTUREACCESS_TARGET}
-  ,{Val_int(MLTAG_SDL_TEXTUREACCESS_STREAMING), SDL_TEXTUREACCESS_STREAMING}
-  ,{Val_int(MLTAG_SDL_TEXTUREACCESS_STATIC), SDL_TEXTUREACCESS_STATIC}
-
-};
diff --git a/src/flags/sdl_texture_access.h b/src/flags/sdl_texture_access.h
deleted file mode 100644
index e7dc00a..0000000
--- a/src/flags/sdl_texture_access.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __SDL_TEXTURE_ACCESS_H__
-#define __SDL_TEXTURE_ACCESS_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_TEXTUREACCESS_TARGET (0)
-#define MLTAG_SDL_TEXTUREACCESS_STREAMING (1)
-#define MLTAG_SDL_TEXTUREACCESS_STATIC (2)
-
-
-extern lookup_info ml_sdl_texture_access_table[];
-
-#endif
diff --git a/src/flags/sdl_texture_modulate.c b/src/flags/sdl_texture_modulate.c
deleted file mode 100644
index cf5cb8c..0000000
--- a/src/flags/sdl_texture_modulate.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "sdl_texture_modulate.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_texture_modulate_table[] = {
-  {0, 3}
-  ,{Val_int(MLTAG_SDL_TEXTUREMODULATE_ALPHA), SDL_TEXTUREMODULATE_ALPHA}
-  ,{Val_int(MLTAG_SDL_TEXTUREMODULATE_COLOR), SDL_TEXTUREMODULATE_COLOR}
-  ,{Val_int(MLTAG_SDL_TEXTUREMODULATE_NONE), SDL_TEXTUREMODULATE_NONE}
-
-};
diff --git a/src/flags/sdl_texture_modulate.h b/src/flags/sdl_texture_modulate.h
deleted file mode 100644
index 30a254d..0000000
--- a/src/flags/sdl_texture_modulate.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __SDL_TEXTURE_MODULATE_H__
-#define __SDL_TEXTURE_MODULATE_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_TEXTUREMODULATE_ALPHA (0)
-#define MLTAG_SDL_TEXTUREMODULATE_COLOR (1)
-#define MLTAG_SDL_TEXTUREMODULATE_NONE (2)
-
-
-extern lookup_info ml_sdl_texture_modulate_table[];
-
-#endif
diff --git a/src/flags/sdl_window_event_id.c b/src/flags/sdl_window_event_id.c
deleted file mode 100644
index c7d6f49..0000000
--- a/src/flags/sdl_window_event_id.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "sdl_window_event_id.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_window_event_id_table[] = {
-  {0, 14}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_CLOSE), SDL_WINDOWEVENT_CLOSE}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_FOCUS_LOST), SDL_WINDOWEVENT_FOCUS_LOST}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_FOCUS_GAINED), SDL_WINDOWEVENT_FOCUS_GAINED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_LEAVE), SDL_WINDOWEVENT_LEAVE}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_ENTER), SDL_WINDOWEVENT_ENTER}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_RESTORED), SDL_WINDOWEVENT_RESTORED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_MAXIMIZED), SDL_WINDOWEVENT_MAXIMIZED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_MINIMIZED), SDL_WINDOWEVENT_MINIMIZED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_SIZE_CHANGED), SDL_WINDOWEVENT_SIZE_CHANGED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_RESIZED), SDL_WINDOWEVENT_RESIZED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_MOVED), SDL_WINDOWEVENT_MOVED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_EXPOSED), SDL_WINDOWEVENT_EXPOSED}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_HIDDEN), SDL_WINDOWEVENT_HIDDEN}
-  ,{Val_int(MLTAG_SDL_WINDOWEVENT_SHOWN), SDL_WINDOWEVENT_SHOWN}
-
-};
diff --git a/src/flags/sdl_window_event_id.h b/src/flags/sdl_window_event_id.h
deleted file mode 100644
index 932ec78..0000000
--- a/src/flags/sdl_window_event_id.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __SDL_WINDOW_EVENT_ID_H__
-#define __SDL_WINDOW_EVENT_ID_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_WINDOWEVENT_CLOSE (0)
-#define MLTAG_SDL_WINDOWEVENT_FOCUS_LOST (1)
-#define MLTAG_SDL_WINDOWEVENT_FOCUS_GAINED (2)
-#define MLTAG_SDL_WINDOWEVENT_LEAVE (3)
-#define MLTAG_SDL_WINDOWEVENT_ENTER (4)
-#define MLTAG_SDL_WINDOWEVENT_RESTORED (5)
-#define MLTAG_SDL_WINDOWEVENT_MAXIMIZED (6)
-#define MLTAG_SDL_WINDOWEVENT_MINIMIZED (7)
-#define MLTAG_SDL_WINDOWEVENT_SIZE_CHANGED (8)
-#define MLTAG_SDL_WINDOWEVENT_RESIZED (9)
-#define MLTAG_SDL_WINDOWEVENT_MOVED (10)
-#define MLTAG_SDL_WINDOWEVENT_EXPOSED (11)
-#define MLTAG_SDL_WINDOWEVENT_HIDDEN (12)
-#define MLTAG_SDL_WINDOWEVENT_SHOWN (13)
-
-
-extern lookup_info ml_sdl_window_event_id_table[];
-
-#endif
diff --git a/src/flags/sdl_window_flags.c b/src/flags/sdl_window_flags.c
deleted file mode 100644
index 3a7b958..0000000
--- a/src/flags/sdl_window_flags.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "sdl_window_flags.h"
-
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-lookup_info ml_sdl_window_flags_table[] = {
-  {0, 14}
-  ,{Val_int(MLTAG_SDL_WINDOW_ALLOW_HIGHDPI), SDL_WINDOW_ALLOW_HIGHDPI}
-  ,{Val_int(MLTAG_SDL_WINDOW_FOREIGN), SDL_WINDOW_FOREIGN}
-  ,{Val_int(MLTAG_SDL_WINDOW_MOUSE_FOCUS), SDL_WINDOW_MOUSE_FOCUS}
-  ,{Val_int(MLTAG_SDL_WINDOW_INPUT_FOCUS), SDL_WINDOW_INPUT_FOCUS}
-  ,{Val_int(MLTAG_SDL_WINDOW_INPUT_GRABBED), SDL_WINDOW_INPUT_GRABBED}
-  ,{Val_int(MLTAG_SDL_WINDOW_MAXIMIZED), SDL_WINDOW_MAXIMIZED}
-  ,{Val_int(MLTAG_SDL_WINDOW_MINIMIZED), SDL_WINDOW_MINIMIZED}
-  ,{Val_int(MLTAG_SDL_WINDOW_RESIZABLE), SDL_WINDOW_RESIZABLE}
-  ,{Val_int(MLTAG_SDL_WINDOW_BORDERLESS), SDL_WINDOW_BORDERLESS}
-  ,{Val_int(MLTAG_SDL_WINDOW_SHOWN), SDL_WINDOW_SHOWN}
-  ,{Val_int(MLTAG_SDL_WINDOW_HIDDEN), SDL_WINDOW_HIDDEN}
-  ,{Val_int(MLTAG_SDL_WINDOW_OPENGL), SDL_WINDOW_OPENGL}
-  ,{Val_int(MLTAG_SDL_WINDOW_FULLSCREEN_DESKTOP), SDL_WINDOW_FULLSCREEN_DESKTOP}
-  ,{Val_int(MLTAG_SDL_WINDOW_FULLSCREEN), SDL_WINDOW_FULLSCREEN}
-
-};
diff --git a/src/flags/sdl_window_flags.h b/src/flags/sdl_window_flags.h
deleted file mode 100644
index 5cb6955..0000000
--- a/src/flags/sdl_window_flags.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __SDL_WINDOW_FLAGS_H__
-#define __SDL_WINDOW_FLAGS_H__
-
-#include "../common.h"
-
-#define MLTAG_SDL_WINDOW_ALLOW_HIGHDPI (818900997)
-#define MLTAG_SDL_WINDOW_FOREIGN (-641800460)
-#define MLTAG_SDL_WINDOW_MOUSE_FOCUS (-485753154)
-#define MLTAG_SDL_WINDOW_INPUT_FOCUS (-491280797)
-#define MLTAG_SDL_WINDOW_INPUT_GRABBED (-436801472)
-#define MLTAG_SDL_WINDOW_MAXIMIZED (-96895496)
-#define MLTAG_SDL_WINDOW_MINIMIZED (603351910)
-#define MLTAG_SDL_WINDOW_RESIZABLE (615032651)
-#define MLTAG_SDL_WINDOW_BORDERLESS (159038021)
-#define MLTAG_SDL_WINDOW_SHOWN (-99237711)
-#define MLTAG_SDL_WINDOW_HIDDEN (-15160470)
-#define MLTAG_SDL_WINDOW_OPENGL (-736685969)
-#define MLTAG_SDL_WINDOW_FULLSCREEN_DESKTOP (-69217160)
-#define MLTAG_SDL_WINDOW_FULLSCREEN (-339890629)
-
-
-extern lookup_info ml_sdl_window_flags_table[];
-
-#endif
diff --git a/src/sdl.ml b/src/sdl.ml
index 465d462..da02ef2 100644
--- a/src/sdl.ml
+++ b/src/sdl.ml
@@ -22,4 +22,6 @@ module Types = struct
   include Sdl_types
 end

+module Pixel = Sdl_pixel
+
 module Rect = Sdl_rect
diff --git a/src/sdl_custom_types.c b/src/sdl_custom_types.c
index 10284d8..cfa32b2 100644
--- a/src/sdl_custom_types.c
+++ b/src/sdl_custom_types.c
@@ -34,3 +34,9 @@ value alloc_texture(SDL_Texture* texture) {
   Texture_val(v) = texture;
   return v;
 }
+
+value alloc_pixel_format(SDL_PixelFormat* pf) {
+  value v = alloc_custom(&sdl_pixel_format_ops, sizeof(SDL_PixelFormat*), 0, 1);
+  PixelFormat_val(v) = pf;
+  return v;
+}
diff --git a/src/sdl_custom_types.h b/src/sdl_custom_types.h
index e22cb74..8ce6e45 100644
--- a/src/sdl_custom_types.h
+++ b/src/sdl_custom_types.h
@@ -76,4 +76,22 @@ static struct custom_operations sdl_texture_ops = {
 /* Allocating a Caml custom block to hold the given SDL_Surface *  */
 value alloc_texture(SDL_Texture* surface);

+/* Encapsulation of opaque SDL Window (of type SDL_Window *)
+   as Caml custom blocks
+ */
+static struct custom_operations sdl_pixel_format_ops = {
+  "sdlcaml.sdl_pixel_format",
+  custom_finalize_default,
+  custom_compare_default,
+  custom_hash_default,
+  custom_serialize_default,
+  custom_deserialize_default
+};
+
+/* Accessing the SDL_Surface * part of a Caml custom block */
+#define PixelFormat_val(v) (*((SDL_PixelFormat**)Data_custom_val(v)))
+
+/* Allocating a Caml custom block to hold the given SDL_Surface *  */
+value alloc_pixel_format(SDL_PixelFormat* pf);
+
 #endif
diff --git a/src/sdl_flags.ml b/src/sdl_flags.ml
deleted file mode 100644
index 3562d66..0000000
--- a/src/sdl_flags.ml
+++ /dev/null
@@ -1,174 +0,0 @@
-module Sdl_blendmode = struct
-type t = SDL_BLENDMODE_MOD
-|SDL_BLENDMODE_ADD
-|SDL_BLENDMODE_BLEND
-|SDL_BLENDMODE_NONE
-end
-module Sdl_gl_attr = struct
-type t = SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
-|SDL_GL_SHARE_WITH_CURRENT_CONTEXT
-|SDL_GL_CONTEXT_PROFILE_MASK
-|SDL_GL_CONTEXT_FLAGS
-|SDL_GL_CONTEXT_EGL
-|SDL_GL_CONTEXT_MINOR_VERSION
-|SDL_GL_CONTEXT_MAJOR_VERSION
-|SDL_GL_RETAINED_BACKING
-|SDL_GL_ACCELERATED_VISUAL
-|SDL_GL_MULTISAMPLESAMPLES
-|SDL_GL_MULTISAMPLEBUFFERS
-|SDL_GL_STEREO
-|SDL_GL_ACCUM_ALPHA_SIZE
-|SDL_GL_ACCUM_BLUE_SIZE
-|SDL_GL_ACCUM_GREEN_SIZE
-|SDL_GL_ACCUM_RED_SIZE
-|SDL_GL_STENCIL_SIZE
-|SDL_GL_DEPTH_SIZE
-|SDL_GL_DOUBLEBUFFER
-|SDL_GL_BUFFER_SIZE
-|SDL_GL_ALPHA_SIZE
-|SDL_GL_BLUE_SIZE
-|SDL_GL_GREEN_SIZE
-|SDL_GL_RED_SIZE
-end
-module Sdl_gl_context_flags = struct
-type t = SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
-|SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
-|SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
-|SDL_GL_CONTEXT_DEBUG_FLAG
-end
-module Sdl_gl_profile = struct
-type t = SDL_GL_CONTEXT_PROFILE_ES
-|SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
-|SDL_GL_CONTEXT_PROFILE_CORE
-end
-module Sdl_init_flags = struct
-type t = SDL_INIT_NOPARACHUTE
-|SDL_INIT_EVERYTHING
-|SDL_INIT_EVENTS
-|SDL_INIT_GAMECONTROLLER
-|SDL_INIT_HAPTIC
-|SDL_INIT_JOYSTICK
-|SDL_INIT_VIDEO
-|SDL_INIT_AUDIO
-|SDL_INIT_TIMER
-end
-module Sdl_log_category = struct
-type t = [`INPUT
-|`RENDER
-|`VIDEO
-|`AUDIO
-|`SYSTEM
-|`ERROR
-|`APPLICATION
-]
-end
-module Sdl_log_priority = struct
-type t = [`CRITICAL
-|`ERROR
-|`WARN
-|`INFO
-|`DEBUG
-|`VERBOSE
-]
-end
-module Sdl_messagebox_flags = struct
-type t = SDL_MESSAGEBOX_INFORMATION
-|SDL_MESSAGEBOX_WARNING
-|SDL_MESSAGEBOX_ERROR
-end
-module Sdl_pixel_format_enum = struct
-type t = SDL_PIXELFORMAT_YVYU
-|SDL_PIXELFORMAT_UYVY
-|SDL_PIXELFORMAT_YUY2
-|SDL_PIXELFORMAT_IYUV
-|SDL_PIXELFORMAT_YV12
-|SDL_PIXELFORMAT_ARGB2101010
-|SDL_PIXELFORMAT_BGRA8888
-|SDL_PIXELFORMAT_ABGR8888
-|SDL_PIXELFORMAT_RGBA8888
-|SDL_PIXELFORMAT_ARGB8888
-|SDL_PIXELFORMAT_BGRX8888
-|SDL_PIXELFORMAT_BGR888
-|SDL_PIXELFORMAT_RGBX8888
-|SDL_PIXELFORMAT_RGB888
-|SDL_PIXELFORMAT_BGR24
-|SDL_PIXELFORMAT_RGB24
-|SDL_PIXELFORMAT_BGR565
-|SDL_PIXELFORMAT_RGB565
-|SDL_PIXELFORMAT_BGRA5551
-|SDL_PIXELFORMAT_ABGR4444
-|SDL_PIXELFORMAT_RGBA4444
-|SDL_PIXELFORMAT_ARGB4444
-|SDL_PIXELFORMAT_BGR555
-|SDL_PIXELFORMAT_RGB555
-|SDL_PIXELFORMAT_RGB444
-|SDL_PIXELFORMAT_RGB332
-|SDL_PIXELFORMAT_INDEX8
-|SDL_PIXELFORMAT_INDEX4MSB
-|SDL_PIXELFORMAT_INDEX4LSB
-|SDL_PIXELFORMAT_INDEX1MSB
-|SDL_PIXELFORMAT_INDEX1LSB
-|SDL_PIXELFORMAT_UNKNOWN
-end
-module Sdl_renderer_flags = struct
-type t = SDL_RENDERER_TARGETTEXTURE
-|SDL_RENDERER_PRESENTVSYNC
-|SDL_RENDERER_ACCELERATED
-|SDL_RENDERER_SOFTWARE
-end
-module Sdl_renderer_flip = struct
-type t = SDL_FLIP_VERTICAL
-|SDL_FLIP_HORIZONTAL
-|SDL_FLIP_NONE
-end
-module Sdl_syswm_type = struct
-type t = SDL_SYSWM_UIKIT
-|SDL_SYSWM_COCOA
-|SDL_SYSWM_DIRECTFB
-|SDL_SYSWM_X11
-|SDL_SYSWM_WINDOWS
-|SDL_SYSWM_UNKNOWN
-end
-module Sdl_texture_access = struct
-type t = SDL_TEXTUREACCESS_TARGET
-|SDL_TEXTUREACCESS_STREAMING
-|SDL_TEXTUREACCESS_STATIC
-end
-module Sdl_texture_modulate = struct
-type t = SDL_TEXTUREMODULATE_ALPHA
-|SDL_TEXTUREMODULATE_COLOR
-|SDL_TEXTUREMODULATE_NONE
-end
-module Sdl_window_event_id = struct
-type t = SDL_WINDOWEVENT_CLOSE
-|SDL_WINDOWEVENT_FOCUS_LOST
-|SDL_WINDOWEVENT_FOCUS_GAINED
-|SDL_WINDOWEVENT_LEAVE
-|SDL_WINDOWEVENT_ENTER
-|SDL_WINDOWEVENT_RESTORED
-|SDL_WINDOWEVENT_MAXIMIZED
-|SDL_WINDOWEVENT_MINIMIZED
-|SDL_WINDOWEVENT_SIZE_CHANGED
-|SDL_WINDOWEVENT_RESIZED
-|SDL_WINDOWEVENT_MOVED
-|SDL_WINDOWEVENT_EXPOSED
-|SDL_WINDOWEVENT_HIDDEN
-|SDL_WINDOWEVENT_SHOWN
-end
-module Sdl_window_flags = struct
-type t = [`ALLOW_HIGHDPI
-|`FOREIGN
-|`MOUSE_FOCUS
-|`INPUT_FOCUS
-|`INPUT_GRABBED
-|`MAXIMIZED
-|`MINIMIZED
-|`RESIZABLE
-|`BORDERLESS
-|`SHOWN
-|`HIDDEN
-|`OPENGL
-|`FULLSCREEN_DESKTOP
-|`FULLSCREEN
-]
-end
diff --git a/src/sdl_init.ml b/src/sdl_init.ml
index 47abddd..c754db6 100644
--- a/src/sdl_init.ml
+++ b/src/sdl_init.ml
@@ -8,7 +8,7 @@

 exception Sdl_init_exception of string

-(** Initializing SDL and SDL Subsystems for SDK version of 1.2
+(** Initializing SDL and SDL Subsystems for SDK version of 2.0
  *  Taking arguments to this function have to {e flags}. if {e auto_clean} isn't
  *  send, you must call {!sdl_quit} in the end of your program.
  *  if SDL initialization failed, raise {!SDL_init_exception} with error infomations
diff --git a/src/sdl_types.ml b/src/sdl_types.ml
deleted file mode 100644
index 33ca425..0000000
--- a/src/sdl_types.ml
+++ /dev/null
@@ -1,74 +0,0 @@
-module Color_table = struct
-type t = (int, Bigarray.int16_unsigned_elt, Bigarray.c_layout) Bigarray.Genarray.t
-end
-module Gamma_ramp = struct
-type t = {
-  red : Color_table.t;
-  blue : Color_table.t;
-  green : Color_table.t;
-}
-end
-module Size = struct
-type t = {
-  width :int;
-  height : int;
-}
-end
-module Pos = struct
-type t = {
-  x : int;
-  y : int;
-}
-end
-module Version = struct
-type t = {
-  major : int;
-  minor : int;
-  patch : int;
-}
-end
-module Sys_wm_info = struct
-type t = {
-  version : Version.t;
-  subsystem : Sdl_flags.Sdl_syswm_type.t
-}
-end
-module Display_mode = struct
-type t = {
-  format : Sdl_flags.Sdl_pixel_format_enum.t;
-  width : int;
-  height : int;
-  refresh_rate : int;
-}
-end
-module Renderer_info = struct
-type t = {
-  name : string;
-  flags :Sdl_flags.Sdl_renderer_flags.t list;
-  num_texture_formats : int;
-  texture_formats : Sdl_flags.Sdl_pixel_format_enum.t list;
-  max_texture_width : int;
-  max_texture_height : int;
-}
-end
-module Color = struct
-type t = {
-  r:int;
-  g:int;
-  b:int;
-  a:int;
-}
-let to_string {r;g;b;a} =
-  Printf.sprintf "colors{r = %d;g = %d;b = %d;a = %d}" r g b a
-end
-module Rect = struct
-(** The type mapping to SDL_Rect *)
-type t = {
-  x : int;                      (** x location of the rectangle's upper left corner *)
-  y : int;                      (** y location of the rectangle's upper left corner *)
-  w : int;                      (** the width of the rectangle *)
-  h : int;                      (** the height of the rectangle *)
-}
-let to_string r =
-  Printf.sprintf "rect{x = %d; y = %d; w = %d; h = %d}" r.x r.y r.w r.h
-end
Add some module for Event.
This reverts commit 660b13b43bda894e1e2139e7da6d88f584a7ebc5.

Conflicts:
	src/config/OMakefile
Add events structures.