summaryrefslogtreecommitdiff
path: root/atspi/atspi-accessible.c
Commit message (Collapse)AuthorAgeFilesLines
* Guard against recursion in atspi_accessible_clear_cacheMike Gorse2023-05-101-8/+17
| | | | | | | | | 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.
* Use internal names when possible for localized role namesMike Gorse2023-05-031-0/+5
| | | | | | | | | | | | | 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
* Fix possible crash in screen_reader_signal_watcherMike Gorse2023-02-151-0/+1
|
* Reformat all the *.[ch] files with clang-formatFederico Mena Quintero2022-12-061-338/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Docs: Move to gi-docgenThomas Booker2022-09-281-0/+10
|
* Rename _atspi_dbus_return_accessible_from_iter to _atspi_dbus_consume_accessibleFederico Mena Quintero2022-07-121-1/+1
| | | | Makes it clear that the iter is being advanced, hopefully?
* _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().
* Remove debug printMike Gorse2021-02-221-1/+0
|
* atspi_accessible_get_(name|description): fix memory leakMike Gorse2021-02-221-0/+6
| | | | This is likely what the backed-out part of !53 was trying to do.
* Fix an invalid free introduced in 2.39.90, along with some warningsMike Gorse2021-02-221-1/+1
| | | | Fixes https://gitlab.gnome.org/GNOME/at-spi2-core/issues/30
* Fix memory leaksBartlomiej Grzelewski2021-02-121-0/+3
| | | | | | | | | | | * Release memory before pointer overwrite. * Reduce memory leaks reported in ref_accessible. * Remove leak connected with atspi_state_type_get_type. * Remove memory leak in atspi_event_listener_register_from_callback_full. * Reduce memory leaks reported on program exit. Change-Id: Ifde65dd44643f2e58442cf70809703f979436e09
* Fix a compiler warningMike Gorse2020-08-191-1/+1
|
* atspi_accessible_set_cache_mask: relax assertMike Gorse2020-06-241-1/+1
| | | | | | | | | | | | | | | | Atspi_accessible_set_cache_mask checks that it is being passed an application's root accessible, and this sometimes fails and generates a warning similar to the following, even when orca passes what it sees as the application's root accessible: (orca:18809): dbind-CRITICAL **: 09:27:25.951: atspi_accessible_set_cache_mask: assertion 'accessible == accessible->parent.app->root' failed I suspect that this is caused by atk-bridge being initialized and caching the root accessible and atk_get_root() is subsequently redefined, in the case of an application that loads more than one atk implementor, such as Firefox. This is indicative of a problem that should be fixed elsewhere--possibly gtk+ and/or firefox shouldn't override atk_get_root if it already has an implementation--but warning and failing here isn't helpful.
* Fix documentation for the new mode_changed signalMike Gorse2020-06-111-0/+1
|
* Fix mode-changed signal registrationMike Gorse2020-06-091-1/+1
| | | | https://gitlab.gnome.org/GNOME/orca/issues/36
* Add mode-changed signalMike Gorse2020-06-071-3/+34
| | | | | | Add a signal to allow a screen reader to indicate that its mode has changed. https://gitlab.gnome.org/GNOME/orca/issues/36
* Use the event name when sending screen reader events over dbusMike Gorse2020-05-271-1/+4
| | | | | | | | | For screen reader events, look at the name of the signal and convert it, rather than hard-coding "RegionChanged." This is necessary to allow screen_reader_signal_watcher to process signals that will be added in the future. https://gitlab.gnome.org/GNOME/orca/issues/36
* Relicense as LGPL 2.1Mike Gorse2019-08-281-4/+4
| | | | Fixes https://gitlab.gnome.org/GNOME/at-spi2-core/issues/2
* Fix outdated FSF addressMike Gorse2019-08-271-2/+2
|
* atspi_accessible_dispose: Avoid unreferencing NULLSamuel Thibault2019-08-251-1/+8
| | | | | | | | The children array may contain NULL entries, when the children have not all been inspected yet for instance. In such a case atspi_accessible_dispose's call to g_ptr_array_free would warn out when freeing array items with g_object_unref. We should thus check for NULL to avoid such warning.
* Fix typosSamuel Thibault2019-07-251-2/+2
|
* Refactor the API for the screen reader to notify listeners of its statusMike Gorse2019-07-181-0/+83
| | | | | | | Remove atspi_text_notify_reading_position, and instead add a region_changed signal. Also make the dbus API more like the API used for other events. Per discussion at https://gitlab.gnome.org/GNOME/orca/issues/36
* Add atspi_accessible_get_accessible_idSamuel Thibault2019-04-301-0/+27
|
* Fix -Wmisleading-indentation warningsIain Lane2017-05-251-4/+5
| | | | | | | | There are a couple of places where code is indented as if it should be part of an `if' block, but it isn't because there are no braces. Fix those by unindenting. Caught by -Werror=misleading-indentation.
* atspi_accessible_get_parent: move check for NULL AtspiApplication objectMike Gorse2017-05-081-2/+3
| | | | | | | Now, if we don't have a cached parent, then we always either return NULL or make a D-Bus call. This might make the code more robust, and hoping that it will fix https://bugzilla.gnome.org/show_bug.cgi?id=767074, though in theory it should make no difference there.
* atspi_accessible_clear_cache: don't crash if we have no childrenMike Gorse2016-05-311-2/+3
| | | | | | If an accessible is disposed, then its list of children may be NULL. https://bugzilla.gnome.org/show_bug.cgi?id=767075
* get_index_in_parent: Don't crash if parent is defunctMike Gorse2015-11-091-0/+4
|
* Modified cache API to include index and child count rather than childrenMike Gorse2015-08-141-65/+59
| | | | | | | | | | | | | | | The original cache API was problematic for QT AT-SPI because it forces enumeration of all children, preventing lazy instantiation of objects. The API now sends the object's index in parent and child count (or -1 if not known / children should not be cached) rather than an array of children. Also made cache of children a GPtrArray rather than a GList, since it may contain holes. If an object has not yet been instantiated for a particular child, then its value will be set to NULL, and atspi_accessible_get_child_at_index will make a dbus call to fetch the child, at which point it will be cached. https://bugzilla.gnome.org/show_bug.cgi?id=650090
* Replaced deprecated "Rename to" GTK-Doc tagAlejandro Piñeiro2014-11-251-22/+11
| | | | Replaced by the gi annotation rename-to on the identifier.
* Revert "Replaced deprecated "Rename to" GTK-Doc tag"Mike Gorse2014-11-251-11/+22
| | | | | | Forgot to tag the release; going to revert, tag, then re-apply. This reverts commit b7bd063e3cd805bc50bf03c5e12087b1553436a2.
* Replaced deprecated "Rename to" GTK-Doc tagAlejandro Piñeiro2014-11-251-22/+11
| | | | Replaced by the gi annotation rename-to on the identifier.
* gi-annotations: get_relation_set returns a array of AtspiRelationAlejandro Piñeiro2014-11-201-1/+1
| | | | This is also explained on the documentation
* Fix lifecycle of an accessible's cacheMike Gorse2014-07-191-1/+2
| | | | | When a cache is referenced in response to an event, it is supposed to be unref'd after the event handler has been called.
* Unref an accessible's cache when destroying itMike Gorse2014-07-191-0/+2
|
* introspection: add some missing Returns: (nullable) annotationsEvan Nemerson2014-06-071-3/+4
|
* Add GError setter in atspi_accessible_get_process_id functionMichal Jagiello2014-04-221-3/+7
|
* Add AtspitableCell, tracking the new atk interfaceMike Gorse2014-02-181-0/+41
|
* Allow caching of data sent with events and requesting such dataMike Gorse2014-02-011-9/+57
| | | | | | | | | | | | | Add atspi_event_listener_register_full, to request that particular data be sent with an event, and cache the data for the duration of the event callback. This also extends the D-Bus protocol, adding an a{sv} to an event to send this data along, but we will still read events without this array added for backwards compatibility (and compatibilllity with QT-AT-SPI, which does not send this data for now). https://bugzilla.gnome.org/show_bug.cgi?id=708695
* Fix crash when get_process_id called with an app no longer on the busMike Gorse2014-01-161-2/+6
|
* accessible: remove an unneeded unrefAlejandro Piñeiro2013-08-271-1/+0
| | | | | | | That unref is done inside an if that starts with a !parent condition, so unrefing it doesn't makes sense https://bugzilla.gnome.org/show_bug.cgi?id=706893
* Reinstate atspi_role_get_nameMike Gorse2013-05-221-16/+6
| | | | | Atspi_role_get_name is used (by Orca, for instance) and was inadvertently removed with the enum refactor.
* Rename various functions to avoid name collisionsMike Gorse2013-05-151-0/+209
| | | | | | | | | Having functions with common suffixes (ie, atspi_text_get_attributes and atspi_document_get_attributes) results in problems for language bindings. Deprecating these functions in favor of functions with new names to avoid these collisions. https://bugzilla.gnome.org/show_bug.cgi?id=700243
* need to dup a role name when fetching it from a valueMike Gorse2013-05-141-1/+1
|
* Merge branch 'enum-types'Mike Gorse2013-05-101-139/+16
|\ | | | | | | | | | | Conflicts: atspi/Makefile.am atspi/atspi-accessible.c
| * Enum clean-upsenum-typesMike Gorse2011-05-291-118/+18
| | | | | | | | | | | | | | | | | | | | Generate enum types where appropriate. Fix prototypes where a method took a "gint" that was really a bitflag. Remove tables of state and role names, since these are now redundant with data from the generated enums and would need to be maintained in parallel. These changes were originally in master but have been backed out since they break compatibility with pygobject 2.26.0, which some users are still using.
* | Add atspi_accessible_get_object_localeMike Gorse2013-02-271-0/+35
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=694368
* | Fix some warningsMike Gorse2013-02-041-0/+2
| |
* | Add ATSPI_ROLE_LEVEL_BARMike Gorse2013-01-311-1/+2
| | | | | | | | Add "level bar" role corresponding to the new atk role.
* | Fix ref count leaks in atspi_accessible_get_applicationMike Gorse2013-01-141-0/+5
| |