Merge upstream branch 2.31.1 into branch origin/tizen
[platform/upstream/at-spi2-core.git] / atspi / atspi-registry.c
index 116da19..07af2c5 100644 (file)
@@ -83,7 +83,8 @@ atspi_get_desktop (gint i)
  * this implementation always returns a #Garray with a single
  * #AtspiAccessible desktop.
  *
- * Returns: (transfer full): a #GArray of desktops.
+ * Returns: (element-type AtspiAccessible*) (transfer full): a #GArray of
+ * desktops.
  **/
 GArray *
 atspi_get_desktop_list ()
@@ -197,7 +198,8 @@ atspi_register_keystroke_listener (AtspiDeviceListener  *listener,
                                         GArray             *key_set,
                                         AtspiKeyMaskType         modmask,
                                         AtspiKeyEventMask        event_types,
-                                        gint sync_type, GError **error)
+                                        AtspiKeyListenerSyncType sync_type,
+                                         GError **error)
 {
   DeviceListenerEntry *e;
 
@@ -268,7 +270,7 @@ atspi_deregister_keystroke_listener (AtspiDeviceListener *listener,
                                      GError             **error)
 {
   GArray *d_key_set;
-  gchar *path = _atspi_device_listener_get_path (listener);
+  gchar *path;
   gint i;
   dbus_uint32_t d_modmask = modmask;
   dbus_uint32_t d_event_types = event_types;
@@ -280,6 +282,7 @@ atspi_deregister_keystroke_listener (AtspiDeviceListener *listener,
     {
       return FALSE;
     }
+  path = _atspi_device_listener_get_path (listener);
 
   /* copy the keyval filter values from the C api into the DBind KeySet */
   if (key_set)
@@ -347,7 +350,7 @@ atspi_deregister_keystroke_listener (AtspiDeviceListener *listener,
  *             the events.
  * @event_types: an #AtspiDeviceEventMask mask indicating which
  *             types of key events are requested (%ATSPI_KEY_PRESSED, etc.).
- * @filter: Unused parameter.
+ * @filter: (allow-none): Unused parameter.
  * @error: (allow-none): a pointer to a %NULL #GError pointer, or %NULL
  *             
  * Registers a listener for device events, for instance button events.
@@ -361,7 +364,7 @@ atspi_register_device_event_listener (AtspiDeviceListener  *listener,
 {
   gboolean                          retval = FALSE;
   dbus_uint32_t d_event_types = event_types;
-  gchar *path = _atspi_device_listener_get_path (listener);
+  gchar *path;
   DBusError d_error;
 
   dbus_error_init (&d_error);
@@ -369,6 +372,7 @@ atspi_register_device_event_listener (AtspiDeviceListener  *listener,
     {
       return retval;
     }
+  path = _atspi_device_listener_get_path (listener);
 
     dbind_method_call_reentrant (_atspi_bus(), atspi_bus_registry, atspi_path_dec, atspi_interface_dec, "RegisterDeviceEventListener", &d_error, "ou=>b", path, d_event_types, &retval);
     if (dbus_error_is_set (&d_error))
@@ -385,7 +389,7 @@ atspi_register_device_event_listener (AtspiDeviceListener  *listener,
  * atspi_deregister_device_event_listener:
  * @listener: a pointer to the #AtspiDeviceListener for which
  *            device events are requested.
- * @filter: Unused parameter.
+ * @filter: (allow-none): Unused parameter.
  * @error: (allow-none): a pointer to a %NULL #GError pointer, or %NULL
  *
  * Removes a device event listener from the registry's listener queue,
@@ -398,7 +402,7 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener,
                                   void                     *filter, GError **error)
 {
   dbus_uint32_t event_types = 0;
-  gchar *path = _atspi_device_listener_get_path (listener);
+  gchar *path;
   DBusError d_error;
 
   dbus_error_init (&d_error);
@@ -407,6 +411,7 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener,
     {
       return FALSE;
     }
+  path = _atspi_device_listener_get_path (listener);
 
   event_types |= (1 << ATSPI_BUTTON_PRESSED_EVENT);
   event_types |= (1 << ATSPI_BUTTON_RELEASED_EVENT);
@@ -424,8 +429,8 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener,
 
 /**
  * atspi_generate_keyboard_event:
- * @keyval: a #gint indicating the keycode or keysym of the key event
- *           being synthesized.
+ * @keyval: a #gint indicating the keycode or keysym or modifier mask of the
+ *           key event being synthesized.
  * @keystring: (allow-none): an (optional) UTF-8 string which, if
  *           @synth_type is %ATSPI_KEY_STRING, indicates a 'composed'
  *           keyboard input string being synthesized; this type of
@@ -434,7 +439,8 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener,
  *           input method (such as XIM) were used.
  * @synth_type: an #AtspiKeySynthType flag indicating whether @keyval
  *           is to be interpreted as a keysym rather than a keycode
- *           (%ATSPI_KEY_SYM) or a string (%ATSPI_KEY_STRING), or
+ *           (%ATSPI_KEY_SYM) or a string (%ATSPI_KEY_STRING) or a modifier
+ *           mask (%ATSPI_KEY_LOCKMODIFIERS and %ATSPI_KEY_UNLOCKMODIFIERS), or
  *           whether to synthesize %ATSPI_KEY_PRESS,
  *           %ATSPI_KEY_RELEASE, or both (%ATSPI_KEY_PRESSRELEASE).
  * @error: (allow-none): a pointer to a %NULL #GError pointer, or %NULL