version 1.1.9
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 27 Mar 2003 13:11:11 +0000 (13:11 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 27 Mar 2003 13:11:11 +0000 (13:11 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@411 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
NEWS
configure.in
test/Makefile.am
test/keypad-test.c [new file with mode: 0644]

index dde0b2d..6546480 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2003-03-07  Padraig O'Briain <padraig.obriain@sun.com>
+2003-03-07  Bill Haneman <bill.haneman@sun.com>
+
+       * configure.in: 1.1.9 release.
+       * NEWS: updated.
+       
+2003-03-07  Bill Haneman <bill.haneman@sun.com>
 
        [needed by GOK, to fix bugs 107985 and 107988]
        * registryd/deviceeventcontroller.c:
diff --git a/NEWS b/NEWS
index 6e7869b..dd8d5e2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,14 @@
 (top)
 in HEAD:
+What's new in at-spi-1.1.9:
+
+* Fixes for 107985, 107988, 105291, 107256, 107254, 105836,
+  104622, 105291, 104744, 104741, 101524, 102830, 98120, 94275.
+
+* added support for mouse buttons 4 and 5.
+
+* compiler warning fixes.
+
 What's new in at-spi-1.1.8:
 
 * Added getRangeExtents() and getBoundedRanges() API for more
index a6e73b3..626f79a 100644 (file)
@@ -2,9 +2,9 @@ AC_INIT(idl/Accessibility.idl)
 
 AT_SPI_MAJOR_VERSION=1
 AT_SPI_MINOR_VERSION=1
-AT_SPI_MICRO_VERSION=8
-AT_SPI_INTERFACE_AGE=0
-AT_SPI_BINARY_AGE=8
+AT_SPI_MICRO_VERSION=9
+AT_SPI_INTERFACE_AGE=1
+AT_SPI_BINARY_AGE=9
 AT_SPI_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION.$AT_SPI_MICRO_VERSION"
 AM_INIT_AUTOMAKE(at-spi, $AT_SPI_VERSION)
 AC_SUBST(AT_SPI_MAJOR_VERSION)
@@ -113,6 +113,7 @@ PKG_CHECK_MODULES(REGISTRYD, \
        libbonobo-2.0 >= 1.107.0 \
        gtk+-2.0 > 2.0.0 \
        atk >= 1.1.0)
+REGISTRYD_LIBS="$REGISTRYD_LIBS -lspi" 
 AC_SUBST(REGISTRYD_LIBS)
 AC_SUBST(REGISTRYD_CFLAGS)
 
@@ -127,6 +128,7 @@ AC_SUBST(TESTS_CFLAGS)
 PKG_CHECK_MODULES(ATK_BRIDGE, \
        libbonobo-2.0 >= 1.107.0 \
        atk >= 1.1.0)
+ATK_BRIDGE_LIBS="$ATK_BRIDGE_LIBS -lspi" 
 AC_SUBST(ATK_BRIDGE_LIBS)
 AC_SUBST(ATK_BRIDGE_CFLAGS)
 
@@ -172,6 +174,7 @@ fi
 AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
 AC_SUBST(XINPUT_LIBS)
 
+dnl CFLAGS="$CFLAGS -Wall"
 AC_SUBST(CFLAGS)
 AC_SUBST(CPPFLAGS)
 AC_SUBST(LDFLAGS)
index 1edfb52..3d0f9ed 100644 (file)
@@ -1,9 +1,11 @@
 NULL=
 
-noinst_PROGRAMS = test-simple at app simple-at stress-test keysynth-demo key-listener-test event-listener-test screen-review-test visual-bell 
+noinst_PROGRAMS = test-simple at app simple-at stress-test keysynth-demo key-listener-test event-listener-test screen-review-test visual-bell keypad-test
 
 stress_test_SOURCES = stress-test.c
 
+keypad_test_SOURCES = keypad-test.c
+
 key_listener_test_SOURCES = key-listener-test.c
 
 visual_bell_SOURCES = visual-bell.c
diff --git a/test/keypad-test.c b/test/keypad-test.c
new file mode 100644 (file)
index 0000000..c714731
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * 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
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <glib-object.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#include <spi.h>
+#define XK_MISCELLANY
+#include <X11/keysymdef.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+
+static SPIBoolean report_keypad_key_event  (const AccessibleKeystroke *stroke, void *user_data);
+
+static short *get_keypad_keycodes (void);
+
+static AccessibleKeystrokeListener *keypad_key_listener;
+static AccessibleKeySet            *keypad_keyset;
+
+static Display *get_display (void);
+
+int
+main (int argc, char **argv)
+{
+  SPIBoolean retval = FALSE;
+       
+  SPI_init ();
+
+  gdk_init (&argc, &argv); /* 
+               * needed in this test program only  
+               * because we are calling GDK_DISPLAY() 
+               */
+
+  /* prepare the keyboard snoopers */
+  keypad_key_listener = SPI_createAccessibleKeystrokeListener (report_keypad_key_event, NULL);
+  keypad_keyset = SPI_createAccessibleKeySet (16, NULL, get_keypad_keycodes (), NULL);
+
+  retval = SPI_registerAccessibleKeystrokeListener(keypad_key_listener,
+                                         keypad_keyset,
+                                         SPI_KEYMASK_UNMODIFIED,
+                                         (unsigned long) ( SPI_KEY_PRESSED |
+                                                           SPI_KEY_RELEASED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
+  fprintf (stderr, "Keypad key registry: result %s\n", retval ? "succeeded" : 
+       "failed");
+
+  retval = SPI_registerAccessibleKeystrokeListener(keypad_key_listener,
+                                         keypad_keyset,
+                                         SPI_KEYMASK_SHIFT,
+                                         (unsigned long) ( SPI_KEY_PRESSED |
+                                                           SPI_KEY_RELEASED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
+
+  fprintf (stderr, "Shift-Keypad key registry: result %s\n", retval ? "succeeded" : 
+       "failed");
+
+  retval = SPI_registerAccessibleKeystrokeListener(keypad_key_listener,
+                                         keypad_keyset,
+                                         SPI_KEYMASK_MOD2,
+                                         (unsigned long) ( SPI_KEY_PRESSED |
+                                                           SPI_KEY_RELEASED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
+
+  fprintf (stderr, "Mod2-Keypad key registry: result %s\n", retval ? "succeeded" : 
+       "failed");
+
+  retval = SPI_registerAccessibleKeystrokeListener(keypad_key_listener,
+                                         keypad_keyset,
+                                         SPI_KEYMASK_MOD3,
+                                         (unsigned long) ( SPI_KEY_PRESSED |
+                                                           SPI_KEY_RELEASED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
+
+  fprintf (stderr, "Mod3-Keypad key registry: result %s\n", retval ? "succeeded" : 
+       "failed");
+
+  retval = SPI_registerAccessibleKeystrokeListener(keypad_key_listener,
+                                         keypad_keyset,
+                                         SPI_KEYMASK_MOD2 | SPI_KEYMASK_SHIFT,
+                                         (unsigned long) ( SPI_KEY_PRESSED |
+                                                           SPI_KEY_RELEASED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
+
+  fprintf (stderr, "Mod2-Shift-Keypad key registry: result %s\n", retval ? "succeeded" : 
+       "failed");
+
+  retval = SPI_registerAccessibleKeystrokeListener(keypad_key_listener,
+                                         keypad_keyset,
+                                         SPI_KEYMASK_MOD3 | SPI_KEYMASK_SHIFT,
+                                         (unsigned long) ( SPI_KEY_PRESSED |
+                                                           SPI_KEY_RELEASED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
+
+  fprintf (stderr, "Mod3-Shift-Keypad key registry: result %s\n", retval ? "succeeded" : 
+       "failed");
+
+  SPI_event_main ();
+
+  putenv ("AT_BRIDGE_SHUTDOWN=1");
+
+  return SPI_exit ();
+}
+
+static Display*
+get_display (void)
+{
+       return GDK_DISPLAY ();
+}
+
+static short*
+get_keypad_keycodes (void)
+{
+       short *keycodes = (short *) g_new0 (short *, 16);
+       int i;
+
+       keycodes [0] = XKeysymToKeycode (get_display (), XK_KP_0);
+       keycodes [1] = XKeysymToKeycode (get_display (), XK_KP_1);
+       keycodes [2] = XKeysymToKeycode (get_display (), XK_KP_2);
+       keycodes [3] = XKeysymToKeycode (get_display (), XK_KP_3);
+       keycodes [4] = XKeysymToKeycode (get_display (), XK_KP_4);
+       keycodes [5] = XKeysymToKeycode (get_display (), XK_KP_5);
+       keycodes [6] = XKeysymToKeycode (get_display (), XK_KP_6);
+       keycodes [7] = XKeysymToKeycode (get_display (), XK_KP_7);
+       keycodes [8] = XKeysymToKeycode (get_display (), XK_KP_8);
+       keycodes [9] = XKeysymToKeycode (get_display (), XK_KP_9);
+       keycodes [10] = XKeysymToKeycode (get_display (), XK_KP_Divide);
+       keycodes [11] = XKeysymToKeycode (get_display (), XK_KP_Multiply);
+       keycodes [12] = XKeysymToKeycode (get_display (), XK_KP_Add);
+       keycodes [13] = XKeysymToKeycode (get_display (), XK_KP_Subtract);
+       keycodes [14] = XKeysymToKeycode (get_display (), XK_KP_Decimal);
+       keycodes [15] = XKeysymToKeycode (get_display (), XK_KP_Enter);
+
+       for (i = 0; i < 16; ++i)
+       {
+               fprintf (stderr, "keycode[%d] = %d\n", i, (int) keycodes[i]);
+       }
+       return keycodes;
+}
+
+static void
+print_key_event (const AccessibleKeystroke *key, char *prefix)
+{
+  fprintf (stderr, "%s KeyEvent %s%c [keysym 0x%x] (keycode %d); string=%s; time=%lx\n",
+          prefix,
+         (key->modifiers & SPI_KEYMASK_ALT)?"Alt-":"",
+         ((key->modifiers & SPI_KEYMASK_SHIFT)^(key->modifiers & SPI_KEYMASK_SHIFTLOCK))?
+         (char) toupper((int) key->keyID) : (char) tolower((int) key->keyID),
+          key->keyID,
+         (int) key->keycode,
+         key->keystring,
+         (long int) key->timestamp);   
+}
+
+static SPIBoolean
+report_keypad_key_event (const AccessibleKeystroke *key, void *user_data)
+{
+  print_key_event (key, "keypad");
+  return FALSE;
+}
+
+