[at-spi2-core] Add atspi_set_timeout
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Add atspi_set_timeout
- Date: Fri, 6 Apr 2012 15:56:48 +0000 (UTC)
commit 37171ce568201a2942e543c3f6af6db4da5cb194
Author: Mike Gorse <mgorse suse com>
Date: Fri Apr 6 10:59:53 2012 -0500
Add atspi_set_timeout
atspi/atspi-misc.c | 20 ++++++++++++++++++++
atspi/atspi-misc.h | 3 +++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 26e1f3a..0b60fb6 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -1436,3 +1436,23 @@ atspi_get_a11y_bus (void)
return bus;
}
+
+/**
+ * Set the timeout used for method calls. If this is not set explicitly,
+ * a default of 0.8 ms is used.
+ * Note that at-spi2-registryd currently uses a timeout of 3 seconds when
+ * sending a keyboard event notification. This means that, if an AT makes
+ * a call in response to the keyboard notification and the application
+ * being called does not respond before the timeout is reached,
+ * at-spi2-registryd will time out on the keyboard event notification and
+ * pass the key onto the application (ie, reply to indicate that the key
+ * was not consumed), so this may make it undesirable to set a timeout
+ * larger than 3 seconds.
+ *
+ * @val: The timeout value, in milliseconds, or -1 to disable the timeout.
+ */
+void
+atspi_set_timeout (gint val)
+{
+ dbind_set_timeout (val);
+}
diff --git a/atspi/atspi-misc.h b/atspi/atspi-misc.h
index 0d84ad6..2d3b3f4 100644
--- a/atspi/atspi-misc.h
+++ b/atspi/atspi-misc.h
@@ -36,4 +36,7 @@ int atspi_exit ();
DBusConnection *
atspi_get_a11y_bus ();
+
+void
+atspi_set_timeout (gint val);
#endif /* _ATSPI_MISC_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]