xhb-0.5.2014.4.10: X Haskell Bindings

Safe HaskellNone
LanguageHaskell98

Graphics.XHB.Connection

Description

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

Synopsis

Documentation

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 -> DispName Source

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

connectionSetup :: Connection -> Setup Source

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 -> WINDOW Source

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.