summaryrefslogtreecommitdiff
path: root/atspi/atspi-device-listener.h
diff options
context:
space:
mode:
authorMike Gorse <mgorse@novell.com>2010-11-29 16:10:22 -0500
committerMike Gorse <mgorse@novell.com>2010-11-29 18:45:56 -0500
commit702d6a97cf7ecae7cd58fe051a2ace197351a3a4 (patch)
tree2feb00aba3ccfd81e8b5eb920e7718013c81416c /atspi/atspi-device-listener.h
parentfebc57fdd883c96a471a970f6801af9d5a5bdf92 (diff)
downloadat-spi2-core-702d6a97cf7ecae7cd58fe051a2ace197351a3a4.tar.gz
Various fixes
Events and DeviceEvents are now sent with transfer full to work around a possible pygi bug. Various other fixes.
Diffstat (limited to 'atspi/atspi-device-listener.h')
-rw-r--r--atspi/atspi-device-listener.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/atspi/atspi-device-listener.h b/atspi/atspi-device-listener.h
index bf78935f..07571ece 100644
--- a/atspi/atspi-device-listener.h
+++ b/atspi/atspi-device-listener.h
@@ -31,7 +31,8 @@
/**
* AtspiDeviceListenerCB:
- * @stroke: The #AtspiDeviceEvent for which notification is being received.
+ * @stroke: (transfer full): The #AtspiDeviceEvent for which notification is
+ * being received.
* @user_data: Data which is passed to the client each time this callback is notified.
*
* A callback function prototype via which clients receive device event notifications.
@@ -42,6 +43,18 @@
typedef gboolean (*AtspiDeviceListenerCB) (const AtspiDeviceEvent *stroke,
void *user_data);
+/**
+ * AtspiDeviceListenerSimpleCB:
+ * @stroke: (transfer full): The #AtspiDeviceEvent for which notification is
+ * being received.
+ *
+ * Like #AtspiDeviceListenerCB but with no user data.
+ *
+ * Returns: %TRUE if the client wishes to consume/preempt the event, preventing it from being
+ * relayed to the currently focussed application, %FALSE if the event delivery should proceed as normal.
+ **/
+typedef gboolean (*AtspiDeviceListenerSimpleCB) (const AtspiDeviceEvent *stroke);
+
#define ATSPI_TYPE_DEVICE_LISTENER (atspi_device_listener_get_type ())
#define ATSPI_DEVICE_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListener))
#define ATSPI_DEVICE_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListenerClass))
@@ -66,9 +79,11 @@ struct _AtspiDeviceListenerClass
GType atspi_device_listener_get_type (void);
-AtspiDeviceListener *atspi_device_listener_new (AtspiDeviceListenerCB callback);
+AtspiDeviceListener *atspi_device_listener_new (AtspiDeviceListenerCB callback, GDestroyNotify callback_destroyed, void *user_data);
+
+AtspiDeviceListener *atspi_device_listener_new_simple (AtspiDeviceListenerSimpleCB callback, GDestroyNotify callback_destroyed);
-void atspi_device_listener_add_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback, void *user_data);
+void atspi_device_listener_add_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback, GDestroyNotify callback_destroyed, void *user_data);
void atspi_device_listener_remove_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback);
#endif /* _ATSPI_DEVICE_LISTENER_H_ */