doc2 support for nimweb; fixed graphics.withEvents

This commit is contained in:
Araq 2012-11-01 08:32:30 +01:00
commit f35b51c68f
4 changed files with 13 additions and 6 deletions

View file

@ -487,7 +487,8 @@ proc fillSurface*(sur: PSurface, color: TColor) =
if sdl.FillRect(sur.s, nil, sur.createSdlColor(color)) == -1:
raiseEGraphics()
template withEvents*(surf: PSurface, event: expr, actions: stmt): stmt =
template withEvents*(surf: PSurface, event: expr, actions: stmt): stmt {.
immediate.} =
## Simple template which creates an event loop. ``Event`` is the name of the
## variable containing the TEvent object.
while True: