* 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
* Boston, MA 02111-1307, USA.
*/
-#ifndef DEVICE_EVENT_CONTROLLER_H_
-#define DEVICE_EVENT_CONTROLLER_H_
+#ifndef SPI_DEVICE_EVENT_CONTROLLER_H_
+#define SPI_DEVICE_EVENT_CONTROLLER_H_
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include <X11/Xlib.h>
+#include <dbus/dbus.h>
-#include <bonobo/bonobo-object.h>
-#include <libspi/Accessibility.h>
-#include "keystrokelistener.h"
+typedef struct _SpiDEController SpiDEController;
-#define DEVICE_EVENT_CONTROLLER_TYPE (device_event_controller_get_type ())
-#define DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventController))
-#define DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventControllerClass))
-#define IS_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DEVICE_EVENT_CONTROLLER_TYPE))
-#define IS_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DEVICE_EVENT_CONTROLLER_TYPE))
-#define DEVICE_EVENT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventControllerClass))
+#include "registry.h"
-typedef struct {
- BonoboObject parent;
- GList *key_listeners;
- GList *mouse_listeners;
- GList *keymask_list;
-} DeviceEventController;
+G_BEGIN_DECLS
+
+#define SPI_DEVICE_EVENT_CONTROLLER_TYPE (spi_device_event_controller_get_type ())
+#define SPI_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDEController))
+#define SPI_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDEControllerClass))
+#define SPI_IS_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_DEVICE_EVENT_CONTROLLER_TYPE))
+#define SPI_IS_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_DEVICE_EVENT_CONTROLLER_TYPE))
+#define SPI_DEVICE_EVENT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDEControllerClass))
+
+struct _SpiDEController {
+ GObject parent;
+ DBusConnection *bus;
+ SpiRegistry *registry;
+ GList *key_listeners;
+ GList *mouse_listeners;
+ GList *keygrabs_list;
+ Display *xevie_display;
+ GQueue *message_queue;
+ guint message_queue_idle;
+};
typedef struct {
- BonoboObjectClass parent_class;
- POA_Accessibility_DeviceEventController__epv epv;
- gboolean (*check_key_event) (DeviceEventController *controller);
-} DeviceEventControllerClass;
+ GObjectClass parent_class;
+} SpiDEControllerClass;
+
+GType spi_device_event_controller_get_type (void);
+SpiDEController *spi_device_event_controller_new (SpiRegistry *registry,
+ DBusConnection *bus);
+
+void spi_device_event_controller_start_poll_mouse (SpiRegistry *registry);
+void spi_device_event_controller_stop_poll_mouse (void);
-GType device_event_controller_get_type (void);
+void spi_remove_device_listeners (SpiDEController *controller, const char *bus_name);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+SpiDEController *spi_registry_dec_new (SpiRegistry *reg, DBusConnection *bus);
+G_END_DECLS
#endif /* DEVICEEVENTCONTROLLER_H_ */