Win32 has the winmm library, which allows joystick events to be captured in the regular event loop (alongside the general window events, keyboard events, and mouse events).
Is there a similar setup in Xlib? Is my only choice to do raw input?
Sounds like the answer is no (until someone smarter than me comes along and corrects me). I need to do raw input. I have to poll at a reasonable interval and convert deltas into my own events.