Skip to content

typing: Add Atspi stubs #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
Merged

typing: Add Atspi stubs #215

merged 1 commit into from
Jun 16, 2025

Conversation

C-Loftus
Copy link
Contributor

@C-Loftus C-Loftus commented Jun 6, 2025

Thanks for your work on this library! I generated type stubs for Atspi which is the accessibility client library on Linux. I think it would be useful to add since there is not a lot of tooling around Atspi but it is needed to create assistive technology apps. I think this would make it slightly easier for others to make these sorts of applications.

I generated them like this:

python3 tools/generate.py Atspi 2.0 >> Atspi.pyi

I then verified they work by making a simple app like this

import gi
import typing


gi.require_version("Atspi", "2.0")
from gi.repository import Atspi  

if typing.TYPE_CHECKING:
    import atspi_types

Atspi: "atspi_types" = Atspi 


desktop = Atspi.get_desktop(0)

print(desktop.get_child_count())

@lovetox
Copy link
Collaborator

lovetox commented Jun 16, 2025

Thanks !

@lovetox lovetox merged commit c6efe3f into pygobject:master Jun 16, 2025
2 checks passed
@C-Loftus C-Loftus deleted the atspi branch June 16, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants