X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi-listener.h;h=0f9e6003c3a2471bde581c82afa06cafbec3d553;hb=ba30f6ce5f99bcde88352ef61b42cfc1241d7636;hp=5c39a3d067e40588a374720812821de7fe2298ee;hpb=408978dd34f3338e49b6ace5f60b7606579ce7a9;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi-listener.h b/cspi/spi-listener.h index 5c39a3d..0f9e600 100644 --- a/cspi/spi-listener.h +++ b/cspi/spi-listener.h @@ -1,40 +1,48 @@ -#ifndef _SPI_SPI_LISTENER_H_ -#define _SPI_SPI_LISTENER_H_ +#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 SpiAccessibleEvent; +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 SpiListener Callbacks. - * (see libspi/accessibleeventlistener.h for definition of VoidEventListenerCB). + * Function prototype typedefs for Event Listener Callbacks. + * (see libspi/accessibleeventlistener.h for definition of SpiVoidEventListenerCB). * * usage: signatures should be - * void (*SpiAccessibleEventListenerCB) (SpiAccessibleEvent *event); + * void (*AccessibleEventListenerCB) (AccessibleEvent *event); * - * boolean (*KeystrokeListenerCB) (KeystrokeEvent *Event); + * SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystrokeEvent *Event); */ +typedef void (*AccessibleEventListenerCB) (AccessibleEvent *event, + void *user_data); +typedef SPIBoolean (*AccessibleKeystrokeListenerCB) (AccessibleKeystroke *stroke, + void *user_data); -typedef VoidEventListenerCB SpiAccessibleEventListenerCB; -typedef BooleanKeystrokeListenerCB KeystrokeListenerCB; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif