xhb-0.5.2012.11.23: X Haskell Bindings

Safe HaskellNone



Basic functions for initiating and working with a connection to an X11 server.



connect :: IO (Maybe Connection)Source

Connect to the the default display.

connectTo :: String -> IO (Maybe Connection)Source

Connect to the display specified. The string must be of the format used in the DISPLAY environment variable.

displayInfo :: Connection -> DispNameSource

Returns the information about what we originally tried to connect to.

connectionSetup :: Connection -> SetupSource

Returns the Setup information returned by the server during the initiation of the connection.

setCrashOnError :: Connection -> IO ()Source

If you don't feel like writing error handlers, but at least want to know that one happened for debugging purposes, call this to have execution come to an abrupt end if an error is received.

getRoot :: Connection -> WINDOWSource

I plan on deprecating this one soon, but until I put together some sort of utils package, it will live here.

Given a connection, this function returns the root window of the first screen.

If your display string specifies a screen other than the first, this probably doesnt do what you want.