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

Portabilityportable
Stabilityprovisional
MaintainerAntoine Latter <aslatter@gmail.com>
Safe HaskellSafe-Inferred

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

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 typ] 
XUnion Name [GenStructElem typ] 
XImport Name 
XError Name Int [GenStructElem typ] 

Instances

data GenBitCase typ Source

Constructors

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

Instances

data GenXidUnionElem typ Source

Constructors

XidUnionElem typ 

data EnumElem typ Source

Constructors

EnumElem Name (Maybe (Expression typ)) 

Instances

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

Instances

data Binop Source

Supported Binary operations.

Constructors

Add 
Sub 
Mult 
Div 
And 
RShift 

Instances

data Unop Source

Constructors

Complement 

Instances

data Type Source

Types may include a reference to the containing module.

Instances

type EnumVals typ = typSource

type MaskVals typ = typSource