Remove deprecated code from GdkEvent

This commit is contained in:
Javier Jardón 2009-10-08 22:47:52 +02:00 committed by Javier Jardón
parent 8c46ef830b
commit 7894951cee
9 changed files with 1 additions and 115 deletions

View File

@ -1086,7 +1086,6 @@ GDK_PRIORITY_REDRAW
gdk_events_pending
gdk_event_peek
gdk_event_get
gdk_event_get_graphics_expose
gdk_event_put
gdk_event_new
gdk_event_copy

View File

@ -182,14 +182,6 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
@Returns:
<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gdk_event_put ##### -->
<para>
</para>

View File

@ -318,36 +318,6 @@ gdk_events_pending (void)
return _gdk_event_queue_find_first (display) ? TRUE : FALSE;
}
GdkEvent *
gdk_event_get_graphics_expose (GdkWindow *window)
{
GdkDisplay *display;
GList *list;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
display = gdk_drawable_get_display (GDK_DRAWABLE (window));
for (list = _gdk_event_queue_find_first (display); list; list = list->next)
{
GdkEvent *event = list->data;
if (event->type == GDK_EXPOSE && event->expose.window == window)
break;
}
if (list)
{
GdkEvent *retval = list->data;
_gdk_event_queue_remove_link (display, list);
g_list_free_1 (list);
return retval;
}
return NULL;
}
void
_gdk_events_queue (GdkDisplay *display)
{

View File

@ -22,9 +22,6 @@
#if IN_HEADER(__GDK_EVENTS_H__)
#if IN_FILE(__GDK_EVENTS_X11_C__)
gdk_add_client_message_filter
#ifndef GDK_DISABLE_DEPRECATED
gdk_event_get_graphics_expose
#endif
gdk_events_pending
#endif
#endif

View File

@ -511,7 +511,7 @@ gdk_event_copy (const GdkEvent *event)
* Frees a #GdkEvent, freeing or decrementing any resources associated with it.
* Note that this function should only be called with events returned from
* functions such as gdk_event_peek(), gdk_event_get(),
* gdk_event_get_graphics_expose() and gdk_event_copy() and gdk_event_new().
* gdk_event_get_graphics_expose(), gdk_event_copy() and gdk_event_new().
**/
void
gdk_event_free (GdkEvent *event)

View File

@ -519,9 +519,6 @@ gboolean gdk_events_pending (void);
GdkEvent* gdk_event_get (void);
GdkEvent* gdk_event_peek (void);
#ifndef GDK_DISABLE_DEPRECATED
GdkEvent* gdk_event_get_graphics_expose (GdkWindow *window);
#endif
void gdk_event_put (const GdkEvent *event);
GdkEvent* gdk_event_new (GdkEventType type);

View File

@ -68,13 +68,6 @@ gdk_events_pending (void)
(_gdk_quartz_event_loop_check_pending ()));
}
GdkEvent*
gdk_event_get_graphics_expose (GdkWindow *window)
{
/* FIXME: Implement */
return NULL;
}
GdkGrabStatus
gdk_keyboard_grab (GdkWindow *window,
gint owner_events,

View File

@ -402,30 +402,6 @@ gdk_events_pending (void)
PeekMessageW (&msg, NULL, 0, 0, PM_NOREMOVE)));
}
GdkEvent*
gdk_event_get_graphics_expose (GdkWindow *window)
{
MSG msg;
GdkEvent *event = NULL;
g_return_val_if_fail (window != NULL, NULL);
GDK_NOTE (EVENTS, g_print ("gdk_event_get_graphics_expose\n"));
if (PeekMessageW (&msg, GDK_WINDOW_HWND (window), WM_PAINT, WM_PAINT, PM_REMOVE))
{
handle_wm_paint (&msg, window, TRUE, &event);
if (event != NULL)
{
GDK_NOTE (EVENTS, g_print ("gdk_event_get_graphics_expose: got it!\n"));
return event;
}
}
GDK_NOTE (EVENTS, g_print ("gdk_event_get_graphics_expose: nope\n"));
return NULL;
}
#if 0 /* Unused, but might be useful to re-introduce in some debugging output? */
static char *

View File

@ -295,44 +295,6 @@ graphics_expose_predicate (Display *display,
return False;
}
/**
* gdk_event_get_graphics_expose:
* @window: the #GdkWindow to wait for the events for.
*
* Waits for a GraphicsExpose or NoExpose event from the X server.
* This is used in the #GtkText and #GtkCList widgets in GTK+ to make sure any
* GraphicsExpose events are handled before the widget is scrolled.
*
* Return value: a #GdkEventExpose if a GraphicsExpose was received, or %NULL if a
* NoExpose event was received.
*
* Deprecated: 2.18:
**/
GdkEvent*
gdk_event_get_graphics_expose (GdkWindow *window)
{
XEvent xevent;
GdkEvent *event;
g_return_val_if_fail (window != NULL, NULL);
XIfEvent (GDK_WINDOW_XDISPLAY (window), &xevent,
graphics_expose_predicate, (XPointer) window);
if (xevent.xany.type == GraphicsExpose)
{
event = gdk_event_new (GDK_NOTHING);
if (gdk_event_translate (GDK_WINDOW_DISPLAY (window), event,
&xevent, TRUE))
return event;
else
gdk_event_free (event);
}
return NULL;
}
static gint
gdk_event_apply_filters (XEvent *xevent,
GdkEvent *event,