Added methods for Component Layer and MDI Z-Order information (see
[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
24 typedef struct {
25         long                   keyID;
26         short                  keycode;
27         long                   timestamp;
28         AccessibleKeyEventType type;
29         unsigned short         modifiers;
30 } AccessibleKeystroke;
31
32 /*
33  * Function prototype typedefs for Event Listener Callbacks.
34  * (see libspi/accessibleeventlistener.h for definition of SpiVoidEventListenerCB).
35  *
36  * usage: signatures should be
37  * void (*AccessibleEventListenerCB) (AccessibleEvent *event);
38  *
39  * SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event);
40  */
41 typedef void    (*AccessibleEventListenerCB)     (AccessibleEvent     *event);
42 typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke);
43
44 G_END_DECLS
45
46 #endif