X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi-listener.h;h=1da413ab17007a6805e12b60d277fd8878dd8d52;hb=ebd9b297363b8b3bd6708e6f0c6c7673e5cc32d6;hp=c03851fd8c1014e7a8a5f065a2b8c6c6cfe886a1;hpb=838ffbd98cd6acfaad67fd6b3a08ac69b9f68f9d;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi-listener.h b/cspi/spi-listener.h index c03851f..1da413a 100644 --- a/cspi/spi-listener.h +++ b/cspi/spi-listener.h @@ -1,42 +1,54 @@ #ifndef _SPI_LISTENER_H_ #define _SPI_LISTENER_H_ +#include -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { -#endif /* __cplusplus */ - -#include "accessibleeventlistener.h" +#endif /* - * * 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; + char * keystring; + long timestamp; + AccessibleKeyEventType type; + unsigned short modifiers; + SPIBoolean is_text; +} AccessibleKeystroke; /* - * * Function prototype typedefs for Event Listener Callbacks. - * (see libspi/accessibleeventlistener.h for definition of VoidEventListenerCB). + * (see libspi/accessibleeventlistener.h for definition of SpiVoidEventListenerCB). * * usage: signatures should be * void (*AccessibleEventListenerCB) (AccessibleEvent *event); * - * void (*KeystrokeListenerCB) (KeystrokeEvent *Event); + * SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event); */ +typedef void (*AccessibleEventListenerCB) (const AccessibleEvent *event, + void *user_data); +typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (const AccessibleKeystroke *stroke, + void *user_data); -typedef VoidEventListenerCB AccessibleEventListenerCB; -typedef VoidEventListenerCB KeystrokeListenerCB; - -typedef struct _KeystrokeListener { - KeystrokeListenerCB callback; -} KeystrokeListener; - -#ifdef __cplusplus +#ifdef __cplusplus } -#endif /* __cplusplus */ - +#endif #endif