]> Pileus Git - ~andy/gtk/commitdiff
API: Deprecate key snooping
authorBenjamin Otte <otte@redhat.com>
Thu, 5 Jan 2012 15:50:49 +0000 (16:50 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 6 Jan 2012 04:23:42 +0000 (05:23 +0100)
You really shouldn't be doing this. If you have to, you can use
gdk_window_add_filter() or listen to raw events on XI2.

gtk/gtkmain.c
gtk/gtkmain.h

index 67d843e433fb360b4fbc329ceae93ac19ea932de..a0bcf0f3eac94253574a680816699fa7daf55218 100644 (file)
@@ -2142,6 +2142,9 @@ gtk_device_grab_remove (GtkWidget *widget,
  *
  * Returns: a unique id for this key snooper for use with
  *    gtk_key_snooper_remove().
+ *
+ * Deprecated: 3.4: Key snooping should not be done. Events should
+ *     be handled by widgets.
  */
 guint
 gtk_key_snooper_install (GtkKeySnoopFunc snooper,
@@ -2166,6 +2169,9 @@ gtk_key_snooper_install (GtkKeySnoopFunc snooper,
  * @snooper_handler_id: Identifies the key snooper to remove
  *
  * Removes the key snooper function with the given id.
+ *
+ * Deprecated: 3.4: Key snooping should not be done. Events should
+ *     be handled by widgets.
  */
 void
 gtk_key_snooper_remove (guint snooper_id)
index 99ce6d45ab175a662c573d54f38f432b12911e95..f6381383facbccec6d3025ea47fb2d52c8e8c262 100644 (file)
@@ -152,8 +152,10 @@ void       gtk_device_grab_add     (GtkWidget          *widget,
 void       gtk_device_grab_remove  (GtkWidget          *widget,
                                     GdkDevice          *device);
 
+G_GNUC_DEPRECATED
 guint      gtk_key_snooper_install (GtkKeySnoopFunc snooper,
                                     gpointer        func_data);
+G_GNUC_DEPRECATED
 void       gtk_key_snooper_remove  (guint           snooper_handler_id);
 
 GdkEvent * gtk_get_current_event        (void);