[gtk/readonly-events-1] a11y: drop unused code



commit c2fe434d9c587a801e2bf4603b5b7b2499df1938
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 20 21:20:05 2020 -0500

    a11y: drop unused code
    
    We are no longer using key snoopers.

 gtk/a11y/gtkaccessibility.h     |  3 ---
 gtk/a11y/gtkaccessibilityutil.c | 51 -----------------------------------------
 2 files changed, 54 deletions(-)
---
diff --git a/gtk/a11y/gtkaccessibility.h b/gtk/a11y/gtkaccessibility.h
index 41d98067cd..67401f8e96 100644
--- a/gtk/a11y/gtkaccessibility.h
+++ b/gtk/a11y/gtkaccessibility.h
@@ -25,9 +25,6 @@ G_BEGIN_DECLS
 
 void      _gtk_accessibility_init              (void);
 
-gboolean  _gtk_accessibility_key_snooper       (GtkWidget   *widget,
-                                                GdkEventKey *event);
-
 G_END_DECLS
 
 #endif /* __GTK_ACCESSIBILITY_H__ */
diff --git a/gtk/a11y/gtkaccessibilityutil.c b/gtk/a11y/gtkaccessibilityutil.c
index 61656857b1..8414776bb3 100644
--- a/gtk/a11y/gtkaccessibilityutil.c
+++ b/gtk/a11y/gtkaccessibilityutil.c
@@ -107,54 +107,3 @@ _gtk_accessibility_override_atk_util (void)
   atk_class->get_toolkit_name = get_toolkit_name;
   atk_class->get_toolkit_version = get_toolkit_version;
 }
-
-static void
-atk_key_event_from_gdk_event_key (GdkEventKey       *key,
-                                  AtkKeyEventStruct *event)
-{
-  GdkEventType type;
-  GdkModifierType state;
-  guint keyval;
-  guint16 keycode;
-
-  type = gdk_event_get_event_type ((GdkEvent *)key);
-  state = gdk_event_get_modifier_state ((GdkEvent *)key);
-  keyval = gdk_key_event_get_keyval ((GdkEvent *)key);
-  keycode = gdk_key_event_get_keycode ((GdkEvent *)key);
-
-  if (type == GDK_KEY_PRESS)
-    event->type = ATK_KEY_EVENT_PRESS;
-  else if (type == GDK_KEY_RELEASE)
-    event->type = ATK_KEY_EVENT_RELEASE;
-  else
-    g_assert_not_reached ();
-
-  event->state = state;
-  event->keyval = keyval;
-  event->string = (char *) gdk_keyval_name (keyval);
-  event->length = strlen (event->string);
-  event->keycode = keycode;
-  event->timestamp = gdk_event_get_time ((GdkEvent *)key);
-}
-
-gboolean
-_gtk_accessibility_key_snooper (GtkWidget   *widget,
-                                GdkEventKey *event)
-{
-  GSList *l;
-  AtkKeyEventStruct atk_event;
-  gboolean result;
-
-  result = FALSE;
-
-  atk_key_event_from_gdk_event_key (event, &atk_event);
-
-  for (l = key_listener_list; l; l = l->next)
-    {
-      KeyEventListener *listener = l->data;
-
-      result |= listener->func (&atk_event, listener->data);
-    }
-
-  return result;
-}


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