[mutter] clutter: Export `clutter_input_device_update()`



commit 8b3bc1f97de9b00592730f03b140eaadd4b77f9c
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Jan 29 14:51:37 2020 +0100

    clutter: Export `clutter_input_device_update()`
    
    The private function `_clutter_input_device_update()` is not currently
    exported.
    
    This function calls `_clutter_input_device_set_actor()` which updates
    the `ClutterActor` under the pointer, so making that function available
    outside of Clutter will allow to make sure the pointer device actor is
    updated prior to do picking.
    
    Also, now that the functions is exported to the upper layers, drop the
    underscore suffix from the function name.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/1026

 clutter/clutter/clutter-device-manager-private.h |  3 ++-
 clutter/clutter/clutter-device-manager.c         |  2 +-
 clutter/clutter/clutter-input-device.c           | 10 +++++-----
 clutter/clutter/clutter-main.c                   |  6 +++---
 clutter/clutter/clutter-stage.c                  |  2 +-
 5 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/clutter/clutter/clutter-device-manager-private.h 
b/clutter/clutter/clutter-device-manager-private.h
index 5a2e6e6be..c10c48379 100644
--- a/clutter/clutter/clutter-device-manager-private.h
+++ b/clutter/clutter/clutter-device-manager-private.h
@@ -244,7 +244,8 @@ void            _clutter_input_device_set_actor                 (ClutterInputDev
                                                                  ClutterEventSequence *sequence,
                                                                  ClutterActor         *actor,
                                                                  gboolean              emit_crossing);
-ClutterActor *  _clutter_input_device_update                    (ClutterInputDevice   *device,
+CLUTTER_EXPORT
+ClutterActor *  clutter_input_device_update                     (ClutterInputDevice   *device,
                                                                  ClutterEventSequence *sequence,
                                                                  gboolean              emit_crossing);
 CLUTTER_EXPORT
diff --git a/clutter/clutter/clutter-device-manager.c b/clutter/clutter/clutter-device-manager.c
index 71e615bf5..8bb616595 100644
--- a/clutter/clutter/clutter-device-manager.c
+++ b/clutter/clutter/clutter-device-manager.c
@@ -539,7 +539,7 @@ _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager)
       if (!clutter_stage_get_motion_events_enabled (device->stage))
         continue;
 
-      _clutter_input_device_update (device, NULL, TRUE);
+      clutter_input_device_update (device, NULL, TRUE);
     }
 }
 
diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c
index 3975e88b5..e8f56e510 100644
--- a/clutter/clutter/clutter-input-device.c
+++ b/clutter/clutter/clutter-input-device.c
@@ -799,7 +799,7 @@ on_cursor_actor_reactive_changed (ClutterActor       *actor,
  *
  * Sets the actor under the pointer coordinates of @device
  *
- * This function is called by _clutter_input_device_update()
+ * This function is called by clutter_input_device_update()
  * and it will:
  *
  *   - queue a %CLUTTER_LEAVE event on the previous pointer actor
@@ -1017,7 +1017,7 @@ clutter_input_device_get_coords (ClutterInputDevice   *device,
 }
 
 /*
- * _clutter_input_device_update:
+ * clutter_input_device_update:
  * @device: a #ClutterInputDevice
  *
  * Updates the input @device by determining the #ClutterActor underneath the
@@ -1031,9 +1031,9 @@ clutter_input_device_get_coords (ClutterInputDevice   *device,
  * Since: 1.2
  */
 ClutterActor *
-_clutter_input_device_update (ClutterInputDevice   *device,
-                              ClutterEventSequence *sequence,
-                              gboolean              emit_crossing)
+clutter_input_device_update (ClutterInputDevice   *device,
+                             ClutterEventSequence *sequence,
+                             gboolean              emit_crossing)
 {
   ClutterStage *stage;
   ClutterActor *new_cursor_actor;
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index 7723a2010..05036d559 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -1776,7 +1776,7 @@ _clutter_process_event_details (ClutterActor        *stage,
 
             emit_crossing_event (event, device);
 
-            actor = _clutter_input_device_update (device, NULL, FALSE);
+            actor = clutter_input_device_update (device, NULL, FALSE);
             if (actor != stage)
               {
                 ClutterEvent *crossing;
@@ -1943,7 +1943,7 @@ _clutter_process_event_details (ClutterActor        *stage,
                * get the actor underneath
                */
               if (device != NULL)
-                actor = _clutter_input_device_update (device, NULL, TRUE);
+                actor = clutter_input_device_update (device, NULL, TRUE);
               else
                 {
                   CLUTTER_NOTE (EVENT, "No device found: picking");
@@ -2060,7 +2060,7 @@ _clutter_process_event_details (ClutterActor        *stage,
                 }
 
               if (device != NULL)
-                actor = _clutter_input_device_update (device, sequence, TRUE);
+                actor = clutter_input_device_update (device, sequence, TRUE);
               else
                 {
                   CLUTTER_NOTE (EVENT, "No device found: picking");
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index bead95c4a..407d6944b 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1496,7 +1496,7 @@ _clutter_stage_do_update (ClutterStage *stage)
 
   while (pointers)
     {
-      _clutter_input_device_update (pointers->data, NULL, TRUE);
+      clutter_input_device_update (pointers->data, NULL, TRUE);
       pointers = g_slist_delete_link (pointers, pointers);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]