2002-03-27 Michael Meeks <michael@ximian.com>
[platform/core/uifw/at-spi2-atk.git] / cspi / spi-listener.h
index a9677dc..1da413a 100644 (file)
@@ -3,30 +3,34 @@
 
 #include <cspi/spi-impl.h>
 
-G_BEGIN_DECLS
+#ifdef  __cplusplus
+extern "C" {
+#endif
 
 /*
  * Structure used to encapsulate event information
  */
 typedef struct {
-       const char  *type;
-       Accessible  *source;
-       long         detail1;
-       long         detail2;
+  const char  *type;
+  Accessible  *source;
+  long         detail1;
+  long         detail2;
 } AccessibleEvent;
 
 typedef enum {
-       SPI_KEY_PRESSED  = 1<<0,
-       SPI_KEY_RELEASED = 1<<1
+  SPI_KEY_PRESSED  = 1<<0,
+  SPI_KEY_RELEASED = 1<<1
 } AccessibleKeyEventType;
 
 
 typedef struct {
-       long                   keyID;
-       short                  keycode;
-       long                   timestamp;
-       AccessibleKeyEventType type;
-       unsigned short         modifiers;
+  long                   keyID;
+  short                  keycode;
+  char *                 keystring;
+  long                   timestamp;
+  AccessibleKeyEventType type;
+  unsigned short         modifiers;
+  SPIBoolean             is_text;      
 } AccessibleKeystroke;
 
 /*
@@ -38,9 +42,13 @@ typedef struct {
  *
  * SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event);
  */
-typedef void    (*AccessibleEventListenerCB)     (AccessibleEvent     *event);
-typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke);
+typedef void       (*AccessibleEventListenerCB)     (const AccessibleEvent     *event,
+                                                    void                      *user_data);
+typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (const AccessibleKeystroke *stroke,
+                                                    void                      *user_data);
 
-G_END_DECLS
+#ifdef  __cplusplus
+}
+#endif
 
 #endif