GtkJoy is a sample event-driven application for the Linux Joystick Driver and GTK+ 1.2.
It was written to encourage support for joysticks in Linux games. The example program displays a pixmap, loaded from a XPM file, and the joystick controls the crosshairs. It also provides an example of double-buffering, in other words, drawing into an off-screen buffer. Multiple joystick axes and buttons are supported.