Files
Picross/Sources/SDL/Event.swift
T
2024-10-16 00:52:21 -04:00

16 lines
265 B
Swift

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