0.0
No commit activity in last 3 years
No release in over 3 years
Interface to Xlib XInput extensions Version 2
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.1
 Project Readme

Simple 1:1 interface to XInput2 for ruby

This gem just wraps Xlib's XInput2 extension and makes its interface available in ruby through ffi. XInput2 documentation can be found in its manual (functions starting with XI belong to XInput Version 2 as defined in the header). No functions have been renamed or abstracted away in some objects. It's just the plain XInput2 API.

For a lightweight wrapper and a more ruby style access to X11 have a look at ruby-xlib-objects'.

Installation

gem install xlib-xinput2

Usage

All constants and methods of XInput can found under their original name in the Xlib namespace.

d = Xlib::XOpenDisplay(':0')
maj = FFI::MemoryPointer.new :int
min = FFI::MemoryPointer.new :int

maj.write_int 2
min.write_int 1

Xlib::XIQueryVersion(d, maj, min)