From 94ee74d18fab7a8225e2ea48b036cab3487ffb75 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 25 Aug 2018 21:38:43 +0200 Subject: [PATCH] New upstream version 2.29.1 --- atspi/atspi-component.c | 57 ++++++ atspi/atspi-component.h | 4 + atspi/atspi-constants.h | 46 ++++- atspi/atspi-gmain.c | 18 +- atspi/meson.build | 3 +- bus/at-spi-bus-launcher.c | 229 +++++++++++++++++++------ bus/meson.build | 32 +++- dbind/dbtest.c | 8 +- doc/libatspi/libatspi-sections.txt | 4 + doc/libatspi/tmpl/atspi-constants.sgml | 21 +++ idl/component.didl | 41 ++++- meson.build | 2 +- meson_options.txt | 9 + registryd/deviceeventcontroller-x11.c | 16 +- registryd/reentrant-list.c | 2 +- xml/Component.xml | 10 ++ 16 files changed, 418 insertions(+), 84 deletions(-) diff --git a/atspi/atspi-component.c b/atspi/atspi-component.c index 0ab552b..ed22582 100644 --- a/atspi/atspi-component.c +++ b/atspi/atspi-component.c @@ -412,6 +412,63 @@ atspi_component_set_size (AtspiComponent *obj, return ret; } +/** + * atspi_component_scroll_to: + * @obj: a pointer to the #AtspiComponent object on which to operate. + * @type: a #AtspiScrollType indicating where the object should be placed on the + * screen. + * + * Scrolls whatever container of the #AtspiComponent object so it becomes + * visible on the screen. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_component_scroll_to (AtspiComponent *obj, + AtspiScrollType type, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_component, + "ScrollTo", error, "u=>b", type, &retval); + + return retval; +} + +/** + * atspi_component_scroll_to_point: + * @obj: a pointer to the #AtspiComponent object on which to operate. + * @coords: a #AtspiCoordType indicating whether the coordinates are relative to + * the screen, to the window, or to the parent object. + * @x: the x coordinate of the point to reach + * @y: the y coordinate of the point to reach + * @error: return location for a #GError + * + * Scrolls whatever container of the #AtspiComponent object so it becomes + * visible on the screen at a given position. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_component_scroll_to_point (AtspiComponent *obj, + AtspiCoordType coords, + gint x, + gint y, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_component, + "ScrollToPoint", error, "uii=>b", coords, x, y, &retval); + + return retval; +} + static void atspi_component_base_init (AtspiComponent *klass) { diff --git a/atspi/atspi-component.h b/atspi/atspi-component.h index dd3455a..c84232d 100644 --- a/atspi/atspi-component.h +++ b/atspi/atspi-component.h @@ -107,6 +107,10 @@ gboolean atspi_component_set_position (AtspiComponent *obj, gint x, gint y, Atsp gboolean atspi_component_set_size (AtspiComponent *obj, gint width, gint height, GError **error); +gboolean atspi_component_scroll_to (AtspiComponent *obj, AtspiScrollType type, GError **error); + +gboolean atspi_component_scroll_to_point (AtspiComponent *obj, AtspiCoordType coords, gint x, gint y, GError **error); + G_END_DECLS #endif /* _ATSPI_COMPONENT_H_ */ diff --git a/atspi/atspi-constants.h b/atspi/atspi-constants.h index 1604f59..6fc7ce0 100644 --- a/atspi/atspi-constants.h +++ b/atspi/atspi-constants.h @@ -53,6 +53,8 @@ Accessibility::StateType\n Accessibility::Event\n Accessibility::EventDetails \n + Accessibility::ScrollType \n + Accessibility::CoordType \n \section Registry Accessibility also includes Accessibility::Registry, @@ -124,8 +126,10 @@ typedef enum { /** * AtspiCoordType: * @ATSPI_COORD_TYPE_SCREEN: Specifies xy coordinates relative to the screen. - * @ATSPI_COORD_TYPE_WINDOW: Specifies xy coordinates relative to the widget's + * @ATSPI_COORD_TYPE_WINDOW: Specifies xy coordinates relative to the widget's * top-level window. + * @ATSPI_COORD_TYPE_PARENT: Specifies xy coordinates relative to the widget's + * immediate parent. * * Enumeration used by #AtspiComponent, #AtspiImage, and #AtspiText interfaces * to specify whether coordinates are relative to the window or the screen. @@ -134,6 +138,7 @@ typedef enum { typedef enum { ATSPI_COORD_TYPE_SCREEN, ATSPI_COORD_TYPE_WINDOW, + ATSPI_COORD_TYPE_PARENT, } AtspiCoordType; /** @@ -141,7 +146,7 @@ typedef enum { * * One higher than the highest valid value of #AtspiCoordType. **/ -#define ATSPI_COORD_TYPE_COUNT (1+1) +#define ATSPI_COORD_TYPE_COUNT (2+1) /** * AtspiCollectionSortOrder: @@ -1383,6 +1388,43 @@ typedef enum ATSPI_CACHE_UNDEFINED = 0x40000000, } AtspiCache; +/** + * AtspiScrollType: + * @ATSPI_SCROLL_TOP_LEFT: Scroll the object to the top left corner of the + * window. + * @ATSPI_SCROLL_BOTTOM_RIGHT: Scroll the object to the bottom right corner of + * the window. + * @ATSPI_SCROLL_TOP_EDGE: Scroll the object to the top edge of the window. + * @ATSPI_SCROLL_BOTTOM_EDGE: Scroll the object to the bottom edge of the + * window. + * @ATSPI_SCROLL_LEFT_EDGE: Scroll the object to the left edge of the + * window. + * @ATSPI_SCROLL_RIGHT_EDGE: Scroll the object to the right edge of the + * window. + * @ATSPI_SCROLL_ANYWHERE: Scroll the object to application-dependent position + * on the window. + * + * Enumeration used by interface #AtspiAccessible to specify where an + * #AtspiAccessible object should be placed on the screen when using scroll_to. + * + */ +typedef enum { + ATSPI_SCROLL_TOP_LEFT, + ATSPI_SCROLL_BOTTOM_RIGHT, + ATSPI_SCROLL_TOP_EDGE, + ATSPI_SCROLL_BOTTOM_EDGE, + ATSPI_SCROLL_LEFT_EDGE, + ATSPI_SCROLL_RIGHT_EDGE, + ATSPI_SCROLL_ANYWHERE +} AtspiScrollType; + +/** + * ATSPI_SCROLLTYPE_COUNT: + * + * One higher than the highest valid value of #AtspiScrollType. + */ +#define ATSPI_SCROLLTYPE_COUNT (6+1) + #define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry" #define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry" #define ATSPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry" diff --git a/atspi/atspi-gmain.c b/atspi/atspi-gmain.c index 3ab985b..588a60d 100644 --- a/atspi/atspi-gmain.c +++ b/atspi/atspi-gmain.c @@ -33,7 +33,7 @@ #define _(x) dgettext (GETTEXT_PACKAGE, x) #define N_(x) x -/** +/* * DBusGMessageQueue: * A GSource subclass for dispatching DBusConnection messages. * We need this on top of the IO handlers, because sometimes @@ -41,8 +41,8 @@ */ typedef struct { - GSource source; /**< the parent GSource */ - DBusConnection *connection; /**< the connection to dispatch */ + GSource source; /* the parent GSource */ + DBusConnection *connection; /* the connection to dispatch */ } DBusGMessageQueue; static gboolean message_queue_prepare (GSource *source, @@ -95,11 +95,11 @@ message_queue_dispatch (GSource *source, typedef struct { - GMainContext *context; /**< the main context */ - GSList *ios; /**< all IOHandler */ - GSList *timeouts; /**< all TimeoutHandler */ - DBusConnection *connection; /**< NULL if this is really for a server not a connection */ - GSource *message_queue_source; /**< DBusGMessageQueue */ + GMainContext *context; /* the main context */ + GSList *ios; /* all IOHandler */ + GSList *timeouts; /* all TimeoutHandler */ + DBusConnection *connection; /* NULL if this is really for a server not a connection */ + GSource *message_queue_source; /* DBusGMessageQueue */ } ConnectionSetup; @@ -510,7 +510,7 @@ connection_setup_new_from_old (GMainContext *context, return cs; } -/** @} */ /* End of GLib bindings internals */ +/* @} */ /* End of GLib bindings internals */ /** * atspi_dbus_connection_setup_with_g_main: (skip) diff --git a/atspi/meson.build b/atspi/meson.build index 17bfc45..1f8d021 100644 --- a/atspi/meson.build +++ b/atspi/meson.build @@ -90,7 +90,8 @@ if have_gir gir_extra_args = [ '--c-include=atspi/atspi.h', - '--pkg-export=atspi-2' + '--pkg-export=atspi-2', + '--quiet', ] gir_dir = join_paths(atspi_datadir, 'gir-1.0') diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index eb2b8e3..5d58dff 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -2,7 +2,7 @@ * * at-spi-bus-launcher: Manage the a11y bus as a child process * - * Copyright 2011 Red Hat, Inc. + * Copyright 2011-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -25,6 +25,11 @@ #include #include #include +#ifdef __linux +#include +#include +#include +#endif #include #include #include @@ -50,6 +55,7 @@ typedef struct { GDBusConnection *session_bus; GSettings *a11y_schema; GSettings *interface_schema; + int name_owner_id; GDBusProxy *client_proxy; @@ -58,6 +64,7 @@ typedef struct { int a11y_bus_pid; char *a11y_bus_address; int pipefd[2]; + int listenfd; char *a11y_launch_error_message; } A11yBusLauncher; @@ -215,23 +222,6 @@ name_appeared_handler (GDBusConnection *connection, register_client (app); } -static void -setup_bus_child (gpointer data) -{ - A11yBusLauncher *app = data; - (void) app; - - close (app->pipefd[0]); - dup2 (app->pipefd[1], 3); - close (app->pipefd[1]); - - /* On Linux, tell the bus process to exit if this process goes away */ -#ifdef __linux -#include - prctl (PR_SET_PDEATHSIG, 15); -#endif -} - /** * unix_read_all_fd_to_string: * @@ -276,24 +266,30 @@ on_bus_exited (GPid pid, g_main_loop_quit (app->loop); } +#ifdef DBUS_DAEMON +static void +setup_bus_child_daemon (gpointer data) +{ + A11yBusLauncher *app = data; + (void) app; + + close (app->pipefd[0]); + dup2 (app->pipefd[1], 3); + close (app->pipefd[1]); + + /* On Linux, tell the bus process to exit if this process goes away */ +#ifdef __linux + prctl (PR_SET_PDEATHSIG, 15); +#endif +} + static gboolean -ensure_a11y_bus (A11yBusLauncher *app) +ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) { + char *argv[] = { DBUS_DAEMON, config_path, "--nofork", "--print-address", "3", NULL }; GPid pid; - char *argv[] = { DBUS_DAEMON, NULL, "--nofork", "--print-address", "3", NULL }; char addr_buf[2048]; GError *error = NULL; - const char *config_path = NULL; - - if (app->a11y_bus_pid != 0) - return FALSE; - - if (g_file_test (SYSCONFDIR"/at-spi2/accessibility.conf", G_FILE_TEST_EXISTS)) - config_path = "--config-file="SYSCONFDIR"/at-spi2/accessibility.conf"; - else - config_path = "--config-file="DATADIR"/defaults/at-spi2/accessibility.conf"; - - argv[1] = config_path; if (pipe (app->pipefd) < 0) g_error ("Failed to create pipe: %s", strerror (errno)); @@ -302,7 +298,7 @@ ensure_a11y_bus (A11yBusLauncher *app) argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, - setup_bus_child, + setup_bus_child_daemon, app, &pid, &error)) @@ -335,6 +331,136 @@ ensure_a11y_bus (A11yBusLauncher *app) app->a11y_bus_address = g_strchomp (g_strdup (addr_buf)); g_debug ("a11y bus address: %s", app->a11y_bus_address); + return TRUE; + +error: + close (app->pipefd[0]); + close (app->pipefd[1]); + app->state = A11Y_BUS_STATE_ERROR; + + return FALSE; +} +#else +static gboolean +ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) +{ + return FALSE; +} +#endif + +#ifdef DBUS_BROKER +static void +setup_bus_child_broker (gpointer data) +{ + A11yBusLauncher *app = data; + gchar *pid_str; + (void) app; + + dup2 (app->listenfd, 3); + close (app->listenfd); + g_setenv("LISTEN_FDS", "1", TRUE); + + pid_str = g_strdup_printf("%u", getpid()); + g_setenv("LISTEN_PID", pid_str, TRUE); + g_free(pid_str); + + /* Tell the bus process to exit if this process goes away */ + prctl (PR_SET_PDEATHSIG, SIGTERM); +} + +static gboolean +ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path) +{ + char *argv[] = { DBUS_BROKER, config_path, "--scope", "user", NULL }; + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + socklen_t addr_len = sizeof(addr); + GPid pid; + GError *error = NULL; + + if ((app->listenfd = socket (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) < 0) + g_error ("Failed to create listening socket: %s", strerror (errno)); + + if (bind (app->listenfd, (struct sockaddr *)&addr, sizeof(sa_family_t)) < 0) + g_error ("Failed to bind listening socket: %s", strerror (errno)); + + if (getsockname (app->listenfd, (struct sockaddr *)&addr, &addr_len) < 0) + g_error ("Failed to get socket name for listening socket: %s", strerror(errno)); + + if (listen (app->listenfd, 1024) < 0) + g_error ("Failed to listen on socket: %s", strerror(errno)); + + if (!g_spawn_async (NULL, + argv, + NULL, + G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, + setup_bus_child_broker, + app, + &pid, + &error)) + { + app->a11y_bus_pid = -1; + app->a11y_launch_error_message = g_strdup (error->message); + g_clear_error (&error); + goto error; + } + + close (app->listenfd); + app->listenfd = -1; + + g_child_watch_add (pid, on_bus_exited, app); + app->a11y_bus_pid = pid; + g_debug ("Launched a11y bus, child is %ld", (long) pid); + app->state = A11Y_BUS_STATE_RUNNING; + + app->a11y_bus_address = g_strconcat("unix:abstract=", addr.sun_path + 1, NULL); + g_debug ("a11y bus address: %s", app->a11y_bus_address); + + return TRUE; + +error: + close (app->listenfd); + app->state = A11Y_BUS_STATE_ERROR; + + return FALSE; +} +#else +static gboolean +ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path) +{ + return FALSE; +} +#endif + +static gboolean +ensure_a11y_bus (A11yBusLauncher *app) +{ + char *config_path = NULL; + gboolean success = FALSE; + + if (app->a11y_bus_pid != 0) + return FALSE; + + if (g_file_test (SYSCONFDIR"/at-spi2/accessibility.conf", G_FILE_TEST_EXISTS)) + config_path = "--config-file="SYSCONFDIR"/at-spi2/accessibility.conf"; + else + config_path = "--config-file="DATADIR"/defaults/at-spi2/accessibility.conf"; + +#ifdef WANT_DBUS_BROKER + success = ensure_a11y_bus_broker (app, config_path); + if (!success) + { + if (!ensure_a11y_bus_daemon (app, config_path)) + return FALSE; + } +#else + success = ensure_a11y_bus_daemon (app, config_path); + if (!success) + { + if (!ensure_a11y_bus_broker (app, config_path)) + return FALSE; + } +#endif + #ifdef HAVE_X11 { Display *display = XOpenDisplay (NULL); @@ -353,13 +479,6 @@ ensure_a11y_bus (A11yBusLauncher *app) #endif return TRUE; - - error: - close (app->pipefd[0]); - close (app->pipefd[1]); - app->state = A11Y_BUS_STATE_ERROR; - - return FALSE; } static void @@ -695,6 +814,15 @@ already_running () static GSettings * get_schema (const gchar *name) { +#if GLIB_CHECK_VERSION (2, 32, 0) + GSettingsSchemaSource *source = g_settings_schema_source_get_default (); + GSettingsSchema *schema = g_settings_schema_source_lookup (source, name, FALSE); + + if (schema == NULL) + return NULL; + + return g_settings_new_full (schema, NULL, NULL); +#else const char * const *schemas = NULL; gint i; @@ -706,13 +834,13 @@ get_schema (const gchar *name) } return NULL; +#endif } static void gsettings_key_changed (GSettings *gsettings, const gchar *key, void *user_data) { gboolean new_val = g_settings_get_boolean (gsettings, key); - A11yBusLauncher *app = user_data; if (!strcmp (key, "toolkit-accessibility")) handle_a11y_enabled_change (_global_app, new_val, FALSE); @@ -724,10 +852,6 @@ int main (int argc, char **argv) { - GError *error = NULL; - GMainLoop *loop; - GDBusConnection *session_bus; - int name_owner_id; gboolean a11y_set = FALSE; gboolean screen_reader_set = FALSE; gint i; @@ -783,14 +907,15 @@ main (int argc, introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL); g_assert (introspection_data != NULL); - name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, - "org.a11y.Bus", - G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, - on_bus_acquired, - on_name_acquired, - on_name_lost, - _global_app, - NULL); + _global_app->name_owner_id = + g_bus_own_name (G_BUS_TYPE_SESSION, + "org.a11y.Bus", + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, + on_bus_acquired, + on_name_acquired, + on_name_lost, + _global_app, + NULL); g_main_loop_run (_global_app->loop); diff --git a/bus/meson.build b/bus/meson.build index 909103c..5c7e03d 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -31,8 +31,13 @@ configure_file(input: 'at-spi-dbus-bus.service.in', install: true, install_dir: systemd_user_dir) +launcher_args = [ + '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), + '-DDATADIR="@0@"'.format(atspi_datadir), + ] + if get_option('dbus_daemon') != 'default' - dbus_daemon = get_option('dbus_daemon') + launcher_args += '-DDBUS_DAEMON="@0@"'.format(get_option('dbus_daemon')) else dbus_daemon = find_program('dbus-daemon', '/sbin/dbus-daemon', @@ -40,16 +45,29 @@ else '/libexec/dbus-daemon', '/usr/libexec/dbus-daemon', '/usr/pkg/bin/dbus-daemon', - required: true).path() + required: false) + if dbus_daemon.found() + launcher_args += '-DDBUS_DAEMON="@0@"'.format(dbus_daemon.path()) + endif +endif + +if get_option('dbus_broker') != 'default' + launcher_args += '-DDBUS_BROKER="@0@"'.format(get_option('dbus_broker')) +else + dbus_broker = find_program('dbus-broker-launch', + required: false) + if dbus_broker.found() + launcher_args += '-DDBUS_BROKER="@0@"'.format(dbus_broker.path()) + endif +endif + +if get_option('default_bus') == 'dbus-broker' + launcher_args += '-DWANT_DBUS_BROKER' endif executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c', include_directories: [ root_inc, include_directories('.') ], dependencies: [ gio_dep, x11_deps ], - c_args: [ - '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), - '-DDATADIR="@0@"'.format(atspi_datadir), - '-DDBUS_DAEMON="@0@"'.format(dbus_daemon), - ], + c_args: launcher_args, install: true, install_dir: atspi_libexecdir) diff --git a/dbind/dbtest.c b/dbind/dbtest.c index abd241a..42c1919 100644 --- a/dbind/dbtest.c +++ b/dbind/dbtest.c @@ -27,7 +27,7 @@ #define DESKICE_PATH "/Novell/ICEDesktop/Daemon" #define DESKICE_NAMESPACE "Novell.ICEDesktop.Daemon" -void marshal (DBusMessage *msg, char *type, void *ptr) +void marshal (DBusMessage *msg, const char *type, void *ptr) { DBusMessageIter iter; @@ -35,7 +35,7 @@ void marshal (DBusMessage *msg, char *type, void *ptr) dbind_any_marshal (&iter, &type, &ptr); } -void demarshal (DBusMessage *msg, char *type, void *ptr) +void demarshal (DBusMessage *msg, const char *type, void *ptr) { DBusMessageIter iter; @@ -317,8 +317,8 @@ void test_twovals () DBusMessage *msg; DBusMessageIter iter; TwoVal i, o; - char *type_twoval = TYPEOF_TWOVAL; - char *type; + const char *type_twoval = TYPEOF_TWOVAL; + const char *type; void *ptr; msg = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_CALL); diff --git a/doc/libatspi/libatspi-sections.txt b/doc/libatspi/libatspi-sections.txt index 78abe76..e5ef6bb 100644 --- a/doc/libatspi/libatspi-sections.txt +++ b/doc/libatspi/libatspi-sections.txt @@ -441,6 +441,8 @@ atspi_component_get_layer atspi_component_get_mdi_z_order atspi_component_grab_focus atspi_component_get_alpha +atspi_component_scroll_to +atspi_component_scroll_to_point ATSPI_COMPONENT ATSPI_IS_COMPONENT @@ -524,6 +526,8 @@ AtspiRelationType ATSPI_RELATIONTYPE_COUNT AtspiRole ATSPI_ROLE_COUNT +AtspiScrollType +ATSPI_SCROLLTYPE_COUNT
diff --git a/doc/libatspi/tmpl/atspi-constants.sgml b/doc/libatspi/tmpl/atspi-constants.sgml index 8763873..24bb07f 100644 --- a/doc/libatspi/tmpl/atspi-constants.sgml +++ b/doc/libatspi/tmpl/atspi-constants.sgml @@ -39,6 +39,26 @@ Constant definitions needed by multiple interfaces. + + + + + +@ATSPI_SCROLL_TOP_LEFT: +@ATSPI_SCROLL_BOTTOM_RIGHT: +@ATSPI_SCROLL_TOP_EDGE: +@ATSPI_SCROLL_BOTTOM_EDGE: +@ATSPI_SCROLL_LEFT_EDGE: +@ATSPI_SCROLL_RIGHT_EDGE: +@ATSPI_SCROLL_ANYWHERE: + + + + + + + + @@ -46,6 +66,7 @@ Constant definitions needed by multiple interfaces. @ATSPI_COORD_TYPE_SCREEN: @ATSPI_COORD_TYPE_WINDOW: +@ATSPI_COORD_TYPE_PARENT: diff --git a/idl/component.didl b/idl/component.didl index aa40e78..31cfbf0 100644 --- a/idl/component.didl +++ b/idl/component.didl @@ -54,7 +54,30 @@ interface org.freestandards.atspi.Component { LAYER_WINDOW, LAYER_LAST_DEFINED } - + + /* + Describes where the object should be placed on the window. + */ + enum uint32 ScrollType { + SCROLL_TOP_LEFT = 0, + SCROLL_BOTTOM_RIGHT, + SCROLL_TOP_EDGE, + SCROLL_BOTTOM_EDGE, + SCROLL_LEFT_EDGE, + SCROLL_RIGHT_EDGE, + SCROLL_ANYWHERE + } + + /* + Specifies whether the coordinates are relative to the screen, to the + window, or to the parent object. + */ + enum uint32 CoordType { + COORD_TYPE_SCREEN = 0, + COORD_TYPE_WINDOW, + COORD_TYPE_PARENT + } + /* True if the specified point lies within the components bounding box. */ @@ -136,4 +159,20 @@ interface org.freestandards.atspi.Component { method GetAlpha reply { double alpha; } + + /* + Scroll this object so it becomes visible on the screen. + */ + method ScrollTo { + ScrollType type; + } + + /* + Scroll this object so it becomes visible on the screen at a given position. + */ + method ScrollToPoint { + CoordType type; + int32 x; + int32 y; + } } diff --git a/meson.build b/meson.build index 86e2a4a..e26e050 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('at-spi2-core', 'c', - version: '2.28.0', + version: '2.29.1', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', diff --git a/meson_options.txt b/meson_options.txt index c9afe2f..f8ec862 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,15 @@ option('dbus_daemon', description: 'The path of the DBus daemon', type: 'string', value: 'default') +option('dbus_broker', + description: 'The path of the DBus broker', + type: 'string', + value: 'default') +option('default_bus', + description: 'The default DBus implementation to use', + type: 'combo', + choices: ['dbus-daemon', 'dbus-broker'], + value: 'dbus-daemon') option('systemd_user_dir', description: 'Location of the systemd user services', type: 'string', diff --git a/registryd/deviceeventcontroller-x11.c b/registryd/deviceeventcontroller-x11.c index d9d9a6c..e5b8dfc 100644 --- a/registryd/deviceeventcontroller-x11.c +++ b/registryd/deviceeventcontroller-x11.c @@ -1018,8 +1018,10 @@ spi_dec_x11_synth_keycode_press (SpiDEController *controller, { unsigned int time = CurrentTime; unsigned int bounce_delay; +#ifdef THIS_IS_BROKEN unsigned int elapsed_msec; struct timeval tv; +#endif DEControllerPrivateData *priv = controller->priv; spi_x_error_trap (); @@ -1028,15 +1030,15 @@ spi_dec_x11_synth_keycode_press (SpiDEController *controller, bounce_delay = xkb_get_bouncekeys_delay (controller); if (bounce_delay) { +#ifdef THIS_IS_BROKEN gettimeofday (&tv, NULL); elapsed_msec = (tv.tv_sec - priv->last_release_time.tv_sec) * 1000 + (tv.tv_usec - priv->last_release_time.tv_usec) / 1000; -#ifdef SPI_XKB_DEBUG +# ifdef SPI_XKB_DEBUG fprintf (stderr, "%d ms elapsed (%ld usec)\n", elapsed_msec, (long) (tv.tv_usec - priv->last_release_time.tv_usec)); -#endif -#ifdef THIS_IS_BROKEN +# endif if (elapsed_msec < bounce_delay) time = bounce_delay - elapsed_msec + 1; #else @@ -1062,8 +1064,10 @@ spi_dec_x11_synth_keycode_release (SpiDEController *controller, { unsigned int time = CurrentTime; unsigned int slow_delay; +#ifdef THIS_IS_BROKEN_DUNNO_WHY unsigned int elapsed_msec; struct timeval tv; +#endif DEControllerPrivateData *priv = controller->priv; spi_x_error_trap (); @@ -1072,15 +1076,15 @@ spi_dec_x11_synth_keycode_release (SpiDEController *controller, slow_delay = xkb_get_slowkeys_delay (controller); if (slow_delay) { +#ifdef THIS_IS_BROKEN_DUNNO_WHY gettimeofday (&tv, NULL); elapsed_msec = (tv.tv_sec - priv->last_press_time.tv_sec) * 1000 + (tv.tv_usec - priv->last_press_time.tv_usec) / 1000; -#ifdef SPI_XKB_DEBUG +# ifdef SPI_XKB_DEBUG fprintf (stderr, "%d ms elapsed (%ld usec)\n", elapsed_msec, (long) (tv.tv_usec - priv->last_press_time.tv_usec)); -#endif -#ifdef THIS_IS_BROKEN_DUNNO_WHY +# endif if (elapsed_msec < slow_delay) time = slow_delay - elapsed_msec + 1; #else diff --git a/registryd/reentrant-list.c b/registryd/reentrant-list.c index 29bdfca..7f9a716 100644 --- a/registryd/reentrant-list.c +++ b/registryd/reentrant-list.c @@ -45,7 +45,7 @@ spi_re_entrant_list_delete_link (GList * const *element_ptr) GList *next; GList *element; gboolean first_item; - GList *dummy; /* suppress warning */ + GList *dummy G_GNUC_UNUSED; g_return_if_fail (element_ptr != NULL); diff --git a/xml/Component.xml b/xml/Component.xml index c67dde9..c1258d2 100644 --- a/xml/Component.xml +++ b/xml/Component.xml @@ -72,5 +72,15 @@ + + + + + + + + + + -- GitLab