2003-06-10 Padraig O'Briain <padraig.obriain@sun.com>
[platform/core/uifw/at-spi2-atk.git] / libspi / keystrokelistener.h
index a2b4c11..ed2ba45 100644 (file)
@@ -2,7 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #ifndef SPI_KEYSTROKE_LISTENER_H_
 #define SPI_KEYSTROKE_LISTENER_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
-#include <bonobo/bonobo-object.h>
-#include <atk/atkobject.h>
-#include <libspi/Accessibility.h>
-#include "keymasks.h"
+#include <libspi/devicelistener.h>
 
-#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 IS_SPI_KEYSTROKE_LISTENER(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_KEYSTROKE_LISTENER_TYPE))
-#define IS_SPI_KEYSTROKE_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_KEYSTROKE_LISTENER_TYPE))
+#define SPI_KEYSTROKE_LISTENER_TYPE        SPI_DEVICE_LISTENER_TYPE
+#define SPI_KEYSTROKE_LISTENER(o)          SPI_DEVICE_LISTENER(o)
+#define SPI_KEYSTROKE_LISTENER_CLASS(k)    SPI_DEVICE_LISTENER_CLASS(k)
+#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 gboolean (*BooleanKeystrokeListenerCB) (const void *keystroke_ptr);
+typedef struct _SpiDeviceListener SpiKeystrokeListener;
 
-typedef struct {
-        BonoboObject parent;
-       GList *callbacks;
-} SpiKeystrokeListener;
+typedef SpiDeviceListenerClass SpiKeystrokeListenerClass;
 
-typedef struct {
-        BonoboObjectClass parent_class;
-        POA_Accessibility_KeystrokeListener__epv epv;
-} SpiKeystrokeListenerClass;
+#define spi_keystroke_listener_get_type spi_device_listener_get_type
+#define spi_keystroke_listener_new      spi_device_listener_new
 
-GType                  spi_keystroke_listener_get_type        (void);
-SpiKeystrokeListener  *spi_keystroke_listener_new             (void);
-void                   spi_keystroke_listener_add_callback    (SpiKeystrokeListener *listener,
-                                                              BooleanKeystrokeListenerCB callback);
-void                   spi_keystroke_listener_remove_callback (SpiKeystrokeListener *listener,
-                                                              BooleanKeystrokeListenerCB callback);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif /* KEYSTROKE_SPI_LISTENER_H_ */