Add Xlib support, some interface changes