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
index 99b1619..e69a2e7 100644 (file)
@@ -1,21 +1,34 @@
 #ifndef _SPI_LISTENER_H_
 #define _SPI_LISTENER_H_
 
-#include <libspi/accessibleeventlistener.h>
-#include <libspi/keystrokelistener.h>
+#include <cspi/spi-impl.h>
 
 G_BEGIN_DECLS
 
 /*
- *
  * Structure used to encapsulate event information
- *
  */
-
-typedef Accessibility_Event AccessibleEvent;
+typedef struct {
+       const char  *type;
+       Accessible  *source;
+       long         detail1;
+       long         detail2;
+} AccessibleEvent;
+
+typedef enum {
+       SPI_KEY_PRESSED  = 1<<0,
+       SPI_KEY_RELEASED = 1<<1
+} AccessibleKeyEventType;
+
+typedef struct {
+       long                   keyID;
+       short                  keycode;
+       long                   timestamp;
+       AccessibleKeyEventType type;
+       unsigned short         modifiers;
+} AccessibleKeystroke;
 
 /*
- *
  * Function prototype typedefs for Event Listener Callbacks.
  * (see libspi/accessibleeventlistener.h for definition of SpiVoidEventListenerCB).
  *
@@ -24,9 +37,8 @@ typedef Accessibility_Event AccessibleEvent;
  *
  * boolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event);
  */
-
-typedef VoidSpiEventListenerCB AccessibleEventListenerCB;
-typedef BooleanKeystrokeListenerCB    AccessibleKeystrokeListenerCB;
+typedef void    (*AccessibleEventListenerCB)     (AccessibleEvent     *event);
+typedef boolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke);
 
 G_END_DECLS