-2002-01-11 Bill Haneman <bill.haneman@sun.com>
+2002-01-16 Bill Haneman <bill.haneman@sun.com>
+
+ * test/test-simple.c:
+ Changed key listeners test - the test was slightly mis-using the
+ (admittedly poorly documented) SPI_generateKeyboardEvent API.
+ It now uses '=' as the key event listened to and generated,
+ relying on a keysym match rather than assuming that keycode 33
+ is always equal to keysym '!'.
+
+2002-01-15 Bill Haneman <bill.haneman@sun.com>
* test/simple-at.c:
Changed simple-at to use a specific keyset, rather than
unsetenv GTK_MODULES
setenv MAGNIFIER 1
setenv FESTIVAL 1
+# start the text-to-speech service
festival_server &
+
+# start the simple AT client, which uses the
+# MAGNIFIER and FESTIVAL environment variables
simple-at &
+
+# now set GTK_MODULES for use by GTK+ applications
+# this will cause the gail accessibility support,
+# the ferret test tool, and the atk-bridge to be
+# loaded
+
setenv GTK_MODULES "gail:ferret:atk-bridge"
+
gtk-demo
+
+# these might be out of place, if gtk-demo backgrounds
+# itself
+
pkill festival_server
pkill festival
pkill sleep
text_interface = Accessible_getText (obj);
first_sentence = AccessibleText_getTextAtOffset (
text_interface, (long) 0, SPI_TEXT_BOUNDARY_SENTENCE_START, &start_offset, &end_offset);
- if (first_sentence)
+ if (first_sentence && use_festival)
{
_festival_say(first_sentence, "voice_don_diphone", FALSE);
SPI_freeString (first_sentence);
int i;
AccessibleKeystroke stroke;
AccessibleKeystrokeListener *key_listener;
+ AccessibleKeySet *test_keyset;
fprintf (stderr, "Testing keyboard listeners ...\n");
key_listener = SPI_createAccessibleKeystrokeListener (
key_listener_cb, &stroke);
+ test_keyset = SPI_createAccessibleKeySet (1, "=", NULL, NULL);
+
g_assert (SPI_registerAccessibleKeystrokeListener (
key_listener,
- SPI_KEYSET_ALL_KEYS,
+ test_keyset,
0,
SPI_KEY_PRESSED | SPI_KEY_RELEASED,
SPI_KEYLISTENER_CANCONSUME | SPI_KEYLISTENER_ALL_WINDOWS));
for (i = 0; i < 3; i++) {
memset (&stroke, 0, sizeof (AccessibleKeystroke));
- g_assert (SPI_generateKeyboardEvent (33, "!", SPI_KEY_PRESSRELEASE));
+ g_assert (SPI_generateKeyboardEvent ('=', NULL, SPI_KEY_SYM));
while (stroke.type == 0)
g_main_iteration (TRUE);
}
g_assert (SPI_deregisterAccessibleKeystrokeListener (key_listener, 0));
+ SPI_freeAccessibleKeySet (test_keyset);
/* FIXME: expand the validation here */
g_assert (stroke.type == SPI_KEY_PRESSRELEASE);