mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
clutter: Drop clutter_event_peek()
Peeking doesn't seem such a good idea when we switch to async queues. Luckily nobody seems to be using this. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1475
This commit is contained in:
parent
bbc4116f10
commit
a3c95f6023
@ -1535,32 +1535,6 @@ clutter_event_get (void)
|
||||
return g_queue_pop_tail (context->events_queue);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_event_peek:
|
||||
*
|
||||
* Returns a pointer to the first event from the event queue but
|
||||
* does not remove it.
|
||||
*
|
||||
* Return value: (transfer none): A #ClutterEvent or NULL if queue empty.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
ClutterEvent *
|
||||
clutter_event_peek (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
|
||||
g_return_val_if_fail (context != NULL, NULL);
|
||||
|
||||
if (context->events_queue == NULL)
|
||||
return NULL;
|
||||
|
||||
if (g_queue_is_empty (context->events_queue))
|
||||
return NULL;
|
||||
|
||||
return g_queue_peek_tail (context->events_queue);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_event_push (const ClutterEvent *event,
|
||||
gboolean do_copy)
|
||||
|
@ -629,8 +629,6 @@ gboolean clutter_events_pending (void);
|
||||
CLUTTER_EXPORT
|
||||
ClutterEvent * clutter_event_get (void);
|
||||
CLUTTER_EXPORT
|
||||
ClutterEvent * clutter_event_peek (void);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_event_put (const ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user