Files
Picross/Sources/SDL/Event.swift
T
2024-10-24 18:29:07 -04:00

16 lines
269 B
Swift

import CSDL3
public class EventHandler {
var handle: SDL_Event
public init() {
handle = SDL_Event()
}
public func pump(handler: (SDL_Event) -> ()) {
while SDL_PollEvent(&handle) == true {
handler(handle)
}
}
}