xcb-types-0.5.1.1: Parses XML files used by the XCB project

Portabilityportable
Stabilityprovisional
MaintainerAntoine Latter <aslatter@gmail.com>

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

xheader_header :: Name

Name of module. Used in the other modules as a reference.

xheader_xname :: Maybe Name

Name used to indentify extensions between the X client and server.

xheader_name :: Maybe Name

InterCaps name.

xheader_multiword :: Maybe Bool
 
xheader_major_version :: Maybe Int
 
xheader_minor_version :: Maybe Int
 
xheader_decls :: [GenXDecl typ]

Declarations contained in this module.

Instances

Show typ => Show (GenXHeader typ) 
Pretty a => Pretty (GenXHeader a) 

mapTypes :: (a -> b) -> GenXHeader a -> GenXHeader bSource

data GenXDecl typ Source

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

Constructors

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

The boolean indicates if the event includes a sequence number.

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

Instances

Show typ => Show (GenXDecl typ) 
Pretty a => Pretty (GenXDecl a) 

mapDecls :: (a -> b) -> GenXDecl a -> GenXDecl bSource

type AltEnumVals typ = typSource

type EnumVals typ = typSource

type MaskVals typ = typSource

data Type Source

Types may include a reference to the containing module.

Instances

data GenXidUnionElem typ Source

Constructors

XidUnionElem typ 

Instances

data Expression 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

Op Binop Expression Expression

A binary opeation

data Binop Source

Supported Binary operations.

Constructors

Add 
Sub 
Mult 
Div 
And 
RShift 

Instances