Basic functions for initiating and working with a connection to an X11 server.
- data Connection
- connect :: IO (Maybe Connection)
- connectTo :: String -> IO (Maybe Connection)
- displayInfo :: Connection -> DispName
- connectionSetup :: Connection -> Setup
- mkConnection :: Handle -> Maybe Xauth -> DispName -> IO (Maybe Connection)
- newResource :: XidLike a => Connection -> IO a
- pollForEvent :: Connection -> IO (Maybe SomeEvent)
- waitForEvent :: Connection -> IO SomeEvent
- pollForError :: Connection -> IO (Maybe SomeError)
- waitForError :: Connection -> IO SomeError
- setCrashOnError :: Connection -> IO ()
- data SomeError
- data SomeEvent
- getRoot :: Connection -> WINDOW
Connect to the display specified. The string must be of the format used in the DISPLAY environment variable.
Returns the information about what we originally tried to connect to.
Setup information returned by the server
during the initiation of the connection.
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.
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.