[mutter/wip/nielsdg/cursor-moved-marshal: 3/3] cursor-tracker: Add documentation to signals



commit 668182096f9090aa7438e81bca62c2484425c891
Author: Niels De Graef <niels degraef barco com>
Date:   Wed Jul 24 11:20:36 2019 +0200

    cursor-tracker: Add documentation to signals
    
    The signals of MetaCursorTracker weren't documented, which isn't really
    nice for documentation, since there is no way of knowing the arguments
    without actually looking at when the signal is emitted.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/697

 src/backends/meta-cursor-tracker.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c
index 1df38fb94..2ae47f14a 100644
--- a/src/backends/meta-cursor-tracker.c
+++ b/src/backends/meta-cursor-tracker.c
@@ -167,15 +167,25 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
                                           NULL, NULL, NULL,
                                           G_TYPE_NONE, 0);
 
+  /**
+   * MetaCursorTracker::cursor-moved:
+   * @cursor: The #MetaCursorTracker
+   * @x: The new X coordinate of the cursor
+   * @y: The new Y coordinate of the cursor
+   *
+   * Notifies when the cursor has moved to a new location.
+   */
   signals[CURSOR_MOVED] = g_signal_new ("cursor-moved",
                                         G_TYPE_FROM_CLASS (klass),
                                         G_SIGNAL_RUN_LAST,
                                         0,
                                         NULL, NULL,
-                                        meta_marshal_VOID__FLOAT_FLOATv,
+                                        meta_marshal_VOID__FLOAT_FLOAT,
                                         G_TYPE_NONE, 2,
                                         G_TYPE_FLOAT,
                                         G_TYPE_FLOAT);
+  g_signal_set_va_marshaller (signals[CURSOR_MOVED],
+                              meta_marshal_VOID__FLOAT_FLOATv);
 
   signals[VISIBILITY_CHANGED] = g_signal_new ("visibility-changed",
                                               G_TYPE_FROM_CLASS (klass),


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