Skip to content

Commit 41bbd81

Browse files
committed
Expose new functionality found in SDL2 2.0.4
1 parent 0de9061 commit 41bbd81

File tree

10 files changed

+218
-7
lines changed

10 files changed

+218
-7
lines changed

ChangeLog.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
2.2.0
22
=====
33

4+
* Version 2.0.4 of the SDL2 C library is now required:
5+
* `SDL.Event`:
6+
* Add `AudioDeviceEvent` constructor to `Event`
7+
* Add `KeymapChangedEvent` constructor to `EventPayload`
8+
* Add `mouseWheelEventDirection` field to `MouseWheelEventData`
9+
* `SDL.Input.Mouse`:
10+
* Add `MouseScrollDirection` enumeration
11+
* `SDL.Raw.Audio`:
12+
* Add `clearQueuedAudio` function
13+
* Add `getQueuedAudioSize` function
14+
* Add `queueAudio` function
15+
* `SDL.Raw.Enum`:
16+
* Add `SDL_GL_CONTEXT_RELEASE_BEHAVIOR` pattern synonym
17+
* Add `JoystickPowerLevel` pattern synonyms
18+
* Add `SDL_MOUSEWHEEL_NORMAL` and `SDL_MOUSEWHEEL_FLIPPED` pattern synonyms
19+
* Add `SDL_KEYMAPCHANGED`, `SDL_AUDIODEVICEADDED`, `SDL_AUDIODEVICEREMOVED`,
20+
`SDL_RENDER_TARGETS_RESET`, and `SDL_RENDER_DEVICE_RESET` pattern synonyms
21+
* Add `SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE` and
22+
`SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH` pattern synonyms
23+
* Add `SDL_WINDOW_MOUSE_CAPTURE` pattern synonym
24+
* `SDL.Raw.Event`:
25+
* Add `captureMouse` function
26+
* Add `getGlobalMouseState` function
27+
* Add `warpMouseGlobal` function
28+
* Add `joystickCurrentPowerLevel` function
29+
* Add `joystickFromInstanceID` function
30+
* Add `gameControllerFromInstanceID` function
31+
* `SDL.Raw.Event`:
32+
* Add `AudioDeviceEvent` constructor to `Event`
33+
* Add `KeymapChangedEvent` constructor to `Event`
34+
* Add `mouseWheelEventDirection` field to `MouseMotionEvent` constructor
35+
436
* Add `SDL.Exception` module, exposing `SDLException`
537
* Add new function, `createSoftwareRenderer`, to render onto a surface
638
* Add joystick POV hat support

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/haskell-game/sdl2.svg?branch=master)](https://travis-ci.org/haskell-game/sdl2)
44

5-
If you don't have SDL 2.0.2 or higher on your system via your
5+
If you don't have SDL 2.0.4 or higher on your system via your
66
package manager, you can install it from the
77
[official SDL site](https://www.libsdl.org/download-2.0.php).
88

sdl2.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sdl2
22
version: 2.2.0
3-
synopsis: Both high- and low-level bindings to the SDL library (version 2.0.2+).
3+
synopsis: Both high- and low-level bindings to the SDL library (version 2.0.4+).
44
description:
55
This package contains bindings to the SDL 2 library, in both high- and
66
low-level forms:
@@ -116,7 +116,7 @@ library
116116
SDL2
117117

118118
pkgconfig-depends:
119-
sdl2 >= 2.0.2
119+
sdl2 >= 2.0.4
120120

121121
build-depends:
122122
base >= 4.7 && < 5,

src/SDL/Event.hs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ data EventPayload
123123
| KeyboardEvent KeyboardEventData
124124
| TextEditingEvent TextEditingEventData
125125
| TextInputEvent TextInputEventData
126+
| KeymapChangedEvent
126127
| MouseMotionEvent MouseMotionEventData
127128
| MouseButtonEvent MouseButtonEventData
128129
| MouseWheelEvent MouseWheelEventData
@@ -134,6 +135,7 @@ data EventPayload
134135
| ControllerAxisEvent ControllerAxisEventData
135136
| ControllerButtonEvent ControllerButtonEventData
136137
| ControllerDeviceEvent ControllerDeviceEventData
138+
| AudioDeviceEvent AudioDeviceEventData
137139
| QuitEvent
138140
| UserEvent UserEventData
139141
| SysWMEvent SysWMEventData
@@ -322,6 +324,8 @@ data MouseWheelEventData =
322324
-- ^ The 'MouseDevice' whose wheel was scrolled.
323325
,mouseWheelEventPos :: V2 Int32
324326
-- ^ The amount scrolled.
327+
,mouseWheelEventDirection :: MouseScrollDirection
328+
-- ^ The scroll direction mode.
325329
}
326330
deriving (Eq,Ord,Generic,Show,Typeable)
327331

@@ -405,6 +409,14 @@ data ControllerDeviceEventData =
405409
}
406410
deriving (Eq,Ord,Generic,Show,Typeable)
407411

412+
data AudioDeviceEventData =
413+
AudioDeviceEventData {audioDeviceEventWhich :: Word32
414+
-- ^ The audio device ID that reported the event.
415+
,audioDeviceEventIsCapture :: Bool
416+
-- * If the audio device is a capture device.
417+
}
418+
deriving (Eq,Ord,Generic,Show,Typeable)
419+
408420
-- | Event data for application-defined events.
409421
data UserEventData =
410422
UserEventData {userEventWindow :: Window
@@ -570,6 +582,8 @@ convertRaw (Raw.TextInputEvent _ ts a b) =
570582
(TextInputEvent
571583
(TextInputEventData w'
572584
(ccharStringToText b))))
585+
convertRaw (Raw.KeymapChangedEvent _ ts) =
586+
return (Event ts KeymapChangedEvent)
573587
convertRaw (Raw.MouseMotionEvent _ ts a b c d e f g) =
574588
do w' <- fmap Window (Raw.getWindowFromID a)
575589
let buttons =
@@ -610,13 +624,14 @@ convertRaw (Raw.MouseButtonEvent t ts a b c _ e f g) =
610624
button
611625
e
612626
(P (V2 f g)))))
613-
convertRaw (Raw.MouseWheelEvent _ ts a b c d) =
627+
convertRaw (Raw.MouseWheelEvent _ ts a b c d e) =
614628
do w' <- fmap Window (Raw.getWindowFromID a)
615629
return (Event ts
616630
(MouseWheelEvent
617631
(MouseWheelEventData w'
618632
(fromNumber b)
619-
(V2 c d))))
633+
(V2 c d)
634+
(fromNumber e))))
620635
convertRaw (Raw.JoyAxisEvent _ ts a b c) =
621636
return (Event ts (JoyAxisEvent (JoyAxisEventData a b c)))
622637
convertRaw (Raw.JoyBallEvent _ ts a b c d) =
@@ -641,6 +656,8 @@ convertRaw (Raw.ControllerButtonEvent _ ts a b c) =
641656
return (Event ts (ControllerButtonEvent (ControllerButtonEventData a b c)))
642657
convertRaw (Raw.ControllerDeviceEvent _ ts a) =
643658
return (Event ts (ControllerDeviceEvent (ControllerDeviceEventData a)))
659+
convertRaw (Raw.AudioDeviceEvent _ ts a b) =
660+
return (Event ts (AudioDeviceEvent (AudioDeviceEventData a (b /= 0))))
644661
convertRaw (Raw.QuitEvent _ ts) =
645662
return (Event ts QuitEvent)
646663
convertRaw (Raw.UserEvent _ ts a b c d) =

src/SDL/Input/Mouse.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module SDL.Input.Mouse
1414
-- * Mouse and Touch Input
1515
, MouseButton(..)
1616
, MouseDevice(..)
17+
, MouseScrollDirection(..)
1718

1819
-- * Mouse State
1920
, getModalMouseLocation
@@ -109,6 +110,18 @@ instance FromNumber MouseDevice Word32 where
109110
Raw.SDL_TOUCH_MOUSEID -> Touch
110111
n -> Mouse $ fromIntegral n
111112

113+
-- | Identifies mouse scroll direction.
114+
data MouseScrollDirection
115+
= ScrollNormal
116+
| ScrollFlipped
117+
deriving (Data, Eq, Generic, Ord, Read, Show, Typeable)
118+
119+
instance FromNumber MouseScrollDirection Word32 where
120+
fromNumber n' = case n' of
121+
Raw.SDL_MOUSEWHEEL_NORMAL -> ScrollNormal
122+
Raw.SDL_MOUSEWHEEL_FLIPPED -> ScrollFlipped
123+
_ -> ScrollNormal
124+
112125
data WarpMouseOrigin
113126
= WarpInWindow Window
114127
-- ^ Move the mouse pointer within a given 'Window'.

src/SDL/Raw/Audio.hs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module SDL.Raw.Audio (
33
audioInit,
44
audioQuit,
55
buildAudioCVT,
6+
clearQueuedAudio,
67
closeAudio,
78
closeAudioDevice,
89
convertAudio,
@@ -14,6 +15,7 @@ module SDL.Raw.Audio (
1415
getCurrentAudioDriver,
1516
getNumAudioDevices,
1617
getNumAudioDrivers,
18+
getQueuedAudioSize,
1719
loadWAV,
1820
loadWAV_RW,
1921
lockAudio,
@@ -24,6 +26,7 @@ module SDL.Raw.Audio (
2426
openAudioDevice,
2527
pauseAudio,
2628
pauseAudioDevice,
29+
queueAudio,
2730
unlockAudio,
2831
unlockAudioDevice
2932
) where
@@ -40,6 +43,7 @@ import SDL.Raw.Types
4043
foreign import ccall "SDL.h SDL_AudioInit" audioInitFFI :: CString -> IO CInt
4144
foreign import ccall "SDL.h SDL_AudioQuit" audioQuitFFI :: IO ()
4245
foreign import ccall "SDL.h SDL_BuildAudioCVT" buildAudioCVTFFI :: Ptr AudioCVT -> AudioFormat -> Word8 -> CInt -> AudioFormat -> Word8 -> CInt -> IO CInt
46+
foreign import ccall "SDL.h SDL_ClearQueuedAudio" clearQueuedAudioFFI :: AudioDeviceID -> IO ()
4347
foreign import ccall "SDL.h SDL_CloseAudio" closeAudioFFI :: IO ()
4448
foreign import ccall "SDL.h SDL_CloseAudioDevice" closeAudioDeviceFFI :: AudioDeviceID -> IO ()
4549
foreign import ccall "SDL.h SDL_ConvertAudio" convertAudioFFI :: Ptr AudioCVT -> IO CInt
@@ -51,6 +55,7 @@ foreign import ccall "SDL.h SDL_GetAudioStatus" getAudioStatusFFI :: IO AudioSta
5155
foreign import ccall "SDL.h SDL_GetCurrentAudioDriver" getCurrentAudioDriverFFI :: IO CString
5256
foreign import ccall "SDL.h SDL_GetNumAudioDevices" getNumAudioDevicesFFI :: CInt -> IO CInt
5357
foreign import ccall "SDL.h SDL_GetNumAudioDrivers" getNumAudioDriversFFI :: IO CInt
58+
foreign import ccall "SDL.h SDL_GetQueuedAudioSize" getQueuedAudioSizeFFI :: AudioDeviceID -> IO Word32
5459
foreign import ccall "SDL.h SDL_LoadWAV_RW" loadWAV_RWFFI :: Ptr RWops -> CInt -> Ptr AudioSpec -> Ptr (Ptr Word8) -> Ptr Word32 -> IO (Ptr AudioSpec)
5560
foreign import ccall "SDL.h SDL_LockAudio" lockAudioFFI :: IO ()
5661
foreign import ccall "SDL.h SDL_LockAudioDevice" lockAudioDeviceFFI :: AudioDeviceID -> IO ()
@@ -60,6 +65,7 @@ foreign import ccall "SDL.h SDL_OpenAudio" openAudioFFI :: Ptr AudioSpec -> Ptr
6065
foreign import ccall "SDL.h SDL_OpenAudioDevice" openAudioDeviceFFI :: CString -> CInt -> Ptr AudioSpec -> Ptr AudioSpec -> CInt -> IO AudioDeviceID
6166
foreign import ccall "SDL.h SDL_PauseAudio" pauseAudioFFI :: CInt -> IO ()
6267
foreign import ccall "SDL.h SDL_PauseAudioDevice" pauseAudioDeviceFFI :: AudioDeviceID -> CInt -> IO ()
68+
foreign import ccall "SDL.h SDL_QueueAudio" queueAudioFFI :: AudioDeviceID -> Ptr () -> Word32 -> IO CInt
6369
foreign import ccall "SDL.h SDL_UnlockAudio" unlockAudioFFI :: IO ()
6470
foreign import ccall "SDL.h SDL_UnlockAudioDevice" unlockAudioDeviceFFI :: AudioDeviceID -> IO ()
6571

@@ -75,6 +81,10 @@ buildAudioCVT :: MonadIO m => Ptr AudioCVT -> AudioFormat -> Word8 -> CInt -> Au
7581
buildAudioCVT v1 v2 v3 v4 v5 v6 v7 = liftIO $ buildAudioCVTFFI v1 v2 v3 v4 v5 v6 v7
7682
{-# INLINE buildAudioCVT #-}
7783

84+
clearQueuedAudio :: MonadIO m => AudioDeviceID -> m ()
85+
clearQueuedAudio v1 = liftIO $ clearQueuedAudioFFI v1
86+
{-# INLINE clearQueuedAudio #-}
87+
7888
closeAudio :: MonadIO m => m ()
7989
closeAudio = liftIO closeAudioFFI
8090
{-# INLINE closeAudio #-}
@@ -119,6 +129,10 @@ getNumAudioDrivers :: MonadIO m => m CInt
119129
getNumAudioDrivers = liftIO getNumAudioDriversFFI
120130
{-# INLINE getNumAudioDrivers #-}
121131

132+
getQueuedAudioSize :: MonadIO m => AudioDeviceID -> m Word32
133+
getQueuedAudioSize v1 = liftIO $ getQueuedAudioSizeFFI v1
134+
{-# INLINE getQueuedAudioSize #-}
135+
122136
loadWAV :: MonadIO m => CString -> Ptr AudioSpec -> Ptr (Ptr Word8) -> Ptr Word32 -> m (Ptr AudioSpec)
123137
loadWAV file spec audio_buf audio_len = liftIO $ do
124138
rw <- withCString "rb" $ rwFromFile file
@@ -161,6 +175,10 @@ pauseAudioDevice :: MonadIO m => AudioDeviceID -> CInt -> m ()
161175
pauseAudioDevice v1 v2 = liftIO $ pauseAudioDeviceFFI v1 v2
162176
{-# INLINE pauseAudioDevice #-}
163177

178+
queueAudio :: MonadIO m => AudioDeviceID -> Ptr () -> Word32 -> m CInt
179+
queueAudio v1 v2 v3 = liftIO $ queueAudioFFI v1 v2 v3
180+
{-# INLINE queueAudio #-}
181+
164182
unlockAudio :: MonadIO m => m ()
165183
unlockAudio = liftIO unlockAudioFFI
166184
{-# INLINE unlockAudio #-}

src/SDL/Raw/Enum.hsc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ module SDL.Raw.Enum (
101101
pattern SDL_GL_CONTEXT_PROFILE_MASK,
102102
pattern SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
103103
pattern SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
104+
pattern SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
104105

105106
-- ** Hint Priority
106107
HintPriority,
@@ -120,6 +121,16 @@ module SDL.Raw.Enum (
120121
pattern SDL_INIT_NOPARACHUTE,
121122
pattern SDL_INIT_EVERYTHING,
122123

124+
-- ** Joystick Power Level
125+
JoystickPowerLevel,
126+
pattern SDL_JOYSTICK_POWER_UNKNOWN,
127+
pattern SDL_JOYSTICK_POWER_EMPTY,
128+
pattern SDL_JOYSTICK_POWER_LOW,
129+
pattern SDL_JOYSTICK_POWER_MEDIUM,
130+
pattern SDL_JOYSTICK_POWER_FULL,
131+
pattern SDL_JOYSTICK_POWER_WIRED,
132+
pattern SDL_JOYSTICK_POWER_MAX,
133+
123134
-- ** Keycode
124135
Keycode,
125136
pattern SDLK_UNKNOWN,
@@ -694,6 +705,10 @@ module SDL.Raw.Enum (
694705
pattern SDL_BUTTON_X1MASK,
695706
pattern SDL_BUTTON_X2MASK,
696707

708+
-- ** Mouse Wheel Direction
709+
pattern SDL_MOUSEWHEEL_NORMAL,
710+
pattern SDL_MOUSEWHEEL_FLIPPED,
711+
697712
-- ** Event Type
698713
pattern SDL_FIRSTEVENT,
699714
pattern SDL_QUIT,
@@ -709,6 +724,7 @@ module SDL.Raw.Enum (
709724
pattern SDL_KEYUP,
710725
pattern SDL_TEXTEDITING,
711726
pattern SDL_TEXTINPUT,
727+
pattern SDL_KEYMAPCHANGED,
712728
pattern SDL_MOUSEMOTION,
713729
pattern SDL_MOUSEBUTTONDOWN,
714730
pattern SDL_MOUSEBUTTONUP,
@@ -734,6 +750,10 @@ module SDL.Raw.Enum (
734750
pattern SDL_MULTIGESTURE,
735751
pattern SDL_CLIPBOARDUPDATE,
736752
pattern SDL_DROPFILE,
753+
pattern SDL_AUDIODEVICEADDED,
754+
pattern SDL_AUDIODEVICEREMOVED,
755+
pattern SDL_RENDER_TARGETS_RESET,
756+
pattern SDL_RENDER_DEVICE_RESET,
737757
pattern SDL_USEREVENT,
738758
pattern SDL_LASTEVENT,
739759

@@ -784,6 +804,10 @@ module SDL.Raw.Enum (
784804
pattern SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG,
785805
pattern SDL_GL_CONTEXT_RESET_ISOLATION_FLAG,
786806

807+
-- ** OpenGL Context Release Behavior Flag
808+
pattern SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE,
809+
pattern SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH,
810+
787811
-- ** Pixel Formats
788812
pattern SDL_PIXELFORMAT_UNKNOWN,
789813
pattern SDL_PIXELFORMAT_INDEX1LSB,
@@ -873,6 +897,7 @@ module SDL.Raw.Enum (
873897
pattern SDL_WINDOW_FULLSCREEN_DESKTOP,
874898
pattern SDL_WINDOW_FOREIGN,
875899
pattern SDL_WINDOW_ALLOW_HIGHDPI,
900+
pattern SDL_WINDOW_MOUSE_CAPTURE,
876901

877902
-- ** Window Positioning
878903
pattern SDL_WINDOWPOS_UNDEFINED,
@@ -899,6 +924,7 @@ type GameControllerButton = (#type SDL_GameControllerButton)
899924
type GLattr = (#type SDL_GLattr)
900925
type HintPriority = (#type SDL_HintPriority)
901926
type InitFlag = Word32
927+
type JoystickPowerLevel = (#type SDL_JoystickPowerLevel)
902928
type Keycode = (#type SDL_Keycode)
903929
type Keymod = (#type SDL_Keymod)
904930
type LogPriority = (#type SDL_LogPriority)
@@ -991,6 +1017,7 @@ pattern SDL_GL_CONTEXT_FLAGS = (#const SDL_GL_CONTEXT_FLAGS) :: GLattr
9911017
pattern SDL_GL_CONTEXT_PROFILE_MASK = (#const SDL_GL_CONTEXT_PROFILE_MASK) :: GLattr
9921018
pattern SDL_GL_SHARE_WITH_CURRENT_CONTEXT = (#const SDL_GL_SHARE_WITH_CURRENT_CONTEXT) :: GLattr
9931019
pattern SDL_GL_FRAMEBUFFER_SRGB_CAPABLE = (#const SDL_GL_FRAMEBUFFER_SRGB_CAPABLE) :: GLattr
1020+
pattern SDL_GL_CONTEXT_RELEASE_BEHAVIOR = (#const SDL_GL_CONTEXT_RELEASE_BEHAVIOR) :: GLattr
9941021

9951022
pattern SDL_HINT_DEFAULT = (#const SDL_HINT_DEFAULT) :: HintPriority
9961023
pattern SDL_HINT_NORMAL = (#const SDL_HINT_NORMAL) :: HintPriority
@@ -1006,6 +1033,14 @@ pattern SDL_INIT_EVENTS = (#const SDL_INIT_EVENTS) :: InitFlag
10061033
pattern SDL_INIT_NOPARACHUTE = (#const SDL_INIT_NOPARACHUTE) :: InitFlag
10071034
pattern SDL_INIT_EVERYTHING = (#const SDL_INIT_EVERYTHING) :: InitFlag
10081035

1036+
pattern SDL_JOYSTICK_POWER_UNKNOWN = (#const SDL_JOYSTICK_POWER_UNKNOWN) :: JoystickPowerLevel
1037+
pattern SDL_JOYSTICK_POWER_EMPTY = (#const SDL_JOYSTICK_POWER_EMPTY) :: JoystickPowerLevel
1038+
pattern SDL_JOYSTICK_POWER_LOW = (#const SDL_JOYSTICK_POWER_LOW) :: JoystickPowerLevel
1039+
pattern SDL_JOYSTICK_POWER_MEDIUM = (#const SDL_JOYSTICK_POWER_MEDIUM) :: JoystickPowerLevel
1040+
pattern SDL_JOYSTICK_POWER_FULL = (#const SDL_JOYSTICK_POWER_FULL) :: JoystickPowerLevel
1041+
pattern SDL_JOYSTICK_POWER_WIRED = (#const SDL_JOYSTICK_POWER_WIRED) :: JoystickPowerLevel
1042+
pattern SDL_JOYSTICK_POWER_MAX = (#const SDL_JOYSTICK_POWER_MAX) :: JoystickPowerLevel
1043+
10091044
pattern SDLK_UNKNOWN = (#const SDLK_UNKNOWN) :: Keycode
10101045
pattern SDLK_RETURN = (#const SDLK_RETURN) :: Keycode
10111046
pattern SDLK_ESCAPE = (#const SDLK_ESCAPE) :: Keycode
@@ -1556,6 +1591,9 @@ pattern SDL_BUTTON_RMASK = (#const SDL_BUTTON_RMASK)
15561591
pattern SDL_BUTTON_X1MASK = (#const SDL_BUTTON_X1MASK)
15571592
pattern SDL_BUTTON_X2MASK = (#const SDL_BUTTON_X2MASK)
15581593

1594+
pattern SDL_MOUSEWHEEL_NORMAL = (#const SDL_MOUSEWHEEL_NORMAL)
1595+
pattern SDL_MOUSEWHEEL_FLIPPED = (#const SDL_MOUSEWHEEL_FLIPPED)
1596+
15591597
pattern SDL_FIRSTEVENT = (#const SDL_FIRSTEVENT)
15601598
pattern SDL_QUIT = (#const SDL_QUIT)
15611599
pattern SDL_APP_TERMINATING = (#const SDL_APP_TERMINATING)
@@ -1570,6 +1608,7 @@ pattern SDL_KEYDOWN = (#const SDL_KEYDOWN)
15701608
pattern SDL_KEYUP = (#const SDL_KEYUP)
15711609
pattern SDL_TEXTEDITING = (#const SDL_TEXTEDITING)
15721610
pattern SDL_TEXTINPUT = (#const SDL_TEXTINPUT)
1611+
pattern SDL_KEYMAPCHANGED = (#const SDL_KEYMAPCHANGED)
15731612
pattern SDL_MOUSEMOTION = (#const SDL_MOUSEMOTION)
15741613
pattern SDL_MOUSEBUTTONDOWN = (#const SDL_MOUSEBUTTONDOWN)
15751614
pattern SDL_MOUSEBUTTONUP = (#const SDL_MOUSEBUTTONUP)
@@ -1595,6 +1634,10 @@ pattern SDL_DOLLARRECORD = (#const SDL_DOLLARRECORD)
15951634
pattern SDL_MULTIGESTURE = (#const SDL_MULTIGESTURE)
15961635
pattern SDL_CLIPBOARDUPDATE = (#const SDL_CLIPBOARDUPDATE)
15971636
pattern SDL_DROPFILE = (#const SDL_DROPFILE)
1637+
pattern SDL_AUDIODEVICEADDED = (#const SDL_AUDIODEVICEADDED)
1638+
pattern SDL_AUDIODEVICEREMOVED = (#const SDL_AUDIODEVICEREMOVED)
1639+
pattern SDL_RENDER_TARGETS_RESET = (#const SDL_RENDER_TARGETS_RESET)
1640+
pattern SDL_RENDER_DEVICE_RESET = (#const SDL_RENDER_DEVICE_RESET)
15981641
pattern SDL_USEREVENT = (#const SDL_USEREVENT)
15991642
pattern SDL_LASTEVENT = (#const SDL_LASTEVENT)
16001643

@@ -1638,6 +1681,9 @@ pattern SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = (#const SDL_GL_CONTEXT_FORWARD_
16381681
pattern SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = (#const SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG)
16391682
pattern SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = (#const SDL_GL_CONTEXT_RESET_ISOLATION_FLAG)
16401683

1684+
pattern SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = (#const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE)
1685+
pattern SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = (#const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH)
1686+
16411687
pattern SDL_PIXELFORMAT_UNKNOWN = (#const SDL_PIXELFORMAT_UNKNOWN)
16421688
pattern SDL_PIXELFORMAT_INDEX1LSB = (#const SDL_PIXELFORMAT_INDEX1LSB)
16431689
pattern SDL_PIXELFORMAT_INDEX1MSB = (#const SDL_PIXELFORMAT_INDEX1MSB)
@@ -1720,6 +1766,7 @@ pattern SDL_WINDOW_MOUSE_FOCUS = (#const SDL_WINDOW_MOUSE_FOCUS)
17201766
pattern SDL_WINDOW_FULLSCREEN_DESKTOP = (#const SDL_WINDOW_FULLSCREEN_DESKTOP)
17211767
pattern SDL_WINDOW_FOREIGN = (#const SDL_WINDOW_FOREIGN)
17221768
pattern SDL_WINDOW_ALLOW_HIGHDPI = (#const SDL_WINDOW_ALLOW_HIGHDPI)
1769+
pattern SDL_WINDOW_MOUSE_CAPTURE = (#const SDL_WINDOW_MOUSE_CAPTURE)
17231770

17241771
pattern SDL_WINDOWPOS_UNDEFINED = (#const SDL_WINDOWPOS_UNDEFINED)
17251772
pattern SDL_WINDOWPOS_CENTERED = (#const SDL_WINDOWPOS_CENTERED)

0 commit comments

Comments
 (0)