| Portability | portable |
|---|---|
| Stability | provisional |
| Maintainer | Antoine 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.
- data XHeader = XHeader {}
- data XDecl
- data StructElem
- type AltEnumVals = Type
- type EnumVals = Type
- type MaskVals = Type
- type Name = String
- type XReply = [StructElem]
- type Ref = String
- type MaskName = Name
- type ListName = Name
- type MaskPadding = Int
- data Type
- = UnQualType Name
- | QualType Name Name
- data XidUnionElem = XidUnionElem Type
- data EnumElem = EnumElem Name (Maybe Expression)
- data Expression
- = Value Int
- | Bit Int
- | FieldRef String
- | Op Binop Expression Expression
- data Binop
Documentation
This is what a single XML file maps to. It contains some meta-data then declarations.
Constructors
| XHeader | |
Fields
| |
The different types of declarations which can be made in one of the XML files.
Constructors
| XStruct Name [StructElem] | |
| XTypeDef Name Type | |
| XEvent Name Int [StructElem] (Maybe Bool) | The boolean indicates if the event includes a sequence number. |
| XRequest Name Int [StructElem] (Maybe XReply) | |
| XidType Name | |
| XidUnion Name [XidUnionElem] | |
| XEnum Name [EnumElem] | |
| XUnion Name [StructElem] | |
| XImport Name | |
| XError Name Int [StructElem] |
data StructElem Source
Constructors
| Pad Int | |
| List Name Type (Maybe Expression) (Maybe EnumVals) | |
| SField Name Type (Maybe EnumVals) (Maybe MaskVals) | |
| ExprField Name Type Expression | |
| ValueParam Type MaskName (Maybe MaskPadding) ListName |
Instances
type AltEnumVals = TypeSource
type XReply = [StructElem]Source
type MaskPadding = IntSource
Types may include a reference to the containing module.
Constructors
| UnQualType Name | |
| QualType Name Name |
Constructors
| EnumElem Name (Maybe Expression) |
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 String | A reference to a field in the same declaration |
| Op Binop Expression Expression | A binary opeation |
Instances