Merged Michael's branch back into HEAD, and fixed a number of reference counting...
[platform/core/uifw/at-spi2-atk.git] / cspi / spi-listener.h
1 #ifndef _SPI_LISTENER_H_
2 #define _SPI_LISTENER_H_
3
4 #include <cspi/spi-impl.h>
5
6 G_BEGIN_DECLS
7
8 /*
9  * Structure used to encapsulate event information
10  */
11 typedef struct {
12         const char  *type;
13         Accessible  *source;
14         long         detail1;
15         long         detail2;
16 } AccessibleEvent;
17
18 typedef enum {
19         SPI_KEY_PRESSED  = 1<<0,
20         SPI_KEY_RELEASED = 1<<1
21 } AccessibleKeyEventType;
22
23 typedef struct {
24         long                   keyID;
25         short                  keycode;
26         long                   timestamp;
27         AccessibleKeyEventType type;
28         unsigned short         modifiers;
29 } AccessibleKeystroke;
30
31 /*
32  * Function prototype typedefs for Event Listener Callbacks.
33  * (see libspi/accessibleeventlistener.h for definition of SpiVoidEventListenerCB).
34  *
35  * usage: signatures should be
36  * void (*AccessibleEventListenerCB) (AccessibleEvent *event);
37  *
38  * boolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event);
39  */
40 typedef void    (*AccessibleEventListenerCB)     (AccessibleEvent     *event);
41 typedef boolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke);
42
43 G_END_DECLS
44
45 #endif