Added is_text member to Accessibility_DeviceEvent and AccessibleKeystroke,
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 18 Dec 2001 11:24:57 +0000 (11:24 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 18 Dec 2001 11:24:57 +0000 (11:24 +0000)
to indicate whether the event's 'event_string' or 'keystring' member is
the name of a keysym, or a composed string.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@189 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
at-bridge/bridge.c
atk-bridge/bridge.c
cspi/spi-listener.h
idl/Accessibility_Registry.idl
registryd/deviceeventcontroller.c

index 381989f..527aff5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2001-12-17  Bill Haneman <bill.haneman@sun.com>
 
+       * idl/Accessibility_Registry.idl:
+       Added boolean member 'is_text' to DeviceEvent.  This is for the
+       use of key events, and helps prevent ambiguity between composed
+       key strings and keysym names, since both may potentially be
+       returned in the 'event_string' member.
+
+       * at-bridge/bridge.c:
+       * registryd/deviceeventcontroller.c:
+       Use the 'is_text' member when notifying device event listeners.
+       Knon issue: composed characters are not dealt with correctly by
+       the global key listener implementation yet.
+       
+2001-12-17  Bill Haneman <bill.haneman@sun.com>
+
        * at-bridge/bridge.c:
        Namespaced local static methods to spi_atk_bridge_* where
        previously named bridge_*, and spi_* elsewhere.
index d506e33..bb9818b 100644 (file)
@@ -352,10 +352,12 @@ spi_init_keystroke_from_atk_key_event (Accessibility_DeviceEvent  *keystroke,
   if (event->string)
     {
       keystroke->event_string = CORBA_string_dup (event->string);
+      keystroke->is_text = CORBA_TRUE;
     }
   else
     {
       keystroke->event_string = CORBA_string_dup ("");
+      keystroke->is_text = CORBA_FALSE;
     }
   switch (event->type)
     {
index d506e33..bb9818b 100644 (file)
@@ -352,10 +352,12 @@ spi_init_keystroke_from_atk_key_event (Accessibility_DeviceEvent  *keystroke,
   if (event->string)
     {
       keystroke->event_string = CORBA_string_dup (event->string);
+      keystroke->is_text = CORBA_TRUE;
     }
   else
     {
       keystroke->event_string = CORBA_string_dup ("");
+      keystroke->is_text = CORBA_FALSE;
     }
   switch (event->type)
     {
index 427473a..61fa35c 100644 (file)
@@ -30,6 +30,7 @@ typedef struct {
   long                   timestamp;
   AccessibleKeyEventType type;
   unsigned short         modifiers;
+  SPIBoolean             is_text;      
 } AccessibleKeystroke;
 
 /*
index 765979d..95bc6fb 100644 (file)
@@ -183,6 +183,7 @@ module Accessibility {
     unsigned short modifiers;
     unsigned long timestamp;
     string event_string;
+    boolean is_text;
   };
 
   typedef sequence< long > KeySet;
index 9d34a2a..2ccff17 100644 (file)
@@ -453,7 +453,7 @@ spi_keystroke_from_x_key_event (XKeyEvent *x_key_event)
       key_event.type = Accessibility_KEY_RELEASED;
     } 
   key_event.modifiers = (CORBA_unsigned_short)(x_key_event->state);
-
+  key_event.is_text = CORBA_FALSE;
   switch (keysym)
     {
       case ' ':
@@ -472,6 +472,10 @@ spi_keystroke_from_x_key_event (XKeyEvent *x_key_event)
         if (XLookupString (x_key_event, cbuf, cbuf_bytes, &keysym, NULL) > 0)
           {
             key_event.event_string = CORBA_string_dup (cbuf);
+           if (isgraph (keysym))
+             {
+               key_event.is_text = CORBA_TRUE; /* FIXME: incorrect for some composed chars? */
+             }
           }
         else
           {