From bd83873a7ff5f5d28f577830481c88c982f0df41 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 31 Oct 2016 17:35:01 +0100 Subject: [PATCH] clutter: Add ClutterDeviceManager::tool-changed signal This signal will notify whenever a device changed tool. https://bugzilla.gnome.org/show_bug.cgi?id=773779 --- clutter/clutter/clutter-device-manager.c | 12 ++++++++++++ clutter/clutter/clutter-marshal.list | 1 + 2 files changed, 13 insertions(+) diff --git a/clutter/clutter/clutter-device-manager.c b/clutter/clutter/clutter-device-manager.c index f9222e765..92badd8a5 100644 --- a/clutter/clutter/clutter-device-manager.c +++ b/clutter/clutter/clutter-device-manager.c @@ -48,6 +48,7 @@ #include "clutter-private.h" #include "clutter-stage-private.h" #include "clutter-virtual-input-device.h" +#include "clutter-input-device-tool.h" struct _ClutterDeviceManagerPrivate { @@ -70,6 +71,7 @@ enum { DEVICE_ADDED, DEVICE_REMOVED, + TOOL_CHANGED, LAST_SIGNAL }; @@ -184,6 +186,16 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass) _clutter_marshal_VOID__OBJECT, G_TYPE_NONE, 1, CLUTTER_TYPE_INPUT_DEVICE); + + manager_signals[TOOL_CHANGED] = + g_signal_new (I_("tool-changed"), + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, NULL, NULL, + _clutter_marshal_VOID__OBJECT_OBJECT, + G_TYPE_NONE, 2, + CLUTTER_TYPE_INPUT_DEVICE, + CLUTTER_TYPE_INPUT_DEVICE_TOOL); } static void diff --git a/clutter/clutter/clutter-marshal.list b/clutter/clutter/clutter-marshal.list index fc7680db6..f6964a11d 100644 --- a/clutter/clutter/clutter-marshal.list +++ b/clutter/clutter/clutter-marshal.list @@ -23,6 +23,7 @@ VOID:OBJECT VOID:OBJECT,FLAGS VOID:OBJECT,FLOAT,FLOAT VOID:OBJECT,FLOAT,FLOAT,FLAGS +VOID:OBJECT,OBJECT VOID:OBJECT,PARAM VOID:OBJECT,POINTER VOID:OBJECT,UINT