summaryrefslogtreecommitdiff
path: root/atspi
Commit message (Collapse)AuthorAgeFilesLines
* Hold a reference to the AtspiDevice while processing eventsHEADmainMike Gorse2023-05-172-0/+5
| | | | | If this is not done, then the device might be finalized from under us during a callback, leading to a crash.
* Guard against recursion in atspi_accessible_clear_cacheMike Gorse2023-05-102-8/+18
| | | | | | | | | Add a stamp to AtspiAccessiblePrivate for use when iterating through a tree, and don't touch accessibles that have already been touched. This should further protect against buggy or malicious applications causing infinite recursion. Fixes #113
* Don't crash when an invalid index, for the array length, is requestedLukáš Tyrychtr2023-05-101-3/+6
| | | | | | for the cached children array Fixes #114.
* Add missing includeMike Gorse2023-05-081-0/+1
|
* When parsing GetItems, guard against adding an object as its own childMike Gorse2023-05-051-1/+8
| | | | | | | | This can happen if a buggy application returns an accessible with itself as its parent. This can cause problems later if something recurses through an object's descendants (atspi_accessible_clear_cache for instance). Helps #113
* Use internal names when possible for localized role namesMike Gorse2023-05-033-0/+167
| | | | | | | | | | | | | This matches the behavior of atspi_accessible_get_role_name. We already hav translations from atk, so we can use those. Also, move the table for role name translations into atspi, since it seems that atk is increasingly becoming a legacy tool. Add a note to the xml indicating that it is optional to implement GetRoleName and GetLocalizedRoleName. Fixes #110
* Use const attribute name input in atspi_*_get*_attribute_value()Colomban Wendling2023-04-254-9/+9
| | | | | There is no point in having them mutable, and makes the API look more awkward and harder to use than it actually is.
* Fix a variable nameMike Gorse2023-04-021-4/+4
|
* typos--Harald Sitter2023-03-066-7/+7
|
* Fix possible crash in screen_reader_signal_watcherMike Gorse2023-02-151-0/+1
|
* Fix memory leakMike Gorse2023-01-061-0/+1
|
* Add socket interface to the list of interfaces in atspi-misc.cMike Gorse2023-01-061-1/+1
| | | | | | | Fixes "Unknown interface org.gnome.atspi.Socket" Also remove LoginHelper interface from the same array. It has never exited in AT-SPI 2.
* x11: Register key grabs using the currently-focused windowMike Gorse2023-01-061-22/+57
| | | | | | | | | | | | | | | Previously, the root window was being passed to XIGrabKeycode. This had the annoying side effect of briefly taking focus from the window when one of our key grabs was used, leading to a window:deactive event that would confuse orca. The challenge with the new approach is that we need to reset any active grabs when the focus changes. Now the X event watcher will listen for FocusIn events and refresh the key grabs when it sees one. As a backup, we also listen for window:activate and window:deactivate events and also refresh the key grabs when we see one. Fixes #101
* atspi-constants.h: put the description of AtspiConstants inside the include ↵Federico Mena Quintero2022-12-131-2/+2
| | | | | | | | guards So that the comment doesn't get expanded multiple times in the includes of other files; g-ir-scanner complains about multiple definitions then.
* Remove blank comment line so g-ir-scanner will pick up enum variantsFederico Mena Quintero2022-12-131-1/+0
|
* DeviceEventController.xml: document the RegisterKeystrokeListener methodFederico Mena Quintero2022-12-121-1/+1
| | | | | | | | This method is still used, but is in the process of deprecation by the atspi-device-listener functions. I'm documenting it to have a reference of what the dbus demarshalling code is supposed to do.
* Reformat all the *.[ch] files with clang-formatFederico Mena Quintero2022-12-0665-3820/+3819
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I ran this on each directory with C files: clang-format -i *.[ch] "-i" is the in-place option. I also adjusted the order of #includes for some files which failed to build after that: Clang-format reorders blocks of #include directives alphabetically, but they can be grouped and separated by blank lines. If there is a blank line between blocks, like #include "zork.h" #include "bar.h" #include "foo.h" then it will not put zork.h after the other two. The last two header files will be sorted alphabetically. We can adjust the formatting of chunks of code by hand with comments like these: /* clang-format off */ this code { is, formatted, by, hand; } /* clang-format on */ See https://clang.llvm.org/docs/ClangFormat.html for the general manual and https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the style options and the comments described above.
* atspi_deregister_device_event_listener(): turn into a no-opFederico Mena Quintero2022-12-051-26/+4
| | | | | Per the previous commits, this function is never called from pyatspi2 nor orca. They do monitoring of mouse events via the Registry interface.
* atspi_register_device_event_listener(): turn into a no-op.Federico Mena Quintero2022-12-051-32/+5
| | | | | | | | | This function is never called from pyatspi2 nor from orca. It was meant to be the way to register for mouse events, but that is done with the Registry.RegisterEvent("mouse", ...) method instead. I've turned the function into a no-op to avoid ABI breakage. We can remove it when we have an ABI break.
* Fix typo in mutter dbus method callMatthias Roßmann2022-11-241-2/+2
| | | | Fixes #93
* Component.xml: document the SetSize methodFederico Mena Quintero2022-10-171-1/+1
|
* Component.xml: document the SetPosition methodFederico Mena Quintero2022-10-171-2/+2
| | | | Same as the last commit, fix the docs for atspi_component_set_position().
* Component.xml: document the SetExtents methodFederico Mena Quintero2022-10-171-2/+2
| | | | | Also fix the docs for atspi_component_set_extents() - the "horizontal" and "vertical" were switched around in the argument descriptions.
* meson: Change x11 option to featureXavier Claessens2022-09-271-6/+3
|
* Docs: Move to gi-docgenThomas Booker2022-09-2820-2/+223
|
* Merge branch 'call-unused-cleanup-function' into 'main'Mike Gorse2022-08-221-2/+7
|\ | | | | | | | | misc: call queue cleanup function See merge request GNOME/at-spi2-core!106
| * misc: call queue cleanup functionVictor Toso2022-08-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | This function was introduced in !53 with 7fdbb0f9 but was not called. I've updated the function to avoid possible complains if the pointer is NULL. Fixes warning: ../atspi/atspi-misc.c:785:1: warning: ‘cleanup_deferred_message’ defined but not used [-Wunused-function] 785 | cleanup_deferred_message(void) | ^~~~~~~~~~~~~~~~~~~~~~~~
* | Fix license of atspi-gmain.cMike Gorse2022-08-221-1/+1
|/ | | | | | | This file is licenced under the gpl, not the lgpl, and there is no version 2.1 of the gpl. Fixes #87
* Fix up last commitMike Gorse2022-08-041-2/+0
|
* Add an "announcement" event/signal to allow objects to send notificationsMike Gorse2022-08-043-1/+4
| | | | Fixes #63
* Add `ATK_ROLE_PUSH_BUTTON_MENU`Fushan Wen2022-07-221-0/+2
| | | | | This role allows to specify a button will open a menu. It's widely used in Hamburger buttons, and Qt has QAccessible:ButtonMenu role for it.
* Rename _atspi_dbus_return_accessible_from_iter to _atspi_dbus_consume_accessibleFederico Mena Quintero2022-07-127-12/+13
| | | | Makes it clear that the iter is being advanced, hopefully?
* Remove unused variablesFederico Mena Quintero2022-07-121-1/+0
|
* Replace pairs of get_reference_from_iter/ref_accessible with ↵Federico Mena Quintero2022-07-121-6/+5
| | | | | | _atspi_dbus_return_accessible_from_iter They are equivalent.
* _atspi_accessible_is_a() - no need to update the interfaces cache mask againFederico Mena Quintero2022-07-121-1/+0
| | | | It is already done in _atspi_dbus_set_interfaces().
* _atspi_dbus_set_interfaces: split internals into a demarshaler and a translatorFederico Mena Quintero2022-07-121-18/+80
| | | | | | | | | First we demarshal the DBusMessageIter into an InterfaceNames struct. Then we convert the InterfaceNames to a bitmask suitable for the field AtspiAccessible.interfaces. This will make it easier to replace libdbus with gdbus.
* Make function staticFederico Mena Quintero2022-07-121-1/+1
|
* atspi-misc: Remove unused allow_sync logicFederico Mena Quintero2022-07-062-42/+0
| | | | | This was added in 6395af932862454ed292d3623c18c59218ecbe7e but never used.
* Accessible.xml: Document the GetRole methodFederico Mena Quintero2022-07-051-13/+12
| | | | Copied descriptions from AtspiRole, and fixed some inconsistencies in those.
* Accessible.xml: document the GetRelationSet methodFederico Mena Quintero2022-07-051-3/+3
| | | | | | | | Copied the documentation from AtspiRelationType. Also, put the order of descriptions for AtspiRelationType in the same order as the enum values; DESCRIPTION_FOR was incorrectly below ERROR_MESSAGE.
* Revert "Add an "announcement" event/signal to allow objects to send ↵Mike Gorse2022-07-021-1/+0
| | | | | | | | notifications" This breaks ABI for atk. Reverting for now. This reverts commit 28d732a20180b5b3f07cb0079b9d9943b881b929.
* Add atspi_event_listener_register_with_appMike Gorse2022-07-022-25/+113
| | | | | | Allows an event listener to be registered only for a given application. Fixes #52
* Add an "announcement" event/signal to allow objects to send notificationsMike Gorse2022-07-021-0/+1
| | | | Fixes #63
* Fix warningMike Gorse2022-06-231-1/+1
|
* fix typoNozomi Miyamori2022-06-191-1/+1
|
* Minor documentation fixMike Gorse2022-06-171-1/+1
|
* Add a Text property to AtspiValueMike Gorse2022-06-172-0/+24
| | | | | | | | This allows an application to expose a textual representation of the value. A similar API was added to atk a few years ago, but it was never exposed via AT-SPI. See https://bugzilla.gnome.org/show_bug.cgi?id=684576
* Remove duplicated codeFederico Mena Quintero2022-06-021-3/+1
| | | | | destroy_deferred_message_item() already frees a whole BusDataClosure; no need to spell it out elsewhere.
* Remove unused field BusDataClosure.dataFederico Mena Quintero2022-06-025-23/+21
| | | | | | | | | | | | | | | | The comment "TODO this is still memory leak on c->data" from destroy_deferred_message_item() caught my eye, so I went looking for what uses it. defer_message() is the only place that creates BusDataClosure structs, and gets passed the data field. However, the only caller of defer_message() is dbus_connection_add_filter(), and *that* call is done with both NULL user_data and free_data_function. So, defer_message() will always get data=NULL. This commit also removes all the "void *user_data" arguments from the functions called by process_deferred_message(); they just got passed the closure->data but none of them actually use it.
* Remove unused prototypeFederico Mena Quintero2022-06-021-2/+0
| | | | Seems to be a cut&paste typo of the prototype just below for _atspi_dbus_handle_event