[gtk+] Move event source apis to gdk_x11
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Move event source apis to gdk_x11
- Date: Tue, 21 Dec 2010 17:12:52 +0000 (UTC)
commit 624dc457553daaf0ed3addb71985241316e41146
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 15 12:25:38 2010 -0500
Move event source apis to gdk_x11
Reduces the changes of cross-backend collisions
gdk/x11/gdkdisplay-x11.c | 16 ++++++++--------
gdk/x11/gdkeventsource.c | 26 +++++++++++++-------------
gdk/x11/gdkeventsource.h | 14 +++++++-------
gdk/x11/gdkwindow-x11.c | 18 +++++++++---------
4 files changed, 37 insertions(+), 37 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 11b3ebe..b61d832 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1100,19 +1100,19 @@ gdk_event_init (GdkDisplay *display)
GdkDeviceManager *device_manager;
display_x11 = GDK_DISPLAY_X11 (display);
- display_x11->event_source = gdk_event_source_new (display);
+ display_x11->event_source = gdk_x11_event_source_new (display);
- gdk_event_source_add_translator ((GdkEventSource *) display_x11->event_source,
- GDK_EVENT_TRANSLATOR (display));
+ gdk_x11_event_source_add_translator ((GdkEventSource *) display_x11->event_source,
+ GDK_EVENT_TRANSLATOR (display));
device_manager = gdk_display_get_device_manager (display);
- gdk_event_source_add_translator ((GdkEventSource *) display_x11->event_source,
- GDK_EVENT_TRANSLATOR (device_manager));
+ gdk_x11_event_source_add_translator ((GdkEventSource *) display_x11->event_source,
+ GDK_EVENT_TRANSLATOR (device_manager));
gdk_display_add_client_message_filter (display,
- gdk_atom_intern_static_string ("WM_PROTOCOLS"),
- gdk_wm_protocols_filter,
- NULL);
+ gdk_atom_intern_static_string ("WM_PROTOCOLS"),
+ gdk_wm_protocols_filter,
+ NULL);
}
static void
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index d21097a..b252e03 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -89,7 +89,7 @@ gdk_event_apply_filters (XEvent *xevent,
tmp_list = node;
if (result != GDK_FILTER_CONTINUE)
- return result;
+ return result;
}
return GDK_FILTER_CONTINUE;
@@ -102,7 +102,7 @@ gdk_event_source_get_filter_window (GdkEventSource *event_source,
GdkWindow *window;
window = gdk_x11_window_lookup_for_display (event_source->display,
- xevent->xany.window);
+ xevent->xany.window);
if (window && !GDK_IS_WINDOW (window))
window = NULL;
@@ -191,7 +191,7 @@ gdk_event_source_translate_event (GdkEventSource *event_source,
}
else if (result == GDK_FILTER_TRANSLATE)
return event;
- }
+ }
}
gdk_event_free (event);
@@ -236,7 +236,7 @@ gdk_event_source_prepare (GSource *source,
*timeout = -1;
retval = (_gdk_event_queue_find_first (display) != NULL ||
- gdk_check_xpending (display));
+ gdk_check_xpending (display));
GDK_THREADS_LEAVE ();
@@ -253,7 +253,7 @@ gdk_event_source_check (GSource *source)
if (event_source->event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (event_source->display) != NULL ||
- gdk_check_xpending (event_source->display));
+ gdk_check_xpending (event_source->display));
else
retval = FALSE;
@@ -336,7 +336,7 @@ gdk_event_source_finalize (GSource *source)
}
GSource *
-gdk_event_source_new (GdkDisplay *display)
+gdk_x11_event_source_new (GdkDisplay *display)
{
GSource *source;
GdkEventSource *event_source;
@@ -346,7 +346,7 @@ gdk_event_source_new (GdkDisplay *display)
source = g_source_new (&event_funcs, sizeof (GdkEventSource));
name = g_strdup_printf ("GDK X11 Event source (%s)",
- gdk_display_get_name (display));
+ gdk_display_get_name (display));
g_source_set_name (source, name);
g_free (name);
event_source = (GdkEventSource *) source;
@@ -369,8 +369,8 @@ gdk_event_source_new (GdkDisplay *display)
}
void
-gdk_event_source_add_translator (GdkEventSource *source,
- GdkEventTranslator *translator)
+gdk_x11_event_source_add_translator (GdkEventSource *source,
+ GdkEventTranslator *translator)
{
g_return_if_fail (GDK_IS_EVENT_TRANSLATOR (translator));
@@ -378,10 +378,10 @@ gdk_event_source_add_translator (GdkEventSource *source,
}
void
-gdk_event_source_select_events (GdkEventSource *source,
- Window window,
- GdkEventMask event_mask,
- unsigned int extra_x_mask)
+gdk_x11_event_source_select_events (GdkEventSource *source,
+ Window window,
+ GdkEventMask event_mask,
+ unsigned int extra_x_mask)
{
unsigned int xmask = extra_x_mask;
GList *list;
diff --git a/gdk/x11/gdkeventsource.h b/gdk/x11/gdkeventsource.h
index 4fc0dbe..b1bf6b2 100644
--- a/gdk/x11/gdkeventsource.h
+++ b/gdk/x11/gdkeventsource.h
@@ -28,17 +28,17 @@ G_BEGIN_DECLS
typedef struct _GdkEventSource GdkEventSource;
G_GNUC_INTERNAL
-GSource * gdk_event_source_new (GdkDisplay *display);
+GSource * gdk_x11_event_source_new (GdkDisplay *display);
G_GNUC_INTERNAL
-void gdk_event_source_add_translator (GdkEventSource *source,
- GdkEventTranslator *translator);
+void gdk_x11_event_source_add_translator (GdkEventSource *source,
+ GdkEventTranslator *translator);
G_GNUC_INTERNAL
-void gdk_event_source_select_events (GdkEventSource *source,
- Window window,
- GdkEventMask event_mask,
- unsigned int extra_x_mask);
+void gdk_x11_event_source_select_events (GdkEventSource *source,
+ Window window,
+ GdkEventMask event_mask,
+ unsigned int extra_x_mask);
G_END_DECLS
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 2798a58..a3bb0f6 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -562,9 +562,9 @@ create_focus_window (GdkDisplay *display,
GDK_KEY_RELEASE_MASK |
GDK_FOCUS_CHANGE_MASK);
- gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
- focus_window,
- event_mask, 0);
+ gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
+ focus_window,
+ event_mask, 0);
XMapWindow (xdisplay, focus_window);
@@ -827,9 +827,9 @@ _gdk_window_impl_new (GdkWindow *window,
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
- gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
- GDK_WINDOW_XID (window), event_mask,
- StructureNotifyMask | PropertyChangeMask);
+ gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
+ GDK_WINDOW_XID (window), event_mask,
+ StructureNotifyMask | PropertyChangeMask);
}
static GdkEventMask
@@ -2833,9 +2833,9 @@ gdk_window_x11_set_events (GdkWindow *window,
xevent_mask = StructureNotifyMask | PropertyChangeMask;
display_x11 = GDK_DISPLAY_X11 (gdk_window_get_display (window));
- gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
- GDK_WINDOW_XID (window), event_mask,
- xevent_mask);
+ gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
+ GDK_WINDOW_XID (window), event_mask,
+ xevent_mask);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]