X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi-listener.h;h=61fa35c0478c79764fcfbf5eecbc5fd9163d6654;hb=cea452a6e46b8f661f4989eb57267e896c7ce5ef;hp=678ad556ba80a541a545ee936a79c6c88c54a029;hpb=9b94d95337a6bd6bc5946191ef52341b0e97530f;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi-listener.h b/cspi/spi-listener.h index 678ad55..61fa35c 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" -#include "keystrokelistener.h" - -#define SPI_KEYSET_ALL_KEYS ((void *)NULL) - +#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 SpiVoidEventListenerCB). * * usage: signatures should be * void (*AccessibleEventListenerCB) (AccessibleEvent *event); * - * boolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event); + * SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event); */ +typedef void (*AccessibleEventListenerCB) (AccessibleEvent *event, + void *user_data); +typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke, + void *user_data); -typedef VoidSpiEventListenerCB AccessibleEventListenerCB; -typedef BooleanKeystrokeListenerCB AccessibleKeystrokeListenerCB; - -#ifdef __cplusplus +#ifdef __cplusplus } -#endif /* __cplusplus */ - +#endif #endif