xcb-types-0.10.0: Parses XML files used by the XCB project
Copyright(c) Antoine Latter 2008
LicenseBSD3
MaintainerAntoine Latter <aslatter@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.XCB.Types

Description

Defines types inteneded to be equivalent to the schema used by the XCB project in their XML protocol description.

Synopsis

Documentation

data GenXHeader typ Source #

This is what a single XML file maps to. It contains some meta-data then declarations.

Constructors

XHeader 

Fields

Instances

Instances details
Functor GenXHeader Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> GenXHeader a -> GenXHeader b

(<$) :: a -> GenXHeader b -> GenXHeader a

Show typ => Show (GenXHeader typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> GenXHeader typ -> ShowS

show :: GenXHeader typ -> String

showList :: [GenXHeader typ] -> ShowS

Pretty a => Pretty (GenXHeader a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: GenXHeader a -> Doc Source #

pretty :: GenXHeader a -> String Source #

data GenXDecl typ Source #

The different types of declarations which can be made in one of the XML files.

Constructors

XStruct Name (Maybe Alignment) [GenStructElem typ] 
XTypeDef Name typ 
XEvent Name Int (Maybe Alignment) [GenStructElem typ] (Maybe Bool)

The boolean indicates if the event includes a sequence number.

XRequest Name Int (Maybe Alignment) [GenStructElem typ] (Maybe (GenXReply typ)) 
XidType Name 
XidUnion Name [GenXidUnionElem typ] 
XEnum Name [EnumElem typ] 
XUnion Name (Maybe Alignment) [GenStructElem typ] 
XImport Name 
XError Name Int (Maybe Alignment) [GenStructElem typ] 
XEventStruct Name [AllowedEvent] 

Instances

Instances details
Functor GenXDecl Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> GenXDecl a -> GenXDecl b

(<$) :: a -> GenXDecl b -> GenXDecl a

Show typ => Show (GenXDecl typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> GenXDecl typ -> ShowS

show :: GenXDecl typ -> String

showList :: [GenXDecl typ] -> ShowS

Pretty a => Pretty (GenXDecl a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: GenXDecl a -> Doc Source #

pretty :: GenXDecl a -> String Source #

data GenStructElem typ Source #

Constructors

Pad Int 
List Name typ (Maybe (Expression typ)) (Maybe (EnumVals typ)) 
SField Name typ (Maybe (EnumVals typ)) (Maybe (MaskVals typ)) 
ExprField Name typ (Expression typ) 
ValueParam typ Name (Maybe MaskPadding) ListName 
Switch Name (Expression typ) (Maybe Alignment) [GenBitCase typ] 
Doc (Maybe String) (Map Name String) [(String, String)] 
Fd String 

Instances

Instances details
Functor GenStructElem Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> GenStructElem a -> GenStructElem b

(<$) :: a -> GenStructElem b -> GenStructElem a

Show typ => Show (GenStructElem typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> GenStructElem typ -> ShowS

show :: GenStructElem typ -> String

showList :: [GenStructElem typ] -> ShowS

Pretty a => Pretty (GenStructElem a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: GenStructElem a -> Doc Source #

pretty :: GenStructElem a -> String Source #

data GenBitCase typ Source #

Constructors

BitCase (Maybe Name) (Expression typ) (Maybe Alignment) [GenStructElem typ] 

Instances

Instances details
Functor GenBitCase Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> GenBitCase a -> GenBitCase b

(<$) :: a -> GenBitCase b -> GenBitCase a

Show typ => Show (GenBitCase typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> GenBitCase typ -> ShowS

show :: GenBitCase typ -> String

showList :: [GenBitCase typ] -> ShowS

Pretty a => Pretty (GenBitCase a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: GenBitCase a -> Doc Source #

pretty :: GenBitCase a -> String Source #

data GenXReply typ Source #

Constructors

GenXReply (Maybe Alignment) [GenStructElem typ] 

Instances

Instances details
Functor GenXReply Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> GenXReply a -> GenXReply b

(<$) :: a -> GenXReply b -> GenXReply a

Show typ => Show (GenXReply typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> GenXReply typ -> ShowS

show :: GenXReply typ -> String

showList :: [GenXReply typ] -> ShowS

data GenXidUnionElem typ Source #

Constructors

XidUnionElem typ 

Instances

Instances details
Functor GenXidUnionElem Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> GenXidUnionElem a -> GenXidUnionElem b

(<$) :: a -> GenXidUnionElem b -> GenXidUnionElem a

Show typ => Show (GenXidUnionElem typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> GenXidUnionElem typ -> ShowS

show :: GenXidUnionElem typ -> String

showList :: [GenXidUnionElem typ] -> ShowS

Pretty a => Pretty (GenXidUnionElem a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: GenXidUnionElem a -> Doc Source #

pretty :: GenXidUnionElem a -> String Source #

data EnumElem typ Source #

Constructors

EnumElem Name (Maybe (Expression typ)) 

Instances

Instances details
Functor EnumElem Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> EnumElem a -> EnumElem b

(<$) :: a -> EnumElem b -> EnumElem a

Show typ => Show (EnumElem typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> EnumElem typ -> ShowS

show :: EnumElem typ -> String

showList :: [EnumElem typ] -> ShowS

Pretty a => Pretty (EnumElem a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: EnumElem a -> Doc Source #

pretty :: EnumElem a -> String Source #

data Expression typ Source #

Declarations may contain expressions from this small language

Constructors

Value Int

A literal value

Bit Int

A log-base-2 literal value

FieldRef Name

A reference to a field in the same declaration

EnumRef typ Name

A reference to a member of an enum.

PopCount (Expression typ)

Calculate the number of set bits in the argument

SumOf Name

Note sure. The argument should be a reference to a list

Op Binop (Expression typ) (Expression typ)

A binary opeation

Unop Unop (Expression typ)

A unary operation

ParamRef Name

I think this is the name of an argument passed to the request. See fffbd04d63 in xcb-proto.

Instances

Instances details
Functor Expression Source # 
Instance details

Defined in Data.XCB.Types

Methods

fmap :: (a -> b) -> Expression a -> Expression b

(<$) :: a -> Expression b -> Expression a

Show typ => Show (Expression typ) Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> Expression typ -> ShowS

show :: Expression typ -> String

showList :: [Expression typ] -> ShowS

Pretty a => Pretty (Expression a) Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: Expression a -> Doc Source #

pretty :: Expression a -> String Source #

data Binop Source #

Supported Binary operations.

Constructors

Add 
Sub 
Mult 
Div 
And 
RShift 

Instances

Instances details
Show Binop Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> Binop -> ShowS

show :: Binop -> String

showList :: [Binop] -> ShowS

Pretty Binop Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: Binop -> Doc Source #

pretty :: Binop -> String Source #

data Unop Source #

Constructors

Complement 

Instances

Instances details
Show Unop Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> Unop -> ShowS

show :: Unop -> String

showList :: [Unop] -> ShowS

Pretty Unop Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: Unop -> Doc Source #

pretty :: Unop -> String Source #

data Type Source #

Types may include a reference to the containing module.

Instances

Instances details
Eq Type Source # 
Instance details

Defined in Data.XCB.Types

Methods

(==) :: Type -> Type -> Bool

(/=) :: Type -> Type -> Bool

Ord Type Source # 
Instance details

Defined in Data.XCB.Types

Methods

compare :: Type -> Type -> Ordering

(<) :: Type -> Type -> Bool

(<=) :: Type -> Type -> Bool

(>) :: Type -> Type -> Bool

(>=) :: Type -> Type -> Bool

max :: Type -> Type -> Type

min :: Type -> Type -> Type

Show Type Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> Type -> ShowS

show :: Type -> String

showList :: [Type] -> ShowS

Pretty Type Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: Type -> Doc Source #

pretty :: Type -> String Source #

type EnumVals typ = typ Source #

type MaskVals typ = typ Source #

type Name = String Source #

type Ref = String Source #

type MaskPadding = Int Source #

data Alignment Source #

Constructors

Alignment Int Int 

Instances

Instances details
Show Alignment Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> Alignment -> ShowS

show :: Alignment -> String

showList :: [Alignment] -> ShowS

Pretty Alignment Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: Alignment -> Doc Source #

pretty :: Alignment -> String Source #

data AllowedEvent Source #

Constructors

AllowedEvent Name Bool Int Int 

Instances

Instances details
Show AllowedEvent Source # 
Instance details

Defined in Data.XCB.Types

Methods

showsPrec :: Int -> AllowedEvent -> ShowS

show :: AllowedEvent -> String

showList :: [AllowedEvent] -> ShowS

Pretty AllowedEvent Source # 
Instance details

Defined in Data.XCB.Pretty

Methods

toDoc :: AllowedEvent -> Doc Source #

pretty :: AllowedEvent -> String Source #