[mutter/wip/carlosg/no-event-source: 9/10] clutter: Drop clutter_event_[gs]et_source()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/no-event-source: 9/10] clutter: Drop clutter_event_[gs]et_source()
- Date: Fri, 25 Feb 2022 15:29:46 +0000 (UTC)
commit 819608cb5ffd7a80e28e53cb5d52a62531bb2c78
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Feb 25 16:15:43 2022 +0100
clutter: Drop clutter_event_[gs]et_source()
It does not make sense that the event "source" (aka the target) is
both content and recipient of a message. Not doing so, events become
largely independent of the actor that is receiving/handling an
event. This is small step toward making events opaque and immutable.
Every user of these API calls in our code have ported away from
them, so stop offering this API.
clutter/clutter/clutter-event.c | 38 --------------------------------------
clutter/clutter/clutter-event.h | 5 -----
2 files changed, 43 deletions(-)
---
diff --git a/clutter/clutter/clutter-event.c b/clutter/clutter/clutter-event.c
index 05cd7ba495..79e6b00212 100644
--- a/clutter/clutter/clutter-event.c
+++ b/clutter/clutter/clutter-event.c
@@ -525,44 +525,6 @@ clutter_event_set_coords (ClutterEvent *event,
}
}
-/**
- * clutter_event_get_source:
- * @event: a #ClutterEvent
- *
- * Retrieves the source #ClutterActor the event originated from, or
- * NULL if the event has no source.
- *
- * Return value: (transfer none): a #ClutterActor
- *
- * Since: 0.6
- */
-ClutterActor *
-clutter_event_get_source (const ClutterEvent *event)
-{
- g_return_val_if_fail (event != NULL, NULL);
-
- return event->any.source;
-}
-
-/**
- * clutter_event_set_source:
- * @event: a #ClutterEvent
- * @actor: (allow-none): a #ClutterActor, or %NULL
- *
- * Sets the source #ClutterActor of @event.
- *
- * Since: 1.8
- */
-void
-clutter_event_set_source (ClutterEvent *event,
- ClutterActor *actor)
-{
- g_return_if_fail (event != NULL);
- g_return_if_fail (actor == NULL || CLUTTER_IS_ACTOR (actor));
-
- event->any.source = actor;
-}
-
/**
* clutter_event_get_stage:
* @event: a #ClutterEvent
diff --git a/clutter/clutter/clutter-event.h b/clutter/clutter/clutter-event.h
index 1378d91e0a..5896572e0f 100644
--- a/clutter/clutter/clutter-event.h
+++ b/clutter/clutter/clutter-event.h
@@ -716,11 +716,6 @@ void clutter_event_set_device_tool (ClutterEvent
CLUTTER_EXPORT
ClutterInputDeviceTool *clutter_event_get_device_tool (const ClutterEvent *event);
-CLUTTER_EXPORT
-void clutter_event_set_source (ClutterEvent *event,
- ClutterActor *actor);
-CLUTTER_EXPORT
-ClutterActor * clutter_event_get_source (const ClutterEvent *event);
CLUTTER_EXPORT
void clutter_event_set_stage (ClutterEvent *event,
ClutterStage *stage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]