Documentation fixes, and a small tweak to simple-at.
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 11 Jan 2002 00:39:39 +0000 (00:39 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 11 Jan 2002 00:39:39 +0000 (00:39 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@209 e2bd861d-eb25-0410-b326-f6ed22b6b98c

cspi/spi-roletypes.h
cspi/spi_accessible.c
cspi/spi_registry.c
docs/reference/cspi/at-spi-cspi-sections.txt
docs/reference/cspi/tmpl/spi_registry.sgml
test/simple-at.c

index 1bd7664..3cbd182 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 /**
  * AccessibleRole:
  * @SPI_ROLE_INVALID: role is not legal, something is wrong with this object
- * @SPI_ROLE_ACCELERATOR_LABEL: object is a label indicating keyboard
+ * @SPI_ROLE_ACCEL_LABEL: object is a label indicating keyboard
  *                              accelerators for the parent
  * @SPI_ROLE_ALERT: Object is used to alert the user about something
  * @SPI_ROLE_ANIMATION: Object contains a dynamic or moving image
@@ -70,6 +70,8 @@ extern "C" {
  *        the application to do something.
  * @SPI_ROLE_RADIO_BUTTON: A specialized check box that will cause other radio buttons in the
  *        same group to become uncghecked when this one is checked.
+ * @SPI_RADIO_MENU_ITEM: A specialized menu item that behaves like a 
+ *        radio button.
  * @SPI_ROLE_ROOT_PANE: A specialized pane that has a glass pane and a layered pane as its
  *        children.
  * @SPI_ROLE_ROW_HEADER: The header for a row of data
@@ -117,6 +119,7 @@ typedef enum
   SPI_ROLE_CALENDAR,
   SPI_ROLE_CANVAS,
   SPI_ROLE_CHECK_BOX,
+  SPI_ROLE_CHECK_MENU_ITEM,
   SPI_ROLE_COLOR_CHOOSER,
   SPI_ROLE_COLUMN_HEADER,
   SPI_ROLE_COMBO_BOX,
index ead5870..a89a36e 100644 (file)
@@ -91,6 +91,7 @@ cspi_init_role_table (AccessibleRole *role_table)
   role_table [Accessibility_ROLE_CALENDAR] = SPI_ROLE_CALENDAR;
   role_table [Accessibility_ROLE_CANVAS] = SPI_ROLE_CANVAS;
   role_table [Accessibility_ROLE_CHECK_BOX] = SPI_ROLE_CHECK_BOX;
+  role_table [Accessibility_ROLE_CHECK_MENU_ITEM] = SPI_ROLE_CHECK_MENU_ITEM;
   role_table [Accessibility_ROLE_COLOR_CHOOSER] = SPI_ROLE_COLOR_CHOOSER;
   role_table [Accessibility_ROLE_COLUMN_HEADER] = SPI_ROLE_COLUMN_HEADER;
   role_table [Accessibility_ROLE_COMBO_BOX] = SPI_ROLE_COMBO_BOX;
index 287bc0e..1b2049e 100644 (file)
@@ -458,6 +458,11 @@ SPI_deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener
  * SPI_generateKeyboardEvent:
  * @keyval: a long integer indicating the keycode or keysym of the key event
  *           being synthesized.
+ * @keystring: an (optional) UTF-8 string which, if @keyval is NULL,
+ *           indicates a 'composed' keyboard input string which is 
+ *           being synthesized; this type of keyboard event synthesis does
+ *           not emulate hardware keypresses but injects the string 
+ *           as though a composing input method (such as XIM) were used.
  * @synth_type: a #AccessibleKeySynthType flag indicating whether @keyval
  *           is to be interpreted as a keysym rather than a keycode
  *           (CSPI_KEYSYM), or whether to synthesize
index 14300de..6ce8cd5 100644 (file)
@@ -17,7 +17,6 @@ SPI_freeString
 AccessibleEvent
 AccessibleEventListenerCB
 SPI_createAccessibleEventListener
-AccessibleEventListener_ref
 AccessibleEventListener_unref
 AccessibleEventListener_addCallback
 AccessibleEventListener_removeCallback
@@ -47,7 +46,7 @@ AccessibleKeystrokeListener_ref
 AccessibleKeystrokeListener_unref
 AccessibleKeystrokeListener_removeCallback
 AccessibleKeystrokeListener_addCallback
-SPI_generateKeyEvent
+SPI_generateKeyboardEvent
 SPI_generateMouseEvent
 </SECTION>
 
index e00a45f..09ab7cd 100644 (file)
@@ -190,6 +190,17 @@ Registry queries
 @Returns: 
 
 
+<!-- ##### FUNCTION SPI_generateKeyboardEvent ##### -->
+<para>
+
+</para>
+
+@keyval: 
+@keystring: 
+@synth_type: 
+@Returns: 
+
+
 <!-- ##### FUNCTION SPI_generateMouseEvent ##### -->
 <para>
 
index 8b2c94a..2b1e846 100644 (file)
@@ -50,7 +50,6 @@ static AccessibleEventListener *generic_listener;
 static AccessibleEventListener *button_listener;
 static AccessibleKeystrokeListener *command_key_listener;
 static AccessibleKeystrokeListener *ordinary_key_listener;
-static AccessibleKeySet *spacebar_key_set;
 
 int
 main (int argc, char **argv)
@@ -122,24 +121,21 @@ main (int argc, char **argv)
                                          SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL,
                                          (unsigned long) ( SPI_KEY_PRESSED ),
                                          SPI_KEYLISTENER_ALL_WINDOWS);
+
+  /* will listen only to CAPSLOCK-Alt-key combinations, and only to KeyPress events */
+  SPI_registerAccessibleKeystrokeListener(command_key_listener,
+                                         (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
+                                         SPI_KEYMASK_ALT | SPI_KEYMASK_SHIFTLOCK,
+                                         (unsigned long) ( SPI_KEY_PRESSED ),
+                                         SPI_KEYLISTENER_ALL_WINDOWS);
   
-  /* will listen only to shifted key events, both press and release */
+  /* will listen only to CAPSLOCK key events, both press and release */
   SPI_registerAccessibleKeystrokeListener(ordinary_key_listener,
                                          (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
-                                         SPI_KEYMASK_SHIFT,
+                                         SPI_KEYMASK_SHIFTLOCK,
                                          (unsigned long) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
                                          SPI_KEYLISTENER_NOSYNC);
 
-  spacebar_key_set = SPI_createAccessibleKeySet (1, " ", NULL, NULL);
-  
-  /* will listen only to shift-spacebar events, on release, globally */
-  SPI_registerAccessibleKeystrokeListener(command_key_listener,
-                                         spacebar_key_set,
-                                         SPI_KEYMASK_SHIFT,
-                                         (unsigned long) ( SPI_KEY_RELEASED ),
-                                         SPI_KEYLISTENER_ALL_WINDOWS);
-
-  
   get_environment_vars ();
 
   SPI_event_main ();
@@ -322,15 +318,14 @@ simple_at_exit ()
   SPI_deregisterGlobalEventListenerAll (button_listener);
   AccessibleEventListener_unref        (button_listener);
 
-  SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT);
+  SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL);
+  SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT | SPI_KEYMASK_SHIFTLOCK);
   AccessibleKeystrokeListener_unref         (command_key_listener);
 
   SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_UNMODIFIED);
-  SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_SHIFT);
+  SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_SHIFTLOCK);
   AccessibleKeystrokeListener_unref         (ordinary_key_listener);
 
-  SPI_freeAccessibleKeySet (spacebar_key_set);
-  
   SPI_event_quit ();
 }