Changes to introspection generation to remove DOCTYPE and XML
[platform/core/uifw/at-spi2-atk.git] / test / keysynth-demo.c
index e3713eb..5f6b6f7 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
@@ -25,7 +26,7 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
-#include "spi.h"
+#include <cspi/spi.h>
 
 #define LABELMAXLEN 20
 #define MIN_KEYCODE 9
@@ -128,7 +129,7 @@ select_line (gint lineno)
 
 
 static ScanState*
-scan_state ()
+scan_state (void)
 {
   static ScanState state = {SCAN_IDLE, 0, 0};
   return &state;
@@ -170,7 +171,6 @@ increment_scan (gpointer data)
       case SCAN_LINES_DONE:
       case SCAN_KEYS_DONE:
          return FALSE;
-      default:
     }
   return TRUE;
 }
@@ -243,7 +243,7 @@ label_buttons(SPIBoolean shifted)
           /* Note: these routines are not i18n-savvy,  we need to use XIM, other methods here */
          if (keysym && g_ascii_isprint((int)keysym))
            {
-             snprintf (label, 2, "%c", (int) keysym); 
+             g_snprintf (label, 2, "%c", (int) keysym); 
            }
          else
            {
@@ -382,7 +382,7 @@ synth_keycode (GtkButton *button, KeyCode *keycode)
 }
 
 static void
-create_vkbd()
+create_vkbd(void)
 {
   GtkWidget *window, *container, *hbox;
   int i, j;
@@ -480,7 +480,7 @@ main (int argc, char **argv)
   /* will listen only to Alt-key combinations */
   SPI_registerAccessibleKeystrokeListener (key_listener,
                                           (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
-                                          SPI_KEYMASK_ALT,
+                                          SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL,
                                           (unsigned long) ( KeyPress | KeyRelease),
                                           SPI_KEYLISTENER_CANCONSUME | SPI_KEYLISTENER_ALL_WINDOWS);
   create_vkbd ();