>
slide: The event interface
interface event {
int type(); // X event type
char* name(); // type as string
int x();
int y();
int button(int i = 0); // ButtonPress
int buttonup(int i = 0); // ButtonRelease
int motion(); // MotionNotify
int keyevent(); // KeyPress or KeyRelease
int buttonevent(int i = 0); // ButtonPress or ButtonRelease
int keycode();
void trace(); // prints event information
void* rawevent(); // delivers raw X event
};