xcb-types-0.9.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

Functor GenXHeader Source # 

Methods

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

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

Show typ => Show (GenXHeader typ) Source # 

Methods

showsPrec :: Int -> GenXHeader typ -> ShowS #

show :: GenXHeader typ -> String #

showList :: [GenXHeader typ] -> ShowS #

Pretty a => Pretty (GenXHeader a) Source # 

data GenXDecl typ Source #

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

Instances

Functor GenXDecl Source # 

Methods

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

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

Show typ => Show (GenXDecl typ) Source # 

Methods

showsPrec :: Int -> GenXDecl typ -> ShowS #

show :: GenXDecl typ -> String #

showList :: [GenXDecl typ] -> ShowS #

Pretty a => Pretty (GenXDecl a) Source # 

data GenBitCase typ Source #

Constructors

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

Instances

Functor GenBitCase Source # 

Methods

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

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

Show typ => Show (GenBitCase typ) Source # 

Methods

showsPrec :: Int -> GenBitCase typ -> ShowS #

show :: GenBitCase typ -> String #

showList :: [GenBitCase typ] -> ShowS #

Pretty a => Pretty (GenBitCase a) Source # 

data GenXReply typ Source #

Constructors

GenXReply (Maybe Alignment) [GenStructElem typ] 

Instances

Functor GenXReply Source # 

Methods

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

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

Show typ => Show (GenXReply typ) Source # 

Methods

showsPrec :: Int -> GenXReply typ -> ShowS #

show :: GenXReply typ -> String #

showList :: [GenXReply typ] -> ShowS #

data EnumElem typ Source #

Constructors

EnumElem Name (Maybe (Expression typ)) 

Instances

Functor EnumElem Source # 

Methods

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

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

Show typ => Show (EnumElem typ) Source # 

Methods

showsPrec :: Int -> EnumElem typ -> ShowS #

show :: EnumElem typ -> String #

showList :: [EnumElem typ] -> ShowS #

Pretty a => Pretty (EnumElem a) 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

Functor Expression Source # 

Methods

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

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

Show typ => Show (Expression typ) Source # 

Methods

showsPrec :: Int -> Expression typ -> ShowS #

show :: Expression typ -> String #

showList :: [Expression typ] -> ShowS #

Pretty a => Pretty (Expression a) Source # 

data Binop Source #

Supported Binary operations.

Constructors

Add 
Sub 
Mult 
Div 
And 
RShift 

data Unop Source #

Constructors

Complement 

Instances

data Type Source #

Types may include a reference to the containing module.

Instances

Eq Type Source # 

Methods

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

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

Ord Type Source # 

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 # 

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Pretty Type Source # 

type EnumVals typ = typ Source #

type MaskVals typ = typ Source #