X11-1.10.3: A binding to the X11 graphics library

Copyright | (c) Alastair Reid 1999-2003
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | libraries@haskell.org
Stability | provisional
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell98

Graphics.X11.Xlib.Font

Description

A collection of FFI declarations for interfacing with Xlib Fonts.

Synopsis

- type Glyph = Word16
- queryFont :: Display -> Font -> IO FontStruct
- fontFromGC :: Display -> GC -> IO Font
- loadQueryFont :: Display -> String -> IO FontStruct
- freeFont :: Display -> FontStruct -> IO ()
- data FontStruct
- fontFromFontStruct :: FontStruct -> Font
- ascentFromFontStruct :: FontStruct -> Int32
- descentFromFontStruct :: FontStruct -> Int32
- type CharStruct = (CInt, CInt, CInt, CInt, CInt)
- textExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct)
- textWidth :: FontStruct -> String -> Int32

# Documentation

type Glyph = Word16 Source #

queryFont :: Display -> Font -> IO FontStruct Source #

interface to the X11 library function `XQueryFont()`.

fontFromGC :: Display -> GC -> IO Font Source #

interface to the X11 library function `XGetGCValues()`.

loadQueryFont :: Display -> String -> IO FontStruct Source #

interface to the X11 library function `XLoadQueryFont()`.

freeFont :: Display -> FontStruct -> IO () Source #

interface to the X11 library function `XFreeFont()`.

data FontStruct Source #

pointer to an X11 `XFontStruct` structure

#### Instances

Instances details

Data FontStruct Source # |

Instance details

Defined in Graphics.X11.Xlib.Font

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FontStruct -> c FontStruct Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FontStruct Source #

toConstr :: FontStruct -> Constr Source #

dataTypeOf :: FontStruct -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FontStruct) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FontStruct) Source #

gmapT :: (forall b. Data b => b -> b) -> FontStruct -> FontStruct Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FontStruct -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FontStruct -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> FontStruct -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FontStruct -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FontStruct -> m FontStruct Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FontStruct -> m FontStruct Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FontStruct -> m FontStruct Source #

Show FontStruct Source # |
Instance details Defined in Graphics.X11.Xlib.Font Methods showsPrec :: Int -> FontStruct -> ShowS Source # show :: FontStruct -> String Source # showList :: [FontStruct] -> ShowS Source #
Eq FontStruct Source # |
Instance details Defined in Graphics.X11.Xlib.Font Methods (==) :: FontStruct -> FontStruct -> Bool Source # (/=) :: FontStruct -> FontStruct -> Bool Source #
Ord FontStruct Source # |

Instance details

Defined in Graphics.X11.Xlib.Font

Methods

compare :: FontStruct -> FontStruct -> Ordering Source #

(<) :: FontStruct -> FontStruct -> Bool Source #

(<=) :: FontStruct -> FontStruct -> Bool Source #

(>) :: FontStruct -> FontStruct -> Bool Source #

(>=) :: FontStruct -> FontStruct -> Bool Source #

max :: FontStruct -> FontStruct -> FontStruct Source #

min :: FontStruct -> FontStruct -> FontStruct Source #

fontFromFontStruct :: FontStruct -> Font Source #

ascentFromFontStruct :: FontStruct -> Int32 Source #

descentFromFontStruct :: FontStruct -> Int32 Source #

type CharStruct = (CInt, CInt, CInt, CInt, CInt) Source #

textExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) Source #

interface to the X11 library function `XTextExtents()`.

textWidth :: FontStruct -> String -> Int32 Source #

interface to the X11 library function `XTextWidth()`.