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

Instances

data GenXidUnionElem typ Source

Constructors

XidUnionElem typ 

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

data Type Source

Types may include a reference to the containing module.

Instances

type EnumVals typ = typSource

type MaskVals typ = typSource