Magical values in Tsdl

ctypes
#1

Hi,
As an exercise I’m trying to add the new SDL_DisplayEvent struct that
appeared in the last SDL2 2.0.9 to tsdl:

diff -u SDL2-2.0.6/include/SDL_events.h SDL2-2.0.9/include/SDL_events.h

Here you can see my attempt as the git diff to the last tsdl git:

I tryed to follow the other events as example, and to add the new
display event, but I’m having difficulty to figure out how to write at
line 50:
let display_event = 0x150 (* compiles fine )
that should probably be:
let display_event = sdl_displayevent
if I follow the other events there, like for example:
let window_event = sdl_windowevent (
at line 4227 )
let clipboard_update = sdl_clipboardupdate (
at line 4011 *)
from:

What I don’t catch is where “sdl_windowevent” comes from?
Because if I write the equivalent:
let display_event = sdl_displayevent
I get:
Error: Unbound value sdl_displayevent

#2

Constants are listed in support/consts_stubs.c, you should probably add a line equivalent to:

int_v(SDL_DISPLAYEVENT);