Commit 985eb144 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Multiple changes to reduce the amount of unprefixed symbols

The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.

The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
parent 33417c36
...@@ -951,8 +951,6 @@ GDK_CURSOR_XCURSOR ...@@ -951,8 +951,6 @@ GDK_CURSOR_XCURSOR
GDK_CURSOR_XDISPLAY GDK_CURSOR_XDISPLAY
gdkx_visual_get gdkx_visual_get
gdk_x11_window_foreign_new_for_display gdk_x11_window_foreign_new_for_display
gdk_xid_table_lookup
gdk_xid_table_lookup_for_display
gdk_x11_window_lookup_for_display gdk_x11_window_lookup_for_display
gdk_x11_lookup_xdisplay gdk_x11_lookup_xdisplay
gdk_x11_get_server_time gdk_x11_get_server_time
......
...@@ -283,8 +283,6 @@ void gdk_synthesize_window_state (GdkWindow *window, ...@@ -283,8 +283,6 @@ void gdk_synthesize_window_state (GdkWindow *window,
GdkWindowState unset_flags, GdkWindowState unset_flags,
GdkWindowState set_flags); GdkWindowState set_flags);
GdkDeviceManager * _gdk_device_manager_new (GdkDisplay *display);
gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface, gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
GdkRectangle *extents); GdkRectangle *extents);
......
...@@ -66,23 +66,23 @@ struct _GdkDeviceXIClass ...@@ -66,23 +66,23 @@ struct _GdkDeviceXIClass
}; };
G_GNUC_INTERNAL G_GNUC_INTERNAL
GType gdk_device_xi_get_type (void) G_GNUC_CONST; GType gdk_device_xi_get_type (void) G_GNUC_CONST;
G_GNUC_INTERNAL G_GNUC_INTERNAL
void gdk_device_xi_update_window_info (GdkWindow *window); void gdk_device_xi_update_window_info (GdkWindow *window);
G_GNUC_INTERNAL G_GNUC_INTERNAL
void gdk_device_xi_update_axes (GdkDevice *device, void gdk_device_xi_update_axes (GdkDevice *device,
gint axes_count, gint axes_count,
gint first_axis, gint first_axis,
gint *axis_data); gint *axis_data);
G_GNUC_INTERNAL G_GNUC_INTERNAL
void gdk_device_xi_translate_axes (GdkDevice *device, void gdk_device_xi_translate_axes (GdkDevice *device,
GdkWindow *window, GdkWindow *window,
gint *axis_data, gint *axis_data,
gdouble *axes, gdouble *axes,
gdouble *x, gdouble *x,
gdouble *y); gdouble *y);
G_END_DECLS G_END_DECLS
......
...@@ -51,11 +51,11 @@ struct _GdkDeviceXI2Class ...@@ -51,11 +51,11 @@ struct _GdkDeviceXI2Class
}; };
G_GNUC_INTERNAL G_GNUC_INTERNAL
GType gdk_device_xi2_get_type (void) G_GNUC_CONST; GType gdk_device_xi2_get_type (void) G_GNUC_CONST;
G_GNUC_INTERNAL G_GNUC_INTERNAL
guchar * gdk_device_xi2_translate_event_mask (GdkEventMask event_mask, guchar * gdk_device_xi2_translate_event_mask (GdkEventMask event_mask,
int *len); int *len);
G_GNUC_INTERNAL G_GNUC_INTERNAL
guint gdk_device_xi2_translate_state (XIModifierState *mods_state, guint gdk_device_xi2_translate_state (XIModifierState *mods_state,
XIButtonState *buttons_state); XIButtonState *buttons_state);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "gdkx.h" #include "gdkx.h"
GdkDeviceManager * GdkDeviceManager *
_gdk_device_manager_new (GdkDisplay *display) _gdk_x11_device_manager_new (GdkDisplay *display)
{ {
if (!g_getenv ("GDK_CORE_DEVICE_EVENTS")) if (!g_getenv ("GDK_CORE_DEVICE_EVENTS"))
{ {
......
...@@ -1255,12 +1255,12 @@ _gdk_x11_display_open (const gchar *display_name) ...@@ -1255,12 +1255,12 @@ _gdk_x11_display_open (const gchar *display_name)
* structures in places * structures in places
*/ */
for (i = 0; i < ScreenCount (display_x11->xdisplay); i++) for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
_gdk_screen_x11_events_init (display_x11->screens[i]); _gdk_x11_screen_init_events (display_x11->screens[i]);
/*set the default screen */ /*set the default screen */
display_x11->default_screen = display_x11->screens[DefaultScreen (display_x11->xdisplay)]; display_x11->default_screen = display_x11->screens[DefaultScreen (display_x11->xdisplay)];
display->device_manager = _gdk_device_manager_new (display); display->device_manager = _gdk_x11_device_manager_new (display);
gdk_event_init (display); gdk_event_init (display);
......
...@@ -605,11 +605,11 @@ is_pointer_within_shape (GdkDisplay *display, ...@@ -605,11 +605,11 @@ is_pointer_within_shape (GdkDisplay *display,
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
cairo_region_t *input_shape; cairo_region_t *input_shape;
child->shape = _xwindow_get_shape (display_x11->xdisplay, child->shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
child->xid, ShapeBounding); child->xid, ShapeBounding);
#ifdef ShapeInput #ifdef ShapeInput
input_shape = _xwindow_get_shape (display_x11->xdisplay, input_shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
child->xid, ShapeInput); child->xid, ShapeInput);
if (child->shape && input_shape) if (child->shape && input_shape)
{ {
cairo_region_intersect (child->shape, input_shape); cairo_region_intersect (child->shape, input_shape);
......
...@@ -202,9 +202,9 @@ gdk_event_source_translate_event (GdkEventSource *event_source, ...@@ -202,9 +202,9 @@ gdk_event_source_translate_event (GdkEventSource *event_source,
GdkEventTranslator *translator = list->data; GdkEventTranslator *translator = list->data;
list = list->next; list = list->next;
event = gdk_event_translator_translate (translator, event = _gdk_x11_event_translator_translate (translator,
event_source->display, event_source->display,
xevent); xevent);
} }
if (event && if (event &&
...@@ -394,12 +394,12 @@ gdk_x11_event_source_select_events (GdkEventSource *source, ...@@ -394,12 +394,12 @@ gdk_x11_event_source_select_events (GdkEventSource *source,
GdkEventTranslator *translator = list->data; GdkEventTranslator *translator = list->data;
GdkEventMask translator_mask, mask; GdkEventMask translator_mask, mask;
translator_mask = gdk_event_translator_get_handled_events (translator); translator_mask = _gdk_x11_event_translator_get_handled_events (translator);
mask = event_mask & translator_mask; mask = event_mask & translator_mask;
if (mask != 0) if (mask != 0)
{ {
gdk_event_translator_select_window_events (translator, window, mask); _gdk_x11_event_translator_select_window_events (translator, window, mask);
event_mask &= ~mask; event_mask &= ~mask;
} }
......
...@@ -23,19 +23,19 @@ ...@@ -23,19 +23,19 @@
typedef GdkEventTranslatorIface GdkEventTranslatorInterface; typedef GdkEventTranslatorIface GdkEventTranslatorInterface;
G_DEFINE_INTERFACE (GdkEventTranslator, gdk_event_translator, G_TYPE_OBJECT); G_DEFINE_INTERFACE (GdkEventTranslator, _gdk_x11_event_translator, G_TYPE_OBJECT);
static void static void
gdk_event_translator_default_init (GdkEventTranslatorInterface *iface) _gdk_x11_event_translator_default_init (GdkEventTranslatorInterface *iface)
{ {
} }
GdkEvent * GdkEvent *
gdk_event_translator_translate (GdkEventTranslator *translator, _gdk_x11_event_translator_translate (GdkEventTranslator *translator,
GdkDisplay *display, GdkDisplay *display,
XEvent *xevent) XEvent *xevent)
{ {
GdkEventTranslatorIface *iface; GdkEventTranslatorIface *iface;
GdkEvent *event; GdkEvent *event;
...@@ -59,7 +59,7 @@ gdk_event_translator_translate (GdkEventTranslator *translator, ...@@ -59,7 +59,7 @@ gdk_event_translator_translate (GdkEventTranslator *translator,
} }
GdkEventMask GdkEventMask
gdk_event_translator_get_handled_events (GdkEventTranslator *translator) _gdk_x11_event_translator_get_handled_events (GdkEventTranslator *translator)
{ {
GdkEventTranslatorIface *iface; GdkEventTranslatorIface *iface;
...@@ -74,9 +74,9 @@ gdk_event_translator_get_handled_events (GdkEventTranslator *translator) ...@@ -74,9 +74,9 @@ gdk_event_translator_get_handled_events (GdkEventTranslator *translator)
} }
void void
gdk_event_translator_select_window_events (GdkEventTranslator *translator, _gdk_x11_event_translator_select_window_events (GdkEventTranslator *translator,
Window window, Window window,
GdkEventMask event_mask) GdkEventMask event_mask)
{ {
GdkEventTranslatorIface *iface; GdkEventTranslatorIface *iface;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GDK_TYPE_EVENT_TRANSLATOR (gdk_event_translator_get_type ()) #define GDK_TYPE_EVENT_TRANSLATOR (_gdk_x11_event_translator_get_type ())
#define GDK_EVENT_TRANSLATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_EVENT_TRANSLATOR, GdkEventTranslator)) #define GDK_EVENT_TRANSLATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_EVENT_TRANSLATOR, GdkEventTranslator))
#define GDK_IS_EVENT_TRANSLATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_EVENT_TRANSLATOR)) #define GDK_IS_EVENT_TRANSLATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_EVENT_TRANSLATOR))
#define GDK_EVENT_TRANSLATOR_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDK_TYPE_EVENT_TRANSLATOR, GdkEventTranslatorIface)) #define GDK_EVENT_TRANSLATOR_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDK_TYPE_EVENT_TRANSLATOR, GdkEventTranslatorIface))
...@@ -50,15 +50,15 @@ struct _GdkEventTranslatorIface ...@@ -50,15 +50,15 @@ struct _GdkEventTranslatorIface
GdkEventMask event_mask); GdkEventMask event_mask);
}; };
GType gdk_event_translator_get_type (void) G_GNUC_CONST; GType _gdk_x11_event_translator_get_type (void) G_GNUC_CONST;
GdkEvent * gdk_event_translator_translate (GdkEventTranslator *translator, GdkEvent * _gdk_x11_event_translator_translate (GdkEventTranslator *translator,
GdkDisplay *display, GdkDisplay *display,
XEvent *xevent); XEvent *xevent);
GdkEventMask gdk_event_translator_get_handled_events (GdkEventTranslator *translator); GdkEventMask _gdk_x11_event_translator_get_handled_events (GdkEventTranslator *translator);
void gdk_event_translator_select_window_events (GdkEventTranslator *translator, void _gdk_x11_event_translator_select_window_events (GdkEventTranslator *translator,
Window window, Window window,
GdkEventMask event_mask); GdkEventMask event_mask);
G_END_DECLS G_END_DECLS
......
...@@ -75,11 +75,14 @@ GList * _gdk_screen_x11_list_visuals (GdkScreen *screen ...@@ -75,11 +75,14 @@ GList * _gdk_screen_x11_list_visuals (GdkScreen *screen
void _gdk_xid_table_insert (GdkDisplay *display, void _gdk_xid_table_insert (GdkDisplay *display,
XID *xid, XID *xid,
gpointer data); gpointer data);
void _gdk_xid_table_remove (GdkDisplay *display, void _gdk_xid_table_remove (GdkDisplay *display,
XID xid); XID xid);
gpointer _gdk_xid_table_lookup (GdkDisplay *display,
XID xid);
gint _gdk_send_xevent (GdkDisplay *display, gint _gdk_send_xevent (GdkDisplay *display,
Window window, Window window,
gboolean propagate, gboolean propagate,
...@@ -106,9 +109,9 @@ void _gdk_x11_window_translate (GdkWindow *window, ...@@ -106,9 +109,9 @@ void _gdk_x11_window_translate (GdkWindow *window,
void _gdk_selection_window_destroyed (GdkWindow *window); void _gdk_selection_window_destroyed (GdkWindow *window);
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event); gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
cairo_region_t* _xwindow_get_shape (Display *xdisplay, cairo_region_t* _gdk_x11_xwindow_get_shape (Display *xdisplay,
Window window, Window window,
gint shape_type); gint shape_type);
void _gdk_region_get_xrectangles (const cairo_region_t *region, void _gdk_region_get_xrectangles (const cairo_region_t *region,
gint x_offset, gint x_offset,
...@@ -152,6 +155,8 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display, ...@@ -152,6 +155,8 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
void _gdk_x11_display_queue_events (GdkDisplay *display); void _gdk_x11_display_queue_events (GdkDisplay *display);
void _gdk_x11_device_check_extension_events (GdkDevice *device); void _gdk_x11_device_check_extension_events (GdkDevice *device);
GdkDeviceManager *_gdk_x11_device_manager_new (GdkDisplay *display);
void _gdk_x11_display_manager_add_display (GdkDisplayManager *manager, void _gdk_x11_display_manager_add_display (GdkDisplayManager *manager,
GdkDisplay *display); GdkDisplay *display);
void _gdk_x11_display_manager_remove_display (GdkDisplayManager *manager, void _gdk_x11_display_manager_remove_display (GdkDisplayManager *manager,
...@@ -180,13 +185,13 @@ void _gdk_x11_precache_atoms (GdkDisplay *display, ...@@ -180,13 +185,13 @@ void _gdk_x11_precache_atoms (GdkDisplay *display,
const gchar * const *atom_names, const gchar * const *atom_names,
gint n_atoms); gint n_atoms);
void _gdk_screen_x11_events_init (GdkScreen *screen); void _gdk_events_init (GdkDisplay *display);
void _gdk_events_uninit (GdkDisplay *display);
void _gdk_x11_dnd_init (GdkDisplay *display);
void _gdk_events_init (GdkDisplay *display); void _gdk_x11_screen_init_root_window (GdkScreen *screen);
void _gdk_events_uninit (GdkDisplay *display); void _gdk_x11_screen_init_visuals (GdkScreen *screen);
void _gdk_windowing_window_init (GdkScreen *screen); void _gdk_x11_screen_init_events (GdkScreen *screen);
void _gdk_x11_visual_init (GdkScreen *screen);
void _gdk_x11_dnd_init (GdkDisplay *display);
void _gdk_x11_cursor_update_theme (GdkCursor *cursor); void _gdk_x11_cursor_update_theme (GdkCursor *cursor);
void _gdk_x11_cursor_display_finalize (GdkDisplay *display); void _gdk_x11_cursor_display_finalize (GdkDisplay *display);
......
...@@ -810,8 +810,8 @@ _gdk_x11_screen_new (GdkDisplay *display, ...@@ -810,8 +810,8 @@ _gdk_x11_screen_new (GdkDisplay *display,
init_multihead (screen); init_multihead (screen);
init_randr_support (screen); init_randr_support (screen);
_gdk_x11_visual_init (screen); _gdk_x11_screen_init_visuals (screen);
_gdk_windowing_window_init (screen); _gdk_x11_screen_init_root_window (screen);
return screen; return screen;
} }
...@@ -1592,7 +1592,7 @@ gdk_xsettings_notify_cb (const char *name, ...@@ -1592,7 +1592,7 @@ gdk_xsettings_notify_cb (const char *name,
} }
void void
_gdk_screen_x11_events_init (GdkScreen *screen) _gdk_x11_screen_init_events (GdkScreen *screen)
{ {
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen); GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
......
...@@ -101,7 +101,7 @@ gdk_visual_x11_class_init (GdkVisualX11Class *class) ...@@ -101,7 +101,7 @@ gdk_visual_x11_class_init (GdkVisualX11Class *class)
} }
void void
_gdk_x11_visual_init (GdkScreen *screen) _gdk_x11_screen_init_visuals (GdkScreen *screen)
{ {
static const gint possible_depths[8] = { 32, 30, 24, 16, 15, 8, 4, 1 }; static const gint possible_depths[8] = { 32, 30, 24, 16, 15, 8, 4, 1 };
static const GdkVisualType possible_types[6] = static const GdkVisualType possible_types[6] =
......
...@@ -450,7 +450,7 @@ _gdk_x11_window_tmp_reset_parent_bg (GdkWindow *window) ...@@ -450,7 +450,7 @@ _gdk_x11_window_tmp_reset_parent_bg (GdkWindow *window)
} }
void void
_gdk_windowing_window_init (GdkScreen * screen) _gdk_x11_screen_init_root_window (GdkScreen *screen)
{ {
GdkWindow *window; GdkWindow *window;
GdkWindowImplX11 *impl; GdkWindowImplX11 *impl;
...@@ -882,7 +882,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display, ...@@ -882,7 +882,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
display_x11 = GDK_DISPLAY_X11 (display); display_x11 = GDK_DISPLAY_X11 (display);
if ((win = gdk_xid_table_lookup_for_display (display, window)) != NULL) if ((win = _gdk_xid_table_lookup (display, window)) != NULL)
return g_object_ref (win); return g_object_ref (win);
gdk_x11_display_error_trap_push (display); gdk_x11_display_error_trap_push (display);
...@@ -912,7 +912,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display, ...@@ -912,7 +912,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
impl = GDK_WINDOW_IMPL_X11 (win->impl); impl = GDK_WINDOW_IMPL_X11 (win->impl);
impl->wrapper = win; impl->wrapper = win;
win->parent = gdk_xid_table_lookup_for_display (display, parent); win->parent = _gdk_xid_table_lookup (display, parent);
if (!win->parent || GDK_WINDOW_TYPE (win->parent) == GDK_WINDOW_FOREIGN) if (!win->parent || GDK_WINDOW_TYPE (win->parent) == GDK_WINDOW_FOREIGN)
win->parent = gdk_screen_get_root_window (screen); win->parent = gdk_screen_get_root_window (screen);
...@@ -963,7 +963,7 @@ GdkWindow * ...@@ -963,7 +963,7 @@ GdkWindow *
gdk_x11_window_lookup_for_display (GdkDisplay *display, gdk_x11_window_lookup_for_display (GdkDisplay *display,
Window window) Window window)
{ {
return (GdkWindow*) gdk_xid_table_lookup_for_display (display, window); return (GdkWindow*) _gdk_xid_table_lookup (display, window);
} }
static void static void
...@@ -3737,9 +3737,9 @@ gdk_x11_window_set_functions (GdkWindow *window, ...@@ -3737,9 +3737,9 @@ gdk_x11_window_set_functions (GdkWindow *window,
} }
cairo_region_t * cairo_region_t *
_xwindow_get_shape (Display *xdisplay, _gdk_x11_xwindow_get_shape (Display *xdisplay,
Window window, Window window,
gint shape_type) gint shape_type)
{ {
cairo_region_t *shape; cairo_region_t *shape;
GdkRectangle *rl; GdkRectangle *rl;
...@@ -3787,8 +3787,9 @@ gdk_x11_window_get_shape (GdkWindow *window) ...@@ -3787,8 +3787,9 @@ gdk_x11_window_get_shape (GdkWindow *window)
{ {
if (!GDK_WINDOW_DESTROYED (window) && if (!GDK_WINDOW_DESTROYED (window) &&
gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window))) gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window)))
return _xwindow_get_shape (GDK_WINDOW_XDISPLAY (window), return _gdk_x11_xwindow_get_shape (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), ShapeBounding); GDK_WINDOW_XID (window),
ShapeBounding);
return NULL; return NULL;
} }
...@@ -3799,9 +3800,9 @@ gdk_x11_window_get_input_shape (GdkWindow *window) ...@@ -3799,9 +3800,9 @@ gdk_x11_window_get_input_shape (GdkWindow *window)
#if defined(ShapeInput) #if defined(ShapeInput)
if (!GDK_WINDOW_DESTROYED (window) && if (!GDK_WINDOW_DESTROYED (window) &&
gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window))) gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window)))
return _xwindow_get_shape (GDK_WINDOW_XDISPLAY (window), return _gdk_x11_xwindow_get_shape (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), GDK_WINDOW_XID (window),
ShapeInput); ShapeInput);
#endif #endif
return NULL; return NULL;
......
...@@ -185,9 +185,6 @@ GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen, ...@@ -185,9 +185,6 @@ GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen,
GdkVisual* gdkx_visual_get (VisualID xvisualid); GdkVisual* gdkx_visual_get (VisualID xvisualid);
#endif #endif
/* Return the Gdk* for a particular XID */
gpointer gdk_xid_table_lookup_for_display (GdkDisplay *display,
XID xid);
guint32 gdk_x11_get_server_time (GdkWindow *window); guint32 gdk_x11_get_server_time (GdkWindow *window);
guint32 gdk_x11_display_get_user_time (GdkDisplay *display); guint32 gdk_x11_display_get_user_time (GdkDisplay *display);
...@@ -211,7 +208,6 @@ XID gdk_x11_screen_get_monitor_output (GdkScreen *screen, ...@@ -211,7 +208,6 @@ XID gdk_x11_screen_get_monitor_output (GdkScreen *screen,
gint monitor_num); gint monitor_num);
#ifndef GDK_MULTIHEAD_SAFE #ifndef GDK_MULTIHEAD_SAFE
gpointer gdk_xid_table_lookup (XID xid);
gboolean gdk_net_wm_supports (GdkAtom property); gboolean gdk_net_wm_supports (GdkAtom property);
void gdk_x11_grab_server (void); void gdk_x11_grab_server (void);
void gdk_x11_ungrab_server (void); void gdk_x11_ungrab_server (void);
......
...@@ -32,15 +32,22 @@ ...@@ -32,15 +32,22 @@
#include <stdio.h> #include <stdio.h>
static guint gdk_xid_hash (XID *xid); static guint
static gboolean gdk_xid_equal (XID *a, gdk_xid_hash (XID *xid)
XID *b); {
return *xid;
}
static gboolean
gdk_xid_equal (XID *a, XID *b)
{
return (*a == *b);
}
void void
_gdk_xid_table_insert (GdkDisplay *display, _gdk_xid_table_insert (GdkDisplay *display,
XID *xid, XID *xid,
gpointer data) gpointer data)
{ {
GdkDisplayX11 *display_x11; GdkDisplayX11 *display_x11;
...@@ -51,7 +58,7 @@ _gdk_xid_table_insert (GdkDisplay *display, ...@@ -51,7 +58,7 @@ _gdk_xid_table_insert (GdkDisplay *display,
if (!display_x11->xid_ht) if (!display_x11->xid_ht)
display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash, display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
(GEqualFunc) gdk_xid_equal); (GEqualFunc) gdk_xid_equal);
if (g_hash_table_lookup (display_x11->xid_ht, xid)) if (g_hash_table_lookup (display_x11->xid_ht, xid))
g_warning ("XID collision, trouble ahead"); g_warning ("XID collision, trouble ahead");
...@@ -61,7 +68,7 @@ _gdk_xid_table_insert (GdkDisplay *display, ...@@ -61,7 +68,7 @@ _gdk_xid_table_insert (GdkDisplay *display,
void void
_gdk_xid_table_remove (GdkDisplay *display, _gdk_xid_table_remove (GdkDisplay *display,
XID xid) XID xid)
{ {
GdkDisplayX11 *display_x11; GdkDisplayX11 *display_x11;