File indexing completed on 2025-01-18 09:28:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef _ATSPI_DEVICE_LISTENER_H_
0027 #define _ATSPI_DEVICE_LISTENER_H_
0028
0029 #include "glib-object.h"
0030
0031 #include "atspi-types.h"
0032
0033 G_BEGIN_DECLS
0034
0035 GType atspi_device_event_get_type (void);
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 typedef gboolean (*AtspiDeviceListenerCB) (AtspiDeviceEvent *stroke,
0049 void *user_data);
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 typedef gboolean (*AtspiDeviceListenerSimpleCB) (const AtspiDeviceEvent *stroke);
0062
0063 #define ATSPI_TYPE_DEVICE_LISTENER (atspi_device_listener_get_type ())
0064 #define ATSPI_DEVICE_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListener))
0065 #define ATSPI_DEVICE_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListenerClass))
0066 #define ATSPI_IS_DEVICE_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_DEVICE_LISTENER))
0067 #define ATSPI_IS_DEVICE_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_DEVICE_LISTENER))
0068 #define ATSPI_DEVICE_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_DEVICE_LISTENER, AtspiDeviceListenerClass))
0069
0070 typedef struct _AtspiDeviceListener AtspiDeviceListener;
0071 struct _AtspiDeviceListener
0072 {
0073 GObject parent;
0074 guint id;
0075 GList *callbacks;
0076 };
0077
0078 typedef struct _AtspiDeviceListenerClass AtspiDeviceListenerClass;
0079 struct _AtspiDeviceListenerClass
0080 {
0081 GObjectClass parent_class;
0082 gboolean (*device_event) (AtspiDeviceListener *listener, const AtspiDeviceEvent *event);
0083 };
0084
0085 GType atspi_device_listener_get_type (void);
0086
0087 AtspiDeviceListener *atspi_device_listener_new (AtspiDeviceListenerCB callback, void *user_data, GDestroyNotify callback_destroyed);
0088
0089 AtspiDeviceListener *atspi_device_listener_new_simple (AtspiDeviceListenerSimpleCB callback, GDestroyNotify callback_destroyed);
0090
0091 void atspi_device_listener_add_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback, GDestroyNotify callback_destroyed, void *user_data);
0092
0093 void atspi_device_listener_remove_callback (AtspiDeviceListener *listener, AtspiDeviceListenerCB callback);
0094
0095 G_END_DECLS
0096
0097 #endif