[gtk+] API: Deprecate key snooping
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: Deprecate key snooping
- Date: Fri, 6 Jan 2012 04:23:59 +0000 (UTC)
commit fc37e2749cfa7c11e72dd9f253ab5c8aa9b1af2c
Author: Benjamin Otte <otte redhat com>
Date: Thu Jan 5 16:50:49 2012 +0100
API: Deprecate key snooping
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 | 6 ++++++
gtk/gtkmain.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 67d843e..a0bcf0f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -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)
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 99ce6d4..f638138 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]