[clutter-gst] sink: Add debug to the navigation events



commit ccbf06ce65e1d0866187f231e6f0bd4b0c341c6c
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 9 17:24:01 2011 +0100

    sink: Add debug to the navigation events

 clutter-gst/clutter-gst-video-sink.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index f5389e0..829dc04 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -890,6 +890,7 @@ navigation_event (ClutterActor        *actor,
     {
       ClutterMotionEvent *mevent = (ClutterMotionEvent *) event;
 
+      GST_DEBUG ("Received mouse move event to %d,%d", mevent->x, mevent->y);
       gst_navigation_send_mouse_event (GST_NAVIGATION (sink),
                                        "mouse-move", 0, mevent->x, mevent->y);
     }
@@ -899,6 +900,9 @@ navigation_event (ClutterActor        *actor,
       ClutterButtonEvent *bevent = (ClutterButtonEvent *) event;
       const char *type;
 
+      GST_DEBUG ("Received button %s event at %d,%d",
+                 (event->type == CLUTTER_BUTTON_PRESS) ? "press" : "release",
+                 bevent->x, bevent->y);
       type = (event->type == CLUTTER_BUTTON_PRESS) ? "mouse-button-press" : "mouse-button-release";
       gst_navigation_send_mouse_event (GST_NAVIGATION (sink),
                                        type, bevent->button, bevent->x, bevent->y);
@@ -912,6 +916,9 @@ navigation_event (ClutterActor        *actor,
 
       type = (event->type == CLUTTER_KEY_PRESS) ? "key-press" : "key-release";
       key = g_ucs4_to_utf8 (&kevent->unicode_value, 1, NULL, NULL, NULL);
+      GST_DEBUG ("Received key %s event (%s)",
+                 (event->type == CLUTTER_KEY_PRESS) ? "press" : "release",
+                 key);
       gst_navigation_send_key_event (GST_NAVIGATION (sink),
                                      type, key ? key : "unknown");
       g_free (key);



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