ModuleX11-1.10.3Haskell98
Graphics.X11.Xlib
A collection of FFI declarations for interfacing with Xlib.
The library aims to provide a direct translation of the X binding into Haskell so the most important documentation you should read is The Xlib Programming Manual, available online at http://tronche.com/gui/x/xlib/. Let me say that again because it is very important. Get hold of this documentation and read it: it tells you almost everything you need to know to use this library.
- 17 types
- PackageX11-1.10.3
- Exports17
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceXlib.hs
Conventions
0 declarationsIn translating the library, we had to change names to conform with Haskell's lexical syntax: function names and names of constants must start with a lowercase letter; type names must start with an uppercase letter. The case of the remaining letters is unchanged.
In addition, we chose to take advantage of Haskell's module system to
allow us to drop common prefixes (X, XA_, etc.) attached to X11
identifiers.
We named enumeration types so that function types would be easier to understand. For example, we added Status, WindowClass, etc. Note that the types are synonyms for Int so no extra typesafety was obtained.
We consistently raise exceptions when a function returns an error code. In practice, this only affects the following functions because most Xlib functions do not return error codes: allocColor, allocNamedColor, fetchBuffer, fetchBytes, fontFromGC, getGeometry, getIconName, iconifyWindow, loadQueryFont, lookupColor, openDisplay, parseColor, queryBestCursor, queryBestSize, queryBestStipple, queryBestTile, rotateBuffers, selectInput, storeBuffer, storeBytes, withdrawWindow.
Types
17 declarationsmodule Graphics.X11.Types
pointer to an X11 Screen structure
pointer to an X11 Visual structure
pointer to an X11 GC structure
pointer to an X11 XSetWindowAttributes structure
Instances4Eq, Data, Ord, Show
Eq SetWindowAttributesDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesData SetWindowAttributesDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesOrd SetWindowAttributesDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesShow SetWindowAttributesDefined in X11-1.10.3 · Graphics.X11.Xlib.Types
counterpart of an X11 XVisualInfo structure
Constructors
Instances4Eq, Show, Storable, Default
Eq VisualInfoDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesShow VisualInfoDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesStorable VisualInfoDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesDefault VisualInfoDefined in X11-1.10.3 · Graphics.X11.Xlib.Types
counterpart of an X11 XRectangle structure
Constructors
Rectanglerect_x :: !Positionrect_y :: !Positionrect_width :: !Dimensionrect_height :: !Dimension
Instances5Eq, Data, Read, Show, Storable
Eq RectangleDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesData RectangleDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesRead RectangleDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesShow RectangleDefined in X11-1.10.3 · Graphics.X11.Xlib.TypesStorable RectangleDefined in X11-1.10.3 · Graphics.X11.Xlib.Types
counterpart of an X11 XArc structure
Constructors
Arcarc_x :: Positionarc_y :: Positionarc_width :: Dimensionarc_height :: Dimensionarc_angle1 :: Anglearc_angle2 :: Angle
counterpart of an X11 XSegment structure
counterpart of an X11 XColor structure
Constructors
X11 library functions
0 declarationsmodule Graphics.X11.Xlib.Event
module Graphics.X11.Xlib.Display
module Graphics.X11.Xlib.Screen
module Graphics.X11.Xlib.Window
module Graphics.X11.Xlib.Context
module Graphics.X11.Xlib.Color
module Graphics.X11.Xlib.Cursor
module Graphics.X11.Xlib.Font
module Graphics.X11.Xlib.Atom
module Graphics.X11.Xlib.Region
module Graphics.X11.Xlib.Image
module Graphics.X11.Xlib.Misc