Safe Haskell | None |
---|---|
Language | Haskell98 |
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
Documentation
data Connection Source
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.
mkConnection :: Handle -> Maybe Xauth -> DispName -> IO (Maybe Connection) Source
newResource :: XidLike a => Connection -> IO a Source
pollForEvent :: Connection -> IO (Maybe SomeEvent) Source
waitForEvent :: Connection -> IO SomeEvent Source
pollForError :: Connection -> IO (Maybe SomeError) Source
waitForError :: Connection -> IO SomeError Source
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.