diff --git a/Data/XCB/FromXML.hs b/Data/XCB/FromXML.hs
--- a/Data/XCB/FromXML.hs
+++ b/Data/XCB/FromXML.hs
@@ -178,6 +178,7 @@
     | el `named` "typedef" = xtypedef el
     | el `named` "enum" = xenum el
     | el `named` "import" = ximport el
+    | el `named` "eventstruct" = xeventstruct el
     | otherwise = mzero
 
 
@@ -324,6 +325,19 @@
   newname <- el `attr` "newname"
   return $ XTypeDef newname oldtyp
 
+xeventstruct :: Element -> Parse XDecl
+xeventstruct el = do
+  name <- el `attr` "name"
+  allowed <- mapAlt allowedEvent $ elChildren el
+  return $ XEventStruct name allowed
+
+allowedEvent :: (MonadPlus m, Functor m) => Element -> m AllowedEvent
+allowedEvent el = do
+  extension <- el `attr` "name"
+  xge <- el `attr` "xge" >>= readM
+  opMin <- el `attr` "opcode-min" >>= readM
+  opMax <- el `attr` "opcode-max" >>= readM
+  return $ AllowedEvent extension xge opMin opMax
 
 structField :: (MonadPlus m, Functor m) => Element -> m StructElem
 structField el
diff --git a/Data/XCB/Pretty.hs b/Data/XCB/Pretty.hs
--- a/Data/XCB/Pretty.hs
+++ b/Data/XCB/Pretty.hs
@@ -39,6 +39,9 @@
 instance Pretty Int where
     pretty = show
 
+instance Pretty Bool where
+    pretty = show
+
 instance Pretty a => Pretty (Maybe a) where
     toDoc Nothing = empty
     toDoc (Just a) = toDoc a
@@ -165,6 +168,13 @@
                                        text "align=" <+> toDoc align <+>
                                        text "offset=" <+> toDoc offset
 
+instance Pretty AllowedEvent where
+    toDoc (AllowedEvent extension xge opMin opMax) = text "allowed" <+>
+                                                       text "extension=" <+> text extension <+>
+                                                       text "xge=" <> toDoc xge <>
+                                                       text "opcode-min" <> toDoc opMin <>
+                                                       text "opcode-max" <> toDoc opMax
+
 instance Pretty a => Pretty (GenXDecl a) where
     toDoc (XStruct nm alignment elems) =
         hang (text "Struct:" <+> text nm <+> toDoc alignment) 2 $ vcat $ map toDoc elems
@@ -199,6 +209,8 @@
     toDoc (XImport nm) = text "Import:" <+> text nm
     toDoc (XError nm _n alignment elems) =
         hang (text "Error:" <+> text nm <+> toDoc alignment) 2 $ vcat $ map toDoc elems
+    toDoc (XEventStruct name allowed) =
+        hang (text "Event struct:" <+> text name) 2 $ vcat $ map toDoc allowed
 
 instance Pretty a => Pretty (GenXHeader a) where
     toDoc xhd = text (xheader_header xhd) $$
diff --git a/Data/XCB/Types.hs b/Data/XCB/Types.hs
--- a/Data/XCB/Types.hs
+++ b/Data/XCB/Types.hs
@@ -45,6 +45,7 @@
     , ListName
     , MaskPadding
     , Alignment ( .. )
+    , AllowedEvent ( .. )
     ) where
 
 import Data.Map
@@ -89,6 +90,7 @@
     | XUnion Name (Maybe Alignment) [GenStructElem typ]
     | XImport Name
     | XError Name Int (Maybe Alignment) [GenStructElem typ]
+    | XEventStruct Name [AllowedEvent]
  deriving (Show, Functor)
 
 data GenStructElem typ
@@ -155,3 +157,5 @@
  deriving (Show)
 
 data Alignment = Alignment Int Int deriving (Show)
+
+data AllowedEvent = AllowedEvent Name Bool Int Int deriving (Show)
diff --git a/xcb-types.cabal b/xcb-types.cabal
--- a/xcb-types.cabal
+++ b/xcb-types.cabal
@@ -1,5 +1,5 @@
 Name:         xcb-types
-Version:      0.8.0
+Version:      0.9.0
 Cabal-Version:  >= 1.6
 Synopsis:     Parses XML files used by the XCB project
 Description:   This package provides types which mirror the structures
