[mutter] clutter: add keyboard accessibility signals



commit aa73504d9512bb84d0e5e11dfc28f295dfcdee44
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Thu Oct 19 08:24:38 2017 +0200

    clutter: add keyboard accessibility signals
    
    Implementing keyboard accessibility in clutter means we need to be able
    to notify higher layers of possible modifier masks or setting changes
    (as some keyboard accessibility can be disabled or enabled by keyboard).
    
    For this purpose, add two new signals:
    
       ClutterDeviceManager::kbd-a11y-mods-state-changed
       ClutterDeviceManager::kbd-a11y-flags-changed
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788564

 clutter/clutter/clutter-device-manager.c |   42 ++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter/clutter-device-manager.c b/clutter/clutter/clutter-device-manager.c
index 812e7e2..cc8007a 100644
--- a/clutter/clutter/clutter-device-manager.c
+++ b/clutter/clutter/clutter-device-manager.c
@@ -75,6 +75,8 @@ enum
   DEVICE_ADDED,
   DEVICE_REMOVED,
   TOOL_CHANGED,
+  KBD_A11Y_MASK_CHANGED,
+  KBD_A11Y_FLAGS_CHANGED,
 
   LAST_SIGNAL
 };
@@ -199,6 +201,46 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
                   G_TYPE_NONE, 2,
                   CLUTTER_TYPE_INPUT_DEVICE,
                   CLUTTER_TYPE_INPUT_DEVICE_TOOL);
+
+  /**
+   * ClutterDeviceManager::kbd-a11y-mods-state-changed:
+   * @manager: the #ClutterDeviceManager that emitted the signal
+   * @latched_mask: the latched modifier mask from stickykeys
+   * @locked_mask:  the locked modifier mask from stickykeys
+   *
+   * The ::kbd-a11y-mods-state-changed signal is emitted each time either the
+   * latched modifiers mask or locked modifiers mask are changed as the
+   * result of keyboard accessibilty's sticky keys operations.
+   */
+  manager_signals[KBD_A11Y_MASK_CHANGED] =
+    g_signal_new (I_("kbd-a11y-mods-state-changed"),
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL,
+                  _clutter_marshal_VOID__UINT_UINT,
+                  G_TYPE_NONE, 2,
+                  G_TYPE_UINT,
+                  G_TYPE_UINT);
+
+  /**
+   * ClutterDeviceManager::kbd-a11y-flags-changed:
+   * @manager: the #ClutterDeviceManager that emitted the signal
+   * @settings_flags: the new ClutterKeyboardA11yFlags configuration
+   * @changed_mask: the ClutterKeyboardA11yFlags changed
+   *
+   * The ::kbd-a11y-flags-changed signal is emitted each time the
+   * ClutterKeyboardA11yFlags configuration is changed as the result of
+   * keyboard accessibilty operations.
+   */
+  manager_signals[KBD_A11Y_FLAGS_CHANGED] =
+    g_signal_new (I_("kbd-a11y-flags-changed"),
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL,
+                  _clutter_marshal_VOID__UINT_UINT,
+                  G_TYPE_NONE, 2,
+                  G_TYPE_UINT,
+                  G_TYPE_UINT);
 }
 
 static void


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