2008-05-16 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / spi-common / event-types.h
similarity index 52%
rename from test/keysynth-test.c
rename to spi-common/event-types.h
index 22adf46..ac0c059 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-#include <unistd.h>
-#include <stdlib.h>
-#include "../cspi/spi-private.h" /* A hack for now */
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include <atk/atk.h>
-#include <atk/atknoopobject.h>
-#include <bonobo-activation/bonobo-activation-register.h>
-#include <bonobo/bonobo-main.h>
-#include <libspi/libspi.h>
+#ifndef EVENT_TYPES_H_
+#define EVENT_TYPES_H_
 
-typedef struct {
-       long int val;
-       char *string;
-       AccessibleKeySynthType type;
-} TextTest;
+#include <dbus/dbus.h>
 
-static TextTest text[] = {
-       {65, NULL, SPI_KEY_PRESSRELEASE},
-       {64, NULL, SPI_KEY_SYM},
-       {0,  "--hello!", SPI_KEY_STRING},
-       {0, "StudlyCaps!", SPI_KEY_STRING}
-};
+typedef unsigned long Accessibility_ControllerEventMask;
 
-static void
-test_key_synthesis (void)
+// TODO: auto-generate the below structs
+typedef struct _Accessibility_DeviceEvent Accessibility_DeviceEvent;
+struct _Accessibility_DeviceEvent
 {
-       int i;
-       for (i = 0; i < G_N_ELEMENTS (text); ++i) {
-               SPI_generateKeyboardEvent (text[i].val, text[i].string, text[i].type);
-       }
-}
+  Accessibility_EventType type;
+  dbus_uint32_t id;
+  dbus_uint16_t hw_code;
+  dbus_uint16_t modifiers;
+  dbus_uint32_t timestamp;
+  char * event_string;
+  dbus_bool_t is_text;
+};
 
-int
-main (int argc, char **argv)
+typedef struct _Accessibility_EventListenerMode Accessibility_EventListenerMode;
+struct _Accessibility_EventListenerMode
 {
-       gtk_init (&argc, &argv);
-       SPI_init ();
-
-       test_key_synthesis ();
+  dbus_bool_t synchronous;
+  dbus_bool_t preemptive;
+  dbus_bool_t global;
+};
 
-       return SPI_exit ();
-}
+typedef struct _Accessibility_KeyDefinition Accessibility_KeyDefinition;
+struct _Accessibility_KeyDefinition
+{
+  dbus_int32_t keycode;
+  dbus_int32_t keysym;
+  char *keystring;
+  dbus_int32_t unused;
+};
 
+#endif /* EVENT_TYPES_H_ */