コード例 #1
0
ファイル: gdkmireventsource.c プロジェクト: csoriano89/gtk-1
static gboolean
gdk_mir_event_source_dispatch (GSource     *g_source,
                               GSourceFunc  callback,
                               gpointer     user_data)
{
  GdkMirEventSource *source = (GdkMirEventSource *) g_source;
  GdkEvent *event;

  /* First, run the queue of events from the thread */
  gdk_mir_event_source_convert_events (source);

  /* Next, dispatch one single event from the display's queue.
   *
   * If there is more than one event then we will soon find ourselves
   * back here again.
   */

  gdk_threads_enter ();

  event = gdk_display_get_event (source->display);

  if (event)
    {
      _gdk_event_emit (event);

      gdk_event_free (event);
    }

  gdk_threads_leave ();

  return TRUE;
}
コード例 #2
0
static gboolean gdk_android_event_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
{
    GdkEvent *event;

    gdk_threads_enter();

    event = _gdk_event_unqueue(GDK_DISPLAY(_gdk_display));

    if (event)
    {
        _gdk_event_emit(event);
        gdk_event_free(event);
    }

    gdk_threads_leave();

    return TRUE;
}
コード例 #3
0
ファイル: gdkeventsource.c プロジェクト: Vort/gtk
static gboolean
gdk_event_source_dispatch (GSource     *source,
                           GSourceFunc  callback,
                           gpointer     user_data)
{
  GdkDisplay *display = ((GdkEventSource*) source)->display;
  GdkEvent *event;

  gdk_threads_enter ();

  event = gdk_display_get_event (display);

  if (event)
    {
      _gdk_event_emit (event);

      gdk_event_free (event);
    }

  gdk_threads_leave ();

  return TRUE;
}
コード例 #4
0
ファイル: gdkeventsource.c プロジェクト: ceibal-tatu/gtk-3.0
static gboolean
gdk_event_source_dispatch (GSource     *source,
                           GSourceFunc  callback,
                           gpointer     user_data)
{
  GdkDisplay *display = ((GdkEventSource*) source)->display;
  GdkEvent *event;

  GDK_THREADS_ENTER ();

  event = gdk_display_get_event (display);

  if (event)
    {
      _gdk_event_emit (event);

      gdk_event_free (event);
    }

  GDK_THREADS_LEAVE ();

  return TRUE;
}