/*
 * call-seq:
 *   wait { |event| block } -> Event
 *   wait() -> Event
 *
 * Waits for the next event of the stream and returns it. If a block
 * is given, it is called with the event as parameter and wait only returns,
 * if the block evaluates to true.
 *
 * Calling wait is also neccessary if Stream#handle was used. If an event
 * is handled this way, wait doesn't return or call the block on this event.
 *
 * The events "motion", "menu_motion" and mouse button presses are not 
 * passed to Stream#wait.
 */
static VALUE xs_wait(VALUE self) {