summaryrefslogtreecommitdiff
path: root/atk/atkutil.h
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2001-11-14 14:32:54 +0000
committerBill Haneman <billh@src.gnome.org>2001-11-14 14:32:54 +0000
commit3f1e147c084e3385cdb6ddf38bb7b8722ddc9d68 (patch)
treecd6e0fbf8c1f180fe4049d53c1c4d82fdf9b90fe /atk/atkutil.h
parent35de5b94c4c783ccade2d583390337be3468571f (diff)
downloadatk-3f1e147c084e3385cdb6ddf38bb7b8722ddc9d68.tar.gz
Added API for key snoop functions, to allow non-GTK-specific registration
of toolkit-level key snoopers.
Diffstat (limited to 'atk/atkutil.h')
-rwxr-xr-xatk/atkutil.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/atk/atkutil.h b/atk/atkutil.h
index c00fadb..ba94a08 100755
--- a/atk/atkutil.h
+++ b/atk/atkutil.h
@@ -38,6 +38,7 @@ extern "C" {
#define _TYPEDEF_ATK_UTIL_
typedef struct _AtkUtil AtkUtil;
typedef struct _AtkUtilClass AtkUtilClass;
+typedef struct _AtkKeyEventStruct AtkKeyEventStruct;
#endif
/*
@@ -46,6 +47,18 @@ typedef struct _AtkUtilClass AtkUtilClass;
*/
typedef void (*AtkEventListener) (AtkObject*);
typedef void (*AtkEventListenerInit) (void);
+typedef gint (*AtkKeySnoopFunc) (AtkImplementor*, AtkKeyEventStruct *event,
+ gpointer func_data);
+
+struct _AtkKeyEventStruct {
+ gint type;
+ guint state;
+ guint keyval;
+ gint length;
+ gchar *string;
+ guint16 keycode;
+ guint32 time;
+};
struct _AtkUtil
{
@@ -58,6 +71,9 @@ struct _AtkUtilClass
guint (* add_global_event_listener) (GSignalEmissionHook listener,
gchar* event_type);
void (* remove_global_event_listener) (guint listener_id);
+ guint (* add_key_event_listener) (AtkKeySnoopFunc *listener,
+ gpointer data);
+ void (* remove_key_event_listener) (guint listener_id);
AtkObject* (* get_root) (void);
gchar* (* get_toolkit_name) (void);
gchar* (* get_toolkit_version) (void);
@@ -117,6 +133,17 @@ guint atk_add_global_event_listener (GSignalEmissionHook listener, gchar* event_
void atk_remove_global_event_listener (guint listener_id);
/*
+ * Adds the specified function to the list of functions to be called
+ * when an keyboard event occurs.
+ */
+guint atk_add_key_event_listener (AtkKeySnoopFunc *listener, gpointer data);
+
+/*
+ * Removes the specified event listener
+ */
+void atk_remove_key_event_listener (guint listener_id);
+
+/*
* Returns the root accessible container for the current application.
*/
AtkObject* atk_get_root(void);