<commit_before>package sdl

/*
#include "sdl_wrapper.h"
#include "events.h"

#if !SDL_VERSION_ATLEAST(2,0,2)
#define SDL_RENDER_TARGETS_RESET (0x2000)
#endif

#if !SDL_VERSION_ATLEAST(2,0,4)
#pragma message("SDL_KEYMAPCHANGED is not supported before SDL 2.0.4")
#define SDL_KEYMAPCHANGED (0)

#pragma message("SDL_DROPTEXT is not supported before SDL 2.0.4")
#define SDL_DROPTEXT (0)

#pragma message("SDL_DROPBEGIN is not supported before SDL 2.0.4")
#define SDL_DROPBEGIN (0)

#pragma message("SDL_DROPCOMPLETE is not supported before SDL 2.0.4")
#define SDL_DROPCOMPLETE (0)

#pragma message("SDL_AUDIODEVICEADDED is not supported before SDL 2.0.4")
#define SDL_AUDIODEVICEADDED (0)

#pragma message("SDL_AUDIODEVICEREMOVED is not supported before SDL 2.0.4")
#define SDL_AUDIODEVICEREMOVED (0)

#pragma message("SDL_RENDER_DEVICE_RESET is not supported before SDL 2.0.4")
#define SDL_RENDER_DEVICE_RESET (0)

#pragma message("SDL_AudioDeviceEvent is not supported before SDL 2.0.4")
typedef struct SDL_AudioDeviceEvent
{
    Uint32 type;
    Uint32 timestamp;
    Uint32 which;
    Uint8  iscapture;
    Uint8  padding1;
    Uint8  padding2;
    Uint8  padding3;
} SDL_AudioDeviceEvent;
#endif
*/
import "C"
import "unsafe"
import "reflect"
import "sync"

var (
	eventFilterCache          EventFilter
	eventWatches              = make(map[EventWatchHandle]*eventFilterCallbackContext)
	lastEventWatchHandleMutex sync.Mutex
	lastEventWatchHandle      EventWatchHandle
	cevent                    C.SDL_Event
)

// Enumeration of the types of events that can be delivered.<commit_msg>sdl: events: fix stub function for SDL_AudioDeviceEvent<commit_after>package sdl

/*
#include "sdl_wrapper.h"
#include "events.h"

#if !SDL_VERSION_ATLEAST(2,0,2)
#define SDL_RENDER_TARGETS_RESET (0x2000)
#endif

#if !SDL_VERSION_ATLEAST(2,0,4)
#pragma message("SDL_KEYMAPCHANGED is not supported before SDL 2.0.4")
#define SDL_KEYMAPCHANGED (0x304)

#pragma message("SDL_DROPTEXT is not supported before SDL 2.0.4")
#define SDL_DROPTEXT (0x1001)

#pragma message("SDL_DROPBEGIN is not supported before SDL 2.0.4")
#define SDL_DROPBEGIN (0x1002)

#pragma message("SDL_DROPCOMPLETE is not supported before SDL 2.0.4")
#define SDL_DROPCOMPLETE (0x1003)

#pragma message("SDL_AUDIODEVICEADDED is not supported before SDL 2.0.4")
#define SDL_AUDIODEVICEADDED (0x1100)

#pragma message("SDL_AUDIODEVICEREMOVED is not supported before SDL 2.0.4")
#define SDL_AUDIODEVICEREMOVED (0x1101)

#pragma message("SDL_RENDER_DEVICE_RESET is not supported before SDL 2.0.4")
#define SDL_RENDER_DEVICE_RESET (0x2001)

#pragma message("SDL_AudioDeviceEvent is not supported before SDL 2.0.4")
typedef struct SDL_AudioDeviceEvent
{
    Uint32 type;
    Uint32 timestamp;
    Uint32 which;
    Uint8  iscapture;
    Uint8  padding1;
    Uint8  padding2;
    Uint8  padding3;
} SDL_AudioDeviceEvent;
#endif
*/
import "C"
import "unsafe"
import "reflect"
import "sync"

var (
	eventFilterCache          EventFilter
	eventWatches              = make(map[EventWatchHandle]*eventFilterCallbackContext)
	lastEventWatchHandleMutex sync.Mutex
	lastEventWatchHandle      EventWatchHandle
	cevent                    C.SDL_Event
)

// Enumeration of the types of events that can be delivered.
{'fraction_non_alphanumeric': 0.08687615526802218, 'fraction_numerical': 0.04220579174368454, 'mean_word_length': 4.850450450450451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '451736', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1122, 'n_words': 299}