IDK, maybe your approach can be helpful on a low-level layer but why would I
want writing C in Nim? I'd prefer event type as enum and sdl_quit declared as
just quit. It can be used as sdl2.quit, assuming your wrapper code's module
name is sdl2, then we can have auto-completion, like
sdl2.nim
type
event_type* = enum
quit_event ,
keyboard_event ,
joy_button_event ,
mouse_motion_event
event* = object
etype* : event_type
proc quit* =
discard
test1.nim
from sdl2 import nil
var
e : sdl2.event
if e.etype == sdl2.quit_event:
sdl2.quit()