summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2001-11-15 01:41:37 +0000
committerBill Haneman <billh@src.gnome.org>2001-11-15 01:41:37 +0000
commit4780c28a2abfd6f76dda5e8d97fef5cb43849798 (patch)
treeaeb533b82aa8d9a5bc8e5dbdb239f35e1f410605
parent71404dbbac2e29a694e40dd206784681820fe633 (diff)
downloadatk-4780c28a2abfd6f76dda5e8d97fef5cb43849798.tar.gz
Added (missing) functions atk_add_key_listener() and atk_remove_key_listener()
-rwxr-xr-xatk/atkutil.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/atk/atkutil.c b/atk/atkutil.c
index d02a3c6..97e4d12 100755
--- a/atk/atkutil.c
+++ b/atk/atkutil.c
@@ -231,6 +231,49 @@ atk_remove_global_event_listener (guint listener_id)
}
/**
+ * atk_add_key_event_listener:
+ * @listener: the listener to notify
+ * @event_type: the type of event for which notification is requested
+ *
+ * Adds the specified function to the list of functions to be called
+ * when an event of type event_type occurs.
+ *
+ * Returns: added event listener id, or 0 on failure.
+ **/
+guint
+atk_add_key_event_listener (AtkKeySnoopFunc *listener, gpointer data)
+{
+ guint retval;
+ AtkUtilClass *klass = g_type_class_ref (ATK_TYPE_UTIL);
+ if (klass->add_key_event_listener)
+ {
+ retval = klass->add_key_event_listener (listener, data);
+ }
+ else
+ {
+ retval = -1;
+ }
+ g_type_class_unref (klass);
+
+ return retval;
+}
+
+/**
+ * atk_remove_key_event_listener:
+ * @listener_id: the id of the event listener to remove
+ *
+ * Removes the specified event listener
+ **/
+void
+atk_remove_key_event_listener (guint listener_id)
+{
+ AtkUtilClass *klass = g_type_class_peek (ATK_TYPE_UTIL);
+
+ if (klass->remove_key_event_listener)
+ klass->remove_key_event_listener (listener_id);
+}
+
+/**
* atk_get_root:
*
* Gets the root accessible container for the current application.