One-line change of a g_error to g_warning when notification fails.
[platform/core/uifw/at-spi2-atk.git] / libspi / keystrokelistener.h
index 93a15a6..5bd61eb 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef KEYSTROKE_LISTENER_H_
-#define KEYSTROKE_LISTENER_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#ifndef SPI_KEYSTROKE_LISTENER_H_
+#define SPI_KEYSTROKE_LISTENER_H_
 
 #include <bonobo/bonobo-object.h>
 #include <atk/atkobject.h>
 #include <libspi/Accessibility.h>
+#include <libspi/keymasks.h>
 
-#define KEYSTROKE_LISTENER_TYPE        (keystroke_listener_get_type ())
-#define KEYSTROKE_LISTENER(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), KEYSTROKE_LISTENER_TYPE, KeystrokeListener))
-#define KEYSTROKE_LISTENER_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), KEYSTROKE_LISTENER_TYPE, KeystrokeListenerClass))
-#define IS_KEYSTROKE_LISTENER(o)       (G_TYPE_CHECK__INSTANCE_TYPE ((o), KEYSTROKE_LISTENER_TYPE))
-#define IS_KEYSTROKE_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), KEYSTROKE_LISTENER_TYPE))
+G_BEGIN_DECLS
 
-typedef struct {
+#define SPI_KEYSTROKE_LISTENER_TYPE        (spi_keystroke_listener_get_type ())
+#define SPI_KEYSTROKE_LISTENER(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_KEYSTROKE_LISTENER_TYPE, SpiKeystrokeListener))
+#define SPI_KEYSTROKE_LISTENER_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), SPI_KEYSTROKE_LISTENER_TYPE, SpiKeystrokeListenerClass))
+#define SPI_IS_KEYSTROKE_LISTENER(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_KEYSTROKE_LISTENER_TYPE))
+#define SPI_IS_KEYSTROKE_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_KEYSTROKE_LISTENER_TYPE))
+
+typedef struct _SpiKeystrokeListener SpiKeystrokeListener;
+
+struct _SpiKeystrokeListener {
         BonoboObject parent;
-} KeystrokeListener;
+};
 
 typedef struct {
         BonoboObjectClass parent_class;
         POA_Accessibility_KeystrokeListener__epv epv;
-} KeystrokeListenerClass;
 
-GType               keystroke_listener_get_type   (void);
-KeystrokeListener  *keystroke_listener_new       (void);
+       gboolean (*key_event) (SpiKeystrokeListener *listener,
+                              const Accessibility_KeyStroke *key);
+} SpiKeystrokeListenerClass;
+
+GType                  spi_keystroke_listener_get_type        (void);
+SpiKeystrokeListener  *spi_keystroke_listener_new             (void);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
-#endif /* KEYSTROKE_LISTENER_H_ */
+#endif /* KEYSTROKE_SPI_LISTENER_H_ */