Skip to content

Commit 4d1bcc3

Browse files
committed
sdl: events.go: Add missing SDL_DROPTEXT, SDL_DROPBEGIN, and SDL_DROPCOMPLETE constants
Signed-off-by: Lilis Iskandar <[email protected]>
1 parent 3f995cb commit 4d1bcc3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

sdl/events.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ package sdl
77
#if !SDL_VERSION_ATLEAST(2,0,2)
88
#define SDL_RENDER_TARGETS_RESET (0x2000)
99
#endif
10+
11+
#if !SDL_VERSION_ATLEAST(2,0,4)
12+
#pragma message("SDL_DROPTEXT is not supported before SDL 2.0.4")
13+
#define SDL_DROPTEXT (0)
14+
15+
#pragma message("SDL_DROPBEGIN is not supported before SDL 2.0.4")
16+
#define SDL_DROPBEGIN (0)
17+
18+
#pragma message("SDL_DROPCOMPLETE is not supported before SDL 2.0.4")
19+
#define SDL_DROPCOMPLETE (0)
20+
#endif
1021
*/
1122
import "C"
1223
import "unsafe"
@@ -84,7 +95,10 @@ const (
8495
CLIPBOARDUPDATE = C.SDL_CLIPBOARDUPDATE // the clipboard changed
8596

8697
// Drag and drop events
87-
DROPFILE = C.SDL_DROPFILE // the system requests a file open
98+
DROPFILE = C.SDL_DROPFILE // the system requests a file open
99+
DROPTEXT = C.SDL_DROPTEXT // text/plain drag-and-drop event
100+
DROPBEGIN = C.SDL_DROPBEGIN // a new set of drops is beginning (NULL filename)
101+
DROPCOMPLETE = C.SDL_DROPCOMPLETE // current set of drops is now complete (NULL filename)
88102

89103
// Render events
90104
RENDER_TARGETS_RESET = C.SDL_RENDER_TARGETS_RESET // the render targets have been reset and their contents need to be updated (>= SDL 2.0.2)

0 commit comments

Comments
 (0)