Esempio n. 1
0
/**
 * gdk_event_peek:
 *
 * If there is an event waiting in the event queue of some open
 * display, returns a copy of it. See gdk_display_peek_event().
 * 
 * Return value: a copy of the first #GdkEvent on some event queue, or %NULL if no
 * events are in any queues. The returned #GdkEvent should be freed with
 * gdk_event_free().
 **/
GdkEvent*
gdk_event_peek (void)
{
  GSList *tmp_list;

  for (tmp_list = _gdk_displays; tmp_list; tmp_list = tmp_list->next)
    {
      GdkEvent *event = gdk_display_peek_event (tmp_list->data);
      if (event)
	return event;
    }

  return NULL;
}
Esempio n. 2
0
static VALUE
rg_peek_event(VALUE self)
{
    return GEV2RVAL(gdk_display_peek_event(_SELF(self)));
}