Project

atspi

0.0
No commit activity in last 3 years
No release in over 3 years
The atspi gem lets you comfortably call the Assistive Technology Service Provider Interface (AT-SPI) on Linux.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8
~> 0.9.12

Runtime

~> 0.14.0
~> 0.11.0
 Project Readme

Atspi

This is a ruby gem that lets you comfortably call the Assistive Technology Service Provider Interface on Linux.

It wraps Gnome's libatspi and exposes it as high level ruby objects.

Installation

Add this line to your application's Gemfile:

gem 'atspi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install atspi

Getting Started

# Get the desktop
desktop = ATSPI.desktops.first

# Get an application on the desktop (here Gnome Terminal)
application = desktop.applications.last

# Get the first window of the application
window = application.windows.first

# Get the window's tabs
tabs = window.descendants.where(role: :page_tab)
tabs.count # => 3

# Get the selected tab
selected_tab = tabs.where(state: :selected).first
selected_tab.index # => 0

# Select the first tab
tabs.last.select

# Get the selected tab
selected_tab = tabs.where(state: :selected).first
selected_tab.index # => 2

Documentation

Detailed documentation can be found at http://www.rubydoc.info/gems/atspi.

Especially:

Todo

Not supported yet are:

  • Event listeners
  • (Editable) text attributes