X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi-listener.h;h=a9677dc726f5130df47bafeb981306fd5d0f0530;hb=a31b958e89b901eec190109be30183a8afc6989d;hp=6aada88a4e65b4ddd3ead2ed48dff5fdcd91c260;hpb=336746297d374424847b92b8109cd43d00dde230;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi-listener.h b/cspi/spi-listener.h index 6aada88..a9677dc 100644 --- a/cspi/spi-listener.h +++ b/cspi/spi-listener.h @@ -1,40 +1,46 @@ #ifndef _SPI_LISTENER_H_ #define _SPI_LISTENER_H_ +#include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "accessibleeventlistener.h" -#include "keystrokelistener.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 VoidEventListenerCB). + * (see libspi/accessibleeventlistener.h for definition of SpiVoidEventListenerCB). * * usage: signatures should be * void (*AccessibleEventListenerCB) (AccessibleEvent *event); * - * boolean (*KeystrokeListenerCB) (KeystrokeEvent *Event); + * SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event); */ +typedef void (*AccessibleEventListenerCB) (AccessibleEvent *event); +typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke); -typedef VoidEventListenerCB AccessibleEventListenerCB; -typedef BooleanKeystrokeListenerCB KeystrokeListenerCB; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif