packages feed

xhb 0.2.2009.2.21 → 0.3.2009.6.28

raw patch · 27 files changed

+10385/−9566 lines, 27 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

- Graphics.XHB.Gen.Damage: MkNotify :: Word8 -> DRAWABLE -> DAMAGE -> TIMESTAMP -> RECTANGLE -> RECTANGLE -> Notify
- Graphics.XHB.Gen.Damage: area_Notify :: Notify -> RECTANGLE
- Graphics.XHB.Gen.Damage: damage_Notify :: Notify -> DAMAGE
- Graphics.XHB.Gen.Damage: data Notify
- Graphics.XHB.Gen.Damage: drawable_Notify :: Notify -> DRAWABLE
- Graphics.XHB.Gen.Damage: geometry_Notify :: Notify -> RECTANGLE
- Graphics.XHB.Gen.Damage: level_Notify :: Notify -> Word8
- Graphics.XHB.Gen.Damage: timestamp_Notify :: Notify -> TIMESTAMP
- Graphics.XHB.Gen.Glx: MkBadContext :: Word32 -> Word16 -> Word8 -> BadContext
- Graphics.XHB.Gen.Glx: MkBadContextState :: Word32 -> Word16 -> Word8 -> BadContextState
- Graphics.XHB.Gen.Glx: MkBadContextTag :: Word32 -> Word16 -> Word8 -> BadContextTag
- Graphics.XHB.Gen.Glx: MkBadCurrentDrawable :: Word32 -> Word16 -> Word8 -> BadCurrentDrawable
- Graphics.XHB.Gen.Glx: MkBadCurrentWindow :: Word32 -> Word16 -> Word8 -> BadCurrentWindow
- Graphics.XHB.Gen.Glx: MkBadDrawable :: Word32 -> Word16 -> Word8 -> BadDrawable
- Graphics.XHB.Gen.Glx: MkBadFBConfig :: Word32 -> Word16 -> Word8 -> BadFBConfig
- Graphics.XHB.Gen.Glx: MkBadLargeRequest :: Word32 -> Word16 -> Word8 -> BadLargeRequest
- Graphics.XHB.Gen.Glx: MkBadPbuffer :: Word32 -> Word16 -> Word8 -> BadPbuffer
- Graphics.XHB.Gen.Glx: MkBadPixmap :: Word32 -> Word16 -> Word8 -> BadPixmap
- Graphics.XHB.Gen.Glx: MkBadRenderRequest :: Word32 -> Word16 -> Word8 -> BadRenderRequest
- Graphics.XHB.Gen.Glx: MkBadWindow :: Word32 -> Word16 -> Word8 -> BadWindow
- Graphics.XHB.Gen.Glx: MkGeneric :: Word32 -> Word16 -> Word8 -> Generic
- Graphics.XHB.Gen.Glx: MkPbufferClobber :: Word16 -> Word16 -> DRAWABLE -> Word32 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> PbufferClobber
- Graphics.XHB.Gen.Glx: MkUnsupportedPrivateRequest :: Word32 -> Word16 -> Word8 -> UnsupportedPrivateRequest
- Graphics.XHB.Gen.Glx: aux_buffer_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: b_mask_PbufferClobber :: PbufferClobber -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadContext :: BadContext -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadContextState :: BadContextState -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadContextTag :: BadContextTag -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadCurrentDrawable :: BadCurrentDrawable -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadCurrentWindow :: BadCurrentWindow -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadDrawable :: BadDrawable -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadFBConfig :: BadFBConfig -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadLargeRequest :: BadLargeRequest -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadPbuffer :: BadPbuffer -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadPixmap :: BadPixmap -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadRenderRequest :: BadRenderRequest -> Word32
- Graphics.XHB.Gen.Glx: bad_value_BadWindow :: BadWindow -> Word32
- Graphics.XHB.Gen.Glx: bad_value_Generic :: Generic -> Word32
- Graphics.XHB.Gen.Glx: bad_value_UnsupportedPrivateRequest :: UnsupportedPrivateRequest -> Word32
- Graphics.XHB.Gen.Glx: count_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: data BadContext
- Graphics.XHB.Gen.Glx: data BadContextState
- Graphics.XHB.Gen.Glx: data BadContextTag
- Graphics.XHB.Gen.Glx: data BadCurrentDrawable
- Graphics.XHB.Gen.Glx: data BadCurrentWindow
- Graphics.XHB.Gen.Glx: data BadDrawable
- Graphics.XHB.Gen.Glx: data BadFBConfig
- Graphics.XHB.Gen.Glx: data BadLargeRequest
- Graphics.XHB.Gen.Glx: data BadPbuffer
- Graphics.XHB.Gen.Glx: data BadPixmap
- Graphics.XHB.Gen.Glx: data BadRenderRequest
- Graphics.XHB.Gen.Glx: data BadWindow
- Graphics.XHB.Gen.Glx: data Generic
- Graphics.XHB.Gen.Glx: data PbufferClobber
- Graphics.XHB.Gen.Glx: data UnsupportedPrivateRequest
- Graphics.XHB.Gen.Glx: draw_type_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: drawable_PbufferClobber :: PbufferClobber -> DRAWABLE
- Graphics.XHB.Gen.Glx: event_type_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: height_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: major_opcode_BadContext :: BadContext -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadContextState :: BadContextState -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadContextTag :: BadContextTag -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadCurrentDrawable :: BadCurrentDrawable -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadCurrentWindow :: BadCurrentWindow -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadDrawable :: BadDrawable -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadFBConfig :: BadFBConfig -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadLargeRequest :: BadLargeRequest -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadPbuffer :: BadPbuffer -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadPixmap :: BadPixmap -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadRenderRequest :: BadRenderRequest -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_BadWindow :: BadWindow -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_Generic :: Generic -> Word8
- Graphics.XHB.Gen.Glx: major_opcode_UnsupportedPrivateRequest :: UnsupportedPrivateRequest -> Word8
- Graphics.XHB.Gen.Glx: minor_opcode_BadContext :: BadContext -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadContextState :: BadContextState -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadContextTag :: BadContextTag -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadCurrentDrawable :: BadCurrentDrawable -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadCurrentWindow :: BadCurrentWindow -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadDrawable :: BadDrawable -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadFBConfig :: BadFBConfig -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadLargeRequest :: BadLargeRequest -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadPbuffer :: BadPbuffer -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadPixmap :: BadPixmap -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadRenderRequest :: BadRenderRequest -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_BadWindow :: BadWindow -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_Generic :: Generic -> Word16
- Graphics.XHB.Gen.Glx: minor_opcode_UnsupportedPrivateRequest :: UnsupportedPrivateRequest -> Word16
- Graphics.XHB.Gen.Glx: width_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: x_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Glx: y_PbufferClobber :: PbufferClobber -> Word16
- Graphics.XHB.Gen.Input: MkChangeDeviceNotify :: Word8 -> TIMESTAMP -> Word8 -> ChangeDeviceNotify
- Graphics.XHB.Gen.Input: MkDeviceButtonPress :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceButtonPress
- Graphics.XHB.Gen.Input: MkDeviceButtonRelease :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceButtonRelease
- Graphics.XHB.Gen.Input: MkDeviceButtonStateNotify :: Word8 -> [Word8] -> DeviceButtonStateNotify
- Graphics.XHB.Gen.Input: MkDeviceKeyPress :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceKeyPress
- Graphics.XHB.Gen.Input: MkDeviceKeyRelease :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceKeyRelease
- Graphics.XHB.Gen.Input: MkDeviceKeyStateNotify :: Word8 -> [Word8] -> DeviceKeyStateNotify
- Graphics.XHB.Gen.Input: MkDeviceMappingNotify :: Word8 -> Word8 -> KeyCode -> Word8 -> TIMESTAMP -> DeviceMappingNotify
- Graphics.XHB.Gen.Input: MkDeviceMotionNotify :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceMotionNotify
- Graphics.XHB.Gen.Input: MkDevicePresenceNotify :: TIMESTAMP -> Word8 -> Word8 -> Word16 -> DevicePresenceNotify
- Graphics.XHB.Gen.Input: MkDeviceStateNotify :: Word8 -> TIMESTAMP -> Word8 -> Word8 -> Word8 -> Word8 -> [Word8] -> [Word8] -> [Word32] -> DeviceStateNotify
- Graphics.XHB.Gen.Input: MkDeviceValuator :: Word8 -> Word16 -> Word8 -> Word8 -> [Int32] -> DeviceValuator
- Graphics.XHB.Gen.Input: MkFocusIn :: Word8 -> TIMESTAMP -> WINDOW -> Word8 -> Word8 -> FocusIn
- Graphics.XHB.Gen.Input: MkFocusOut :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> FocusOut
- Graphics.XHB.Gen.Input: MkProximityIn :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> ProximityIn
- Graphics.XHB.Gen.Input: MkProximityOut :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> ProximityOut
- Graphics.XHB.Gen.Input: buttons_DeviceButtonStateNotify :: DeviceButtonStateNotify -> [Word8]
- Graphics.XHB.Gen.Input: buttons_DeviceStateNotify :: DeviceStateNotify -> [Word8]
- Graphics.XHB.Gen.Input: child_DeviceButtonPress :: DeviceButtonPress -> WINDOW
- Graphics.XHB.Gen.Input: child_DeviceButtonRelease :: DeviceButtonRelease -> WINDOW
- Graphics.XHB.Gen.Input: child_DeviceKeyPress :: DeviceKeyPress -> WINDOW
- Graphics.XHB.Gen.Input: child_DeviceKeyRelease :: DeviceKeyRelease -> WINDOW
- Graphics.XHB.Gen.Input: child_DeviceMotionNotify :: DeviceMotionNotify -> WINDOW
- Graphics.XHB.Gen.Input: child_FocusOut :: FocusOut -> WINDOW
- Graphics.XHB.Gen.Input: child_ProximityIn :: ProximityIn -> WINDOW
- Graphics.XHB.Gen.Input: child_ProximityOut :: ProximityOut -> WINDOW
- Graphics.XHB.Gen.Input: classes_reported_DeviceStateNotify :: DeviceStateNotify -> Word8
- Graphics.XHB.Gen.Input: control_DevicePresenceNotify :: DevicePresenceNotify -> Word16
- Graphics.XHB.Gen.Input: count_DeviceMappingNotify :: DeviceMappingNotify -> Word8
- Graphics.XHB.Gen.Input: data ChangeDeviceNotify
- Graphics.XHB.Gen.Input: data DeviceButtonPress
- Graphics.XHB.Gen.Input: data DeviceButtonRelease
- Graphics.XHB.Gen.Input: data DeviceButtonStateNotify
- Graphics.XHB.Gen.Input: data DeviceKeyPress
- Graphics.XHB.Gen.Input: data DeviceKeyRelease
- Graphics.XHB.Gen.Input: data DeviceKeyStateNotify
- Graphics.XHB.Gen.Input: data DeviceMappingNotify
- Graphics.XHB.Gen.Input: data DeviceMotionNotify
- Graphics.XHB.Gen.Input: data DevicePresenceNotify
- Graphics.XHB.Gen.Input: data DeviceStateNotify
- Graphics.XHB.Gen.Input: data DeviceValuator
- Graphics.XHB.Gen.Input: data FocusIn
- Graphics.XHB.Gen.Input: data FocusOut
- Graphics.XHB.Gen.Input: data ProximityIn
- Graphics.XHB.Gen.Input: data ProximityOut
- Graphics.XHB.Gen.Input: detail_DeviceButtonPress :: DeviceButtonPress -> Word8
- Graphics.XHB.Gen.Input: detail_DeviceButtonRelease :: DeviceButtonRelease -> Word8
- Graphics.XHB.Gen.Input: detail_DeviceKeyPress :: DeviceKeyPress -> Word8
- Graphics.XHB.Gen.Input: detail_DeviceKeyRelease :: DeviceKeyRelease -> Word8
- Graphics.XHB.Gen.Input: detail_DeviceMotionNotify :: DeviceMotionNotify -> Word8
- Graphics.XHB.Gen.Input: detail_FocusIn :: FocusIn -> Word8
- Graphics.XHB.Gen.Input: detail_FocusOut :: FocusOut -> Word8
- Graphics.XHB.Gen.Input: detail_ProximityIn :: ProximityIn -> Word8
- Graphics.XHB.Gen.Input: detail_ProximityOut :: ProximityOut -> Word8
- Graphics.XHB.Gen.Input: devchange_DevicePresenceNotify :: DevicePresenceNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_ChangeDeviceNotify :: ChangeDeviceNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceButtonPress :: DeviceButtonPress -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceButtonRelease :: DeviceButtonRelease -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceButtonStateNotify :: DeviceButtonStateNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceKeyPress :: DeviceKeyPress -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceKeyRelease :: DeviceKeyRelease -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceKeyStateNotify :: DeviceKeyStateNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceMappingNotify :: DeviceMappingNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceMotionNotify :: DeviceMotionNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DevicePresenceNotify :: DevicePresenceNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceStateNotify :: DeviceStateNotify -> Word8
- Graphics.XHB.Gen.Input: device_id_DeviceValuator :: DeviceValuator -> Word8
- Graphics.XHB.Gen.Input: device_id_FocusIn :: FocusIn -> Word8
- Graphics.XHB.Gen.Input: device_id_FocusOut :: FocusOut -> Word8
- Graphics.XHB.Gen.Input: device_id_ProximityIn :: ProximityIn -> Word8
- Graphics.XHB.Gen.Input: device_id_ProximityOut :: ProximityOut -> Word8
- Graphics.XHB.Gen.Input: device_state_DeviceValuator :: DeviceValuator -> Word16
- Graphics.XHB.Gen.Input: event_DeviceButtonPress :: DeviceButtonPress -> WINDOW
- Graphics.XHB.Gen.Input: event_DeviceButtonRelease :: DeviceButtonRelease -> WINDOW
- Graphics.XHB.Gen.Input: event_DeviceKeyPress :: DeviceKeyPress -> WINDOW
- Graphics.XHB.Gen.Input: event_DeviceKeyRelease :: DeviceKeyRelease -> WINDOW
- Graphics.XHB.Gen.Input: event_DeviceMotionNotify :: DeviceMotionNotify -> WINDOW
- Graphics.XHB.Gen.Input: event_FocusOut :: FocusOut -> WINDOW
- Graphics.XHB.Gen.Input: event_ProximityIn :: ProximityIn -> WINDOW
- Graphics.XHB.Gen.Input: event_ProximityOut :: ProximityOut -> WINDOW
- Graphics.XHB.Gen.Input: event_x_DeviceButtonPress :: DeviceButtonPress -> Int16
- Graphics.XHB.Gen.Input: event_x_DeviceButtonRelease :: DeviceButtonRelease -> Int16
- Graphics.XHB.Gen.Input: event_x_DeviceKeyPress :: DeviceKeyPress -> Int16
- Graphics.XHB.Gen.Input: event_x_DeviceKeyRelease :: DeviceKeyRelease -> Int16
- Graphics.XHB.Gen.Input: event_x_DeviceMotionNotify :: DeviceMotionNotify -> Int16
- Graphics.XHB.Gen.Input: event_x_FocusOut :: FocusOut -> Int16
- Graphics.XHB.Gen.Input: event_x_ProximityIn :: ProximityIn -> Int16
- Graphics.XHB.Gen.Input: event_x_ProximityOut :: ProximityOut -> Int16
- Graphics.XHB.Gen.Input: event_y_DeviceButtonPress :: DeviceButtonPress -> Int16
- Graphics.XHB.Gen.Input: event_y_DeviceButtonRelease :: DeviceButtonRelease -> Int16
- Graphics.XHB.Gen.Input: event_y_DeviceKeyPress :: DeviceKeyPress -> Int16
- Graphics.XHB.Gen.Input: event_y_DeviceKeyRelease :: DeviceKeyRelease -> Int16
- Graphics.XHB.Gen.Input: event_y_DeviceMotionNotify :: DeviceMotionNotify -> Int16
- Graphics.XHB.Gen.Input: event_y_FocusOut :: FocusOut -> Int16
- Graphics.XHB.Gen.Input: event_y_ProximityIn :: ProximityIn -> Int16
- Graphics.XHB.Gen.Input: event_y_ProximityOut :: ProximityOut -> Int16
- Graphics.XHB.Gen.Input: first_keycode_DeviceMappingNotify :: DeviceMappingNotify -> KeyCode
- Graphics.XHB.Gen.Input: first_valuator_DeviceValuator :: DeviceValuator -> Word8
- Graphics.XHB.Gen.Input: keys_DeviceKeyStateNotify :: DeviceKeyStateNotify -> [Word8]
- Graphics.XHB.Gen.Input: keys_DeviceStateNotify :: DeviceStateNotify -> [Word8]
- Graphics.XHB.Gen.Input: mode_FocusIn :: FocusIn -> Word8
- Graphics.XHB.Gen.Input: num_buttons_DeviceStateNotify :: DeviceStateNotify -> Word8
- Graphics.XHB.Gen.Input: num_keys_DeviceStateNotify :: DeviceStateNotify -> Word8
- Graphics.XHB.Gen.Input: num_valuators_DeviceStateNotify :: DeviceStateNotify -> Word8
- Graphics.XHB.Gen.Input: num_valuators_DeviceValuator :: DeviceValuator -> Word8
- Graphics.XHB.Gen.Input: request_ChangeDeviceNotify :: ChangeDeviceNotify -> Word8
- Graphics.XHB.Gen.Input: request_DeviceMappingNotify :: DeviceMappingNotify -> Word8
- Graphics.XHB.Gen.Input: root_DeviceButtonPress :: DeviceButtonPress -> WINDOW
- Graphics.XHB.Gen.Input: root_DeviceButtonRelease :: DeviceButtonRelease -> WINDOW
- Graphics.XHB.Gen.Input: root_DeviceKeyPress :: DeviceKeyPress -> WINDOW
- Graphics.XHB.Gen.Input: root_DeviceKeyRelease :: DeviceKeyRelease -> WINDOW
- Graphics.XHB.Gen.Input: root_DeviceMotionNotify :: DeviceMotionNotify -> WINDOW
- Graphics.XHB.Gen.Input: root_FocusOut :: FocusOut -> WINDOW
- Graphics.XHB.Gen.Input: root_ProximityIn :: ProximityIn -> WINDOW
- Graphics.XHB.Gen.Input: root_ProximityOut :: ProximityOut -> WINDOW
- Graphics.XHB.Gen.Input: root_x_DeviceButtonPress :: DeviceButtonPress -> Int16
- Graphics.XHB.Gen.Input: root_x_DeviceButtonRelease :: DeviceButtonRelease -> Int16
- Graphics.XHB.Gen.Input: root_x_DeviceKeyPress :: DeviceKeyPress -> Int16
- Graphics.XHB.Gen.Input: root_x_DeviceKeyRelease :: DeviceKeyRelease -> Int16
- Graphics.XHB.Gen.Input: root_x_DeviceMotionNotify :: DeviceMotionNotify -> Int16
- Graphics.XHB.Gen.Input: root_x_FocusOut :: FocusOut -> Int16
- Graphics.XHB.Gen.Input: root_x_ProximityIn :: ProximityIn -> Int16
- Graphics.XHB.Gen.Input: root_x_ProximityOut :: ProximityOut -> Int16
- Graphics.XHB.Gen.Input: root_y_DeviceButtonPress :: DeviceButtonPress -> Int16
- Graphics.XHB.Gen.Input: root_y_DeviceButtonRelease :: DeviceButtonRelease -> Int16
- Graphics.XHB.Gen.Input: root_y_DeviceKeyPress :: DeviceKeyPress -> Int16
- Graphics.XHB.Gen.Input: root_y_DeviceKeyRelease :: DeviceKeyRelease -> Int16
- Graphics.XHB.Gen.Input: root_y_DeviceMotionNotify :: DeviceMotionNotify -> Int16
- Graphics.XHB.Gen.Input: root_y_FocusOut :: FocusOut -> Int16
- Graphics.XHB.Gen.Input: root_y_ProximityIn :: ProximityIn -> Int16
- Graphics.XHB.Gen.Input: root_y_ProximityOut :: ProximityOut -> Int16
- Graphics.XHB.Gen.Input: same_screen_DeviceButtonPress :: DeviceButtonPress -> Bool
- Graphics.XHB.Gen.Input: same_screen_DeviceButtonRelease :: DeviceButtonRelease -> Bool
- Graphics.XHB.Gen.Input: same_screen_DeviceKeyPress :: DeviceKeyPress -> Bool
- Graphics.XHB.Gen.Input: same_screen_DeviceKeyRelease :: DeviceKeyRelease -> Bool
- Graphics.XHB.Gen.Input: same_screen_DeviceMotionNotify :: DeviceMotionNotify -> Bool
- Graphics.XHB.Gen.Input: same_screen_FocusOut :: FocusOut -> Bool
- Graphics.XHB.Gen.Input: same_screen_ProximityIn :: ProximityIn -> Bool
- Graphics.XHB.Gen.Input: same_screen_ProximityOut :: ProximityOut -> Bool
- Graphics.XHB.Gen.Input: state_DeviceButtonPress :: DeviceButtonPress -> Word16
- Graphics.XHB.Gen.Input: state_DeviceButtonRelease :: DeviceButtonRelease -> Word16
- Graphics.XHB.Gen.Input: state_DeviceKeyPress :: DeviceKeyPress -> Word16
- Graphics.XHB.Gen.Input: state_DeviceKeyRelease :: DeviceKeyRelease -> Word16
- Graphics.XHB.Gen.Input: state_DeviceMotionNotify :: DeviceMotionNotify -> Word16
- Graphics.XHB.Gen.Input: state_FocusOut :: FocusOut -> Word16
- Graphics.XHB.Gen.Input: state_ProximityIn :: ProximityIn -> Word16
- Graphics.XHB.Gen.Input: state_ProximityOut :: ProximityOut -> Word16
- Graphics.XHB.Gen.Input: time_ChangeDeviceNotify :: ChangeDeviceNotify -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceButtonPress :: DeviceButtonPress -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceButtonRelease :: DeviceButtonRelease -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceKeyPress :: DeviceKeyPress -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceKeyRelease :: DeviceKeyRelease -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceMappingNotify :: DeviceMappingNotify -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceMotionNotify :: DeviceMotionNotify -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DevicePresenceNotify :: DevicePresenceNotify -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_DeviceStateNotify :: DeviceStateNotify -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_FocusIn :: FocusIn -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_FocusOut :: FocusOut -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_ProximityIn :: ProximityIn -> TIMESTAMP
- Graphics.XHB.Gen.Input: time_ProximityOut :: ProximityOut -> TIMESTAMP
- Graphics.XHB.Gen.Input: valuators_DeviceStateNotify :: DeviceStateNotify -> [Word32]
- Graphics.XHB.Gen.Input: valuators_DeviceValuator :: DeviceValuator -> [Int32]
- Graphics.XHB.Gen.Input: window_FocusIn :: FocusIn -> WINDOW
- Graphics.XHB.Gen.RandR: MkNotify :: Word8 -> NotifyData -> Notify
- Graphics.XHB.Gen.RandR: MkScreenChangeNotify :: Word8 -> TIMESTAMP -> TIMESTAMP -> WINDOW -> WINDOW -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> ScreenChangeNotify
- Graphics.XHB.Gen.RandR: config_timestamp_ScreenChangeNotify :: ScreenChangeNotify -> TIMESTAMP
- Graphics.XHB.Gen.RandR: data NotifyEnum
- Graphics.XHB.Gen.RandR: data ScreenChangeNotify
- Graphics.XHB.Gen.RandR: height_ScreenChangeNotify :: ScreenChangeNotify -> Word16
- Graphics.XHB.Gen.RandR: mheight_ScreenChangeNotify :: ScreenChangeNotify -> Word16
- Graphics.XHB.Gen.RandR: mwidth_ScreenChangeNotify :: ScreenChangeNotify -> Word16
- Graphics.XHB.Gen.RandR: request_window_ScreenChangeNotify :: ScreenChangeNotify -> WINDOW
- Graphics.XHB.Gen.RandR: root_ScreenChangeNotify :: ScreenChangeNotify -> WINDOW
- Graphics.XHB.Gen.RandR: rotation_ScreenChangeNotify :: ScreenChangeNotify -> Word8
- Graphics.XHB.Gen.RandR: sizeID_ScreenChangeNotify :: ScreenChangeNotify -> Word16
- Graphics.XHB.Gen.RandR: subCode_Notify :: Notify -> Word8
- Graphics.XHB.Gen.RandR: subpixel_order_ScreenChangeNotify :: ScreenChangeNotify -> Word16
- Graphics.XHB.Gen.RandR: timestamp_ScreenChangeNotify :: ScreenChangeNotify -> TIMESTAMP
- Graphics.XHB.Gen.RandR: u_Notify :: Notify -> NotifyData
- Graphics.XHB.Gen.RandR: width_ScreenChangeNotify :: ScreenChangeNotify -> Word16
- Graphics.XHB.Gen.Record: MkBadContext :: Word32 -> BadContext
- Graphics.XHB.Gen.Record: data BadContext
- Graphics.XHB.Gen.Record: invalid_record_BadContext :: BadContext -> Word32
- Graphics.XHB.Gen.ScreenSaver: MkNotify :: Word8 -> Word8 -> Word16 -> TIMESTAMP -> WINDOW -> WINDOW -> Word8 -> Bool -> Notify
- Graphics.XHB.Gen.ScreenSaver: code_Notify :: Notify -> Word8
- Graphics.XHB.Gen.ScreenSaver: data Notify
- Graphics.XHB.Gen.ScreenSaver: forced_Notify :: Notify -> Bool
- Graphics.XHB.Gen.ScreenSaver: kind_Notify :: Notify -> Word8
- Graphics.XHB.Gen.ScreenSaver: root_Notify :: Notify -> WINDOW
- Graphics.XHB.Gen.ScreenSaver: sequence_number_Notify :: Notify -> Word16
- Graphics.XHB.Gen.ScreenSaver: state_Notify :: Notify -> Word8
- Graphics.XHB.Gen.ScreenSaver: time_Notify :: Notify -> TIMESTAMP
- Graphics.XHB.Gen.ScreenSaver: window_Notify :: Notify -> WINDOW
- Graphics.XHB.Gen.Shape: MkNotify :: KIND -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> TIMESTAMP -> Bool -> Notify
- Graphics.XHB.Gen.Shape: affected_window_Notify :: Notify -> WINDOW
- Graphics.XHB.Gen.Shape: data Notify
- Graphics.XHB.Gen.Shape: extents_height_Notify :: Notify -> Word16
- Graphics.XHB.Gen.Shape: extents_width_Notify :: Notify -> Word16
- Graphics.XHB.Gen.Shape: extents_x_Notify :: Notify -> Int16
- Graphics.XHB.Gen.Shape: extents_y_Notify :: Notify -> Int16
- Graphics.XHB.Gen.Shape: server_time_Notify :: Notify -> TIMESTAMP
- Graphics.XHB.Gen.Shape: shape_kind_Notify :: Notify -> KIND
- Graphics.XHB.Gen.Shape: shaped_Notify :: Notify -> Bool
- Graphics.XHB.Gen.Shm: MkBadSeg :: Word32 -> Word16 -> Word8 -> BadSeg
- Graphics.XHB.Gen.Shm: MkCompletion :: DRAWABLE -> SEG -> Word16 -> Word8 -> Word32 -> Completion
- Graphics.XHB.Gen.Shm: bad_value_BadSeg :: BadSeg -> Word32
- Graphics.XHB.Gen.Shm: data BadSeg
- Graphics.XHB.Gen.Shm: data Completion
- Graphics.XHB.Gen.Shm: drawable_Completion :: Completion -> DRAWABLE
- Graphics.XHB.Gen.Shm: major_event_Completion :: Completion -> Word8
- Graphics.XHB.Gen.Shm: major_opcode_BadSeg :: BadSeg -> Word8
- Graphics.XHB.Gen.Shm: minor_event_Completion :: Completion -> Word16
- Graphics.XHB.Gen.Shm: minor_opcode_BadSeg :: BadSeg -> Word16
- Graphics.XHB.Gen.Shm: offset_Completion :: Completion -> Word32
- Graphics.XHB.Gen.Shm: shmseg_Completion :: Completion -> SEG
- Graphics.XHB.Gen.Sync: MkAlarm :: Word32 -> Word16 -> Word8 -> Alarm
- Graphics.XHB.Gen.Sync: MkAlarmNotify :: Word8 -> ALARM -> INT64 -> INT64 -> TIMESTAMP -> AlarmNotify
- Graphics.XHB.Gen.Sync: MkCounter :: Word32 -> Word16 -> Word8 -> Counter
- Graphics.XHB.Gen.Sync: MkCounterNotify :: Word8 -> COUNTER -> INT64 -> INT64 -> TIMESTAMP -> Word16 -> Bool -> CounterNotify
- Graphics.XHB.Gen.Sync: alarm_AlarmNotify :: AlarmNotify -> ALARM
- Graphics.XHB.Gen.Sync: alarm_value_AlarmNotify :: AlarmNotify -> INT64
- Graphics.XHB.Gen.Sync: bad_alarm_Alarm :: Alarm -> Word32
- Graphics.XHB.Gen.Sync: bad_counter_Counter :: Counter -> Word32
- Graphics.XHB.Gen.Sync: count_CounterNotify :: CounterNotify -> Word16
- Graphics.XHB.Gen.Sync: counter_CounterNotify :: CounterNotify -> COUNTER
- Graphics.XHB.Gen.Sync: counter_value_AlarmNotify :: AlarmNotify -> INT64
- Graphics.XHB.Gen.Sync: counter_value_CounterNotify :: CounterNotify -> INT64
- Graphics.XHB.Gen.Sync: data Alarm
- Graphics.XHB.Gen.Sync: data AlarmNotify
- Graphics.XHB.Gen.Sync: data Counter
- Graphics.XHB.Gen.Sync: data CounterNotify
- Graphics.XHB.Gen.Sync: destroyed_CounterNotify :: CounterNotify -> Bool
- Graphics.XHB.Gen.Sync: kind_AlarmNotify :: AlarmNotify -> Word8
- Graphics.XHB.Gen.Sync: kind_CounterNotify :: CounterNotify -> Word8
- Graphics.XHB.Gen.Sync: major_opcode_Alarm :: Alarm -> Word8
- Graphics.XHB.Gen.Sync: major_opcode_Counter :: Counter -> Word8
- Graphics.XHB.Gen.Sync: minor_opcode_Alarm :: Alarm -> Word16
- Graphics.XHB.Gen.Sync: minor_opcode_Counter :: Counter -> Word16
- Graphics.XHB.Gen.Sync: timestamp_AlarmNotify :: AlarmNotify -> TIMESTAMP
- Graphics.XHB.Gen.Sync: timestamp_CounterNotify :: CounterNotify -> TIMESTAMP
- Graphics.XHB.Gen.Sync: wait_value_CounterNotify :: CounterNotify -> INT64
- Graphics.XHB.Gen.Test: window_FakeInput :: FakeInput -> WINDOW
- Graphics.XHB.Gen.XFixes: MkCursorNotify :: Word8 -> WINDOW -> Word32 -> TIMESTAMP -> ATOM -> CursorNotify
- Graphics.XHB.Gen.XFixes: MkSelectionNotify :: Word8 -> WINDOW -> WINDOW -> ATOM -> TIMESTAMP -> TIMESTAMP -> SelectionNotify
- Graphics.XHB.Gen.XFixes: cursor_serial_CursorNotify :: CursorNotify -> Word32
- Graphics.XHB.Gen.XFixes: data CursorNotifyEnum
- Graphics.XHB.Gen.XFixes: data SelectionNotify
- Graphics.XHB.Gen.XFixes: name_CursorNotify :: CursorNotify -> ATOM
- Graphics.XHB.Gen.XFixes: owner_SelectionNotify :: SelectionNotify -> WINDOW
- Graphics.XHB.Gen.XFixes: selection_SelectionNotify :: SelectionNotify -> ATOM
- Graphics.XHB.Gen.XFixes: selection_timestamp_SelectionNotify :: SelectionNotify -> TIMESTAMP
- Graphics.XHB.Gen.XFixes: subtype_CursorNotify :: CursorNotify -> Word8
- Graphics.XHB.Gen.XFixes: subtype_SelectionNotify :: SelectionNotify -> Word8
- Graphics.XHB.Gen.XFixes: timestamp_CursorNotify :: CursorNotify -> TIMESTAMP
- Graphics.XHB.Gen.XFixes: timestamp_SelectionNotify :: SelectionNotify -> TIMESTAMP
- Graphics.XHB.Gen.XFixes: window_CursorNotify :: CursorNotify -> WINDOW
- Graphics.XHB.Gen.XFixes: window_SelectionNotify :: SelectionNotify -> WINDOW
- Graphics.XHB.Gen.XPrint: MkAttributNotify :: Word8 -> PCONTEXT -> AttributNotify
- Graphics.XHB.Gen.XPrint: MkNotify :: Word8 -> PCONTEXT -> Bool -> Notify
- Graphics.XHB.Gen.XPrint: cancel_Notify :: Notify -> Bool
- Graphics.XHB.Gen.XPrint: context_AttributNotify :: AttributNotify -> PCONTEXT
- Graphics.XHB.Gen.XPrint: context_Notify :: Notify -> PCONTEXT
- Graphics.XHB.Gen.XPrint: data AttributNotify
- Graphics.XHB.Gen.XPrint: data Notify
- Graphics.XHB.Gen.XPrint: detail_AttributNotify :: AttributNotify -> Word8
- Graphics.XHB.Gen.XPrint: detail_Notify :: Notify -> Word8
- Graphics.XHB.Gen.Xproto: JoinStyleMitre :: JoinStyle
- Graphics.XHB.Gen.Xproto: MkAccess :: Word32 -> Word16 -> Word8 -> Access
- Graphics.XHB.Gen.Xproto: MkAlloc :: Word32 -> Word16 -> Word8 -> Alloc
- Graphics.XHB.Gen.Xproto: MkAtom :: Word32 -> Word16 -> Word8 -> Atom
- Graphics.XHB.Gen.Xproto: MkButtonPress :: BUTTON -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> ButtonPress
- Graphics.XHB.Gen.Xproto: MkButtonRelease :: BUTTON -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> ButtonRelease
- Graphics.XHB.Gen.Xproto: MkCirculateNotify :: WINDOW -> WINDOW -> Place -> CirculateNotify
- Graphics.XHB.Gen.Xproto: MkCirculateRequest :: WINDOW -> WINDOW -> Place -> CirculateRequest
- Graphics.XHB.Gen.Xproto: MkClientMessage :: Word8 -> WINDOW -> ATOM -> ClientMessageData -> ClientMessage
- Graphics.XHB.Gen.Xproto: MkColormap :: Word32 -> Word16 -> Word8 -> Colormap
- Graphics.XHB.Gen.Xproto: MkColormapNotify :: WINDOW -> COLORMAP -> Bool -> ColormapState -> ColormapNotify
- Graphics.XHB.Gen.Xproto: MkConfigureNotify :: WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> Word16 -> Bool -> ConfigureNotify
- Graphics.XHB.Gen.Xproto: MkConfigureRequest :: StackMode -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> Word16 -> [ConfigWindow] -> ConfigureRequest
- Graphics.XHB.Gen.Xproto: MkCreateNotify :: WINDOW -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> Word16 -> Bool -> CreateNotify
- Graphics.XHB.Gen.Xproto: MkCursor :: Word32 -> Word16 -> Word8 -> Cursor
- Graphics.XHB.Gen.Xproto: MkDestroyNotify :: WINDOW -> WINDOW -> DestroyNotify
- Graphics.XHB.Gen.Xproto: MkDrawable :: Word32 -> Word16 -> Word8 -> Drawable
- Graphics.XHB.Gen.Xproto: MkEnterNotify :: NotifyDetail -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> NotifyMode -> Word8 -> EnterNotify
- Graphics.XHB.Gen.Xproto: MkExpose :: WINDOW -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Expose
- Graphics.XHB.Gen.Xproto: MkFocusIn :: NotifyDetail -> WINDOW -> NotifyMode -> FocusIn
- Graphics.XHB.Gen.Xproto: MkFocusOut :: NotifyDetail -> WINDOW -> NotifyMode -> FocusOut
- Graphics.XHB.Gen.Xproto: MkFont :: Word32 -> Word16 -> Word8 -> Font
- Graphics.XHB.Gen.Xproto: MkGContext :: Word32 -> Word16 -> Word8 -> GContext
- Graphics.XHB.Gen.Xproto: MkGraphicsExposure :: DRAWABLE -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word8 -> GraphicsExposure
- Graphics.XHB.Gen.Xproto: MkGravityNotify :: WINDOW -> WINDOW -> Int16 -> Int16 -> GravityNotify
- Graphics.XHB.Gen.Xproto: MkIDChoice :: Word32 -> Word16 -> Word8 -> IDChoice
- Graphics.XHB.Gen.Xproto: MkImplementation :: Word32 -> Word16 -> Word8 -> Implementation
- Graphics.XHB.Gen.Xproto: MkKeyPress :: KEYCODE -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> KeyPress
- Graphics.XHB.Gen.Xproto: MkKeyRelease :: KEYCODE -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> KeyRelease
- Graphics.XHB.Gen.Xproto: MkKeymapNotify :: [Word8] -> KeymapNotify
- Graphics.XHB.Gen.Xproto: MkLeaveNotify :: NotifyDetail -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> NotifyMode -> Word8 -> LeaveNotify
- Graphics.XHB.Gen.Xproto: MkLength :: Word32 -> Word16 -> Word8 -> Length
- Graphics.XHB.Gen.Xproto: MkMapNotify :: WINDOW -> WINDOW -> Bool -> MapNotify
- Graphics.XHB.Gen.Xproto: MkMapRequest :: WINDOW -> WINDOW -> MapRequest
- Graphics.XHB.Gen.Xproto: MkMappingNotify :: Mapping -> KEYCODE -> Word8 -> MappingNotify
- Graphics.XHB.Gen.Xproto: MkMatch :: Word32 -> Word16 -> Word8 -> Match
- Graphics.XHB.Gen.Xproto: MkMotionNotify :: Motion -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> MotionNotify
- Graphics.XHB.Gen.Xproto: MkName :: Word32 -> Word16 -> Word8 -> Name
- Graphics.XHB.Gen.Xproto: MkNoExposure :: DRAWABLE -> Word16 -> Word8 -> NoExposure
- Graphics.XHB.Gen.Xproto: MkPixmap :: Word32 -> Word16 -> Word8 -> Pixmap
- Graphics.XHB.Gen.Xproto: MkPropertyNotify :: WINDOW -> ATOM -> TIMESTAMP -> Property -> PropertyNotify
- Graphics.XHB.Gen.Xproto: MkReparentNotify :: WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Bool -> ReparentNotify
- Graphics.XHB.Gen.Xproto: MkRequest :: Word32 -> Word16 -> Word8 -> Request
- Graphics.XHB.Gen.Xproto: MkResizeRequest :: WINDOW -> Word16 -> Word16 -> ResizeRequest
- Graphics.XHB.Gen.Xproto: MkSelectionClear :: TIMESTAMP -> WINDOW -> ATOM -> SelectionClear
- Graphics.XHB.Gen.Xproto: MkSelectionNotify :: TIMESTAMP -> WINDOW -> ATOM -> ATOM -> ATOM -> SelectionNotify
- Graphics.XHB.Gen.Xproto: MkSelectionRequest :: TIMESTAMP -> WINDOW -> WINDOW -> ATOM -> ATOM -> ATOM -> SelectionRequest
- Graphics.XHB.Gen.Xproto: MkUnmapNotify :: WINDOW -> WINDOW -> Bool -> UnmapNotify
- Graphics.XHB.Gen.Xproto: MkValue :: Word32 -> Word16 -> Word8 -> Value
- Graphics.XHB.Gen.Xproto: MkVisibilityNotify :: WINDOW -> Visibility -> VisibilityNotify
- Graphics.XHB.Gen.Xproto: MkWindow :: Word32 -> Word16 -> Word8 -> Window
- Graphics.XHB.Gen.Xproto: above_sibling_ConfigureNotify :: ConfigureNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: atom_PropertyNotify :: PropertyNotify -> ATOM
- Graphics.XHB.Gen.Xproto: bad_value_Access :: Access -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Alloc :: Alloc -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Atom :: Atom -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Colormap :: Colormap -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Cursor :: Cursor -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Drawable :: Drawable -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Font :: Font -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_GContext :: GContext -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_IDChoice :: IDChoice -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Implementation :: Implementation -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Length :: Length -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Match :: Match -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Name :: Name -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Pixmap :: Pixmap -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Request :: Request -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Value :: Value -> Word32
- Graphics.XHB.Gen.Xproto: bad_value_Window :: Window -> Word32
- Graphics.XHB.Gen.Xproto: border_width_ConfigureNotify :: ConfigureNotify -> Word16
- Graphics.XHB.Gen.Xproto: border_width_ConfigureRequest :: ConfigureRequest -> Word16
- Graphics.XHB.Gen.Xproto: border_width_CreateNotify :: CreateNotify -> Word16
- Graphics.XHB.Gen.Xproto: child_ButtonPress :: ButtonPress -> WINDOW
- Graphics.XHB.Gen.Xproto: child_ButtonRelease :: ButtonRelease -> WINDOW
- Graphics.XHB.Gen.Xproto: child_EnterNotify :: EnterNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: child_KeyPress :: KeyPress -> WINDOW
- Graphics.XHB.Gen.Xproto: child_KeyRelease :: KeyRelease -> WINDOW
- Graphics.XHB.Gen.Xproto: child_LeaveNotify :: LeaveNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: child_MotionNotify :: MotionNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: colormap_ColormapNotify :: ColormapNotify -> COLORMAP
- Graphics.XHB.Gen.Xproto: count_Expose :: Expose -> Word16
- Graphics.XHB.Gen.Xproto: count_GraphicsExposure :: GraphicsExposure -> Word16
- Graphics.XHB.Gen.Xproto: count_MappingNotify :: MappingNotify -> Word8
- Graphics.XHB.Gen.Xproto: data Access
- Graphics.XHB.Gen.Xproto: data Alloc
- Graphics.XHB.Gen.Xproto: data ButtonPress
- Graphics.XHB.Gen.Xproto: data ButtonRelease
- Graphics.XHB.Gen.Xproto: data CirculateNotify
- Graphics.XHB.Gen.Xproto: data CirculateRequest
- Graphics.XHB.Gen.Xproto: data ClientMessage
- Graphics.XHB.Gen.Xproto: data ColormapNotify
- Graphics.XHB.Gen.Xproto: data ConfigureNotify
- Graphics.XHB.Gen.Xproto: data ConfigureRequest
- Graphics.XHB.Gen.Xproto: data CreateNotify
- Graphics.XHB.Gen.Xproto: data DestroyNotify
- Graphics.XHB.Gen.Xproto: data Drawable
- Graphics.XHB.Gen.Xproto: data EnterNotify
- Graphics.XHB.Gen.Xproto: data Expose
- Graphics.XHB.Gen.Xproto: data FocusIn
- Graphics.XHB.Gen.Xproto: data FocusOut
- Graphics.XHB.Gen.Xproto: data GContext
- Graphics.XHB.Gen.Xproto: data GraphicsExposure
- Graphics.XHB.Gen.Xproto: data GravityNotify
- Graphics.XHB.Gen.Xproto: data IDChoice
- Graphics.XHB.Gen.Xproto: data Implementation
- Graphics.XHB.Gen.Xproto: data KeyPress
- Graphics.XHB.Gen.Xproto: data KeyRelease
- Graphics.XHB.Gen.Xproto: data KeymapNotify
- Graphics.XHB.Gen.Xproto: data LeaveNotify
- Graphics.XHB.Gen.Xproto: data Length
- Graphics.XHB.Gen.Xproto: data MapNotify
- Graphics.XHB.Gen.Xproto: data MapRequest
- Graphics.XHB.Gen.Xproto: data MappingNotify
- Graphics.XHB.Gen.Xproto: data Match
- Graphics.XHB.Gen.Xproto: data MotionNotify
- Graphics.XHB.Gen.Xproto: data Name
- Graphics.XHB.Gen.Xproto: data NoExposure
- Graphics.XHB.Gen.Xproto: data PropertyNotify
- Graphics.XHB.Gen.Xproto: data ReparentNotify
- Graphics.XHB.Gen.Xproto: data Request
- Graphics.XHB.Gen.Xproto: data ResizeRequest
- Graphics.XHB.Gen.Xproto: data SelectionClear
- Graphics.XHB.Gen.Xproto: data SelectionNotify
- Graphics.XHB.Gen.Xproto: data SelectionRequest
- Graphics.XHB.Gen.Xproto: data UnmapNotify
- Graphics.XHB.Gen.Xproto: data Value
- Graphics.XHB.Gen.Xproto: data VisibilityNotify
- Graphics.XHB.Gen.Xproto: data_ClientMessage :: ClientMessage -> ClientMessageData
- Graphics.XHB.Gen.Xproto: detail_ButtonPress :: ButtonPress -> BUTTON
- Graphics.XHB.Gen.Xproto: detail_ButtonRelease :: ButtonRelease -> BUTTON
- Graphics.XHB.Gen.Xproto: detail_EnterNotify :: EnterNotify -> NotifyDetail
- Graphics.XHB.Gen.Xproto: detail_FocusIn :: FocusIn -> NotifyDetail
- Graphics.XHB.Gen.Xproto: detail_FocusOut :: FocusOut -> NotifyDetail
- Graphics.XHB.Gen.Xproto: detail_KeyPress :: KeyPress -> KEYCODE
- Graphics.XHB.Gen.Xproto: detail_KeyRelease :: KeyRelease -> KEYCODE
- Graphics.XHB.Gen.Xproto: detail_LeaveNotify :: LeaveNotify -> NotifyDetail
- Graphics.XHB.Gen.Xproto: detail_MotionNotify :: MotionNotify -> Motion
- Graphics.XHB.Gen.Xproto: drawable_GraphicsExposure :: GraphicsExposure -> DRAWABLE
- Graphics.XHB.Gen.Xproto: drawable_NoExposure :: NoExposure -> DRAWABLE
- Graphics.XHB.Gen.Xproto: event_ButtonPress :: ButtonPress -> WINDOW
- Graphics.XHB.Gen.Xproto: event_ButtonRelease :: ButtonRelease -> WINDOW
- Graphics.XHB.Gen.Xproto: event_CirculateNotify :: CirculateNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_CirculateRequest :: CirculateRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: event_ConfigureNotify :: ConfigureNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_DestroyNotify :: DestroyNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_EnterNotify :: EnterNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_FocusIn :: FocusIn -> WINDOW
- Graphics.XHB.Gen.Xproto: event_FocusOut :: FocusOut -> WINDOW
- Graphics.XHB.Gen.Xproto: event_GravityNotify :: GravityNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_KeyPress :: KeyPress -> WINDOW
- Graphics.XHB.Gen.Xproto: event_KeyRelease :: KeyRelease -> WINDOW
- Graphics.XHB.Gen.Xproto: event_LeaveNotify :: LeaveNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_MapNotify :: MapNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_MotionNotify :: MotionNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_ReparentNotify :: ReparentNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_UnmapNotify :: UnmapNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: event_x_ButtonPress :: ButtonPress -> Int16
- Graphics.XHB.Gen.Xproto: event_x_ButtonRelease :: ButtonRelease -> Int16
- Graphics.XHB.Gen.Xproto: event_x_EnterNotify :: EnterNotify -> Int16
- Graphics.XHB.Gen.Xproto: event_x_KeyPress :: KeyPress -> Int16
- Graphics.XHB.Gen.Xproto: event_x_KeyRelease :: KeyRelease -> Int16
- Graphics.XHB.Gen.Xproto: event_x_LeaveNotify :: LeaveNotify -> Int16
- Graphics.XHB.Gen.Xproto: event_x_MotionNotify :: MotionNotify -> Int16
- Graphics.XHB.Gen.Xproto: event_y_ButtonPress :: ButtonPress -> Int16
- Graphics.XHB.Gen.Xproto: event_y_ButtonRelease :: ButtonRelease -> Int16
- Graphics.XHB.Gen.Xproto: event_y_EnterNotify :: EnterNotify -> Int16
- Graphics.XHB.Gen.Xproto: event_y_KeyPress :: KeyPress -> Int16
- Graphics.XHB.Gen.Xproto: event_y_KeyRelease :: KeyRelease -> Int16
- Graphics.XHB.Gen.Xproto: event_y_LeaveNotify :: LeaveNotify -> Int16
- Graphics.XHB.Gen.Xproto: event_y_MotionNotify :: MotionNotify -> Int16
- Graphics.XHB.Gen.Xproto: first_keycode_MappingNotify :: MappingNotify -> KEYCODE
- Graphics.XHB.Gen.Xproto: format_ClientMessage :: ClientMessage -> Word8
- Graphics.XHB.Gen.Xproto: from_configure_UnmapNotify :: UnmapNotify -> Bool
- Graphics.XHB.Gen.Xproto: height_ConfigureNotify :: ConfigureNotify -> Word16
- Graphics.XHB.Gen.Xproto: height_ConfigureRequest :: ConfigureRequest -> Word16
- Graphics.XHB.Gen.Xproto: height_CreateNotify :: CreateNotify -> Word16
- Graphics.XHB.Gen.Xproto: height_Expose :: Expose -> Word16
- Graphics.XHB.Gen.Xproto: height_GraphicsExposure :: GraphicsExposure -> Word16
- Graphics.XHB.Gen.Xproto: height_ResizeRequest :: ResizeRequest -> Word16
- Graphics.XHB.Gen.Xproto: keys_KeymapNotify :: KeymapNotify -> [Word8]
- Graphics.XHB.Gen.Xproto: major_opcode_Access :: Access -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Alloc :: Alloc -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Atom :: Atom -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Colormap :: Colormap -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Cursor :: Cursor -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Drawable :: Drawable -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Font :: Font -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_GContext :: GContext -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_GraphicsExposure :: GraphicsExposure -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_IDChoice :: IDChoice -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Implementation :: Implementation -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Length :: Length -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Match :: Match -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Name :: Name -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_NoExposure :: NoExposure -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Pixmap :: Pixmap -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Request :: Request -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Value :: Value -> Word8
- Graphics.XHB.Gen.Xproto: major_opcode_Window :: Window -> Word8
- Graphics.XHB.Gen.Xproto: minor_opcode_Access :: Access -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Alloc :: Alloc -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Atom :: Atom -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Colormap :: Colormap -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Cursor :: Cursor -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Drawable :: Drawable -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Font :: Font -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_GContext :: GContext -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_GraphicsExposure :: GraphicsExposure -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_IDChoice :: IDChoice -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Implementation :: Implementation -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Length :: Length -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Match :: Match -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Name :: Name -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_NoExposure :: NoExposure -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Pixmap :: Pixmap -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Request :: Request -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Value :: Value -> Word16
- Graphics.XHB.Gen.Xproto: minor_opcode_Window :: Window -> Word16
- Graphics.XHB.Gen.Xproto: mode_EnterNotify :: EnterNotify -> NotifyMode
- Graphics.XHB.Gen.Xproto: mode_FocusIn :: FocusIn -> NotifyMode
- Graphics.XHB.Gen.Xproto: mode_FocusOut :: FocusOut -> NotifyMode
- Graphics.XHB.Gen.Xproto: mode_LeaveNotify :: LeaveNotify -> NotifyMode
- Graphics.XHB.Gen.Xproto: new_ColormapNotify :: ColormapNotify -> Bool
- Graphics.XHB.Gen.Xproto: override_redirect_ConfigureNotify :: ConfigureNotify -> Bool
- Graphics.XHB.Gen.Xproto: override_redirect_CreateNotify :: CreateNotify -> Bool
- Graphics.XHB.Gen.Xproto: override_redirect_MapNotify :: MapNotify -> Bool
- Graphics.XHB.Gen.Xproto: override_redirect_ReparentNotify :: ReparentNotify -> Bool
- Graphics.XHB.Gen.Xproto: owner_SelectionClear :: SelectionClear -> WINDOW
- Graphics.XHB.Gen.Xproto: owner_SelectionRequest :: SelectionRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: parent_ConfigureRequest :: ConfigureRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: parent_CreateNotify :: CreateNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: parent_MapRequest :: MapRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: parent_ReparentNotify :: ReparentNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: place_CirculateNotify :: CirculateNotify -> Place
- Graphics.XHB.Gen.Xproto: place_CirculateRequest :: CirculateRequest -> Place
- Graphics.XHB.Gen.Xproto: property_SelectionNotify :: SelectionNotify -> ATOM
- Graphics.XHB.Gen.Xproto: property_SelectionRequest :: SelectionRequest -> ATOM
- Graphics.XHB.Gen.Xproto: request_MappingNotify :: MappingNotify -> Mapping
- Graphics.XHB.Gen.Xproto: requestor_SelectionNotify :: SelectionNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: requestor_SelectionRequest :: SelectionRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: root_ButtonPress :: ButtonPress -> WINDOW
- Graphics.XHB.Gen.Xproto: root_ButtonRelease :: ButtonRelease -> WINDOW
- Graphics.XHB.Gen.Xproto: root_EnterNotify :: EnterNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: root_KeyPress :: KeyPress -> WINDOW
- Graphics.XHB.Gen.Xproto: root_KeyRelease :: KeyRelease -> WINDOW
- Graphics.XHB.Gen.Xproto: root_LeaveNotify :: LeaveNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: root_MotionNotify :: MotionNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: root_x_ButtonPress :: ButtonPress -> Int16
- Graphics.XHB.Gen.Xproto: root_x_ButtonRelease :: ButtonRelease -> Int16
- Graphics.XHB.Gen.Xproto: root_x_EnterNotify :: EnterNotify -> Int16
- Graphics.XHB.Gen.Xproto: root_x_KeyPress :: KeyPress -> Int16
- Graphics.XHB.Gen.Xproto: root_x_KeyRelease :: KeyRelease -> Int16
- Graphics.XHB.Gen.Xproto: root_x_LeaveNotify :: LeaveNotify -> Int16
- Graphics.XHB.Gen.Xproto: root_x_MotionNotify :: MotionNotify -> Int16
- Graphics.XHB.Gen.Xproto: root_y_ButtonPress :: ButtonPress -> Int16
- Graphics.XHB.Gen.Xproto: root_y_ButtonRelease :: ButtonRelease -> Int16
- Graphics.XHB.Gen.Xproto: root_y_EnterNotify :: EnterNotify -> Int16
- Graphics.XHB.Gen.Xproto: root_y_KeyPress :: KeyPress -> Int16
- Graphics.XHB.Gen.Xproto: root_y_KeyRelease :: KeyRelease -> Int16
- Graphics.XHB.Gen.Xproto: root_y_LeaveNotify :: LeaveNotify -> Int16
- Graphics.XHB.Gen.Xproto: root_y_MotionNotify :: MotionNotify -> Int16
- Graphics.XHB.Gen.Xproto: same_screen_ButtonPress :: ButtonPress -> Bool
- Graphics.XHB.Gen.Xproto: same_screen_ButtonRelease :: ButtonRelease -> Bool
- Graphics.XHB.Gen.Xproto: same_screen_KeyPress :: KeyPress -> Bool
- Graphics.XHB.Gen.Xproto: same_screen_KeyRelease :: KeyRelease -> Bool
- Graphics.XHB.Gen.Xproto: same_screen_MotionNotify :: MotionNotify -> Bool
- Graphics.XHB.Gen.Xproto: same_screen_focus_EnterNotify :: EnterNotify -> Word8
- Graphics.XHB.Gen.Xproto: same_screen_focus_LeaveNotify :: LeaveNotify -> Word8
- Graphics.XHB.Gen.Xproto: selection_SelectionClear :: SelectionClear -> ATOM
- Graphics.XHB.Gen.Xproto: selection_SelectionNotify :: SelectionNotify -> ATOM
- Graphics.XHB.Gen.Xproto: selection_SelectionRequest :: SelectionRequest -> ATOM
- Graphics.XHB.Gen.Xproto: sibling_ConfigureRequest :: ConfigureRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: stack_mode_ConfigureRequest :: ConfigureRequest -> StackMode
- Graphics.XHB.Gen.Xproto: state_ButtonPress :: ButtonPress -> Word16
- Graphics.XHB.Gen.Xproto: state_ButtonRelease :: ButtonRelease -> Word16
- Graphics.XHB.Gen.Xproto: state_ColormapNotify :: ColormapNotify -> ColormapState
- Graphics.XHB.Gen.Xproto: state_EnterNotify :: EnterNotify -> Word16
- Graphics.XHB.Gen.Xproto: state_KeyPress :: KeyPress -> Word16
- Graphics.XHB.Gen.Xproto: state_KeyRelease :: KeyRelease -> Word16
- Graphics.XHB.Gen.Xproto: state_LeaveNotify :: LeaveNotify -> Word16
- Graphics.XHB.Gen.Xproto: state_MotionNotify :: MotionNotify -> Word16
- Graphics.XHB.Gen.Xproto: state_PropertyNotify :: PropertyNotify -> Property
- Graphics.XHB.Gen.Xproto: state_VisibilityNotify :: VisibilityNotify -> Visibility
- Graphics.XHB.Gen.Xproto: target_SelectionNotify :: SelectionNotify -> ATOM
- Graphics.XHB.Gen.Xproto: target_SelectionRequest :: SelectionRequest -> ATOM
- Graphics.XHB.Gen.Xproto: time_ButtonPress :: ButtonPress -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_ButtonRelease :: ButtonRelease -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_EnterNotify :: EnterNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_KeyPress :: KeyPress -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_KeyRelease :: KeyRelease -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_LeaveNotify :: LeaveNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_MotionNotify :: MotionNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_PropertyNotify :: PropertyNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_SelectionClear :: SelectionClear -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_SelectionNotify :: SelectionNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: time_SelectionRequest :: SelectionRequest -> TIMESTAMP
- Graphics.XHB.Gen.Xproto: type_ClientMessage :: ClientMessage -> ATOM
- Graphics.XHB.Gen.Xproto: value_mask_ConfigureRequest :: ConfigureRequest -> [ConfigWindow]
- Graphics.XHB.Gen.Xproto: width_ConfigureNotify :: ConfigureNotify -> Word16
- Graphics.XHB.Gen.Xproto: width_ConfigureRequest :: ConfigureRequest -> Word16
- Graphics.XHB.Gen.Xproto: width_CreateNotify :: CreateNotify -> Word16
- Graphics.XHB.Gen.Xproto: width_Expose :: Expose -> Word16
- Graphics.XHB.Gen.Xproto: width_GraphicsExposure :: GraphicsExposure -> Word16
- Graphics.XHB.Gen.Xproto: width_ResizeRequest :: ResizeRequest -> Word16
- Graphics.XHB.Gen.Xproto: window_CirculateNotify :: CirculateNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_CirculateRequest :: CirculateRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: window_ClientMessage :: ClientMessage -> WINDOW
- Graphics.XHB.Gen.Xproto: window_ColormapNotify :: ColormapNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_ConfigureNotify :: ConfigureNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_ConfigureRequest :: ConfigureRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: window_CreateNotify :: CreateNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_DestroyNotify :: DestroyNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_Expose :: Expose -> WINDOW
- Graphics.XHB.Gen.Xproto: window_GravityNotify :: GravityNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_MapNotify :: MapNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_MapRequest :: MapRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: window_PropertyNotify :: PropertyNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_ReparentNotify :: ReparentNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_ResizeRequest :: ResizeRequest -> WINDOW
- Graphics.XHB.Gen.Xproto: window_UnmapNotify :: UnmapNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: window_VisibilityNotify :: VisibilityNotify -> WINDOW
- Graphics.XHB.Gen.Xproto: x_ConfigureNotify :: ConfigureNotify -> Int16
- Graphics.XHB.Gen.Xproto: x_ConfigureRequest :: ConfigureRequest -> Int16
- Graphics.XHB.Gen.Xproto: x_CreateNotify :: CreateNotify -> Int16
- Graphics.XHB.Gen.Xproto: x_Expose :: Expose -> Word16
- Graphics.XHB.Gen.Xproto: x_GraphicsExposure :: GraphicsExposure -> Word16
- Graphics.XHB.Gen.Xproto: x_GravityNotify :: GravityNotify -> Int16
- Graphics.XHB.Gen.Xproto: x_ReparentNotify :: ReparentNotify -> Int16
- Graphics.XHB.Gen.Xproto: y_ConfigureNotify :: ConfigureNotify -> Int16
- Graphics.XHB.Gen.Xproto: y_ConfigureRequest :: ConfigureRequest -> Int16
- Graphics.XHB.Gen.Xproto: y_CreateNotify :: CreateNotify -> Int16
- Graphics.XHB.Gen.Xproto: y_Expose :: Expose -> Word16
- Graphics.XHB.Gen.Xproto: y_GraphicsExposure :: GraphicsExposure -> Word16
- Graphics.XHB.Gen.Xproto: y_GravityNotify :: GravityNotify -> Int16
- Graphics.XHB.Gen.Xproto: y_ReparentNotify :: ReparentNotify -> Int16
- Graphics.XHB.Gen.Xv: MkPortNotify :: TIMESTAMP -> PORT -> ATOM -> Int32 -> PortNotify
- Graphics.XHB.Gen.Xv: MkVideoNotify :: Word8 -> TIMESTAMP -> DRAWABLE -> PORT -> VideoNotify
- Graphics.XHB.Gen.Xv: attribute_PortNotify :: PortNotify -> ATOM
- Graphics.XHB.Gen.Xv: data PortNotify
- Graphics.XHB.Gen.Xv: data VideoNotify
- Graphics.XHB.Gen.Xv: drawable_VideoNotify :: VideoNotify -> DRAWABLE
- Graphics.XHB.Gen.Xv: port_PortNotify :: PortNotify -> PORT
- Graphics.XHB.Gen.Xv: port_VideoNotify :: VideoNotify -> PORT
- Graphics.XHB.Gen.Xv: reason_VideoNotify :: VideoNotify -> Word8
- Graphics.XHB.Gen.Xv: time_PortNotify :: PortNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xv: time_VideoNotify :: VideoNotify -> TIMESTAMP
- Graphics.XHB.Gen.Xv: value_PortNotify :: PortNotify -> Int32
+ Graphics.XHB.Gen.DPMS: DPMSModeOff :: DPMSMode
+ Graphics.XHB.Gen.DPMS: DPMSModeOn :: DPMSMode
+ Graphics.XHB.Gen.DPMS: DPMSModeStandby :: DPMSMode
+ Graphics.XHB.Gen.DPMS: DPMSModeSuspend :: DPMSMode
+ Graphics.XHB.Gen.DPMS: data DPMSMode
+ Graphics.XHB.Gen.Damage: MkNotifyEvent :: ReportLevel -> DRAWABLE -> DAMAGE -> TIMESTAMP -> RECTANGLE -> RECTANGLE -> NotifyEvent
+ Graphics.XHB.Gen.Damage: area_NotifyEvent :: NotifyEvent -> RECTANGLE
+ Graphics.XHB.Gen.Damage: damage_NotifyEvent :: NotifyEvent -> DAMAGE
+ Graphics.XHB.Gen.Damage: data NotifyEvent
+ Graphics.XHB.Gen.Damage: drawable_NotifyEvent :: NotifyEvent -> DRAWABLE
+ Graphics.XHB.Gen.Damage: geometry_NotifyEvent :: NotifyEvent -> RECTANGLE
+ Graphics.XHB.Gen.Damage: level_NotifyEvent :: NotifyEvent -> ReportLevel
+ Graphics.XHB.Gen.Damage: timestamp_NotifyEvent :: NotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Glx: MkBadContextError :: Word32 -> Word16 -> Word8 -> BadContextError
+ Graphics.XHB.Gen.Glx: MkBadContextStateError :: Word32 -> Word16 -> Word8 -> BadContextStateError
+ Graphics.XHB.Gen.Glx: MkBadContextTagError :: Word32 -> Word16 -> Word8 -> BadContextTagError
+ Graphics.XHB.Gen.Glx: MkBadCurrentDrawableError :: Word32 -> Word16 -> Word8 -> BadCurrentDrawableError
+ Graphics.XHB.Gen.Glx: MkBadCurrentWindowError :: Word32 -> Word16 -> Word8 -> BadCurrentWindowError
+ Graphics.XHB.Gen.Glx: MkBadDrawableError :: Word32 -> Word16 -> Word8 -> BadDrawableError
+ Graphics.XHB.Gen.Glx: MkBadFBConfigError :: Word32 -> Word16 -> Word8 -> BadFBConfigError
+ Graphics.XHB.Gen.Glx: MkBadLargeRequestError :: Word32 -> Word16 -> Word8 -> BadLargeRequestError
+ Graphics.XHB.Gen.Glx: MkBadPbufferError :: Word32 -> Word16 -> Word8 -> BadPbufferError
+ Graphics.XHB.Gen.Glx: MkBadPixmapError :: Word32 -> Word16 -> Word8 -> BadPixmapError
+ Graphics.XHB.Gen.Glx: MkBadRenderRequestError :: Word32 -> Word16 -> Word8 -> BadRenderRequestError
+ Graphics.XHB.Gen.Glx: MkBadWindowError :: Word32 -> Word16 -> Word8 -> BadWindowError
+ Graphics.XHB.Gen.Glx: MkGenericError :: Word32 -> Word16 -> Word8 -> GenericError
+ Graphics.XHB.Gen.Glx: MkPbufferClobberEvent :: Word16 -> Word16 -> DRAWABLE -> Word32 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> PbufferClobberEvent
+ Graphics.XHB.Gen.Glx: MkUnsupportedPrivateRequestError :: Word32 -> Word16 -> Word8 -> UnsupportedPrivateRequestError
+ Graphics.XHB.Gen.Glx: aux_buffer_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: b_mask_PbufferClobberEvent :: PbufferClobberEvent -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadContextError :: BadContextError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadContextStateError :: BadContextStateError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadContextTagError :: BadContextTagError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadCurrentDrawableError :: BadCurrentDrawableError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadCurrentWindowError :: BadCurrentWindowError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadDrawableError :: BadDrawableError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadFBConfigError :: BadFBConfigError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadLargeRequestError :: BadLargeRequestError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadPbufferError :: BadPbufferError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadPixmapError :: BadPixmapError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadRenderRequestError :: BadRenderRequestError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_BadWindowError :: BadWindowError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_GenericError :: GenericError -> Word32
+ Graphics.XHB.Gen.Glx: bad_value_UnsupportedPrivateRequestError :: UnsupportedPrivateRequestError -> Word32
+ Graphics.XHB.Gen.Glx: count_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: data BadContextError
+ Graphics.XHB.Gen.Glx: data BadContextStateError
+ Graphics.XHB.Gen.Glx: data BadContextTagError
+ Graphics.XHB.Gen.Glx: data BadCurrentDrawableError
+ Graphics.XHB.Gen.Glx: data BadCurrentWindowError
+ Graphics.XHB.Gen.Glx: data BadDrawableError
+ Graphics.XHB.Gen.Glx: data BadFBConfigError
+ Graphics.XHB.Gen.Glx: data BadLargeRequestError
+ Graphics.XHB.Gen.Glx: data BadPbufferError
+ Graphics.XHB.Gen.Glx: data BadPixmapError
+ Graphics.XHB.Gen.Glx: data BadRenderRequestError
+ Graphics.XHB.Gen.Glx: data BadWindowError
+ Graphics.XHB.Gen.Glx: data GenericError
+ Graphics.XHB.Gen.Glx: data PbufferClobberEvent
+ Graphics.XHB.Gen.Glx: data UnsupportedPrivateRequestError
+ Graphics.XHB.Gen.Glx: draw_type_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: drawable_PbufferClobberEvent :: PbufferClobberEvent -> DRAWABLE
+ Graphics.XHB.Gen.Glx: event_type_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: height_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: major_opcode_BadContextError :: BadContextError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadContextStateError :: BadContextStateError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadContextTagError :: BadContextTagError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadCurrentDrawableError :: BadCurrentDrawableError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadCurrentWindowError :: BadCurrentWindowError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadDrawableError :: BadDrawableError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadFBConfigError :: BadFBConfigError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadLargeRequestError :: BadLargeRequestError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadPbufferError :: BadPbufferError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadPixmapError :: BadPixmapError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadRenderRequestError :: BadRenderRequestError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_BadWindowError :: BadWindowError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_GenericError :: GenericError -> Word8
+ Graphics.XHB.Gen.Glx: major_opcode_UnsupportedPrivateRequestError :: UnsupportedPrivateRequestError -> Word8
+ Graphics.XHB.Gen.Glx: minor_opcode_BadContextError :: BadContextError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadContextStateError :: BadContextStateError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadContextTagError :: BadContextTagError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadCurrentDrawableError :: BadCurrentDrawableError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadCurrentWindowError :: BadCurrentWindowError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadDrawableError :: BadDrawableError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadFBConfigError :: BadFBConfigError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadLargeRequestError :: BadLargeRequestError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadPbufferError :: BadPbufferError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadPixmapError :: BadPixmapError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadRenderRequestError :: BadRenderRequestError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_BadWindowError :: BadWindowError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_GenericError :: GenericError -> Word16
+ Graphics.XHB.Gen.Glx: minor_opcode_UnsupportedPrivateRequestError :: UnsupportedPrivateRequestError -> Word16
+ Graphics.XHB.Gen.Glx: width_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: x_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Glx: y_PbufferClobberEvent :: PbufferClobberEvent -> Word16
+ Graphics.XHB.Gen.Input: DeviceInputModeAsyncAll :: DeviceInputMode
+ Graphics.XHB.Gen.Input: DeviceInputModeAsyncOtherDevices :: DeviceInputMode
+ Graphics.XHB.Gen.Input: DeviceInputModeAsyncThisDevice :: DeviceInputMode
+ Graphics.XHB.Gen.Input: DeviceInputModeReplayThisDevice :: DeviceInputMode
+ Graphics.XHB.Gen.Input: DeviceInputModeSyncAll :: DeviceInputMode
+ Graphics.XHB.Gen.Input: DeviceInputModeSyncThisDevice :: DeviceInputMode
+ Graphics.XHB.Gen.Input: FeedbackClassBell :: FeedbackClass
+ Graphics.XHB.Gen.Input: FeedbackClassInteger :: FeedbackClass
+ Graphics.XHB.Gen.Input: FeedbackClassKeyboard :: FeedbackClass
+ Graphics.XHB.Gen.Input: FeedbackClassLed :: FeedbackClass
+ Graphics.XHB.Gen.Input: FeedbackClassPointer :: FeedbackClass
+ Graphics.XHB.Gen.Input: FeedbackClassString :: FeedbackClass
+ Graphics.XHB.Gen.Input: MkChangeDeviceNotifyEvent :: Word8 -> TIMESTAMP -> Word8 -> ChangeDeviceNotifyEvent
+ Graphics.XHB.Gen.Input: MkDeviceButtonPressEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceButtonPressEvent
+ Graphics.XHB.Gen.Input: MkDeviceButtonReleaseEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceButtonReleaseEvent
+ Graphics.XHB.Gen.Input: MkDeviceButtonStateNotifyEvent :: Word8 -> [Word8] -> DeviceButtonStateNotifyEvent
+ Graphics.XHB.Gen.Input: MkDeviceKeyPressEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceKeyPressEvent
+ Graphics.XHB.Gen.Input: MkDeviceKeyReleaseEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceKeyReleaseEvent
+ Graphics.XHB.Gen.Input: MkDeviceKeyStateNotifyEvent :: Word8 -> [Word8] -> DeviceKeyStateNotifyEvent
+ Graphics.XHB.Gen.Input: MkDeviceMappingNotifyEvent :: Word8 -> Word8 -> KeyCode -> Word8 -> TIMESTAMP -> DeviceMappingNotifyEvent
+ Graphics.XHB.Gen.Input: MkDeviceMotionNotifyEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> DeviceMotionNotifyEvent
+ Graphics.XHB.Gen.Input: MkDevicePresenceNotifyEvent :: TIMESTAMP -> Word8 -> Word8 -> Word16 -> DevicePresenceNotifyEvent
+ Graphics.XHB.Gen.Input: MkDeviceStateNotifyEvent :: Word8 -> TIMESTAMP -> Word8 -> Word8 -> Word8 -> Word8 -> [Word8] -> [Word8] -> [Word32] -> DeviceStateNotifyEvent
+ Graphics.XHB.Gen.Input: MkDeviceValuatorEvent :: Word8 -> Word16 -> Word8 -> Word8 -> [Int32] -> DeviceValuatorEvent
+ Graphics.XHB.Gen.Input: MkFocusInEvent :: NotifyDetail -> TIMESTAMP -> WINDOW -> NotifyMode -> Word8 -> FocusInEvent
+ Graphics.XHB.Gen.Input: MkFocusOutEvent :: NotifyDetail -> TIMESTAMP -> WINDOW -> NotifyMode -> Word8 -> FocusOutEvent
+ Graphics.XHB.Gen.Input: MkProximityInEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> ProximityInEvent
+ Graphics.XHB.Gen.Input: MkProximityOutEvent :: Word8 -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Bool -> Word8 -> ProximityOutEvent
+ Graphics.XHB.Gen.Input: buttons_DeviceButtonStateNotifyEvent :: DeviceButtonStateNotifyEvent -> [Word8]
+ Graphics.XHB.Gen.Input: buttons_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> [Word8]
+ Graphics.XHB.Gen.Input: child_DeviceButtonPressEvent :: DeviceButtonPressEvent -> WINDOW
+ Graphics.XHB.Gen.Input: child_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Input: child_DeviceKeyPressEvent :: DeviceKeyPressEvent -> WINDOW
+ Graphics.XHB.Gen.Input: child_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Input: child_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Input: child_ProximityInEvent :: ProximityInEvent -> WINDOW
+ Graphics.XHB.Gen.Input: child_ProximityOutEvent :: ProximityOutEvent -> WINDOW
+ Graphics.XHB.Gen.Input: classes_reported_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: control_DevicePresenceNotifyEvent :: DevicePresenceNotifyEvent -> Word16
+ Graphics.XHB.Gen.Input: count_DeviceMappingNotifyEvent :: DeviceMappingNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: data ChangeDeviceNotifyEvent
+ Graphics.XHB.Gen.Input: data DeviceButtonPressEvent
+ Graphics.XHB.Gen.Input: data DeviceButtonReleaseEvent
+ Graphics.XHB.Gen.Input: data DeviceButtonStateNotifyEvent
+ Graphics.XHB.Gen.Input: data DeviceInputMode
+ Graphics.XHB.Gen.Input: data DeviceKeyPressEvent
+ Graphics.XHB.Gen.Input: data DeviceKeyReleaseEvent
+ Graphics.XHB.Gen.Input: data DeviceKeyStateNotifyEvent
+ Graphics.XHB.Gen.Input: data DeviceMappingNotifyEvent
+ Graphics.XHB.Gen.Input: data DeviceMotionNotifyEvent
+ Graphics.XHB.Gen.Input: data DevicePresenceNotifyEvent
+ Graphics.XHB.Gen.Input: data DeviceStateNotifyEvent
+ Graphics.XHB.Gen.Input: data DeviceValuatorEvent
+ Graphics.XHB.Gen.Input: data FeedbackClass
+ Graphics.XHB.Gen.Input: data FocusInEvent
+ Graphics.XHB.Gen.Input: data FocusOutEvent
+ Graphics.XHB.Gen.Input: data ProximityInEvent
+ Graphics.XHB.Gen.Input: data ProximityOutEvent
+ Graphics.XHB.Gen.Input: detail_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Word8
+ Graphics.XHB.Gen.Input: detail_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Word8
+ Graphics.XHB.Gen.Input: detail_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Word8
+ Graphics.XHB.Gen.Input: detail_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Word8
+ Graphics.XHB.Gen.Input: detail_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: detail_FocusInEvent :: FocusInEvent -> NotifyDetail
+ Graphics.XHB.Gen.Input: detail_FocusOutEvent :: FocusOutEvent -> NotifyDetail
+ Graphics.XHB.Gen.Input: detail_ProximityInEvent :: ProximityInEvent -> Word8
+ Graphics.XHB.Gen.Input: detail_ProximityOutEvent :: ProximityOutEvent -> Word8
+ Graphics.XHB.Gen.Input: devchange_DevicePresenceNotifyEvent :: DevicePresenceNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_ChangeDeviceNotifyEvent :: ChangeDeviceNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceButtonStateNotifyEvent :: DeviceButtonStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceKeyStateNotifyEvent :: DeviceKeyStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceMappingNotifyEvent :: DeviceMappingNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DevicePresenceNotifyEvent :: DevicePresenceNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_DeviceValuatorEvent :: DeviceValuatorEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_FocusInEvent :: FocusInEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_FocusOutEvent :: FocusOutEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_ProximityInEvent :: ProximityInEvent -> Word8
+ Graphics.XHB.Gen.Input: device_id_ProximityOutEvent :: ProximityOutEvent -> Word8
+ Graphics.XHB.Gen.Input: device_state_DeviceValuatorEvent :: DeviceValuatorEvent -> Word16
+ Graphics.XHB.Gen.Input: event_DeviceButtonPressEvent :: DeviceButtonPressEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_DeviceKeyPressEvent :: DeviceKeyPressEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_ProximityInEvent :: ProximityInEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_ProximityOutEvent :: ProximityOutEvent -> WINDOW
+ Graphics.XHB.Gen.Input: event_x_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Input: event_x_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: event_x_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Int16
+ Graphics.XHB.Gen.Input: event_x_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: event_x_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Input: event_x_ProximityInEvent :: ProximityInEvent -> Int16
+ Graphics.XHB.Gen.Input: event_x_ProximityOutEvent :: ProximityOutEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_ProximityInEvent :: ProximityInEvent -> Int16
+ Graphics.XHB.Gen.Input: event_y_ProximityOutEvent :: ProximityOutEvent -> Int16
+ Graphics.XHB.Gen.Input: first_keycode_DeviceMappingNotifyEvent :: DeviceMappingNotifyEvent -> KeyCode
+ Graphics.XHB.Gen.Input: first_valuator_DeviceValuatorEvent :: DeviceValuatorEvent -> Word8
+ Graphics.XHB.Gen.Input: keys_DeviceKeyStateNotifyEvent :: DeviceKeyStateNotifyEvent -> [Word8]
+ Graphics.XHB.Gen.Input: keys_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> [Word8]
+ Graphics.XHB.Gen.Input: mode_FocusInEvent :: FocusInEvent -> NotifyMode
+ Graphics.XHB.Gen.Input: mode_FocusOutEvent :: FocusOutEvent -> NotifyMode
+ Graphics.XHB.Gen.Input: num_buttons_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: num_keys_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: num_valuators_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: num_valuators_DeviceValuatorEvent :: DeviceValuatorEvent -> Word8
+ Graphics.XHB.Gen.Input: request_ChangeDeviceNotifyEvent :: ChangeDeviceNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: request_DeviceMappingNotifyEvent :: DeviceMappingNotifyEvent -> Word8
+ Graphics.XHB.Gen.Input: root_DeviceButtonPressEvent :: DeviceButtonPressEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_DeviceKeyPressEvent :: DeviceKeyPressEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_ProximityInEvent :: ProximityInEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_ProximityOutEvent :: ProximityOutEvent -> WINDOW
+ Graphics.XHB.Gen.Input: root_x_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Input: root_x_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: root_x_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Int16
+ Graphics.XHB.Gen.Input: root_x_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: root_x_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Input: root_x_ProximityInEvent :: ProximityInEvent -> Int16
+ Graphics.XHB.Gen.Input: root_x_ProximityOutEvent :: ProximityOutEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_ProximityInEvent :: ProximityInEvent -> Int16
+ Graphics.XHB.Gen.Input: root_y_ProximityOutEvent :: ProximityOutEvent -> Int16
+ Graphics.XHB.Gen.Input: same_screen_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Bool
+ Graphics.XHB.Gen.Input: same_screen_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Bool
+ Graphics.XHB.Gen.Input: same_screen_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Bool
+ Graphics.XHB.Gen.Input: same_screen_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Bool
+ Graphics.XHB.Gen.Input: same_screen_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Bool
+ Graphics.XHB.Gen.Input: same_screen_ProximityInEvent :: ProximityInEvent -> Bool
+ Graphics.XHB.Gen.Input: same_screen_ProximityOutEvent :: ProximityOutEvent -> Bool
+ Graphics.XHB.Gen.Input: state_DeviceButtonPressEvent :: DeviceButtonPressEvent -> Word16
+ Graphics.XHB.Gen.Input: state_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> Word16
+ Graphics.XHB.Gen.Input: state_DeviceKeyPressEvent :: DeviceKeyPressEvent -> Word16
+ Graphics.XHB.Gen.Input: state_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> Word16
+ Graphics.XHB.Gen.Input: state_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> Word16
+ Graphics.XHB.Gen.Input: state_ProximityInEvent :: ProximityInEvent -> Word16
+ Graphics.XHB.Gen.Input: state_ProximityOutEvent :: ProximityOutEvent -> Word16
+ Graphics.XHB.Gen.Input: time_ChangeDeviceNotifyEvent :: ChangeDeviceNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceButtonPressEvent :: DeviceButtonPressEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceButtonReleaseEvent :: DeviceButtonReleaseEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceKeyPressEvent :: DeviceKeyPressEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceKeyReleaseEvent :: DeviceKeyReleaseEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceMappingNotifyEvent :: DeviceMappingNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceMotionNotifyEvent :: DeviceMotionNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DevicePresenceNotifyEvent :: DevicePresenceNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_FocusInEvent :: FocusInEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_FocusOutEvent :: FocusOutEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_ProximityInEvent :: ProximityInEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: time_ProximityOutEvent :: ProximityOutEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Input: valuators_DeviceStateNotifyEvent :: DeviceStateNotifyEvent -> [Word32]
+ Graphics.XHB.Gen.Input: valuators_DeviceValuatorEvent :: DeviceValuatorEvent -> [Int32]
+ Graphics.XHB.Gen.Input: window_FocusInEvent :: FocusInEvent -> WINDOW
+ Graphics.XHB.Gen.Input: window_FocusOutEvent :: FocusOutEvent -> WINDOW
+ Graphics.XHB.Gen.RandR: MkGetCrtcTransform :: CRTC -> GetCrtcTransform
+ Graphics.XHB.Gen.RandR: MkGetCrtcTransformReply :: TRANSFORM -> Bool -> TRANSFORM -> Word16 -> Word16 -> Word16 -> Word16 -> [CChar] -> [FIXED] -> [CChar] -> [FIXED] -> GetCrtcTransformReply
+ Graphics.XHB.Gen.RandR: MkGetOutputPrimary :: WINDOW -> GetOutputPrimary
+ Graphics.XHB.Gen.RandR: MkGetOutputPrimaryReply :: OUTPUT -> GetOutputPrimaryReply
+ Graphics.XHB.Gen.RandR: MkGetPanning :: CRTC -> GetPanning
+ Graphics.XHB.Gen.RandR: MkGetPanningReply :: SetConfig -> TIMESTAMP -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Int16 -> Int16 -> Int16 -> Int16 -> GetPanningReply
+ Graphics.XHB.Gen.RandR: MkGetScreenResourcesCurrent :: WINDOW -> GetScreenResourcesCurrent
+ Graphics.XHB.Gen.RandR: MkGetScreenResourcesCurrentReply :: TIMESTAMP -> TIMESTAMP -> Word16 -> Word16 -> Word16 -> Word16 -> [CRTC] -> [OUTPUT] -> [ModeInfo] -> [Word8] -> GetScreenResourcesCurrentReply
+ Graphics.XHB.Gen.RandR: MkNotifyEvent :: Notify -> NotifyData -> NotifyEvent
+ Graphics.XHB.Gen.RandR: MkScreenChangeNotifyEvent :: [Rotation] -> TIMESTAMP -> TIMESTAMP -> WINDOW -> WINDOW -> Word16 -> SubPixel -> Word16 -> Word16 -> Word16 -> Word16 -> ScreenChangeNotifyEvent
+ Graphics.XHB.Gen.RandR: MkSetCrtcTransform :: CRTC -> TRANSFORM -> Word16 -> [CChar] -> [FIXED] -> SetCrtcTransform
+ Graphics.XHB.Gen.RandR: MkSetOutputPrimary :: WINDOW -> OUTPUT -> SetOutputPrimary
+ Graphics.XHB.Gen.RandR: MkSetPanning :: CRTC -> TIMESTAMP -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Int16 -> Int16 -> Int16 -> Int16 -> SetPanning
+ Graphics.XHB.Gen.RandR: MkSetPanningReply :: SetConfig -> TIMESTAMP -> SetPanningReply
+ Graphics.XHB.Gen.RandR: border_bottom_GetPanningReply :: GetPanningReply -> Int16
+ Graphics.XHB.Gen.RandR: border_bottom_SetPanning :: SetPanning -> Int16
+ Graphics.XHB.Gen.RandR: border_left_GetPanningReply :: GetPanningReply -> Int16
+ Graphics.XHB.Gen.RandR: border_left_SetPanning :: SetPanning -> Int16
+ Graphics.XHB.Gen.RandR: border_right_GetPanningReply :: GetPanningReply -> Int16
+ Graphics.XHB.Gen.RandR: border_right_SetPanning :: SetPanning -> Int16
+ Graphics.XHB.Gen.RandR: border_top_GetPanningReply :: GetPanningReply -> Int16
+ Graphics.XHB.Gen.RandR: border_top_SetPanning :: SetPanning -> Int16
+ Graphics.XHB.Gen.RandR: config_timestamp_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: config_timestamp_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: crtc_GetCrtcTransform :: GetCrtcTransform -> CRTC
+ Graphics.XHB.Gen.RandR: crtc_GetPanning :: GetPanning -> CRTC
+ Graphics.XHB.Gen.RandR: crtc_SetCrtcTransform :: SetCrtcTransform -> CRTC
+ Graphics.XHB.Gen.RandR: crtc_SetPanning :: SetPanning -> CRTC
+ Graphics.XHB.Gen.RandR: crtcs_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> [CRTC]
+ Graphics.XHB.Gen.RandR: current_filter_name_GetCrtcTransformReply :: GetCrtcTransformReply -> [CChar]
+ Graphics.XHB.Gen.RandR: current_len_GetCrtcTransformReply :: GetCrtcTransformReply -> Word16
+ Graphics.XHB.Gen.RandR: current_nparams_GetCrtcTransformReply :: GetCrtcTransformReply -> Word16
+ Graphics.XHB.Gen.RandR: current_params_GetCrtcTransformReply :: GetCrtcTransformReply -> [FIXED]
+ Graphics.XHB.Gen.RandR: current_transform_GetCrtcTransformReply :: GetCrtcTransformReply -> TRANSFORM
+ Graphics.XHB.Gen.RandR: data GetCrtcTransform
+ Graphics.XHB.Gen.RandR: data GetCrtcTransformReply
+ Graphics.XHB.Gen.RandR: data GetOutputPrimary
+ Graphics.XHB.Gen.RandR: data GetOutputPrimaryReply
+ Graphics.XHB.Gen.RandR: data GetPanning
+ Graphics.XHB.Gen.RandR: data GetPanningReply
+ Graphics.XHB.Gen.RandR: data GetScreenResourcesCurrent
+ Graphics.XHB.Gen.RandR: data GetScreenResourcesCurrentReply
+ Graphics.XHB.Gen.RandR: data NotifyEvent
+ Graphics.XHB.Gen.RandR: data ScreenChangeNotifyEvent
+ Graphics.XHB.Gen.RandR: data SetCrtcTransform
+ Graphics.XHB.Gen.RandR: data SetOutputPrimary
+ Graphics.XHB.Gen.RandR: data SetPanning
+ Graphics.XHB.Gen.RandR: data SetPanningReply
+ Graphics.XHB.Gen.RandR: filter_len_SetCrtcTransform :: SetCrtcTransform -> Word16
+ Graphics.XHB.Gen.RandR: filter_name_SetCrtcTransform :: SetCrtcTransform -> [CChar]
+ Graphics.XHB.Gen.RandR: filter_params_SetCrtcTransform :: SetCrtcTransform -> [FIXED]
+ Graphics.XHB.Gen.RandR: getCrtcTransform :: Connection -> CRTC -> IO (Receipt GetCrtcTransformReply)
+ Graphics.XHB.Gen.RandR: getOutputPrimary :: Connection -> WINDOW -> IO (Receipt OUTPUT)
+ Graphics.XHB.Gen.RandR: getPanning :: Connection -> CRTC -> IO (Receipt GetPanningReply)
+ Graphics.XHB.Gen.RandR: getScreenResourcesCurrent :: Connection -> WINDOW -> IO (Receipt GetScreenResourcesCurrentReply)
+ Graphics.XHB.Gen.RandR: has_transforms_GetCrtcTransformReply :: GetCrtcTransformReply -> Bool
+ Graphics.XHB.Gen.RandR: height_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: height_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> Word16
+ Graphics.XHB.Gen.RandR: height_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: left_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: left_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: mheight_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> Word16
+ Graphics.XHB.Gen.RandR: modes_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> [ModeInfo]
+ Graphics.XHB.Gen.RandR: mwidth_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> Word16
+ Graphics.XHB.Gen.RandR: names_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> [Word8]
+ Graphics.XHB.Gen.RandR: names_len_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> Word16
+ Graphics.XHB.Gen.RandR: num_crtcs_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> Word16
+ Graphics.XHB.Gen.RandR: num_modes_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> Word16
+ Graphics.XHB.Gen.RandR: num_outputs_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> Word16
+ Graphics.XHB.Gen.RandR: output_GetOutputPrimaryReply :: GetOutputPrimaryReply -> OUTPUT
+ Graphics.XHB.Gen.RandR: output_SetOutputPrimary :: SetOutputPrimary -> OUTPUT
+ Graphics.XHB.Gen.RandR: outputs_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> [OUTPUT]
+ Graphics.XHB.Gen.RandR: pending_filter_name_GetCrtcTransformReply :: GetCrtcTransformReply -> [CChar]
+ Graphics.XHB.Gen.RandR: pending_len_GetCrtcTransformReply :: GetCrtcTransformReply -> Word16
+ Graphics.XHB.Gen.RandR: pending_nparams_GetCrtcTransformReply :: GetCrtcTransformReply -> Word16
+ Graphics.XHB.Gen.RandR: pending_params_GetCrtcTransformReply :: GetCrtcTransformReply -> [FIXED]
+ Graphics.XHB.Gen.RandR: pending_transform_GetCrtcTransformReply :: GetCrtcTransformReply -> TRANSFORM
+ Graphics.XHB.Gen.RandR: request_window_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.RandR: root_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.RandR: rotation_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> [Rotation]
+ Graphics.XHB.Gen.RandR: setCrtcTransform :: Connection -> SetCrtcTransform -> IO ()
+ Graphics.XHB.Gen.RandR: setOutputPrimary :: Connection -> WINDOW -> OUTPUT -> IO ()
+ Graphics.XHB.Gen.RandR: setPanning :: Connection -> SetPanning -> IO (Receipt SetPanningReply)
+ Graphics.XHB.Gen.RandR: sizeID_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> Word16
+ Graphics.XHB.Gen.RandR: status_GetPanningReply :: GetPanningReply -> SetConfig
+ Graphics.XHB.Gen.RandR: status_SetPanningReply :: SetPanningReply -> SetConfig
+ Graphics.XHB.Gen.RandR: subCode_NotifyEvent :: NotifyEvent -> Notify
+ Graphics.XHB.Gen.RandR: subpixel_order_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> SubPixel
+ Graphics.XHB.Gen.RandR: timestamp_GetPanningReply :: GetPanningReply -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: timestamp_GetScreenResourcesCurrentReply :: GetScreenResourcesCurrentReply -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: timestamp_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: timestamp_SetPanning :: SetPanning -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: timestamp_SetPanningReply :: SetPanningReply -> TIMESTAMP
+ Graphics.XHB.Gen.RandR: top_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: top_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: track_height_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: track_height_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: track_left_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: track_left_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: track_top_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: track_top_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: track_width_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: track_width_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: transform_SetCrtcTransform :: SetCrtcTransform -> TRANSFORM
+ Graphics.XHB.Gen.RandR: u_NotifyEvent :: NotifyEvent -> NotifyData
+ Graphics.XHB.Gen.RandR: width_GetPanningReply :: GetPanningReply -> Word16
+ Graphics.XHB.Gen.RandR: width_ScreenChangeNotifyEvent :: ScreenChangeNotifyEvent -> Word16
+ Graphics.XHB.Gen.RandR: width_SetPanning :: SetPanning -> Word16
+ Graphics.XHB.Gen.RandR: window_GetOutputPrimary :: GetOutputPrimary -> WINDOW
+ Graphics.XHB.Gen.RandR: window_GetScreenResourcesCurrent :: GetScreenResourcesCurrent -> WINDOW
+ Graphics.XHB.Gen.RandR: window_SetOutputPrimary :: SetOutputPrimary -> WINDOW
+ Graphics.XHB.Gen.Record: MkBadContextError :: Word32 -> BadContextError
+ Graphics.XHB.Gen.Record: data BadContextError
+ Graphics.XHB.Gen.Record: invalid_record_BadContextError :: BadContextError -> Word32
+ Graphics.XHB.Gen.Render: PictureNone :: Picture
+ Graphics.XHB.Gen.Render: data Picture
+ Graphics.XHB.Gen.ScreenSaver: MkNotifyEvent :: Word8 -> Word8 -> Word16 -> TIMESTAMP -> WINDOW -> WINDOW -> Word8 -> Bool -> NotifyEvent
+ Graphics.XHB.Gen.ScreenSaver: code_NotifyEvent :: NotifyEvent -> Word8
+ Graphics.XHB.Gen.ScreenSaver: data NotifyEvent
+ Graphics.XHB.Gen.ScreenSaver: forced_NotifyEvent :: NotifyEvent -> Bool
+ Graphics.XHB.Gen.ScreenSaver: kind_NotifyEvent :: NotifyEvent -> Word8
+ Graphics.XHB.Gen.ScreenSaver: root_NotifyEvent :: NotifyEvent -> WINDOW
+ Graphics.XHB.Gen.ScreenSaver: sequence_number_NotifyEvent :: NotifyEvent -> Word16
+ Graphics.XHB.Gen.ScreenSaver: state_NotifyEvent :: NotifyEvent -> Word8
+ Graphics.XHB.Gen.ScreenSaver: time_NotifyEvent :: NotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.ScreenSaver: window_NotifyEvent :: NotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Shape: MkNotifyEvent :: SK -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> TIMESTAMP -> Bool -> NotifyEvent
+ Graphics.XHB.Gen.Shape: affected_window_NotifyEvent :: NotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Shape: data NotifyEvent
+ Graphics.XHB.Gen.Shape: extents_height_NotifyEvent :: NotifyEvent -> Word16
+ Graphics.XHB.Gen.Shape: extents_width_NotifyEvent :: NotifyEvent -> Word16
+ Graphics.XHB.Gen.Shape: extents_x_NotifyEvent :: NotifyEvent -> Int16
+ Graphics.XHB.Gen.Shape: extents_y_NotifyEvent :: NotifyEvent -> Int16
+ Graphics.XHB.Gen.Shape: server_time_NotifyEvent :: NotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Shape: shape_kind_NotifyEvent :: NotifyEvent -> SK
+ Graphics.XHB.Gen.Shape: shaped_NotifyEvent :: NotifyEvent -> Bool
+ Graphics.XHB.Gen.Shm: MkBadSegError :: Word32 -> Word16 -> Word8 -> BadSegError
+ Graphics.XHB.Gen.Shm: MkCompletionEvent :: DRAWABLE -> Word16 -> Word8 -> SEG -> Word32 -> CompletionEvent
+ Graphics.XHB.Gen.Shm: bad_value_BadSegError :: BadSegError -> Word32
+ Graphics.XHB.Gen.Shm: data BadSegError
+ Graphics.XHB.Gen.Shm: data CompletionEvent
+ Graphics.XHB.Gen.Shm: drawable_CompletionEvent :: CompletionEvent -> DRAWABLE
+ Graphics.XHB.Gen.Shm: major_event_CompletionEvent :: CompletionEvent -> Word8
+ Graphics.XHB.Gen.Shm: major_opcode_BadSegError :: BadSegError -> Word8
+ Graphics.XHB.Gen.Shm: minor_event_CompletionEvent :: CompletionEvent -> Word16
+ Graphics.XHB.Gen.Shm: minor_opcode_BadSegError :: BadSegError -> Word16
+ Graphics.XHB.Gen.Shm: offset_CompletionEvent :: CompletionEvent -> Word32
+ Graphics.XHB.Gen.Shm: shmseg_CompletionEvent :: CompletionEvent -> SEG
+ Graphics.XHB.Gen.Sync: MkAlarmError :: Word32 -> Word16 -> Word8 -> AlarmError
+ Graphics.XHB.Gen.Sync: MkAlarmNotifyEvent :: Word8 -> ALARM -> INT64 -> INT64 -> TIMESTAMP -> ALARMSTATE -> AlarmNotifyEvent
+ Graphics.XHB.Gen.Sync: MkCounterError :: Word32 -> Word16 -> Word8 -> CounterError
+ Graphics.XHB.Gen.Sync: MkCounterNotifyEvent :: Word8 -> COUNTER -> INT64 -> INT64 -> TIMESTAMP -> Word16 -> Bool -> CounterNotifyEvent
+ Graphics.XHB.Gen.Sync: alarm_AlarmNotifyEvent :: AlarmNotifyEvent -> ALARM
+ Graphics.XHB.Gen.Sync: alarm_value_AlarmNotifyEvent :: AlarmNotifyEvent -> INT64
+ Graphics.XHB.Gen.Sync: bad_alarm_AlarmError :: AlarmError -> Word32
+ Graphics.XHB.Gen.Sync: bad_counter_CounterError :: CounterError -> Word32
+ Graphics.XHB.Gen.Sync: count_CounterNotifyEvent :: CounterNotifyEvent -> Word16
+ Graphics.XHB.Gen.Sync: counter_CounterNotifyEvent :: CounterNotifyEvent -> COUNTER
+ Graphics.XHB.Gen.Sync: counter_value_AlarmNotifyEvent :: AlarmNotifyEvent -> INT64
+ Graphics.XHB.Gen.Sync: counter_value_CounterNotifyEvent :: CounterNotifyEvent -> INT64
+ Graphics.XHB.Gen.Sync: data AlarmError
+ Graphics.XHB.Gen.Sync: data AlarmNotifyEvent
+ Graphics.XHB.Gen.Sync: data CounterError
+ Graphics.XHB.Gen.Sync: data CounterNotifyEvent
+ Graphics.XHB.Gen.Sync: destroyed_CounterNotifyEvent :: CounterNotifyEvent -> Bool
+ Graphics.XHB.Gen.Sync: kind_AlarmNotifyEvent :: AlarmNotifyEvent -> Word8
+ Graphics.XHB.Gen.Sync: kind_CounterNotifyEvent :: CounterNotifyEvent -> Word8
+ Graphics.XHB.Gen.Sync: major_opcode_AlarmError :: AlarmError -> Word8
+ Graphics.XHB.Gen.Sync: major_opcode_CounterError :: CounterError -> Word8
+ Graphics.XHB.Gen.Sync: minor_opcode_AlarmError :: AlarmError -> Word16
+ Graphics.XHB.Gen.Sync: minor_opcode_CounterError :: CounterError -> Word16
+ Graphics.XHB.Gen.Sync: state_AlarmNotifyEvent :: AlarmNotifyEvent -> ALARMSTATE
+ Graphics.XHB.Gen.Sync: timestamp_AlarmNotifyEvent :: AlarmNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Sync: timestamp_CounterNotifyEvent :: CounterNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Sync: wait_value_CounterNotifyEvent :: CounterNotifyEvent -> INT64
+ Graphics.XHB.Gen.Test: root_FakeInput :: FakeInput -> WINDOW
+ Graphics.XHB.Gen.XFixes: MkCursorNotifyEvent :: CursorNotify -> WINDOW -> Word32 -> TIMESTAMP -> ATOM -> CursorNotifyEvent
+ Graphics.XHB.Gen.XFixes: MkSelectionNotifyEvent :: SelectionEvent -> WINDOW -> WINDOW -> ATOM -> TIMESTAMP -> TIMESTAMP -> SelectionNotifyEvent
+ Graphics.XHB.Gen.XFixes: RegionNone :: Region
+ Graphics.XHB.Gen.XFixes: cursor_serial_CursorNotifyEvent :: CursorNotifyEvent -> Word32
+ Graphics.XHB.Gen.XFixes: data CursorNotifyEvent
+ Graphics.XHB.Gen.XFixes: data Region
+ Graphics.XHB.Gen.XFixes: data SelectionNotifyEvent
+ Graphics.XHB.Gen.XFixes: name_CursorNotifyEvent :: CursorNotifyEvent -> ATOM
+ Graphics.XHB.Gen.XFixes: owner_SelectionNotifyEvent :: SelectionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.XFixes: selection_SelectionNotifyEvent :: SelectionNotifyEvent -> ATOM
+ Graphics.XHB.Gen.XFixes: selection_timestamp_SelectionNotifyEvent :: SelectionNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.XFixes: subtype_CursorNotifyEvent :: CursorNotifyEvent -> CursorNotify
+ Graphics.XHB.Gen.XFixes: subtype_SelectionNotifyEvent :: SelectionNotifyEvent -> SelectionEvent
+ Graphics.XHB.Gen.XFixes: timestamp_CursorNotifyEvent :: CursorNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.XFixes: timestamp_SelectionNotifyEvent :: SelectionNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.XFixes: window_CursorNotifyEvent :: CursorNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.XFixes: window_SelectionNotifyEvent :: SelectionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.XPrint: MkAttributNotifyEvent :: Word8 -> PCONTEXT -> AttributNotifyEvent
+ Graphics.XHB.Gen.XPrint: MkNotifyEvent :: Word8 -> PCONTEXT -> Bool -> NotifyEvent
+ Graphics.XHB.Gen.XPrint: cancel_NotifyEvent :: NotifyEvent -> Bool
+ Graphics.XHB.Gen.XPrint: context_AttributNotifyEvent :: AttributNotifyEvent -> PCONTEXT
+ Graphics.XHB.Gen.XPrint: context_NotifyEvent :: NotifyEvent -> PCONTEXT
+ Graphics.XHB.Gen.XPrint: data AttributNotifyEvent
+ Graphics.XHB.Gen.XPrint: data NotifyEvent
+ Graphics.XHB.Gen.XPrint: detail_AttributNotifyEvent :: AttributNotifyEvent -> Word8
+ Graphics.XHB.Gen.XPrint: detail_NotifyEvent :: NotifyEvent -> Word8
+ Graphics.XHB.Gen.Xproto: AtomNone :: Atom
+ Graphics.XHB.Gen.Xproto: ColormapNone :: Colormap
+ Graphics.XHB.Gen.Xproto: CursorNone :: Cursor
+ Graphics.XHB.Gen.Xproto: FontNone :: Font
+ Graphics.XHB.Gen.Xproto: InputFocusFollowKeyboard :: InputFocus
+ Graphics.XHB.Gen.Xproto: JoinStyleMiter :: JoinStyle
+ Graphics.XHB.Gen.Xproto: KeyButMaskButton1 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskButton2 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskButton3 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskButton4 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskButton5 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskControl :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskLock :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskMod1 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskMod2 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskMod3 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskMod4 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskMod5 :: KeyButMask
+ Graphics.XHB.Gen.Xproto: KeyButMaskShift :: KeyButMask
+ Graphics.XHB.Gen.Xproto: MkAccessError :: Word32 -> Word16 -> Word8 -> AccessError
+ Graphics.XHB.Gen.Xproto: MkAllocError :: Word32 -> Word16 -> Word8 -> AllocError
+ Graphics.XHB.Gen.Xproto: MkAtomError :: Word32 -> Word16 -> Word8 -> AtomError
+ Graphics.XHB.Gen.Xproto: MkButtonPressEvent :: BUTTON -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> Bool -> ButtonPressEvent
+ Graphics.XHB.Gen.Xproto: MkButtonReleaseEvent :: BUTTON -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> Bool -> ButtonReleaseEvent
+ Graphics.XHB.Gen.Xproto: MkCirculateNotifyEvent :: WINDOW -> WINDOW -> Place -> CirculateNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkCirculateRequestEvent :: WINDOW -> WINDOW -> Place -> CirculateRequestEvent
+ Graphics.XHB.Gen.Xproto: MkClientMessageEvent :: Word8 -> WINDOW -> ATOM -> ClientMessageData -> ClientMessageEvent
+ Graphics.XHB.Gen.Xproto: MkColormapError :: Word32 -> Word16 -> Word8 -> ColormapError
+ Graphics.XHB.Gen.Xproto: MkColormapNotifyEvent :: WINDOW -> COLORMAP -> Bool -> ColormapState -> ColormapNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkConfigureNotifyEvent :: WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> Word16 -> Bool -> ConfigureNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkConfigureRequestEvent :: StackMode -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> Word16 -> [ConfigWindow] -> ConfigureRequestEvent
+ Graphics.XHB.Gen.Xproto: MkCreateNotifyEvent :: WINDOW -> WINDOW -> Int16 -> Int16 -> Word16 -> Word16 -> Word16 -> Bool -> CreateNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkCursorError :: Word32 -> Word16 -> Word8 -> CursorError
+ Graphics.XHB.Gen.Xproto: MkDestroyNotifyEvent :: WINDOW -> WINDOW -> DestroyNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkDrawableError :: Word32 -> Word16 -> Word8 -> DrawableError
+ Graphics.XHB.Gen.Xproto: MkEnterNotifyEvent :: NotifyDetail -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> NotifyMode -> Word8 -> EnterNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkExposeEvent :: WINDOW -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> ExposeEvent
+ Graphics.XHB.Gen.Xproto: MkFocusInEvent :: NotifyDetail -> WINDOW -> NotifyMode -> FocusInEvent
+ Graphics.XHB.Gen.Xproto: MkFocusOutEvent :: NotifyDetail -> WINDOW -> NotifyMode -> FocusOutEvent
+ Graphics.XHB.Gen.Xproto: MkFontError :: Word32 -> Word16 -> Word8 -> FontError
+ Graphics.XHB.Gen.Xproto: MkGContextError :: Word32 -> Word16 -> Word8 -> GContextError
+ Graphics.XHB.Gen.Xproto: MkGraphicsExposureEvent :: DRAWABLE -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word8 -> GraphicsExposureEvent
+ Graphics.XHB.Gen.Xproto: MkGravityNotifyEvent :: WINDOW -> WINDOW -> Int16 -> Int16 -> GravityNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkIDChoiceError :: Word32 -> Word16 -> Word8 -> IDChoiceError
+ Graphics.XHB.Gen.Xproto: MkImplementationError :: Word32 -> Word16 -> Word8 -> ImplementationError
+ Graphics.XHB.Gen.Xproto: MkKeyPressEvent :: KEYCODE -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> Bool -> KeyPressEvent
+ Graphics.XHB.Gen.Xproto: MkKeyReleaseEvent :: KEYCODE -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> Bool -> KeyReleaseEvent
+ Graphics.XHB.Gen.Xproto: MkKeymapNotifyEvent :: [Word8] -> KeymapNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkLeaveNotifyEvent :: NotifyDetail -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> NotifyMode -> Word8 -> LeaveNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkLengthError :: Word32 -> Word16 -> Word8 -> LengthError
+ Graphics.XHB.Gen.Xproto: MkMapNotifyEvent :: WINDOW -> WINDOW -> Bool -> MapNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkMapRequestEvent :: WINDOW -> WINDOW -> MapRequestEvent
+ Graphics.XHB.Gen.Xproto: MkMappingNotifyEvent :: Mapping -> KEYCODE -> Word8 -> MappingNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkMatchError :: Word32 -> Word16 -> Word8 -> MatchError
+ Graphics.XHB.Gen.Xproto: MkMotionNotifyEvent :: Motion -> TIMESTAMP -> WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> Bool -> MotionNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkNameError :: Word32 -> Word16 -> Word8 -> NameError
+ Graphics.XHB.Gen.Xproto: MkNoExposureEvent :: DRAWABLE -> Word16 -> Word8 -> NoExposureEvent
+ Graphics.XHB.Gen.Xproto: MkPixmapError :: Word32 -> Word16 -> Word8 -> PixmapError
+ Graphics.XHB.Gen.Xproto: MkPropertyNotifyEvent :: WINDOW -> ATOM -> TIMESTAMP -> Property -> PropertyNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkReparentNotifyEvent :: WINDOW -> WINDOW -> WINDOW -> Int16 -> Int16 -> Bool -> ReparentNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkRequestError :: Word32 -> Word16 -> Word8 -> RequestError
+ Graphics.XHB.Gen.Xproto: MkResizeRequestEvent :: WINDOW -> Word16 -> Word16 -> ResizeRequestEvent
+ Graphics.XHB.Gen.Xproto: MkSelectionClearEvent :: TIMESTAMP -> WINDOW -> ATOM -> SelectionClearEvent
+ Graphics.XHB.Gen.Xproto: MkSelectionNotifyEvent :: TIMESTAMP -> WINDOW -> ATOM -> ATOM -> ATOM -> SelectionNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkSelectionRequestEvent :: TIMESTAMP -> WINDOW -> WINDOW -> ATOM -> ATOM -> ATOM -> SelectionRequestEvent
+ Graphics.XHB.Gen.Xproto: MkUnmapNotifyEvent :: WINDOW -> WINDOW -> Bool -> UnmapNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkValueError :: Word32 -> Word16 -> Word8 -> ValueError
+ Graphics.XHB.Gen.Xproto: MkVisibilityNotifyEvent :: WINDOW -> Visibility -> VisibilityNotifyEvent
+ Graphics.XHB.Gen.Xproto: MkWindowError :: Word32 -> Word16 -> Word8 -> WindowError
+ Graphics.XHB.Gen.Xproto: ModMaskAny :: ModMask
+ Graphics.XHB.Gen.Xproto: PixmapNone :: Pixmap
+ Graphics.XHB.Gen.Xproto: TimeCurrentTime :: Time
+ Graphics.XHB.Gen.Xproto: WindowNone :: Window
+ Graphics.XHB.Gen.Xproto: above_sibling_ConfigureNotifyEvent :: ConfigureNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: atom_PropertyNotifyEvent :: PropertyNotifyEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: bad_value_AccessError :: AccessError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_AllocError :: AllocError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_AtomError :: AtomError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_ColormapError :: ColormapError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_CursorError :: CursorError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_DrawableError :: DrawableError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_FontError :: FontError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_GContextError :: GContextError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_IDChoiceError :: IDChoiceError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_ImplementationError :: ImplementationError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_LengthError :: LengthError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_MatchError :: MatchError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_NameError :: NameError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_PixmapError :: PixmapError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_RequestError :: RequestError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_ValueError :: ValueError -> Word32
+ Graphics.XHB.Gen.Xproto: bad_value_WindowError :: WindowError -> Word32
+ Graphics.XHB.Gen.Xproto: border_width_ConfigureNotifyEvent :: ConfigureNotifyEvent -> Word16
+ Graphics.XHB.Gen.Xproto: border_width_ConfigureRequestEvent :: ConfigureRequestEvent -> Word16
+ Graphics.XHB.Gen.Xproto: border_width_CreateNotifyEvent :: CreateNotifyEvent -> Word16
+ Graphics.XHB.Gen.Xproto: child_ButtonPressEvent :: ButtonPressEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: child_ButtonReleaseEvent :: ButtonReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: child_EnterNotifyEvent :: EnterNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: child_KeyPressEvent :: KeyPressEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: child_KeyReleaseEvent :: KeyReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: child_LeaveNotifyEvent :: LeaveNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: child_MotionNotifyEvent :: MotionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: colormap_ColormapNotifyEvent :: ColormapNotifyEvent -> COLORMAP
+ Graphics.XHB.Gen.Xproto: count_ExposeEvent :: ExposeEvent -> Word16
+ Graphics.XHB.Gen.Xproto: count_GraphicsExposureEvent :: GraphicsExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: count_MappingNotifyEvent :: MappingNotifyEvent -> Word8
+ Graphics.XHB.Gen.Xproto: data AccessError
+ Graphics.XHB.Gen.Xproto: data AllocError
+ Graphics.XHB.Gen.Xproto: data AtomError
+ Graphics.XHB.Gen.Xproto: data ButtonPressEvent
+ Graphics.XHB.Gen.Xproto: data ButtonReleaseEvent
+ Graphics.XHB.Gen.Xproto: data CirculateNotifyEvent
+ Graphics.XHB.Gen.Xproto: data CirculateRequestEvent
+ Graphics.XHB.Gen.Xproto: data ClientMessageEvent
+ Graphics.XHB.Gen.Xproto: data ColormapError
+ Graphics.XHB.Gen.Xproto: data ColormapNotifyEvent
+ Graphics.XHB.Gen.Xproto: data ConfigureNotifyEvent
+ Graphics.XHB.Gen.Xproto: data ConfigureRequestEvent
+ Graphics.XHB.Gen.Xproto: data CreateNotifyEvent
+ Graphics.XHB.Gen.Xproto: data CursorError
+ Graphics.XHB.Gen.Xproto: data DestroyNotifyEvent
+ Graphics.XHB.Gen.Xproto: data DrawableError
+ Graphics.XHB.Gen.Xproto: data EnterNotifyEvent
+ Graphics.XHB.Gen.Xproto: data ExposeEvent
+ Graphics.XHB.Gen.Xproto: data FocusInEvent
+ Graphics.XHB.Gen.Xproto: data FocusOutEvent
+ Graphics.XHB.Gen.Xproto: data FontError
+ Graphics.XHB.Gen.Xproto: data GContextError
+ Graphics.XHB.Gen.Xproto: data GraphicsExposureEvent
+ Graphics.XHB.Gen.Xproto: data GravityNotifyEvent
+ Graphics.XHB.Gen.Xproto: data IDChoiceError
+ Graphics.XHB.Gen.Xproto: data ImplementationError
+ Graphics.XHB.Gen.Xproto: data KeyButMask
+ Graphics.XHB.Gen.Xproto: data KeyPressEvent
+ Graphics.XHB.Gen.Xproto: data KeyReleaseEvent
+ Graphics.XHB.Gen.Xproto: data KeymapNotifyEvent
+ Graphics.XHB.Gen.Xproto: data LeaveNotifyEvent
+ Graphics.XHB.Gen.Xproto: data LengthError
+ Graphics.XHB.Gen.Xproto: data MapNotifyEvent
+ Graphics.XHB.Gen.Xproto: data MapRequestEvent
+ Graphics.XHB.Gen.Xproto: data MappingNotifyEvent
+ Graphics.XHB.Gen.Xproto: data MatchError
+ Graphics.XHB.Gen.Xproto: data MotionNotifyEvent
+ Graphics.XHB.Gen.Xproto: data NameError
+ Graphics.XHB.Gen.Xproto: data NoExposureEvent
+ Graphics.XHB.Gen.Xproto: data PixmapError
+ Graphics.XHB.Gen.Xproto: data PropertyNotifyEvent
+ Graphics.XHB.Gen.Xproto: data ReparentNotifyEvent
+ Graphics.XHB.Gen.Xproto: data RequestError
+ Graphics.XHB.Gen.Xproto: data ResizeRequestEvent
+ Graphics.XHB.Gen.Xproto: data SelectionClearEvent
+ Graphics.XHB.Gen.Xproto: data SelectionNotifyEvent
+ Graphics.XHB.Gen.Xproto: data SelectionRequestEvent
+ Graphics.XHB.Gen.Xproto: data Time
+ Graphics.XHB.Gen.Xproto: data UnmapNotifyEvent
+ Graphics.XHB.Gen.Xproto: data ValueError
+ Graphics.XHB.Gen.Xproto: data VisibilityNotifyEvent
+ Graphics.XHB.Gen.Xproto: data WindowError
+ Graphics.XHB.Gen.Xproto: data_ClientMessageEvent :: ClientMessageEvent -> ClientMessageData
+ Graphics.XHB.Gen.Xproto: detail_ButtonPressEvent :: ButtonPressEvent -> BUTTON
+ Graphics.XHB.Gen.Xproto: detail_ButtonReleaseEvent :: ButtonReleaseEvent -> BUTTON
+ Graphics.XHB.Gen.Xproto: detail_EnterNotifyEvent :: EnterNotifyEvent -> NotifyDetail
+ Graphics.XHB.Gen.Xproto: detail_FocusInEvent :: FocusInEvent -> NotifyDetail
+ Graphics.XHB.Gen.Xproto: detail_FocusOutEvent :: FocusOutEvent -> NotifyDetail
+ Graphics.XHB.Gen.Xproto: detail_KeyPressEvent :: KeyPressEvent -> KEYCODE
+ Graphics.XHB.Gen.Xproto: detail_KeyReleaseEvent :: KeyReleaseEvent -> KEYCODE
+ Graphics.XHB.Gen.Xproto: detail_LeaveNotifyEvent :: LeaveNotifyEvent -> NotifyDetail
+ Graphics.XHB.Gen.Xproto: detail_MotionNotifyEvent :: MotionNotifyEvent -> Motion
+ Graphics.XHB.Gen.Xproto: drawable_GraphicsExposureEvent :: GraphicsExposureEvent -> DRAWABLE
+ Graphics.XHB.Gen.Xproto: drawable_NoExposureEvent :: NoExposureEvent -> DRAWABLE
+ Graphics.XHB.Gen.Xproto: event_ButtonPressEvent :: ButtonPressEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_ButtonReleaseEvent :: ButtonReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_CirculateNotifyEvent :: CirculateNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_CirculateRequestEvent :: CirculateRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_ConfigureNotifyEvent :: ConfigureNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_DestroyNotifyEvent :: DestroyNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_EnterNotifyEvent :: EnterNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_FocusInEvent :: FocusInEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_FocusOutEvent :: FocusOutEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_GravityNotifyEvent :: GravityNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_KeyPressEvent :: KeyPressEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_KeyReleaseEvent :: KeyReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_LeaveNotifyEvent :: LeaveNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_MapNotifyEvent :: MapNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_MotionNotifyEvent :: MotionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_ReparentNotifyEvent :: ReparentNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_UnmapNotifyEvent :: UnmapNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: event_x_ButtonPressEvent :: ButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_x_ButtonReleaseEvent :: ButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_x_EnterNotifyEvent :: EnterNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_x_KeyPressEvent :: KeyPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_x_KeyReleaseEvent :: KeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_x_LeaveNotifyEvent :: LeaveNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_x_MotionNotifyEvent :: MotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_ButtonPressEvent :: ButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_ButtonReleaseEvent :: ButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_EnterNotifyEvent :: EnterNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_KeyPressEvent :: KeyPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_KeyReleaseEvent :: KeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_LeaveNotifyEvent :: LeaveNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: event_y_MotionNotifyEvent :: MotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: first_keycode_MappingNotifyEvent :: MappingNotifyEvent -> KEYCODE
+ Graphics.XHB.Gen.Xproto: format_ClientMessageEvent :: ClientMessageEvent -> Word8
+ Graphics.XHB.Gen.Xproto: from_configure_UnmapNotifyEvent :: UnmapNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: height_ConfigureNotifyEvent :: ConfigureNotifyEvent -> Word16
+ Graphics.XHB.Gen.Xproto: height_ConfigureRequestEvent :: ConfigureRequestEvent -> Word16
+ Graphics.XHB.Gen.Xproto: height_CreateNotifyEvent :: CreateNotifyEvent -> Word16
+ Graphics.XHB.Gen.Xproto: height_ExposeEvent :: ExposeEvent -> Word16
+ Graphics.XHB.Gen.Xproto: height_GraphicsExposureEvent :: GraphicsExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: height_ResizeRequestEvent :: ResizeRequestEvent -> Word16
+ Graphics.XHB.Gen.Xproto: keys_KeymapNotifyEvent :: KeymapNotifyEvent -> [Word8]
+ Graphics.XHB.Gen.Xproto: major_opcode_AccessError :: AccessError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_AllocError :: AllocError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_AtomError :: AtomError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_ColormapError :: ColormapError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_CursorError :: CursorError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_DrawableError :: DrawableError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_FontError :: FontError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_GContextError :: GContextError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_GraphicsExposureEvent :: GraphicsExposureEvent -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_IDChoiceError :: IDChoiceError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_ImplementationError :: ImplementationError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_LengthError :: LengthError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_MatchError :: MatchError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_NameError :: NameError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_NoExposureEvent :: NoExposureEvent -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_PixmapError :: PixmapError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_RequestError :: RequestError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_ValueError :: ValueError -> Word8
+ Graphics.XHB.Gen.Xproto: major_opcode_WindowError :: WindowError -> Word8
+ Graphics.XHB.Gen.Xproto: minor_opcode_AccessError :: AccessError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_AllocError :: AllocError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_AtomError :: AtomError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_ColormapError :: ColormapError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_CursorError :: CursorError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_DrawableError :: DrawableError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_FontError :: FontError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_GContextError :: GContextError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_GraphicsExposureEvent :: GraphicsExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_IDChoiceError :: IDChoiceError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_ImplementationError :: ImplementationError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_LengthError :: LengthError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_MatchError :: MatchError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_NameError :: NameError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_NoExposureEvent :: NoExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_PixmapError :: PixmapError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_RequestError :: RequestError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_ValueError :: ValueError -> Word16
+ Graphics.XHB.Gen.Xproto: minor_opcode_WindowError :: WindowError -> Word16
+ Graphics.XHB.Gen.Xproto: mode_EnterNotifyEvent :: EnterNotifyEvent -> NotifyMode
+ Graphics.XHB.Gen.Xproto: mode_FocusInEvent :: FocusInEvent -> NotifyMode
+ Graphics.XHB.Gen.Xproto: mode_FocusOutEvent :: FocusOutEvent -> NotifyMode
+ Graphics.XHB.Gen.Xproto: mode_LeaveNotifyEvent :: LeaveNotifyEvent -> NotifyMode
+ Graphics.XHB.Gen.Xproto: new_ColormapNotifyEvent :: ColormapNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: override_redirect_ConfigureNotifyEvent :: ConfigureNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: override_redirect_CreateNotifyEvent :: CreateNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: override_redirect_MapNotifyEvent :: MapNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: override_redirect_ReparentNotifyEvent :: ReparentNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: owner_SelectionClearEvent :: SelectionClearEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: owner_SelectionRequestEvent :: SelectionRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: parent_ConfigureRequestEvent :: ConfigureRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: parent_CreateNotifyEvent :: CreateNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: parent_MapRequestEvent :: MapRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: parent_ReparentNotifyEvent :: ReparentNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: place_CirculateNotifyEvent :: CirculateNotifyEvent -> Place
+ Graphics.XHB.Gen.Xproto: place_CirculateRequestEvent :: CirculateRequestEvent -> Place
+ Graphics.XHB.Gen.Xproto: property_SelectionNotifyEvent :: SelectionNotifyEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: property_SelectionRequestEvent :: SelectionRequestEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: request_MappingNotifyEvent :: MappingNotifyEvent -> Mapping
+ Graphics.XHB.Gen.Xproto: requestor_SelectionNotifyEvent :: SelectionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: requestor_SelectionRequestEvent :: SelectionRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_ButtonPressEvent :: ButtonPressEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_ButtonReleaseEvent :: ButtonReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_EnterNotifyEvent :: EnterNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_KeyPressEvent :: KeyPressEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_KeyReleaseEvent :: KeyReleaseEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_LeaveNotifyEvent :: LeaveNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_MotionNotifyEvent :: MotionNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: root_x_ButtonPressEvent :: ButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_x_ButtonReleaseEvent :: ButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_x_EnterNotifyEvent :: EnterNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_x_KeyPressEvent :: KeyPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_x_KeyReleaseEvent :: KeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_x_LeaveNotifyEvent :: LeaveNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_x_MotionNotifyEvent :: MotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_ButtonPressEvent :: ButtonPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_ButtonReleaseEvent :: ButtonReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_EnterNotifyEvent :: EnterNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_KeyPressEvent :: KeyPressEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_KeyReleaseEvent :: KeyReleaseEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_LeaveNotifyEvent :: LeaveNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: root_y_MotionNotifyEvent :: MotionNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: same_screen_ButtonPressEvent :: ButtonPressEvent -> Bool
+ Graphics.XHB.Gen.Xproto: same_screen_ButtonReleaseEvent :: ButtonReleaseEvent -> Bool
+ Graphics.XHB.Gen.Xproto: same_screen_KeyPressEvent :: KeyPressEvent -> Bool
+ Graphics.XHB.Gen.Xproto: same_screen_KeyReleaseEvent :: KeyReleaseEvent -> Bool
+ Graphics.XHB.Gen.Xproto: same_screen_MotionNotifyEvent :: MotionNotifyEvent -> Bool
+ Graphics.XHB.Gen.Xproto: same_screen_focus_EnterNotifyEvent :: EnterNotifyEvent -> Word8
+ Graphics.XHB.Gen.Xproto: same_screen_focus_LeaveNotifyEvent :: LeaveNotifyEvent -> Word8
+ Graphics.XHB.Gen.Xproto: selection_SelectionClearEvent :: SelectionClearEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: selection_SelectionNotifyEvent :: SelectionNotifyEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: selection_SelectionRequestEvent :: SelectionRequestEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: sibling_ConfigureRequestEvent :: ConfigureRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: stack_mode_ConfigureRequestEvent :: ConfigureRequestEvent -> StackMode
+ Graphics.XHB.Gen.Xproto: state_ButtonPressEvent :: ButtonPressEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_ButtonReleaseEvent :: ButtonReleaseEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_ColormapNotifyEvent :: ColormapNotifyEvent -> ColormapState
+ Graphics.XHB.Gen.Xproto: state_EnterNotifyEvent :: EnterNotifyEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_KeyPressEvent :: KeyPressEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_KeyReleaseEvent :: KeyReleaseEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_LeaveNotifyEvent :: LeaveNotifyEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_MotionNotifyEvent :: MotionNotifyEvent -> [KeyButMask]
+ Graphics.XHB.Gen.Xproto: state_PropertyNotifyEvent :: PropertyNotifyEvent -> Property
+ Graphics.XHB.Gen.Xproto: state_VisibilityNotifyEvent :: VisibilityNotifyEvent -> Visibility
+ Graphics.XHB.Gen.Xproto: target_SelectionNotifyEvent :: SelectionNotifyEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: target_SelectionRequestEvent :: SelectionRequestEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: time_ButtonPressEvent :: ButtonPressEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_ButtonReleaseEvent :: ButtonReleaseEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_EnterNotifyEvent :: EnterNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_KeyPressEvent :: KeyPressEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_KeyReleaseEvent :: KeyReleaseEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_LeaveNotifyEvent :: LeaveNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_MotionNotifyEvent :: MotionNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_PropertyNotifyEvent :: PropertyNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_SelectionClearEvent :: SelectionClearEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_SelectionNotifyEvent :: SelectionNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: time_SelectionRequestEvent :: SelectionRequestEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xproto: type_ClientMessageEvent :: ClientMessageEvent -> ATOM
+ Graphics.XHB.Gen.Xproto: value_mask_ConfigureRequestEvent :: ConfigureRequestEvent -> [ConfigWindow]
+ Graphics.XHB.Gen.Xproto: width_ConfigureNotifyEvent :: ConfigureNotifyEvent -> Word16
+ Graphics.XHB.Gen.Xproto: width_ConfigureRequestEvent :: ConfigureRequestEvent -> Word16
+ Graphics.XHB.Gen.Xproto: width_CreateNotifyEvent :: CreateNotifyEvent -> Word16
+ Graphics.XHB.Gen.Xproto: width_ExposeEvent :: ExposeEvent -> Word16
+ Graphics.XHB.Gen.Xproto: width_GraphicsExposureEvent :: GraphicsExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: width_ResizeRequestEvent :: ResizeRequestEvent -> Word16
+ Graphics.XHB.Gen.Xproto: window_CirculateNotifyEvent :: CirculateNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_CirculateRequestEvent :: CirculateRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ClientMessageEvent :: ClientMessageEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ColormapNotifyEvent :: ColormapNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ConfigureNotifyEvent :: ConfigureNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ConfigureRequestEvent :: ConfigureRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_CreateNotifyEvent :: CreateNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_DestroyNotifyEvent :: DestroyNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ExposeEvent :: ExposeEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_GravityNotifyEvent :: GravityNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_MapNotifyEvent :: MapNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_MapRequestEvent :: MapRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_PropertyNotifyEvent :: PropertyNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ReparentNotifyEvent :: ReparentNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_ResizeRequestEvent :: ResizeRequestEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_UnmapNotifyEvent :: UnmapNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: window_VisibilityNotifyEvent :: VisibilityNotifyEvent -> WINDOW
+ Graphics.XHB.Gen.Xproto: x_ConfigureNotifyEvent :: ConfigureNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: x_ConfigureRequestEvent :: ConfigureRequestEvent -> Int16
+ Graphics.XHB.Gen.Xproto: x_CreateNotifyEvent :: CreateNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: x_ExposeEvent :: ExposeEvent -> Word16
+ Graphics.XHB.Gen.Xproto: x_GraphicsExposureEvent :: GraphicsExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: x_GravityNotifyEvent :: GravityNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: x_ReparentNotifyEvent :: ReparentNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: y_ConfigureNotifyEvent :: ConfigureNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: y_ConfigureRequestEvent :: ConfigureRequestEvent -> Int16
+ Graphics.XHB.Gen.Xproto: y_CreateNotifyEvent :: CreateNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: y_ExposeEvent :: ExposeEvent -> Word16
+ Graphics.XHB.Gen.Xproto: y_GraphicsExposureEvent :: GraphicsExposureEvent -> Word16
+ Graphics.XHB.Gen.Xproto: y_GravityNotifyEvent :: GravityNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xproto: y_ReparentNotifyEvent :: ReparentNotifyEvent -> Int16
+ Graphics.XHB.Gen.Xv: GrabPortStatusAlreadyGrabbed :: GrabPortStatus
+ Graphics.XHB.Gen.Xv: GrabPortStatusBadAlloc :: GrabPortStatus
+ Graphics.XHB.Gen.Xv: GrabPortStatusBadExtension :: GrabPortStatus
+ Graphics.XHB.Gen.Xv: GrabPortStatusBadReply :: GrabPortStatus
+ Graphics.XHB.Gen.Xv: GrabPortStatusInvalidTime :: GrabPortStatus
+ Graphics.XHB.Gen.Xv: GrabPortStatusSuccess :: GrabPortStatus
+ Graphics.XHB.Gen.Xv: MkPortNotifyEvent :: TIMESTAMP -> PORT -> ATOM -> Int32 -> PortNotifyEvent
+ Graphics.XHB.Gen.Xv: MkVideoNotifyEvent :: VideoNotifyReason -> TIMESTAMP -> DRAWABLE -> PORT -> VideoNotifyEvent
+ Graphics.XHB.Gen.Xv: ScanlineOrderBottomToTop :: ScanlineOrder
+ Graphics.XHB.Gen.Xv: ScanlineOrderTopToBottom :: ScanlineOrder
+ Graphics.XHB.Gen.Xv: VideoNotifyReasonBusy :: VideoNotifyReason
+ Graphics.XHB.Gen.Xv: VideoNotifyReasonHardError :: VideoNotifyReason
+ Graphics.XHB.Gen.Xv: VideoNotifyReasonPreempted :: VideoNotifyReason
+ Graphics.XHB.Gen.Xv: VideoNotifyReasonStarted :: VideoNotifyReason
+ Graphics.XHB.Gen.Xv: VideoNotifyReasonStopped :: VideoNotifyReason
+ Graphics.XHB.Gen.Xv: attribute_PortNotifyEvent :: PortNotifyEvent -> ATOM
+ Graphics.XHB.Gen.Xv: data GrabPortStatus
+ Graphics.XHB.Gen.Xv: data PortNotifyEvent
+ Graphics.XHB.Gen.Xv: data ScanlineOrder
+ Graphics.XHB.Gen.Xv: data VideoNotifyEvent
+ Graphics.XHB.Gen.Xv: data VideoNotifyReason
+ Graphics.XHB.Gen.Xv: drawable_VideoNotifyEvent :: VideoNotifyEvent -> DRAWABLE
+ Graphics.XHB.Gen.Xv: port_PortNotifyEvent :: PortNotifyEvent -> PORT
+ Graphics.XHB.Gen.Xv: port_VideoNotifyEvent :: VideoNotifyEvent -> PORT
+ Graphics.XHB.Gen.Xv: reason_VideoNotifyEvent :: VideoNotifyEvent -> VideoNotifyReason
+ Graphics.XHB.Gen.Xv: time_PortNotifyEvent :: PortNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xv: time_VideoNotifyEvent :: VideoNotifyEvent -> TIMESTAMP
+ Graphics.XHB.Gen.Xv: value_PortNotifyEvent :: PortNotifyEvent -> Int32
- Graphics.XHB: class (Typeable a) => Event a
+ Graphics.XHB: class Typeable a => Event a
- Graphics.XHB: emptyValueParam :: (Bits a) => ValueParam a
+ Graphics.XHB: emptyValueParam :: Bits a => ValueParam a
- Graphics.XHB: fromBit :: (BitEnum a) => Int -> a
+ Graphics.XHB: fromBit :: BitEnum a => Int -> a
- Graphics.XHB: fromError :: (Error a) => SomeError -> Maybe a
+ Graphics.XHB: fromError :: Error a => SomeError -> Maybe a
- Graphics.XHB: fromEvent :: (Event a) => SomeEvent -> Maybe a
+ Graphics.XHB: fromEvent :: Event a => SomeEvent -> Maybe a
- Graphics.XHB: fromXid :: (XidLike a) => Xid -> a
+ Graphics.XHB: fromXid :: XidLike a => Xid -> a
- Graphics.XHB: toBit :: (BitEnum a) => a -> Int
+ Graphics.XHB: toBit :: BitEnum a => a -> Int
- Graphics.XHB: toError :: (Error a) => a -> SomeError
+ Graphics.XHB: toError :: Error a => a -> SomeError
- Graphics.XHB: toEvent :: (Event a) => a -> SomeEvent
+ Graphics.XHB: toEvent :: Event a => a -> SomeEvent
- Graphics.XHB: toXid :: (XidLike a) => a -> Xid
+ Graphics.XHB: toXid :: XidLike a => a -> Xid
- Graphics.XHB.Connection: newResource :: (XidLike a) => Connection -> IO a
+ Graphics.XHB.Connection: newResource :: XidLike a => Connection -> IO a
- Graphics.XHB.Connection.Extension: serializeExtensionRequest :: (ExtensionRequest a) => Connection -> a -> IO Put
+ Graphics.XHB.Connection.Extension: serializeExtensionRequest :: ExtensionRequest a => Connection -> a -> IO Put
- Graphics.XHB.Gen.Composite: MkRedirectSubwindows :: WINDOW -> Word8 -> RedirectSubwindows
+ Graphics.XHB.Gen.Composite: MkRedirectSubwindows :: WINDOW -> Redirect -> RedirectSubwindows
- Graphics.XHB.Gen.Composite: MkRedirectWindow :: WINDOW -> Word8 -> RedirectWindow
+ Graphics.XHB.Gen.Composite: MkRedirectWindow :: WINDOW -> Redirect -> RedirectWindow
- Graphics.XHB.Gen.Composite: MkUnredirectSubwindows :: WINDOW -> Word8 -> UnredirectSubwindows
+ Graphics.XHB.Gen.Composite: MkUnredirectSubwindows :: WINDOW -> Redirect -> UnredirectSubwindows
- Graphics.XHB.Gen.Composite: MkUnredirectWindow :: WINDOW -> Word8 -> UnredirectWindow
+ Graphics.XHB.Gen.Composite: MkUnredirectWindow :: WINDOW -> Redirect -> UnredirectWindow
- Graphics.XHB.Gen.Composite: redirectSubwindows :: Connection -> WINDOW -> Word8 -> IO ()
+ Graphics.XHB.Gen.Composite: redirectSubwindows :: Connection -> WINDOW -> Redirect -> IO ()
- Graphics.XHB.Gen.Composite: redirectWindow :: Connection -> WINDOW -> Word8 -> IO ()
+ Graphics.XHB.Gen.Composite: redirectWindow :: Connection -> WINDOW -> Redirect -> IO ()
- Graphics.XHB.Gen.Composite: unredirectSubwindows :: Connection -> WINDOW -> Word8 -> IO ()
+ Graphics.XHB.Gen.Composite: unredirectSubwindows :: Connection -> WINDOW -> Redirect -> IO ()
- Graphics.XHB.Gen.Composite: unredirectWindow :: Connection -> WINDOW -> Word8 -> IO ()
+ Graphics.XHB.Gen.Composite: unredirectWindow :: Connection -> WINDOW -> Redirect -> IO ()
- Graphics.XHB.Gen.Composite: update_RedirectSubwindows :: RedirectSubwindows -> Word8
+ Graphics.XHB.Gen.Composite: update_RedirectSubwindows :: RedirectSubwindows -> Redirect
- Graphics.XHB.Gen.Composite: update_RedirectWindow :: RedirectWindow -> Word8
+ Graphics.XHB.Gen.Composite: update_RedirectWindow :: RedirectWindow -> Redirect
- Graphics.XHB.Gen.Composite: update_UnredirectSubwindows :: UnredirectSubwindows -> Word8
+ Graphics.XHB.Gen.Composite: update_UnredirectSubwindows :: UnredirectSubwindows -> Redirect
- Graphics.XHB.Gen.Composite: update_UnredirectWindow :: UnredirectWindow -> Word8
+ Graphics.XHB.Gen.Composite: update_UnredirectWindow :: UnredirectWindow -> Redirect
- Graphics.XHB.Gen.DPMS: MkForceLevel :: Word16 -> ForceLevel
+ Graphics.XHB.Gen.DPMS: MkForceLevel :: DPMSMode -> ForceLevel
- Graphics.XHB.Gen.DPMS: MkInfoReply :: Word16 -> Bool -> InfoReply
+ Graphics.XHB.Gen.DPMS: MkInfoReply :: DPMSMode -> Bool -> InfoReply
- Graphics.XHB.Gen.DPMS: forceLevel :: Connection -> Word16 -> IO ()
+ Graphics.XHB.Gen.DPMS: forceLevel :: Connection -> DPMSMode -> IO ()
- Graphics.XHB.Gen.DPMS: power_level_ForceLevel :: ForceLevel -> Word16
+ Graphics.XHB.Gen.DPMS: power_level_ForceLevel :: ForceLevel -> DPMSMode
- Graphics.XHB.Gen.DPMS: power_level_InfoReply :: InfoReply -> Word16
+ Graphics.XHB.Gen.DPMS: power_level_InfoReply :: InfoReply -> DPMSMode
- Graphics.XHB.Gen.Damage: MkCreate :: DAMAGE -> DRAWABLE -> Word8 -> Create
+ Graphics.XHB.Gen.Damage: MkCreate :: DAMAGE -> DRAWABLE -> ReportLevel -> Create
- Graphics.XHB.Gen.Damage: level_Create :: Create -> Word8
+ Graphics.XHB.Gen.Damage: level_Create :: Create -> ReportLevel
- Graphics.XHB.Gen.Input: MkAllowDeviceEvents :: TIMESTAMP -> Word8 -> Word8 -> AllowDeviceEvents
+ Graphics.XHB.Gen.Input: MkAllowDeviceEvents :: TIMESTAMP -> DeviceInputMode -> Word8 -> AllowDeviceEvents
- Graphics.XHB.Gen.Input: MkAxisInfo :: Word32 -> Word32 -> Word32 -> AxisInfo
+ Graphics.XHB.Gen.Input: MkAxisInfo :: Word32 -> Int32 -> Int32 -> AxisInfo
- Graphics.XHB.Gen.Input: MkBellFeedbackCtl :: Word8 -> Word8 -> Word16 -> Int8 -> Int16 -> Int16 -> BellFeedbackCtl
+ Graphics.XHB.Gen.Input: MkBellFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> Int8 -> Int16 -> Int16 -> BellFeedbackCtl
- Graphics.XHB.Gen.Input: MkBellFeedbackState :: Word8 -> Word8 -> Word16 -> Word8 -> Word16 -> Word16 -> BellFeedbackState
+ Graphics.XHB.Gen.Input: MkBellFeedbackState :: FeedbackClass -> Word8 -> Word16 -> Word8 -> Word16 -> Word16 -> BellFeedbackState
- Graphics.XHB.Gen.Input: MkButtonInfo :: Word8 -> Word8 -> Word16 -> ButtonInfo
+ Graphics.XHB.Gen.Input: MkButtonInfo :: InputClass -> Word8 -> Word16 -> ButtonInfo
- Graphics.XHB.Gen.Input: MkButtonState :: Word8 -> Word8 -> Word8 -> [Word8] -> ButtonState
+ Graphics.XHB.Gen.Input: MkButtonState :: InputClass -> Word8 -> Word8 -> [Word8] -> ButtonState
- Graphics.XHB.Gen.Input: MkChangeDeviceDontPropagateList :: WINDOW -> Word16 -> Word8 -> [EventClass] -> ChangeDeviceDontPropagateList
+ Graphics.XHB.Gen.Input: MkChangeDeviceDontPropagateList :: WINDOW -> Word16 -> PropagateMode -> [EventClass] -> ChangeDeviceDontPropagateList
- Graphics.XHB.Gen.Input: MkDeviceInfo :: ATOM -> Word8 -> Word8 -> Word8 -> DeviceInfo
+ Graphics.XHB.Gen.Input: MkDeviceInfo :: ATOM -> Word8 -> Word8 -> DeviceUse -> DeviceInfo
- Graphics.XHB.Gen.Input: MkFeedbackCtl :: Word8 -> Word8 -> Word16 -> FeedbackCtl
+ Graphics.XHB.Gen.Input: MkFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> FeedbackCtl
- Graphics.XHB.Gen.Input: MkFeedbackState :: Word8 -> Word8 -> Word16 -> FeedbackState
+ Graphics.XHB.Gen.Input: MkFeedbackState :: FeedbackClass -> Word8 -> Word16 -> FeedbackState
- Graphics.XHB.Gen.Input: MkGetDeviceFocusReply :: WINDOW -> TIMESTAMP -> Word8 -> GetDeviceFocusReply
+ Graphics.XHB.Gen.Input: MkGetDeviceFocusReply :: WINDOW -> TIMESTAMP -> InputFocus -> GetDeviceFocusReply
- Graphics.XHB.Gen.Input: MkGetDeviceMotionEventsReply :: Word32 -> Word8 -> Word8 -> GetDeviceMotionEventsReply
+ Graphics.XHB.Gen.Input: MkGetDeviceMotionEventsReply :: Word32 -> Word8 -> ValuatorMode -> GetDeviceMotionEventsReply
- Graphics.XHB.Gen.Input: MkGetExtensionVersionReply :: Word16 -> Word16 -> Word8 -> GetExtensionVersionReply
+ Graphics.XHB.Gen.Input: MkGetExtensionVersionReply :: Word16 -> Word16 -> Bool -> GetExtensionVersionReply
- Graphics.XHB.Gen.Input: MkGrabDevice :: WINDOW -> TIMESTAMP -> Word16 -> Word8 -> Word8 -> Bool -> Word8 -> [EventClass] -> GrabDevice
+ Graphics.XHB.Gen.Input: MkGrabDevice :: WINDOW -> TIMESTAMP -> Word16 -> GrabMode -> GrabMode -> Bool -> Word8 -> [EventClass] -> GrabDevice
- Graphics.XHB.Gen.Input: MkGrabDeviceButton :: WINDOW -> Word8 -> Word8 -> Word16 -> Word16 -> Word8 -> Word8 -> Word8 -> Word8 -> [EventClass] -> GrabDeviceButton
+ Graphics.XHB.Gen.Input: MkGrabDeviceButton :: WINDOW -> Word8 -> Word8 -> Word16 -> [ModMask] -> GrabMode -> GrabMode -> Word8 -> Word8 -> [EventClass] -> GrabDeviceButton
- Graphics.XHB.Gen.Input: MkGrabDeviceKey :: WINDOW -> Word16 -> Word16 -> Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> Bool -> [EventClass] -> GrabDeviceKey
+ Graphics.XHB.Gen.Input: MkGrabDeviceKey :: WINDOW -> Word16 -> [ModMask] -> Word8 -> Word8 -> Word8 -> GrabMode -> GrabMode -> Bool -> [EventClass] -> GrabDeviceKey
- Graphics.XHB.Gen.Input: MkGrabDeviceReply :: Word8 -> GrabDeviceReply
+ Graphics.XHB.Gen.Input: MkGrabDeviceReply :: GrabStatus -> GrabDeviceReply
- Graphics.XHB.Gen.Input: MkInputClassInfo :: Word8 -> Word8 -> InputClassInfo
+ Graphics.XHB.Gen.Input: MkInputClassInfo :: InputClass -> Word8 -> InputClassInfo
- Graphics.XHB.Gen.Input: MkInputInfo :: Word8 -> Word8 -> InputInfo
+ Graphics.XHB.Gen.Input: MkInputInfo :: InputClass -> Word8 -> InputInfo
- Graphics.XHB.Gen.Input: MkInputState :: Word8 -> Word8 -> Word8 -> InputState
+ Graphics.XHB.Gen.Input: MkInputState :: InputClass -> Word8 -> Word8 -> InputState
- Graphics.XHB.Gen.Input: MkIntegerFeedbackCtl :: Word8 -> Word8 -> Word16 -> Int32 -> IntegerFeedbackCtl
+ Graphics.XHB.Gen.Input: MkIntegerFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> Int32 -> IntegerFeedbackCtl
- Graphics.XHB.Gen.Input: MkIntegerFeedbackState :: Word8 -> Word8 -> Word16 -> Word32 -> Int32 -> Int32 -> IntegerFeedbackState
+ Graphics.XHB.Gen.Input: MkIntegerFeedbackState :: FeedbackClass -> Word8 -> Word16 -> Word32 -> Int32 -> Int32 -> IntegerFeedbackState
- Graphics.XHB.Gen.Input: MkKbdFeedbackCtl :: Word8 -> Word8 -> Word16 -> KeyCode -> Word8 -> Int8 -> Int8 -> Int16 -> Int16 -> Word32 -> Word32 -> KbdFeedbackCtl
+ Graphics.XHB.Gen.Input: MkKbdFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> KeyCode -> Word8 -> Int8 -> Int8 -> Int16 -> Int16 -> Word32 -> Word32 -> KbdFeedbackCtl
- Graphics.XHB.Gen.Input: MkKbdFeedbackState :: Word8 -> Word8 -> Word16 -> Word16 -> Word16 -> Word32 -> Word32 -> Bool -> Word8 -> Word8 -> [Word8] -> KbdFeedbackState
+ Graphics.XHB.Gen.Input: MkKbdFeedbackState :: FeedbackClass -> Word8 -> Word16 -> Word16 -> Word16 -> Word32 -> Word32 -> Bool -> Word8 -> Word8 -> [Word8] -> KbdFeedbackState
- Graphics.XHB.Gen.Input: MkKeyInfo :: Word8 -> Word8 -> KeyCode -> KeyCode -> Word16 -> KeyInfo
+ Graphics.XHB.Gen.Input: MkKeyInfo :: InputClass -> Word8 -> KeyCode -> KeyCode -> Word16 -> KeyInfo
- Graphics.XHB.Gen.Input: MkKeyState :: Word8 -> Word8 -> Word8 -> [Word8] -> KeyState
+ Graphics.XHB.Gen.Input: MkKeyState :: InputClass -> Word8 -> Word8 -> [Word8] -> KeyState
- Graphics.XHB.Gen.Input: MkLedFeedbackCtl :: Word8 -> Word8 -> Word16 -> Word32 -> Word32 -> LedFeedbackCtl
+ Graphics.XHB.Gen.Input: MkLedFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> Word32 -> Word32 -> LedFeedbackCtl
- Graphics.XHB.Gen.Input: MkLedFeedbackState :: Word8 -> Word8 -> Word16 -> Word32 -> Word32 -> LedFeedbackState
+ Graphics.XHB.Gen.Input: MkLedFeedbackState :: FeedbackClass -> Word8 -> Word16 -> Word32 -> Word32 -> LedFeedbackState
- Graphics.XHB.Gen.Input: MkPtrFeedbackCtl :: Word8 -> Word8 -> Word16 -> Int16 -> Int16 -> Int16 -> PtrFeedbackCtl
+ Graphics.XHB.Gen.Input: MkPtrFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> Int16 -> Int16 -> Int16 -> PtrFeedbackCtl
- Graphics.XHB.Gen.Input: MkPtrFeedbackState :: Word8 -> Word8 -> Word16 -> Word16 -> Word16 -> Word16 -> PtrFeedbackState
+ Graphics.XHB.Gen.Input: MkPtrFeedbackState :: FeedbackClass -> Word8 -> Word16 -> Word16 -> Word16 -> Word16 -> PtrFeedbackState
- Graphics.XHB.Gen.Input: MkSetDeviceButtonMappingReply :: Word8 -> SetDeviceButtonMappingReply
+ Graphics.XHB.Gen.Input: MkSetDeviceButtonMappingReply :: MappingStatus -> SetDeviceButtonMappingReply
- Graphics.XHB.Gen.Input: MkSetDeviceFocus :: WINDOW -> TIMESTAMP -> Word8 -> Word8 -> SetDeviceFocus
+ Graphics.XHB.Gen.Input: MkSetDeviceFocus :: WINDOW -> TIMESTAMP -> InputFocus -> Word8 -> SetDeviceFocus
- Graphics.XHB.Gen.Input: MkSetDeviceMode :: Word8 -> Word8 -> SetDeviceMode
+ Graphics.XHB.Gen.Input: MkSetDeviceMode :: Word8 -> ValuatorMode -> SetDeviceMode
- Graphics.XHB.Gen.Input: MkSetDeviceModifierMappingReply :: Word8 -> SetDeviceModifierMappingReply
+ Graphics.XHB.Gen.Input: MkSetDeviceModifierMappingReply :: MappingStatus -> SetDeviceModifierMappingReply
- Graphics.XHB.Gen.Input: MkSetDeviceValuatorsReply :: Word8 -> SetDeviceValuatorsReply
+ Graphics.XHB.Gen.Input: MkSetDeviceValuatorsReply :: GrabStatus -> SetDeviceValuatorsReply
- Graphics.XHB.Gen.Input: MkStringFeedbackCtl :: Word8 -> Word8 -> Word16 -> Word16 -> [KEYSYM] -> StringFeedbackCtl
+ Graphics.XHB.Gen.Input: MkStringFeedbackCtl :: FeedbackClass -> Word8 -> Word16 -> Word16 -> [KEYSYM] -> StringFeedbackCtl
- Graphics.XHB.Gen.Input: MkStringFeedbackState :: Word8 -> Word8 -> Word16 -> Word16 -> Word16 -> [KEYSYM] -> StringFeedbackState
+ Graphics.XHB.Gen.Input: MkStringFeedbackState :: FeedbackClass -> Word8 -> Word16 -> Word16 -> Word16 -> [KEYSYM] -> StringFeedbackState
- Graphics.XHB.Gen.Input: MkUngrabDeviceButton :: WINDOW -> Word16 -> Word8 -> Word8 -> Word8 -> UngrabDeviceButton
+ Graphics.XHB.Gen.Input: MkUngrabDeviceButton :: WINDOW -> [ModMask] -> Word8 -> Word8 -> Word8 -> UngrabDeviceButton
- Graphics.XHB.Gen.Input: MkUngrabDeviceKey :: WINDOW -> Word16 -> Word8 -> Word8 -> Word8 -> UngrabDeviceKey
+ Graphics.XHB.Gen.Input: MkUngrabDeviceKey :: WINDOW -> [ModMask] -> Word8 -> Word8 -> Word8 -> UngrabDeviceKey
- Graphics.XHB.Gen.Input: MkValuatorInfo :: Word8 -> Word8 -> Word8 -> Word8 -> Word32 -> [AxisInfo] -> ValuatorInfo
+ Graphics.XHB.Gen.Input: MkValuatorInfo :: InputClass -> Word8 -> Word8 -> ValuatorMode -> Word32 -> [AxisInfo] -> ValuatorInfo
- Graphics.XHB.Gen.Input: MkValuatorState :: Word8 -> Word8 -> Word8 -> Word8 -> [Word32] -> ValuatorState
+ Graphics.XHB.Gen.Input: MkValuatorState :: InputClass -> Word8 -> Word8 -> Word8 -> [Word32] -> ValuatorState
- Graphics.XHB.Gen.Input: class_id_BellFeedbackCtl :: BellFeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_BellFeedbackCtl :: BellFeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_BellFeedbackState :: BellFeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_BellFeedbackState :: BellFeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_ButtonInfo :: ButtonInfo -> Word8
+ Graphics.XHB.Gen.Input: class_id_ButtonInfo :: ButtonInfo -> InputClass
- Graphics.XHB.Gen.Input: class_id_ButtonState :: ButtonState -> Word8
+ Graphics.XHB.Gen.Input: class_id_ButtonState :: ButtonState -> InputClass
- Graphics.XHB.Gen.Input: class_id_FeedbackCtl :: FeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_FeedbackCtl :: FeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_FeedbackState :: FeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_FeedbackState :: FeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_InputClassInfo :: InputClassInfo -> Word8
+ Graphics.XHB.Gen.Input: class_id_InputClassInfo :: InputClassInfo -> InputClass
- Graphics.XHB.Gen.Input: class_id_InputInfo :: InputInfo -> Word8
+ Graphics.XHB.Gen.Input: class_id_InputInfo :: InputInfo -> InputClass
- Graphics.XHB.Gen.Input: class_id_InputState :: InputState -> Word8
+ Graphics.XHB.Gen.Input: class_id_InputState :: InputState -> InputClass
- Graphics.XHB.Gen.Input: class_id_IntegerFeedbackCtl :: IntegerFeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_IntegerFeedbackCtl :: IntegerFeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_IntegerFeedbackState :: IntegerFeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_IntegerFeedbackState :: IntegerFeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_KbdFeedbackCtl :: KbdFeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_KbdFeedbackCtl :: KbdFeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_KbdFeedbackState :: KbdFeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_KbdFeedbackState :: KbdFeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_KeyInfo :: KeyInfo -> Word8
+ Graphics.XHB.Gen.Input: class_id_KeyInfo :: KeyInfo -> InputClass
- Graphics.XHB.Gen.Input: class_id_KeyState :: KeyState -> Word8
+ Graphics.XHB.Gen.Input: class_id_KeyState :: KeyState -> InputClass
- Graphics.XHB.Gen.Input: class_id_LedFeedbackCtl :: LedFeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_LedFeedbackCtl :: LedFeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_LedFeedbackState :: LedFeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_LedFeedbackState :: LedFeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_PtrFeedbackCtl :: PtrFeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_PtrFeedbackCtl :: PtrFeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_PtrFeedbackState :: PtrFeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_PtrFeedbackState :: PtrFeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_StringFeedbackCtl :: StringFeedbackCtl -> Word8
+ Graphics.XHB.Gen.Input: class_id_StringFeedbackCtl :: StringFeedbackCtl -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_StringFeedbackState :: StringFeedbackState -> Word8
+ Graphics.XHB.Gen.Input: class_id_StringFeedbackState :: StringFeedbackState -> FeedbackClass
- Graphics.XHB.Gen.Input: class_id_ValuatorInfo :: ValuatorInfo -> Word8
+ Graphics.XHB.Gen.Input: class_id_ValuatorInfo :: ValuatorInfo -> InputClass
- Graphics.XHB.Gen.Input: class_id_ValuatorState :: ValuatorState -> Word8
+ Graphics.XHB.Gen.Input: class_id_ValuatorState :: ValuatorState -> InputClass
- Graphics.XHB.Gen.Input: device_mode_GetDeviceMotionEventsReply :: GetDeviceMotionEventsReply -> Word8
+ Graphics.XHB.Gen.Input: device_mode_GetDeviceMotionEventsReply :: GetDeviceMotionEventsReply -> ValuatorMode
- Graphics.XHB.Gen.Input: device_use_DeviceInfo :: DeviceInfo -> Word8
+ Graphics.XHB.Gen.Input: device_use_DeviceInfo :: DeviceInfo -> DeviceUse
- Graphics.XHB.Gen.Input: grabDevice :: Connection -> GrabDevice -> IO (Receipt Word8)
+ Graphics.XHB.Gen.Input: grabDevice :: Connection -> GrabDevice -> IO (Receipt GrabStatus)
- Graphics.XHB.Gen.Input: maximum_AxisInfo :: AxisInfo -> Word32
+ Graphics.XHB.Gen.Input: maximum_AxisInfo :: AxisInfo -> Int32
- Graphics.XHB.Gen.Input: minimum_AxisInfo :: AxisInfo -> Word32
+ Graphics.XHB.Gen.Input: minimum_AxisInfo :: AxisInfo -> Int32
- Graphics.XHB.Gen.Input: mode_AllowDeviceEvents :: AllowDeviceEvents -> Word8
+ Graphics.XHB.Gen.Input: mode_AllowDeviceEvents :: AllowDeviceEvents -> DeviceInputMode
- Graphics.XHB.Gen.Input: mode_ChangeDeviceDontPropagateList :: ChangeDeviceDontPropagateList -> Word8
+ Graphics.XHB.Gen.Input: mode_ChangeDeviceDontPropagateList :: ChangeDeviceDontPropagateList -> PropagateMode
- Graphics.XHB.Gen.Input: mode_SetDeviceMode :: SetDeviceMode -> Word8
+ Graphics.XHB.Gen.Input: mode_SetDeviceMode :: SetDeviceMode -> ValuatorMode
- Graphics.XHB.Gen.Input: mode_ValuatorInfo :: ValuatorInfo -> Word8
+ Graphics.XHB.Gen.Input: mode_ValuatorInfo :: ValuatorInfo -> ValuatorMode
- Graphics.XHB.Gen.Input: modifiers_GrabDeviceButton :: GrabDeviceButton -> Word16
+ Graphics.XHB.Gen.Input: modifiers_GrabDeviceButton :: GrabDeviceButton -> [ModMask]
- Graphics.XHB.Gen.Input: modifiers_GrabDeviceKey :: GrabDeviceKey -> Word16
+ Graphics.XHB.Gen.Input: modifiers_GrabDeviceKey :: GrabDeviceKey -> [ModMask]
- Graphics.XHB.Gen.Input: modifiers_UngrabDeviceButton :: UngrabDeviceButton -> Word16
+ Graphics.XHB.Gen.Input: modifiers_UngrabDeviceButton :: UngrabDeviceButton -> [ModMask]
- Graphics.XHB.Gen.Input: modifiers_UngrabDeviceKey :: UngrabDeviceKey -> Word16
+ Graphics.XHB.Gen.Input: modifiers_UngrabDeviceKey :: UngrabDeviceKey -> [ModMask]
- Graphics.XHB.Gen.Input: other_device_mode_GrabDevice :: GrabDevice -> Word8
+ Graphics.XHB.Gen.Input: other_device_mode_GrabDevice :: GrabDevice -> GrabMode
- Graphics.XHB.Gen.Input: other_device_mode_GrabDeviceButton :: GrabDeviceButton -> Word8
+ Graphics.XHB.Gen.Input: other_device_mode_GrabDeviceButton :: GrabDeviceButton -> GrabMode
- Graphics.XHB.Gen.Input: other_device_mode_GrabDeviceKey :: GrabDeviceKey -> Word8
+ Graphics.XHB.Gen.Input: other_device_mode_GrabDeviceKey :: GrabDeviceKey -> GrabMode
- Graphics.XHB.Gen.Input: present_GetExtensionVersionReply :: GetExtensionVersionReply -> Word8
+ Graphics.XHB.Gen.Input: present_GetExtensionVersionReply :: GetExtensionVersionReply -> Bool
- Graphics.XHB.Gen.Input: revert_to_GetDeviceFocusReply :: GetDeviceFocusReply -> Word8
+ Graphics.XHB.Gen.Input: revert_to_GetDeviceFocusReply :: GetDeviceFocusReply -> InputFocus
- Graphics.XHB.Gen.Input: revert_to_SetDeviceFocus :: SetDeviceFocus -> Word8
+ Graphics.XHB.Gen.Input: revert_to_SetDeviceFocus :: SetDeviceFocus -> InputFocus
- Graphics.XHB.Gen.Input: setDeviceButtonMapping :: Connection -> SetDeviceButtonMapping -> IO (Receipt Word8)
+ Graphics.XHB.Gen.Input: setDeviceButtonMapping :: Connection -> SetDeviceButtonMapping -> IO (Receipt MappingStatus)
- Graphics.XHB.Gen.Input: setDeviceMode :: Connection -> Word8 -> Word8 -> IO (Receipt Word8)
+ Graphics.XHB.Gen.Input: setDeviceMode :: Connection -> Word8 -> ValuatorMode -> IO (Receipt Word8)
- Graphics.XHB.Gen.Input: setDeviceModifierMapping :: Connection -> SetDeviceModifierMapping -> IO (Receipt Word8)
+ Graphics.XHB.Gen.Input: setDeviceModifierMapping :: Connection -> SetDeviceModifierMapping -> IO (Receipt MappingStatus)
- Graphics.XHB.Gen.Input: setDeviceValuators :: Connection -> SetDeviceValuators -> IO (Receipt Word8)
+ Graphics.XHB.Gen.Input: setDeviceValuators :: Connection -> SetDeviceValuators -> IO (Receipt GrabStatus)
- Graphics.XHB.Gen.Input: status_GrabDeviceReply :: GrabDeviceReply -> Word8
+ Graphics.XHB.Gen.Input: status_GrabDeviceReply :: GrabDeviceReply -> GrabStatus
- Graphics.XHB.Gen.Input: status_SetDeviceButtonMappingReply :: SetDeviceButtonMappingReply -> Word8
+ Graphics.XHB.Gen.Input: status_SetDeviceButtonMappingReply :: SetDeviceButtonMappingReply -> MappingStatus
- Graphics.XHB.Gen.Input: status_SetDeviceModifierMappingReply :: SetDeviceModifierMappingReply -> Word8
+ Graphics.XHB.Gen.Input: status_SetDeviceModifierMappingReply :: SetDeviceModifierMappingReply -> MappingStatus
- Graphics.XHB.Gen.Input: status_SetDeviceValuatorsReply :: SetDeviceValuatorsReply -> Word8
+ Graphics.XHB.Gen.Input: status_SetDeviceValuatorsReply :: SetDeviceValuatorsReply -> GrabStatus
- Graphics.XHB.Gen.Input: this_device_mode_GrabDevice :: GrabDevice -> Word8
+ Graphics.XHB.Gen.Input: this_device_mode_GrabDevice :: GrabDevice -> GrabMode
- Graphics.XHB.Gen.Input: this_device_mode_GrabDeviceButton :: GrabDeviceButton -> Word8
+ Graphics.XHB.Gen.Input: this_device_mode_GrabDeviceButton :: GrabDeviceButton -> GrabMode
- Graphics.XHB.Gen.Input: this_device_mode_GrabDeviceKey :: GrabDeviceKey -> Word8
+ Graphics.XHB.Gen.Input: this_device_mode_GrabDeviceKey :: GrabDeviceKey -> GrabMode
- Graphics.XHB.Gen.RandR: MkChangeOutputProperty :: OUTPUT -> ATOM -> ATOM -> Word8 -> Word8 -> Word32 -> [Word8] -> ChangeOutputProperty
+ Graphics.XHB.Gen.RandR: MkChangeOutputProperty :: OUTPUT -> ATOM -> ATOM -> Word8 -> PropMode -> Word32 -> [Word8] -> ChangeOutputProperty
- Graphics.XHB.Gen.RandR: MkCrtcChange :: TIMESTAMP -> WINDOW -> CRTC -> MODE -> Word16 -> Int16 -> Int16 -> Word16 -> Word16 -> CrtcChange
+ Graphics.XHB.Gen.RandR: MkCrtcChange :: TIMESTAMP -> WINDOW -> CRTC -> MODE -> [Rotation] -> Int16 -> Int16 -> Word16 -> Word16 -> CrtcChange
- Graphics.XHB.Gen.RandR: MkGetCrtcInfoReply :: Word8 -> TIMESTAMP -> Int16 -> Int16 -> Word16 -> Word16 -> MODE -> Word16 -> Word16 -> Word16 -> Word16 -> [OUTPUT] -> [OUTPUT] -> GetCrtcInfoReply
+ Graphics.XHB.Gen.RandR: MkGetCrtcInfoReply :: SetConfig -> TIMESTAMP -> Int16 -> Int16 -> Word16 -> Word16 -> MODE -> [Rotation] -> [Rotation] -> Word16 -> Word16 -> [OUTPUT] -> [OUTPUT] -> GetCrtcInfoReply
- Graphics.XHB.Gen.RandR: MkGetOutputInfoReply :: Word8 -> TIMESTAMP -> CRTC -> Word32 -> Word32 -> Word8 -> Word8 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> [CRTC] -> [MODE] -> [OUTPUT] -> [Word8] -> GetOutputInfoReply
+ Graphics.XHB.Gen.RandR: MkGetOutputInfoReply :: SetConfig -> TIMESTAMP -> CRTC -> Word32 -> Word32 -> Connection -> SubPixel -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> [CRTC] -> [MODE] -> [OUTPUT] -> [Word8] -> GetOutputInfoReply
- Graphics.XHB.Gen.RandR: MkGetScreenInfoReply :: Word8 -> WINDOW -> TIMESTAMP -> TIMESTAMP -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> [ScreenSize] -> [RefreshRates] -> GetScreenInfoReply
+ Graphics.XHB.Gen.RandR: MkGetScreenInfoReply :: [Rotation] -> WINDOW -> TIMESTAMP -> TIMESTAMP -> Word16 -> Word16 -> [Rotation] -> Word16 -> Word16 -> [ScreenSize] -> [RefreshRates] -> GetScreenInfoReply
- Graphics.XHB.Gen.RandR: MkModeInfo :: Word32 -> Word16 -> Word16 -> Word32 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word32 -> ModeInfo
+ Graphics.XHB.Gen.RandR: MkModeInfo :: Word32 -> Word16 -> Word16 -> Word32 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> [ModeFlag] -> ModeInfo
- Graphics.XHB.Gen.RandR: MkOutputChange :: TIMESTAMP -> TIMESTAMP -> WINDOW -> OUTPUT -> CRTC -> MODE -> Word16 -> Word8 -> Word8 -> OutputChange
+ Graphics.XHB.Gen.RandR: MkOutputChange :: TIMESTAMP -> TIMESTAMP -> WINDOW -> OUTPUT -> CRTC -> MODE -> [Rotation] -> Connection -> SubPixel -> OutputChange
- Graphics.XHB.Gen.RandR: MkOutputProperty :: WINDOW -> OUTPUT -> ATOM -> TIMESTAMP -> Word8 -> OutputProperty
+ Graphics.XHB.Gen.RandR: MkOutputProperty :: WINDOW -> OUTPUT -> ATOM -> TIMESTAMP -> Property -> OutputProperty
- Graphics.XHB.Gen.RandR: MkSelectInput :: WINDOW -> Word16 -> SelectInput
+ Graphics.XHB.Gen.RandR: MkSelectInput :: WINDOW -> [NotifyMask] -> SelectInput
- Graphics.XHB.Gen.RandR: MkSetCrtcConfig :: CRTC -> TIMESTAMP -> TIMESTAMP -> Int16 -> Int16 -> MODE -> Word16 -> [OUTPUT] -> SetCrtcConfig
+ Graphics.XHB.Gen.RandR: MkSetCrtcConfig :: CRTC -> TIMESTAMP -> TIMESTAMP -> Int16 -> Int16 -> MODE -> [Rotation] -> [OUTPUT] -> SetCrtcConfig
- Graphics.XHB.Gen.RandR: MkSetCrtcConfigReply :: Word8 -> TIMESTAMP -> SetCrtcConfigReply
+ Graphics.XHB.Gen.RandR: MkSetCrtcConfigReply :: SetConfig -> TIMESTAMP -> SetCrtcConfigReply
- Graphics.XHB.Gen.RandR: MkSetScreenConfig :: WINDOW -> TIMESTAMP -> TIMESTAMP -> Word16 -> Word16 -> Word16 -> SetScreenConfig
+ Graphics.XHB.Gen.RandR: MkSetScreenConfig :: WINDOW -> TIMESTAMP -> TIMESTAMP -> Word16 -> [Rotation] -> Word16 -> SetScreenConfig
- Graphics.XHB.Gen.RandR: MkSetScreenConfigReply :: Word8 -> TIMESTAMP -> TIMESTAMP -> WINDOW -> Word16 -> SetScreenConfigReply
+ Graphics.XHB.Gen.RandR: MkSetScreenConfigReply :: SetConfig -> TIMESTAMP -> TIMESTAMP -> WINDOW -> SubPixel -> SetScreenConfigReply
- Graphics.XHB.Gen.RandR: NotifyCrtcChange :: NotifyEnum
+ Graphics.XHB.Gen.RandR: NotifyCrtcChange :: Notify
- Graphics.XHB.Gen.RandR: NotifyOutputChange :: NotifyEnum
+ Graphics.XHB.Gen.RandR: NotifyOutputChange :: Notify
- Graphics.XHB.Gen.RandR: NotifyOutputProperty :: NotifyEnum
+ Graphics.XHB.Gen.RandR: NotifyOutputProperty :: Notify
- Graphics.XHB.Gen.RandR: connection_GetOutputInfoReply :: GetOutputInfoReply -> Word8
+ Graphics.XHB.Gen.RandR: connection_GetOutputInfoReply :: GetOutputInfoReply -> Connection
- Graphics.XHB.Gen.RandR: connection_OutputChange :: OutputChange -> Word8
+ Graphics.XHB.Gen.RandR: connection_OutputChange :: OutputChange -> Connection
- Graphics.XHB.Gen.RandR: enable_SelectInput :: SelectInput -> Word16
+ Graphics.XHB.Gen.RandR: enable_SelectInput :: SelectInput -> [NotifyMask]
- Graphics.XHB.Gen.RandR: mode_ChangeOutputProperty :: ChangeOutputProperty -> Word8
+ Graphics.XHB.Gen.RandR: mode_ChangeOutputProperty :: ChangeOutputProperty -> PropMode
- Graphics.XHB.Gen.RandR: mode_flags_ModeInfo :: ModeInfo -> Word32
+ Graphics.XHB.Gen.RandR: mode_flags_ModeInfo :: ModeInfo -> [ModeFlag]
- Graphics.XHB.Gen.RandR: rotation_CrtcChange :: CrtcChange -> Word16
+ Graphics.XHB.Gen.RandR: rotation_CrtcChange :: CrtcChange -> [Rotation]
- Graphics.XHB.Gen.RandR: rotation_GetCrtcInfoReply :: GetCrtcInfoReply -> Word16
+ Graphics.XHB.Gen.RandR: rotation_GetCrtcInfoReply :: GetCrtcInfoReply -> [Rotation]
- Graphics.XHB.Gen.RandR: rotation_GetScreenInfoReply :: GetScreenInfoReply -> Word16
+ Graphics.XHB.Gen.RandR: rotation_GetScreenInfoReply :: GetScreenInfoReply -> [Rotation]
- Graphics.XHB.Gen.RandR: rotation_OutputChange :: OutputChange -> Word16
+ Graphics.XHB.Gen.RandR: rotation_OutputChange :: OutputChange -> [Rotation]
- Graphics.XHB.Gen.RandR: rotation_SetCrtcConfig :: SetCrtcConfig -> Word16
+ Graphics.XHB.Gen.RandR: rotation_SetCrtcConfig :: SetCrtcConfig -> [Rotation]
- Graphics.XHB.Gen.RandR: rotation_SetScreenConfig :: SetScreenConfig -> Word16
+ Graphics.XHB.Gen.RandR: rotation_SetScreenConfig :: SetScreenConfig -> [Rotation]
- Graphics.XHB.Gen.RandR: rotations_GetCrtcInfoReply :: GetCrtcInfoReply -> Word16
+ Graphics.XHB.Gen.RandR: rotations_GetCrtcInfoReply :: GetCrtcInfoReply -> [Rotation]
- Graphics.XHB.Gen.RandR: rotations_GetScreenInfoReply :: GetScreenInfoReply -> Word8
+ Graphics.XHB.Gen.RandR: rotations_GetScreenInfoReply :: GetScreenInfoReply -> [Rotation]
- Graphics.XHB.Gen.RandR: selectInput :: Connection -> WINDOW -> Word16 -> IO ()
+ Graphics.XHB.Gen.RandR: selectInput :: Connection -> WINDOW -> [NotifyMask] -> IO ()
- Graphics.XHB.Gen.RandR: status_GetCrtcInfoReply :: GetCrtcInfoReply -> Word8
+ Graphics.XHB.Gen.RandR: status_GetCrtcInfoReply :: GetCrtcInfoReply -> SetConfig
- Graphics.XHB.Gen.RandR: status_GetOutputInfoReply :: GetOutputInfoReply -> Word8
+ Graphics.XHB.Gen.RandR: status_GetOutputInfoReply :: GetOutputInfoReply -> SetConfig
- Graphics.XHB.Gen.RandR: status_OutputProperty :: OutputProperty -> Word8
+ Graphics.XHB.Gen.RandR: status_OutputProperty :: OutputProperty -> Property
- Graphics.XHB.Gen.RandR: status_SetCrtcConfigReply :: SetCrtcConfigReply -> Word8
+ Graphics.XHB.Gen.RandR: status_SetCrtcConfigReply :: SetCrtcConfigReply -> SetConfig
- Graphics.XHB.Gen.RandR: status_SetScreenConfigReply :: SetScreenConfigReply -> Word8
+ Graphics.XHB.Gen.RandR: status_SetScreenConfigReply :: SetScreenConfigReply -> SetConfig
- Graphics.XHB.Gen.RandR: subpixel_order_GetOutputInfoReply :: GetOutputInfoReply -> Word8
+ Graphics.XHB.Gen.RandR: subpixel_order_GetOutputInfoReply :: GetOutputInfoReply -> SubPixel
- Graphics.XHB.Gen.RandR: subpixel_order_OutputChange :: OutputChange -> Word8
+ Graphics.XHB.Gen.RandR: subpixel_order_OutputChange :: OutputChange -> SubPixel
- Graphics.XHB.Gen.RandR: subpixel_order_SetScreenConfigReply :: SetScreenConfigReply -> Word16
+ Graphics.XHB.Gen.RandR: subpixel_order_SetScreenConfigReply :: SetScreenConfigReply -> SubPixel
- Graphics.XHB.Gen.Render: MkComposite :: Word8 -> PICTURE -> PICTURE -> PICTURE -> Int16 -> Int16 -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Word16 -> Composite
+ Graphics.XHB.Gen.Render: MkComposite :: PictOp -> PICTURE -> PICTURE -> PICTURE -> Int16 -> Int16 -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> Word16 -> Composite
- Graphics.XHB.Gen.Render: MkCompositeGlyphs16 :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> GLYPHSET -> Int16 -> Int16 -> [Word8] -> CompositeGlyphs16
+ Graphics.XHB.Gen.Render: MkCompositeGlyphs16 :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> GLYPHSET -> Int16 -> Int16 -> [Word8] -> CompositeGlyphs16
- Graphics.XHB.Gen.Render: MkCompositeGlyphs32 :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> GLYPHSET -> Int16 -> Int16 -> [Word8] -> CompositeGlyphs32
+ Graphics.XHB.Gen.Render: MkCompositeGlyphs32 :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> GLYPHSET -> Int16 -> Int16 -> [Word8] -> CompositeGlyphs32
- Graphics.XHB.Gen.Render: MkCompositeGlyphs8 :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> GLYPHSET -> Int16 -> Int16 -> [Word8] -> CompositeGlyphs8
+ Graphics.XHB.Gen.Render: MkCompositeGlyphs8 :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> GLYPHSET -> Int16 -> Int16 -> [Word8] -> CompositeGlyphs8
- Graphics.XHB.Gen.Render: MkFillRectangles :: Word8 -> PICTURE -> COLOR -> [RECTANGLE] -> FillRectangles
+ Graphics.XHB.Gen.Render: MkFillRectangles :: PictOp -> PICTURE -> COLOR -> [RECTANGLE] -> FillRectangles
- Graphics.XHB.Gen.Render: MkPICTFORMINFO :: PICTFORMAT -> Word8 -> Word8 -> DIRECTFORMAT -> COLORMAP -> PICTFORMINFO
+ Graphics.XHB.Gen.Render: MkPICTFORMINFO :: PICTFORMAT -> PictType -> Word8 -> DIRECTFORMAT -> COLORMAP -> PICTFORMINFO
- Graphics.XHB.Gen.Render: MkQueryPictFormatsReply :: Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> [PICTFORMINFO] -> [PICTSCREEN] -> [Word32] -> QueryPictFormatsReply
+ Graphics.XHB.Gen.Render: MkQueryPictFormatsReply :: Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> [PICTFORMINFO] -> [PICTSCREEN] -> [SubPixel] -> QueryPictFormatsReply
- Graphics.XHB.Gen.Render: MkTrapezoids :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [TRAPEZOID] -> Trapezoids
+ Graphics.XHB.Gen.Render: MkTrapezoids :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [TRAPEZOID] -> Trapezoids
- Graphics.XHB.Gen.Render: MkTriFan :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [POINTFIX] -> TriFan
+ Graphics.XHB.Gen.Render: MkTriFan :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [POINTFIX] -> TriFan
- Graphics.XHB.Gen.Render: MkTriStrip :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [POINTFIX] -> TriStrip
+ Graphics.XHB.Gen.Render: MkTriStrip :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [POINTFIX] -> TriStrip
- Graphics.XHB.Gen.Render: MkTriangles :: Word8 -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [TRIANGLE] -> Triangles
+ Graphics.XHB.Gen.Render: MkTriangles :: PictOp -> PICTURE -> PICTURE -> PICTFORMAT -> Int16 -> Int16 -> [TRIANGLE] -> Triangles
- Graphics.XHB.Gen.Render: op_Composite :: Composite -> Word8
+ Graphics.XHB.Gen.Render: op_Composite :: Composite -> PictOp
- Graphics.XHB.Gen.Render: op_CompositeGlyphs16 :: CompositeGlyphs16 -> Word8
+ Graphics.XHB.Gen.Render: op_CompositeGlyphs16 :: CompositeGlyphs16 -> PictOp
- Graphics.XHB.Gen.Render: op_CompositeGlyphs32 :: CompositeGlyphs32 -> Word8
+ Graphics.XHB.Gen.Render: op_CompositeGlyphs32 :: CompositeGlyphs32 -> PictOp
- Graphics.XHB.Gen.Render: op_CompositeGlyphs8 :: CompositeGlyphs8 -> Word8
+ Graphics.XHB.Gen.Render: op_CompositeGlyphs8 :: CompositeGlyphs8 -> PictOp
- Graphics.XHB.Gen.Render: op_FillRectangles :: FillRectangles -> Word8
+ Graphics.XHB.Gen.Render: op_FillRectangles :: FillRectangles -> PictOp
- Graphics.XHB.Gen.Render: op_Trapezoids :: Trapezoids -> Word8
+ Graphics.XHB.Gen.Render: op_Trapezoids :: Trapezoids -> PictOp
- Graphics.XHB.Gen.Render: op_TriFan :: TriFan -> Word8
+ Graphics.XHB.Gen.Render: op_TriFan :: TriFan -> PictOp
- Graphics.XHB.Gen.Render: op_TriStrip :: TriStrip -> Word8
+ Graphics.XHB.Gen.Render: op_TriStrip :: TriStrip -> PictOp
- Graphics.XHB.Gen.Render: op_Triangles :: Triangles -> Word8
+ Graphics.XHB.Gen.Render: op_Triangles :: Triangles -> PictOp
- Graphics.XHB.Gen.Render: subpixels_QueryPictFormatsReply :: QueryPictFormatsReply -> [Word32]
+ Graphics.XHB.Gen.Render: subpixels_QueryPictFormatsReply :: QueryPictFormatsReply -> [SubPixel]
- Graphics.XHB.Gen.Render: type_PICTFORMINFO :: PICTFORMINFO -> Word8
+ Graphics.XHB.Gen.Render: type_PICTFORMINFO :: PICTFORMINFO -> PictType
- Graphics.XHB.Gen.Shape: MkCombine :: OP -> KIND -> KIND -> WINDOW -> Int16 -> Int16 -> WINDOW -> Combine
+ Graphics.XHB.Gen.Shape: MkCombine :: SO -> SK -> SK -> WINDOW -> Int16 -> Int16 -> WINDOW -> Combine
- Graphics.XHB.Gen.Shape: MkGetRectangles :: WINDOW -> KIND -> GetRectangles
+ Graphics.XHB.Gen.Shape: MkGetRectangles :: WINDOW -> SK -> GetRectangles
- Graphics.XHB.Gen.Shape: MkGetRectanglesReply :: Word8 -> Word32 -> [RECTANGLE] -> GetRectanglesReply
+ Graphics.XHB.Gen.Shape: MkGetRectanglesReply :: ClipOrdering -> Word32 -> [RECTANGLE] -> GetRectanglesReply
- Graphics.XHB.Gen.Shape: MkMask :: OP -> KIND -> WINDOW -> Int16 -> Int16 -> PIXMAP -> Mask
+ Graphics.XHB.Gen.Shape: MkMask :: SO -> SK -> WINDOW -> Int16 -> Int16 -> PIXMAP -> Mask
- Graphics.XHB.Gen.Shape: MkOffset :: KIND -> WINDOW -> Int16 -> Int16 -> Offset
+ Graphics.XHB.Gen.Shape: MkOffset :: SK -> WINDOW -> Int16 -> Int16 -> Offset
- Graphics.XHB.Gen.Shape: MkRectangles :: OP -> KIND -> Word8 -> WINDOW -> Int16 -> Int16 -> [RECTANGLE] -> Rectangles
+ Graphics.XHB.Gen.Shape: MkRectangles :: SO -> SK -> ClipOrdering -> WINDOW -> Int16 -> Int16 -> [RECTANGLE] -> Rectangles
- Graphics.XHB.Gen.Shape: destination_kind_Combine :: Combine -> KIND
+ Graphics.XHB.Gen.Shape: destination_kind_Combine :: Combine -> SK
- Graphics.XHB.Gen.Shape: destination_kind_Mask :: Mask -> KIND
+ Graphics.XHB.Gen.Shape: destination_kind_Mask :: Mask -> SK
- Graphics.XHB.Gen.Shape: destination_kind_Offset :: Offset -> KIND
+ Graphics.XHB.Gen.Shape: destination_kind_Offset :: Offset -> SK
- Graphics.XHB.Gen.Shape: destination_kind_Rectangles :: Rectangles -> KIND
+ Graphics.XHB.Gen.Shape: destination_kind_Rectangles :: Rectangles -> SK
- Graphics.XHB.Gen.Shape: getRectangles :: Connection -> WINDOW -> KIND -> IO (Receipt GetRectanglesReply)
+ Graphics.XHB.Gen.Shape: getRectangles :: Connection -> WINDOW -> SK -> IO (Receipt GetRectanglesReply)
- Graphics.XHB.Gen.Shape: operation_Combine :: Combine -> OP
+ Graphics.XHB.Gen.Shape: operation_Combine :: Combine -> SO
- Graphics.XHB.Gen.Shape: operation_Mask :: Mask -> OP
+ Graphics.XHB.Gen.Shape: operation_Mask :: Mask -> SO
- Graphics.XHB.Gen.Shape: operation_Rectangles :: Rectangles -> OP
+ Graphics.XHB.Gen.Shape: operation_Rectangles :: Rectangles -> SO
- Graphics.XHB.Gen.Shape: ordering_GetRectanglesReply :: GetRectanglesReply -> Word8
+ Graphics.XHB.Gen.Shape: ordering_GetRectanglesReply :: GetRectanglesReply -> ClipOrdering
- Graphics.XHB.Gen.Shape: ordering_Rectangles :: Rectangles -> Word8
+ Graphics.XHB.Gen.Shape: ordering_Rectangles :: Rectangles -> ClipOrdering
- Graphics.XHB.Gen.Shape: source_kind_Combine :: Combine -> KIND
+ Graphics.XHB.Gen.Shape: source_kind_Combine :: Combine -> SK
- Graphics.XHB.Gen.Shape: source_kind_GetRectangles :: GetRectangles -> KIND
+ Graphics.XHB.Gen.Shape: source_kind_GetRectangles :: GetRectangles -> SK
- Graphics.XHB.Gen.Sync: MkQueryAlarmReply :: TRIGGER -> INT64 -> Bool -> Word8 -> QueryAlarmReply
+ Graphics.XHB.Gen.Sync: MkQueryAlarmReply :: TRIGGER -> INT64 -> Bool -> ALARMSTATE -> QueryAlarmReply
- Graphics.XHB.Gen.Sync: MkTRIGGER :: COUNTER -> Word32 -> INT64 -> Word32 -> TRIGGER
+ Graphics.XHB.Gen.Sync: MkTRIGGER :: COUNTER -> VALUETYPE -> INT64 -> TESTTYPE -> TRIGGER
- Graphics.XHB.Gen.Sync: state_QueryAlarmReply :: QueryAlarmReply -> Word8
+ Graphics.XHB.Gen.Sync: state_QueryAlarmReply :: QueryAlarmReply -> ALARMSTATE
- Graphics.XHB.Gen.Sync: test_type_TRIGGER :: TRIGGER -> Word32
+ Graphics.XHB.Gen.Sync: test_type_TRIGGER :: TRIGGER -> TESTTYPE
- Graphics.XHB.Gen.Sync: wait_type_TRIGGER :: TRIGGER -> Word32
+ Graphics.XHB.Gen.Sync: wait_type_TRIGGER :: TRIGGER -> VALUETYPE
- Graphics.XHB.Gen.XFixes: CursorNotifyDisplayCursor :: CursorNotifyEnum
+ Graphics.XHB.Gen.XFixes: CursorNotifyDisplayCursor :: CursorNotify
- Graphics.XHB.Gen.XFixes: MkChangeSaveSet :: Word8 -> Word8 -> Word8 -> WINDOW -> ChangeSaveSet
+ Graphics.XHB.Gen.XFixes: MkChangeSaveSet :: SaveSetMode -> SaveSetTarget -> SaveSetMapping -> WINDOW -> ChangeSaveSet
- Graphics.XHB.Gen.XFixes: MkCreateRegionFromWindow :: REGION -> WINDOW -> KIND -> CreateRegionFromWindow
+ Graphics.XHB.Gen.XFixes: MkCreateRegionFromWindow :: REGION -> WINDOW -> SK -> CreateRegionFromWindow
- Graphics.XHB.Gen.XFixes: MkSelectCursorInput :: WINDOW -> Word32 -> SelectCursorInput
+ Graphics.XHB.Gen.XFixes: MkSelectCursorInput :: WINDOW -> [CursorNotifyMask] -> SelectCursorInput
- Graphics.XHB.Gen.XFixes: MkSelectSelectionInput :: WINDOW -> ATOM -> Word32 -> SelectSelectionInput
+ Graphics.XHB.Gen.XFixes: MkSelectSelectionInput :: WINDOW -> ATOM -> [SelectionEventMask] -> SelectSelectionInput
- Graphics.XHB.Gen.XFixes: MkSetWindowShapeRegion :: WINDOW -> KIND -> Int16 -> Int16 -> REGION -> SetWindowShapeRegion
+ Graphics.XHB.Gen.XFixes: MkSetWindowShapeRegion :: WINDOW -> SK -> Int16 -> Int16 -> REGION -> SetWindowShapeRegion
- Graphics.XHB.Gen.XFixes: dest_kind_SetWindowShapeRegion :: SetWindowShapeRegion -> KIND
+ Graphics.XHB.Gen.XFixes: dest_kind_SetWindowShapeRegion :: SetWindowShapeRegion -> SK
- Graphics.XHB.Gen.XFixes: event_mask_SelectCursorInput :: SelectCursorInput -> Word32
+ Graphics.XHB.Gen.XFixes: event_mask_SelectCursorInput :: SelectCursorInput -> [CursorNotifyMask]
- Graphics.XHB.Gen.XFixes: event_mask_SelectSelectionInput :: SelectSelectionInput -> Word32
+ Graphics.XHB.Gen.XFixes: event_mask_SelectSelectionInput :: SelectSelectionInput -> [SelectionEventMask]
- Graphics.XHB.Gen.XFixes: kind_CreateRegionFromWindow :: CreateRegionFromWindow -> KIND
+ Graphics.XHB.Gen.XFixes: kind_CreateRegionFromWindow :: CreateRegionFromWindow -> SK
- Graphics.XHB.Gen.XFixes: map_ChangeSaveSet :: ChangeSaveSet -> Word8
+ Graphics.XHB.Gen.XFixes: map_ChangeSaveSet :: ChangeSaveSet -> SaveSetMapping
- Graphics.XHB.Gen.XFixes: mode_ChangeSaveSet :: ChangeSaveSet -> Word8
+ Graphics.XHB.Gen.XFixes: mode_ChangeSaveSet :: ChangeSaveSet -> SaveSetMode
- Graphics.XHB.Gen.XFixes: selectCursorInput :: Connection -> WINDOW -> Word32 -> IO ()
+ Graphics.XHB.Gen.XFixes: selectCursorInput :: Connection -> WINDOW -> [CursorNotifyMask] -> IO ()
- Graphics.XHB.Gen.XFixes: target_ChangeSaveSet :: ChangeSaveSet -> Word8
+ Graphics.XHB.Gen.XFixes: target_ChangeSaveSet :: ChangeSaveSet -> SaveSetTarget
- Graphics.XHB.Gen.Xproto: MkKillClient :: Kill -> KillClient
+ Graphics.XHB.Gen.Xproto: MkKillClient :: Word32 -> KillClient
- Graphics.XHB.Gen.Xproto: MkQueryPointerReply :: Bool -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> Word16 -> QueryPointerReply
+ Graphics.XHB.Gen.Xproto: MkQueryPointerReply :: Bool -> WINDOW -> WINDOW -> Int16 -> Int16 -> Int16 -> Int16 -> [KeyButMask] -> QueryPointerReply
- Graphics.XHB.Gen.Xproto: killClient :: Connection -> Kill -> IO ()
+ Graphics.XHB.Gen.Xproto: killClient :: Connection -> Word32 -> IO ()
- Graphics.XHB.Gen.Xproto: mask_QueryPointerReply :: QueryPointerReply -> Word16
+ Graphics.XHB.Gen.Xproto: mask_QueryPointerReply :: QueryPointerReply -> [KeyButMask]
- Graphics.XHB.Gen.Xproto: resource_KillClient :: KillClient -> Kill
+ Graphics.XHB.Gen.Xproto: resource_KillClient :: KillClient -> Word32
- Graphics.XHB.Gen.Xv: MkAdaptorInfo :: PORT -> Word16 -> Word16 -> Word16 -> Word8 -> [CChar] -> [Format] -> AdaptorInfo
+ Graphics.XHB.Gen.Xv: MkAdaptorInfo :: PORT -> Word16 -> Word16 -> Word16 -> [Type] -> [CChar] -> [Format] -> AdaptorInfo
- Graphics.XHB.Gen.Xv: MkAttributeInfo :: Word32 -> Int32 -> Int32 -> Word32 -> [CChar] -> AttributeInfo
+ Graphics.XHB.Gen.Xv: MkAttributeInfo :: [AttributeFlag] -> Int32 -> Int32 -> Word32 -> [CChar] -> AttributeInfo
- Graphics.XHB.Gen.Xv: MkGrabPortReply :: Word8 -> GrabPortReply
+ Graphics.XHB.Gen.Xv: MkGrabPortReply :: GrabPortStatus -> GrabPortReply
- Graphics.XHB.Gen.Xv: MkImageFormatInfo :: Word32 -> Word8 -> Word8 -> [Word8] -> Word8 -> Word8 -> Word8 -> Word32 -> Word32 -> Word32 -> Word8 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> [Word8] -> Word8 -> ImageFormatInfo
+ Graphics.XHB.Gen.Xv: MkImageFormatInfo :: Word32 -> ImageFormatInfoType -> ImageOrder -> [Word8] -> Word8 -> Word8 -> Word8 -> Word32 -> Word32 -> Word32 -> ImageFormatInfoFormat -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> [Word8] -> ScanlineOrder -> ImageFormatInfo
- Graphics.XHB.Gen.Xv: byte_order_ImageFormatInfo :: ImageFormatInfo -> Word8
+ Graphics.XHB.Gen.Xv: byte_order_ImageFormatInfo :: ImageFormatInfo -> ImageOrder
- Graphics.XHB.Gen.Xv: flags_AttributeInfo :: AttributeInfo -> Word32
+ Graphics.XHB.Gen.Xv: flags_AttributeInfo :: AttributeInfo -> [AttributeFlag]
- Graphics.XHB.Gen.Xv: format_ImageFormatInfo :: ImageFormatInfo -> Word8
+ Graphics.XHB.Gen.Xv: format_ImageFormatInfo :: ImageFormatInfo -> ImageFormatInfoFormat
- Graphics.XHB.Gen.Xv: grabPort :: Connection -> PORT -> TIMESTAMP -> IO (Receipt Word8)
+ Graphics.XHB.Gen.Xv: grabPort :: Connection -> PORT -> TIMESTAMP -> IO (Receipt GrabPortStatus)
- Graphics.XHB.Gen.Xv: result_GrabPortReply :: GrabPortReply -> Word8
+ Graphics.XHB.Gen.Xv: result_GrabPortReply :: GrabPortReply -> GrabPortStatus
- Graphics.XHB.Gen.Xv: type_AdaptorInfo :: AdaptorInfo -> Word8
+ Graphics.XHB.Gen.Xv: type_AdaptorInfo :: AdaptorInfo -> [Type]
- Graphics.XHB.Gen.Xv: type_ImageFormatInfo :: ImageFormatInfo -> Word8
+ Graphics.XHB.Gen.Xv: type_ImageFormatInfo :: ImageFormatInfo -> ImageFormatInfoType
- Graphics.XHB.Gen.Xv: vscanline_order_ImageFormatInfo :: ImageFormatInfo -> Word8
+ Graphics.XHB.Gen.Xv: vscanline_order_ImageFormatInfo :: ImageFormatInfo -> ScanlineOrder

Files

patched/Graphics/XHB/Gen/Composite.hs view
@@ -39,7 +39,7 @@   redirectWindow ::                  Graphics.XHB.Connection.Types.Connection ->-                   WINDOW -> Word8 -> IO ()+                   WINDOW -> Redirect -> IO () redirectWindow c window update   = do let req = MkRedirectWindow window update        putAction <- serializeExtensionRequest c req@@ -48,7 +48,7 @@   redirectSubwindows ::                      Graphics.XHB.Connection.Types.Connection ->-                       WINDOW -> Word8 -> IO ()+                       WINDOW -> Redirect -> IO () redirectSubwindows c window update   = do let req = MkRedirectSubwindows window update        putAction <- serializeExtensionRequest c req@@ -57,7 +57,7 @@   unredirectWindow ::                    Graphics.XHB.Connection.Types.Connection ->-                     WINDOW -> Word8 -> IO ()+                     WINDOW -> Redirect -> IO () unredirectWindow c window update   = do let req = MkUnredirectWindow window update        putAction <- serializeExtensionRequest c req@@ -66,7 +66,7 @@   unredirectSubwindows ::                        Graphics.XHB.Connection.Types.Connection ->-                         WINDOW -> Word8 -> IO ()+                         WINDOW -> Redirect -> IO () unredirectSubwindows c window update   = do let req = MkUnredirectSubwindows window update        putAction <- serializeExtensionRequest c req
patched/Graphics/XHB/Gen/Composite/Types.hs view
@@ -79,7 +79,7 @@   data RedirectWindow = MkRedirectWindow{window_RedirectWindow ::                                        WINDOW,-                                       update_RedirectWindow :: Word8}+                                       update_RedirectWindow :: Redirect}                     deriving (Show, Typeable)   instance ExtensionRequest RedirectWindow where@@ -88,18 +88,17 @@           = do putWord8 extOpCode                putWord8 1                let size__-                     = 4 + size (window_RedirectWindow x) +-                         size (update_RedirectWindow x)-                         + 3+                     = 4 + size (window_RedirectWindow x) + size (undefined :: Word8) ++                         3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_RedirectWindow x)-               serialize (update_RedirectWindow x)+               serialize (toValue (update_RedirectWindow x) :: Word8)                putSkip 3                putSkip (requiredPadding size__)   data RedirectSubwindows = MkRedirectSubwindows{window_RedirectSubwindows                                                :: WINDOW,-                                               update_RedirectSubwindows :: Word8}+                                               update_RedirectSubwindows :: Redirect}                         deriving (Show, Typeable)   instance ExtensionRequest RedirectSubwindows where@@ -109,17 +108,17 @@                putWord8 2                let size__                      = 4 + size (window_RedirectSubwindows x) +-                         size (update_RedirectSubwindows x)+                         size (undefined :: Word8)                          + 3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_RedirectSubwindows x)-               serialize (update_RedirectSubwindows x)+               serialize (toValue (update_RedirectSubwindows x) :: Word8)                putSkip 3                putSkip (requiredPadding size__)   data UnredirectWindow = MkUnredirectWindow{window_UnredirectWindow                                            :: WINDOW,-                                           update_UnredirectWindow :: Word8}+                                           update_UnredirectWindow :: Redirect}                       deriving (Show, Typeable)   instance ExtensionRequest UnredirectWindow where@@ -128,18 +127,17 @@           = do putWord8 extOpCode                putWord8 3                let size__-                     = 4 + size (window_UnredirectWindow x) +-                         size (update_UnredirectWindow x)+                     = 4 + size (window_UnredirectWindow x) + size (undefined :: Word8)                          + 3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_UnredirectWindow x)-               serialize (update_UnredirectWindow x)+               serialize (toValue (update_UnredirectWindow x) :: Word8)                putSkip 3                putSkip (requiredPadding size__)   data UnredirectSubwindows = MkUnredirectSubwindows{window_UnredirectSubwindows                                                    :: WINDOW,-                                                   update_UnredirectSubwindows :: Word8}+                                                   update_UnredirectSubwindows :: Redirect}                           deriving (Show, Typeable)   instance ExtensionRequest UnredirectSubwindows where@@ -149,11 +147,11 @@                putWord8 4                let size__                      = 4 + size (window_UnredirectSubwindows x) +-                         size (update_UnredirectSubwindows x)+                         size (undefined :: Word8)                          + 3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_UnredirectSubwindows x)-               serialize (update_UnredirectSubwindows x)+               serialize (toValue (update_UnredirectSubwindows x) :: Word8)                putSkip 3                putSkip (requiredPadding size__)  
patched/Graphics/XHB/Gen/DPMS.hs view
@@ -58,7 +58,7 @@        sendRequest c chunk   forceLevel ::-             Graphics.XHB.Connection.Types.Connection -> Word16 -> IO ()+             Graphics.XHB.Connection.Types.Connection -> DPMSMode -> IO () forceLevel c power_level   = do let req = MkForceLevel power_level        putAction <- serializeExtensionRequest c req
patched/Graphics/XHB/Gen/DPMS/Types.hs view
@@ -2,7 +2,7 @@        (deserializeError, deserializeEvent, GetVersion(..),         GetVersionReply(..), Capable(..), CapableReply(..),         GetTimeouts(..), GetTimeoutsReply(..), SetTimeouts(..),-        ForceLevel(..), Info(..), InfoReply(..))+        DPMSMode(..), ForceLevel(..), Info(..), InfoReply(..))        where import Data.Word import Data.Int@@ -137,7 +137,23 @@                serialize (off_timeout_SetTimeouts x)                putSkip (requiredPadding size__)  -data ForceLevel = MkForceLevel{power_level_ForceLevel :: Word16}+data DPMSMode = DPMSModeOn+              | DPMSModeStandby+              | DPMSModeSuspend+              | DPMSModeOff+              deriving Show+ +instance SimpleEnum DPMSMode where+        toValue DPMSModeOn{} = 0+        toValue DPMSModeStandby{} = 1+        toValue DPMSModeSuspend{} = 2+        toValue DPMSModeOff{} = 3+        fromValue 0 = DPMSModeOn+        fromValue 1 = DPMSModeStandby+        fromValue 2 = DPMSModeSuspend+        fromValue 3 = DPMSModeOff+ +data ForceLevel = MkForceLevel{power_level_ForceLevel :: DPMSMode}                 deriving (Show, Typeable)   instance ExtensionRequest ForceLevel where@@ -145,9 +161,9 @@         serializeRequest x extOpCode           = do putWord8 extOpCode                putWord8 6-               let size__ = 4 + size (power_level_ForceLevel x)+               let size__ = 4 + size (undefined :: Word16)                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (power_level_ForceLevel x)+               serialize (toValue (power_level_ForceLevel x) :: Word16)                putSkip (requiredPadding size__)   data Info = MkInfo{}@@ -162,7 +178,7 @@                serialize (convertBytesToRequestSize size__ :: Int16)                putSkip (requiredPadding size__)  -data InfoReply = MkInfoReply{power_level_InfoReply :: Word16,+data InfoReply = MkInfoReply{power_level_InfoReply :: DPMSMode,                              state_InfoReply :: Bool}                deriving (Show, Typeable)  @@ -172,7 +188,7 @@                skip 1                skip 2                length <- deserialize-               power_level <- deserialize+               power_level <- liftM fromValue (deserialize :: Get Word16)                state <- deserialize                skip 21                let _ = isCard32 length
patched/Graphics/XHB/Gen/Damage/Types.hs view
@@ -1,7 +1,7 @@ module Graphics.XHB.Gen.Damage.Types        (deserializeError, deserializeEvent, DAMAGE, ReportLevel(..),         QueryVersion(..), QueryVersionReply(..), Create(..), Destroy(..),-        Subtract(..), Add(..), Notify(..))+        Subtract(..), Add(..), NotifyEvent(..))        where import Data.Word import Data.Int@@ -28,7 +28,7 @@   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get Notify))+  = return (liftM toEvent (deserialize :: Get NotifyEvent)) deserializeEvent _ = Nothing   newtype DAMAGE = MkDAMAGE Xid@@ -86,7 +86,7 @@                return (MkQueryVersionReply major_version minor_version)   data Create = MkCreate{damage_Create :: DAMAGE,-                       drawable_Create :: DRAWABLE, level_Create :: Word8}+                       drawable_Create :: DRAWABLE, level_Create :: ReportLevel}             deriving (Show, Typeable)   instance ExtensionRequest Create where@@ -96,12 +96,12 @@                putWord8 1                let size__                      = 4 + size (damage_Create x) + size (drawable_Create x) +-                         size (level_Create x)+                         size (undefined :: Word8)                          + 3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (damage_Create x)                serialize (drawable_Create x)-               serialize (level_Create x)+               serialize (toValue (level_Create x) :: Word8)                putSkip 3                putSkip (requiredPadding size__)  @@ -150,22 +150,23 @@                serialize (region_Add x)                putSkip (requiredPadding size__)  -data Notify = MkNotify{level_Notify :: Word8,-                       drawable_Notify :: DRAWABLE, damage_Notify :: DAMAGE,-                       timestamp_Notify :: TIMESTAMP, area_Notify :: RECTANGLE,-                       geometry_Notify :: RECTANGLE}-            deriving (Show, Typeable)+data NotifyEvent = MkNotifyEvent{level_NotifyEvent :: ReportLevel,+                                 drawable_NotifyEvent :: DRAWABLE, damage_NotifyEvent :: DAMAGE,+                                 timestamp_NotifyEvent :: TIMESTAMP, area_NotifyEvent :: RECTANGLE,+                                 geometry_NotifyEvent :: RECTANGLE}+                 deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event Notify+instance Graphics.XHB.Shared.Event NotifyEvent  -instance Deserialize Notify where+instance Deserialize NotifyEvent where         deserialize           = do skip 1-               level <- deserialize+               level <- liftM fromValue (deserialize :: Get Word8)                skip 2                drawable <- deserialize                damage <- deserialize                timestamp <- deserialize                area <- deserialize                geometry <- deserialize-               return (MkNotify level drawable damage timestamp area geometry)+               return+                 (MkNotifyEvent level drawable damage timestamp area geometry)
patched/Graphics/XHB/Gen/Extension.hs view
@@ -24,8 +24,8 @@ import qualified Graphics.XHB.Gen.XPrint.Types import qualified Graphics.XHB.Gen.SELinux.Types import qualified Graphics.XHB.Gen.Test.Types-import qualified Graphics.XHB.Gen.Xv.Types import qualified Graphics.XHB.Gen.XvMC.Types+import qualified Graphics.XHB.Gen.Xv.Types   errorDispatch :: ExtensionId -> Word8 -> Maybe (Get SomeError) errorDispatch "BIG-REQUESTS"@@ -69,9 +69,9 @@   = Graphics.XHB.Gen.SELinux.Types.deserializeError errorDispatch "XTEST"   = Graphics.XHB.Gen.Test.Types.deserializeError-errorDispatch "XVideo" = Graphics.XHB.Gen.Xv.Types.deserializeError errorDispatch "XVideo-MotionCompensation"   = Graphics.XHB.Gen.XvMC.Types.deserializeError+errorDispatch "XVideo" = Graphics.XHB.Gen.Xv.Types.deserializeError errorDispatch _ = const (Nothing)   eventDispatch :: ExtensionId -> Word8 -> Maybe (Get SomeEvent)@@ -116,7 +116,7 @@   = Graphics.XHB.Gen.SELinux.Types.deserializeEvent eventDispatch "XTEST"   = Graphics.XHB.Gen.Test.Types.deserializeEvent-eventDispatch "XVideo" = Graphics.XHB.Gen.Xv.Types.deserializeEvent eventDispatch "XVideo-MotionCompensation"   = Graphics.XHB.Gen.XvMC.Types.deserializeEvent+eventDispatch "XVideo" = Graphics.XHB.Gen.Xv.Types.deserializeEvent eventDispatch _ = const (Nothing)
patched/Graphics/XHB/Gen/Glx/Types.hs view
@@ -1,17 +1,18 @@ module Graphics.XHB.Gen.Glx.Types        (deserializeError, deserializeEvent, PIXMAP, CONTEXT, PBUFFER,         WINDOW, FBCONFIG, DRAWABLE, FLOAT32, FLOAT64, BOOL32, CONTEXT_TAG,-        Generic(..), BadContext(..), BadContextState(..), BadDrawable(..),-        BadPixmap(..), BadContextTag(..), BadCurrentWindow(..),-        BadRenderRequest(..), BadLargeRequest(..),-        UnsupportedPrivateRequest(..), BadFBConfig(..), BadPbuffer(..),-        BadCurrentDrawable(..), BadWindow(..), PbufferClobber(..),-        PBCET(..), PBCDT(..), Render(..), RenderLarge(..),-        CreateContext(..), DestroyContext(..), MakeCurrent(..),-        MakeCurrentReply(..), IsDirect(..), IsDirectReply(..),-        QueryVersion(..), QueryVersionReply(..), WaitGL(..), WaitX(..),-        CopyContext(..), GC(..), SwapBuffers(..), UseXFont(..),-        CreateGLXPixmap(..), GetVisualConfigs(..),+        GenericError(..), BadContextError(..), BadContextStateError(..),+        BadDrawableError(..), BadPixmapError(..), BadContextTagError(..),+        BadCurrentWindowError(..), BadRenderRequestError(..),+        BadLargeRequestError(..), UnsupportedPrivateRequestError(..),+        BadFBConfigError(..), BadPbufferError(..),+        BadCurrentDrawableError(..), BadWindowError(..),+        PbufferClobberEvent(..), PBCET(..), PBCDT(..), Render(..),+        RenderLarge(..), CreateContext(..), DestroyContext(..),+        MakeCurrent(..), MakeCurrentReply(..), IsDirect(..),+        IsDirectReply(..), QueryVersion(..), QueryVersionReply(..),+        WaitGL(..), WaitX(..), CopyContext(..), GC(..), SwapBuffers(..),+        UseXFont(..), CreateGLXPixmap(..), GetVisualConfigs(..),         GetVisualConfigsReply(..), DestroyGLXPixmap(..), VendorPrivate(..),         VendorPrivateWithReply(..), VendorPrivateWithReplyReply(..),         QueryExtensionsString(..), QueryExtensionsStringReply(..),@@ -89,37 +90,38 @@   deserializeError :: Word8 -> Maybe (Get SomeError) deserializeError 0-  = return (liftM toError (deserialize :: Get BadContext))+  = return (liftM toError (deserialize :: Get BadContextError)) deserializeError 1-  = return (liftM toError (deserialize :: Get BadContextState))+  = return (liftM toError (deserialize :: Get BadContextStateError)) deserializeError 2-  = return (liftM toError (deserialize :: Get BadDrawable))+  = return (liftM toError (deserialize :: Get BadDrawableError)) deserializeError 3-  = return (liftM toError (deserialize :: Get BadPixmap))+  = return (liftM toError (deserialize :: Get BadPixmapError)) deserializeError 4-  = return (liftM toError (deserialize :: Get BadContextTag))+  = return (liftM toError (deserialize :: Get BadContextTagError)) deserializeError 5-  = return (liftM toError (deserialize :: Get BadCurrentWindow))+  = return (liftM toError (deserialize :: Get BadCurrentWindowError)) deserializeError 6-  = return (liftM toError (deserialize :: Get BadRenderRequest))+  = return (liftM toError (deserialize :: Get BadRenderRequestError)) deserializeError 7-  = return (liftM toError (deserialize :: Get BadLargeRequest))+  = return (liftM toError (deserialize :: Get BadLargeRequestError)) deserializeError 8   = return-      (liftM toError (deserialize :: Get UnsupportedPrivateRequest))+      (liftM toError (deserialize :: Get UnsupportedPrivateRequestError)) deserializeError 9-  = return (liftM toError (deserialize :: Get BadFBConfig))+  = return (liftM toError (deserialize :: Get BadFBConfigError)) deserializeError 10-  = return (liftM toError (deserialize :: Get BadPbuffer))+  = return (liftM toError (deserialize :: Get BadPbufferError)) deserializeError 11-  = return (liftM toError (deserialize :: Get BadCurrentDrawable))+  = return+      (liftM toError (deserialize :: Get BadCurrentDrawableError)) deserializeError 12-  = return (liftM toError (deserialize :: Get BadWindow))+  = return (liftM toError (deserialize :: Get BadWindowError)) deserializeError _ = Nothing   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get PbufferClobber))+  = return (liftM toEvent (deserialize :: Get PbufferClobberEvent)) deserializeEvent _ = Nothing   newtype PIXMAP = MkPIXMAP Xid@@ -148,164 +150,172 @@   type CONTEXT_TAG = Word32  -data Generic = MkGeneric{bad_value_Generic :: Word32,-                         minor_opcode_Generic :: Word16, major_opcode_Generic :: Word8}-             deriving (Show, Typeable)+data GenericError = MkGenericError{bad_value_GenericError ::+                                   Word32,+                                   minor_opcode_GenericError :: Word16,+                                   major_opcode_GenericError :: Word8}+                  deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error Generic+instance Graphics.XHB.Shared.Error GenericError  -instance Deserialize Generic where+instance Deserialize GenericError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkGeneric bad_value minor_opcode major_opcode)+               return (MkGenericError bad_value minor_opcode major_opcode)  -data BadContext = MkBadContext{bad_value_BadContext :: Word32,-                               minor_opcode_BadContext :: Word16,-                               major_opcode_BadContext :: Word8}-                deriving (Show, Typeable)+data BadContextError = MkBadContextError{bad_value_BadContextError+                                         :: Word32,+                                         minor_opcode_BadContextError :: Word16,+                                         major_opcode_BadContextError :: Word8}+                     deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadContext+instance Graphics.XHB.Shared.Error BadContextError  -instance Deserialize BadContext where+instance Deserialize BadContextError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadContext bad_value minor_opcode major_opcode)+               return (MkBadContextError bad_value minor_opcode major_opcode)  -data BadContextState = MkBadContextState{bad_value_BadContextState-                                         :: Word32,-                                         minor_opcode_BadContextState :: Word16,-                                         major_opcode_BadContextState :: Word8}-                     deriving (Show, Typeable)+data BadContextStateError = MkBadContextStateError{bad_value_BadContextStateError+                                                   :: Word32,+                                                   minor_opcode_BadContextStateError :: Word16,+                                                   major_opcode_BadContextStateError :: Word8}+                          deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadContextState+instance Graphics.XHB.Shared.Error BadContextStateError  -instance Deserialize BadContextState where+instance Deserialize BadContextStateError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadContextState bad_value minor_opcode major_opcode)+               return (MkBadContextStateError bad_value minor_opcode major_opcode)  -data BadDrawable = MkBadDrawable{bad_value_BadDrawable :: Word32,-                                 minor_opcode_BadDrawable :: Word16,-                                 major_opcode_BadDrawable :: Word8}-                 deriving (Show, Typeable)+data BadDrawableError = MkBadDrawableError{bad_value_BadDrawableError+                                           :: Word32,+                                           minor_opcode_BadDrawableError :: Word16,+                                           major_opcode_BadDrawableError :: Word8}+                      deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadDrawable+instance Graphics.XHB.Shared.Error BadDrawableError  -instance Deserialize BadDrawable where+instance Deserialize BadDrawableError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadDrawable bad_value minor_opcode major_opcode)+               return (MkBadDrawableError bad_value minor_opcode major_opcode)  -data BadPixmap = MkBadPixmap{bad_value_BadPixmap :: Word32,-                             minor_opcode_BadPixmap :: Word16, major_opcode_BadPixmap :: Word8}-               deriving (Show, Typeable)+data BadPixmapError = MkBadPixmapError{bad_value_BadPixmapError ::+                                       Word32,+                                       minor_opcode_BadPixmapError :: Word16,+                                       major_opcode_BadPixmapError :: Word8}+                    deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadPixmap+instance Graphics.XHB.Shared.Error BadPixmapError  -instance Deserialize BadPixmap where+instance Deserialize BadPixmapError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadPixmap bad_value minor_opcode major_opcode)+               return (MkBadPixmapError bad_value minor_opcode major_opcode)  -data BadContextTag = MkBadContextTag{bad_value_BadContextTag ::-                                     Word32,-                                     minor_opcode_BadContextTag :: Word16,-                                     major_opcode_BadContextTag :: Word8}-                   deriving (Show, Typeable)+data BadContextTagError = MkBadContextTagError{bad_value_BadContextTagError+                                               :: Word32,+                                               minor_opcode_BadContextTagError :: Word16,+                                               major_opcode_BadContextTagError :: Word8}+                        deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadContextTag+instance Graphics.XHB.Shared.Error BadContextTagError  -instance Deserialize BadContextTag where+instance Deserialize BadContextTagError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadContextTag bad_value minor_opcode major_opcode)+               return (MkBadContextTagError bad_value minor_opcode major_opcode)  -data BadCurrentWindow = MkBadCurrentWindow{bad_value_BadCurrentWindow-                                           :: Word32,-                                           minor_opcode_BadCurrentWindow :: Word16,-                                           major_opcode_BadCurrentWindow :: Word8}-                      deriving (Show, Typeable)+data BadCurrentWindowError = MkBadCurrentWindowError{bad_value_BadCurrentWindowError+                                                     :: Word32,+                                                     minor_opcode_BadCurrentWindowError :: Word16,+                                                     major_opcode_BadCurrentWindowError :: Word8}+                           deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadCurrentWindow+instance Graphics.XHB.Shared.Error BadCurrentWindowError  -instance Deserialize BadCurrentWindow where+instance Deserialize BadCurrentWindowError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadCurrentWindow bad_value minor_opcode major_opcode)+               return+                 (MkBadCurrentWindowError bad_value minor_opcode major_opcode)  -data BadRenderRequest = MkBadRenderRequest{bad_value_BadRenderRequest-                                           :: Word32,-                                           minor_opcode_BadRenderRequest :: Word16,-                                           major_opcode_BadRenderRequest :: Word8}-                      deriving (Show, Typeable)+data BadRenderRequestError = MkBadRenderRequestError{bad_value_BadRenderRequestError+                                                     :: Word32,+                                                     minor_opcode_BadRenderRequestError :: Word16,+                                                     major_opcode_BadRenderRequestError :: Word8}+                           deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadRenderRequest+instance Graphics.XHB.Shared.Error BadRenderRequestError  -instance Deserialize BadRenderRequest where+instance Deserialize BadRenderRequestError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadRenderRequest bad_value minor_opcode major_opcode)+               return+                 (MkBadRenderRequestError bad_value minor_opcode major_opcode)  -data BadLargeRequest = MkBadLargeRequest{bad_value_BadLargeRequest-                                         :: Word32,-                                         minor_opcode_BadLargeRequest :: Word16,-                                         major_opcode_BadLargeRequest :: Word8}-                     deriving (Show, Typeable)+data BadLargeRequestError = MkBadLargeRequestError{bad_value_BadLargeRequestError+                                                   :: Word32,+                                                   minor_opcode_BadLargeRequestError :: Word16,+                                                   major_opcode_BadLargeRequestError :: Word8}+                          deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadLargeRequest+instance Graphics.XHB.Shared.Error BadLargeRequestError  -instance Deserialize BadLargeRequest where+instance Deserialize BadLargeRequestError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadLargeRequest bad_value minor_opcode major_opcode)+               return (MkBadLargeRequestError bad_value minor_opcode major_opcode)  -data UnsupportedPrivateRequest = MkUnsupportedPrivateRequest{bad_value_UnsupportedPrivateRequest-                                                             :: Word32,-                                                             minor_opcode_UnsupportedPrivateRequest-                                                             :: Word16,-                                                             major_opcode_UnsupportedPrivateRequest-                                                             :: Word8}-                               deriving (Show, Typeable)+data UnsupportedPrivateRequestError = MkUnsupportedPrivateRequestError{bad_value_UnsupportedPrivateRequestError+                                                                       :: Word32,+                                                                       minor_opcode_UnsupportedPrivateRequestError+                                                                       :: Word16,+                                                                       major_opcode_UnsupportedPrivateRequestError+                                                                       :: Word8}+                                    deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error UnsupportedPrivateRequest+instance Graphics.XHB.Shared.Error UnsupportedPrivateRequestError  -instance Deserialize UnsupportedPrivateRequest where+instance Deserialize UnsupportedPrivateRequestError where         deserialize           = do skip 4                bad_value <- deserialize@@ -313,88 +323,97 @@                major_opcode <- deserialize                skip 21                return-                 (MkUnsupportedPrivateRequest bad_value minor_opcode major_opcode)+                 (MkUnsupportedPrivateRequestError bad_value minor_opcode+                    major_opcode)  -data BadFBConfig = MkBadFBConfig{bad_value_BadFBConfig :: Word32,-                                 minor_opcode_BadFBConfig :: Word16,-                                 major_opcode_BadFBConfig :: Word8}-                 deriving (Show, Typeable)+data BadFBConfigError = MkBadFBConfigError{bad_value_BadFBConfigError+                                           :: Word32,+                                           minor_opcode_BadFBConfigError :: Word16,+                                           major_opcode_BadFBConfigError :: Word8}+                      deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadFBConfig+instance Graphics.XHB.Shared.Error BadFBConfigError  -instance Deserialize BadFBConfig where+instance Deserialize BadFBConfigError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadFBConfig bad_value minor_opcode major_opcode)+               return (MkBadFBConfigError bad_value minor_opcode major_opcode)  -data BadPbuffer = MkBadPbuffer{bad_value_BadPbuffer :: Word32,-                               minor_opcode_BadPbuffer :: Word16,-                               major_opcode_BadPbuffer :: Word8}-                deriving (Show, Typeable)+data BadPbufferError = MkBadPbufferError{bad_value_BadPbufferError+                                         :: Word32,+                                         minor_opcode_BadPbufferError :: Word16,+                                         major_opcode_BadPbufferError :: Word8}+                     deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadPbuffer+instance Graphics.XHB.Shared.Error BadPbufferError  -instance Deserialize BadPbuffer where+instance Deserialize BadPbufferError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadPbuffer bad_value minor_opcode major_opcode)+               return (MkBadPbufferError bad_value minor_opcode major_opcode)  -data BadCurrentDrawable = MkBadCurrentDrawable{bad_value_BadCurrentDrawable-                                               :: Word32,-                                               minor_opcode_BadCurrentDrawable :: Word16,-                                               major_opcode_BadCurrentDrawable :: Word8}-                        deriving (Show, Typeable)+data BadCurrentDrawableError = MkBadCurrentDrawableError{bad_value_BadCurrentDrawableError+                                                         :: Word32,+                                                         minor_opcode_BadCurrentDrawableError ::+                                                         Word16,+                                                         major_opcode_BadCurrentDrawableError ::+                                                         Word8}+                             deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadCurrentDrawable+instance Graphics.XHB.Shared.Error BadCurrentDrawableError  -instance Deserialize BadCurrentDrawable where+instance Deserialize BadCurrentDrawableError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadCurrentDrawable bad_value minor_opcode major_opcode)+               return+                 (MkBadCurrentDrawableError bad_value minor_opcode major_opcode)  -data BadWindow = MkBadWindow{bad_value_BadWindow :: Word32,-                             minor_opcode_BadWindow :: Word16, major_opcode_BadWindow :: Word8}-               deriving (Show, Typeable)+data BadWindowError = MkBadWindowError{bad_value_BadWindowError ::+                                       Word32,+                                       minor_opcode_BadWindowError :: Word16,+                                       major_opcode_BadWindowError :: Word8}+                    deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadWindow+instance Graphics.XHB.Shared.Error BadWindowError  -instance Deserialize BadWindow where+instance Deserialize BadWindowError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 21-               return (MkBadWindow bad_value minor_opcode major_opcode)+               return (MkBadWindowError bad_value minor_opcode major_opcode)  -data PbufferClobber = MkPbufferClobber{event_type_PbufferClobber ::-                                       Word16,-                                       draw_type_PbufferClobber :: Word16,-                                       drawable_PbufferClobber ::-                                       Graphics.XHB.Gen.Glx.Types.DRAWABLE,-                                       b_mask_PbufferClobber :: Word32,-                                       aux_buffer_PbufferClobber :: Word16,-                                       x_PbufferClobber :: Word16, y_PbufferClobber :: Word16,-                                       width_PbufferClobber :: Word16,-                                       height_PbufferClobber :: Word16,-                                       count_PbufferClobber :: Word16}-                    deriving (Show, Typeable)+data PbufferClobberEvent = MkPbufferClobberEvent{event_type_PbufferClobberEvent+                                                 :: Word16,+                                                 draw_type_PbufferClobberEvent :: Word16,+                                                 drawable_PbufferClobberEvent ::+                                                 Graphics.XHB.Gen.Glx.Types.DRAWABLE,+                                                 b_mask_PbufferClobberEvent :: Word32,+                                                 aux_buffer_PbufferClobberEvent :: Word16,+                                                 x_PbufferClobberEvent :: Word16,+                                                 y_PbufferClobberEvent :: Word16,+                                                 width_PbufferClobberEvent :: Word16,+                                                 height_PbufferClobberEvent :: Word16,+                                                 count_PbufferClobberEvent :: Word16}+                         deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event PbufferClobber+instance Graphics.XHB.Shared.Event PbufferClobberEvent  -instance Deserialize PbufferClobber where+instance Deserialize PbufferClobberEvent where         deserialize           = do skip 1                skip 1@@ -411,7 +430,9 @@                count <- deserialize                skip 4                return-                 (MkPbufferClobber event_type draw_type drawable b_mask aux_buffer x+                 (MkPbufferClobberEvent event_type draw_type drawable b_mask+                    aux_buffer+                    x                     y                     width                     height
patched/Graphics/XHB/Gen/Input.hs view
@@ -25,7 +25,7 @@ import Data.Binary.Put (runPut) import Graphics.XHB.Shared hiding (Event(..), Error(..)) import Graphics.XHB.Gen.Xproto.Types-       hiding (FocusIn(..), FocusOut(..), deserializeError,+       hiding (FocusInEvent(..), FocusOutEvent(..), deserializeError,                deserializeEvent) import qualified Graphics.XHB.Gen.Xproto.Types  @@ -75,7 +75,7 @@   setDeviceMode ::                 Graphics.XHB.Connection.Types.Connection ->-                  Word8 -> Word8 -> IO (Receipt Word8)+                  Word8 -> ValuatorMode -> IO (Receipt Word8) setDeviceMode c device_id mode   = do (receipt, rReceipt) <- newEmptyReceipt                                 (runGet (status_SetDeviceModeReply `fmap` deserialize))@@ -158,7 +158,7 @@   grabDevice ::              Graphics.XHB.Connection.Types.Connection ->-               GrabDevice -> IO (Receipt Word8)+               GrabDevice -> IO (Receipt GrabStatus) grabDevice c req   = do (receipt, rReceipt) <- newEmptyReceipt                                 (runGet (status_GrabDeviceReply `fmap` deserialize))@@ -276,7 +276,7 @@   setDeviceModifierMapping ::                            Graphics.XHB.Connection.Types.Connection ->-                             SetDeviceModifierMapping -> IO (Receipt Word8)+                             SetDeviceModifierMapping -> IO (Receipt MappingStatus) setDeviceModifierMapping c req   = do (receipt, rReceipt) <- newEmptyReceipt                                 (runGet (status_SetDeviceModifierMappingReply `fmap` deserialize))@@ -298,7 +298,7 @@   setDeviceButtonMapping ::                          Graphics.XHB.Connection.Types.Connection ->-                           SetDeviceButtonMapping -> IO (Receipt Word8)+                           SetDeviceButtonMapping -> IO (Receipt MappingStatus) setDeviceButtonMapping c req   = do (receipt, rReceipt) <- newEmptyReceipt                                 (runGet (status_SetDeviceButtonMappingReply `fmap` deserialize))@@ -336,7 +336,7 @@   setDeviceValuators ::                      Graphics.XHB.Connection.Types.Connection ->-                       SetDeviceValuators -> IO (Receipt Word8)+                       SetDeviceValuators -> IO (Receipt GrabStatus) setDeviceValuators c req   = do (receipt, rReceipt) <- newEmptyReceipt                                 (runGet (status_SetDeviceValuatorsReply `fmap` deserialize))
patched/Graphics/XHB/Gen/Input/Types.hs view
@@ -1,2932 +1,3005 @@ module Graphics.XHB.Gen.Input.Types        (deserializeError, deserializeEvent, KeyCode, EventClass,         ValuatorMode(..), PropagateMode(..), GetExtensionVersion(..),-        GetExtensionVersionReply(..), DeviceInfo(..), ListInputDevices(..),-        ListInputDevicesReply(..), DeviceUse(..), InputInfo(..),-        KeyInfo(..), ButtonInfo(..), AxisInfo(..), ValuatorInfo(..),-        InputClassInfo(..), OpenDevice(..), OpenDeviceReply(..),-        InputClass(..), CloseDevice(..), SetDeviceMode(..),-        SetDeviceModeReply(..), SelectExtensionEvent(..),-        GetSelectedExtensionEvents(..),-        GetSelectedExtensionEventsReply(..),-        ChangeDeviceDontPropagateList(..), GetDeviceDontPropagateList(..),-        GetDeviceDontPropagateListReply(..), GetDeviceMotionEvents(..),-        GetDeviceMotionEventsReply(..), DeviceTimeCoord(..),-        ChangeKeyboardDevice(..), ChangeKeyboardDeviceReply(..),-        ChangePointerDevice(..), ChangePointerDeviceReply(..),-        GrabDevice(..), GrabDeviceReply(..), UngrabDevice(..),-        GrabDeviceKey(..), UngrabDeviceKey(..), GrabDeviceButton(..),-        UngrabDeviceButton(..), AllowDeviceEvents(..), GetDeviceFocus(..),-        GetDeviceFocusReply(..), SetDeviceFocus(..),-        GetFeedbackControl(..), GetFeedbackControlReply(..),-        FeedbackState(..), KbdFeedbackState(..), PtrFeedbackState(..),-        IntegerFeedbackState(..), StringFeedbackState(..),-        BellFeedbackState(..), LedFeedbackState(..), FeedbackCtl(..),-        KbdFeedbackCtl(..), PtrFeedbackCtl(..), IntegerFeedbackCtl(..),-        StringFeedbackCtl(..), BellFeedbackCtl(..), LedFeedbackCtl(..),-        GetDeviceKeyMapping(..), GetDeviceKeyMappingReply(..),-        ChangeDeviceKeyMapping(..), GetDeviceModifierMapping(..),-        GetDeviceModifierMappingReply(..), SetDeviceModifierMapping(..),-        SetDeviceModifierMappingReply(..), GetDeviceButtonMapping(..),-        GetDeviceButtonMappingReply(..), SetDeviceButtonMapping(..),-        SetDeviceButtonMappingReply(..), QueryDeviceState(..),-        QueryDeviceStateReply(..), InputState(..), KeyState(..),-        ButtonState(..), ValuatorState(..), SendExtensionEvent(..),-        DeviceBell(..), SetDeviceValuators(..),-        SetDeviceValuatorsReply(..), GetDeviceControl(..),-        GetDeviceControlReply(..), DeviceState(..),-        DeviceResolutionState(..), DeviceAbsCalibState(..),-        DeviceAbsAreaState(..), DeviceCoreState(..), DeviceEnableState(..),-        DeviceCtl(..), DeviceResolutionCtl(..), DeviceAbsCalibCtl(..),-        DeviceAbsAreaCtrl(..), DeviceCoreCtrl(..), DeviceEnableCtrl(..),-        DeviceValuator(..), DeviceKeyPress(..), DeviceKeyRelease(..),-        DeviceButtonPress(..), DeviceButtonRelease(..),-        DeviceMotionNotify(..), ProximityIn(..), ProximityOut(..),-        FocusIn(..), FocusOut(..), DeviceStateNotify(..),-        DeviceMappingNotify(..), ChangeDeviceNotify(..),-        DeviceKeyStateNotify(..), DeviceButtonStateNotify(..),-        DevicePresenceNotify(..))-       where-import Data.Word-import Data.Int-import Foreign.C.Types-import Data.Bits-import Data.Binary.Put-import Data.Binary.Get-import Data.Typeable-import Control.Monad-import Control.Exception-import Data.List-import Graphics.XHB.Shared hiding (Event, Error)-import qualified Graphics.XHB.Shared-import Graphics.XHB.Gen.Xproto.Types-       hiding (FocusIn(..), FocusOut(..), deserializeError,-               deserializeEvent)-import qualified Graphics.XHB.Gen.Xproto.Types- -deserializeError :: Word8 -> Maybe (Get SomeError)-deserializeError _ = Nothing- -deserializeEvent :: Word8 -> Maybe (Get SomeEvent)-deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get DeviceValuator))-deserializeEvent 1-  = return (liftM toEvent (deserialize :: Get DeviceKeyPress))-deserializeEvent 2-  = return (liftM toEvent (deserialize :: Get DeviceKeyRelease))-deserializeEvent 3-  = return (liftM toEvent (deserialize :: Get DeviceButtonPress))-deserializeEvent 4-  = return (liftM toEvent (deserialize :: Get DeviceButtonRelease))-deserializeEvent 5-  = return (liftM toEvent (deserialize :: Get DeviceMotionNotify))-deserializeEvent 8-  = return (liftM toEvent (deserialize :: Get ProximityIn))-deserializeEvent 9-  = return (liftM toEvent (deserialize :: Get ProximityOut))-deserializeEvent 6-  = return (liftM toEvent (deserialize :: Get FocusIn))-deserializeEvent 7-  = return (liftM toEvent (deserialize :: Get FocusOut))-deserializeEvent 10-  = return (liftM toEvent (deserialize :: Get DeviceStateNotify))-deserializeEvent 11-  = return (liftM toEvent (deserialize :: Get DeviceMappingNotify))-deserializeEvent 12-  = return (liftM toEvent (deserialize :: Get ChangeDeviceNotify))-deserializeEvent 13-  = return (liftM toEvent (deserialize :: Get DeviceKeyStateNotify))-deserializeEvent 14-  = return-      (liftM toEvent (deserialize :: Get DeviceButtonStateNotify))-deserializeEvent 15-  = return (liftM toEvent (deserialize :: Get DevicePresenceNotify))-deserializeEvent _ = Nothing- -type KeyCode = Word8- -type EventClass = Word32- -data ValuatorMode = ValuatorModeRelative-                  | ValuatorModeAbsolute-                  deriving Show- -instance SimpleEnum ValuatorMode where-        toValue ValuatorModeRelative{} = 0-        toValue ValuatorModeAbsolute{} = 1-        fromValue 0 = ValuatorModeRelative-        fromValue 1 = ValuatorModeAbsolute- -data PropagateMode = PropagateModeAddToList-                   | PropagateModeDeleteFromList-                   deriving Show- -instance SimpleEnum PropagateMode where-        toValue PropagateModeAddToList{} = 0-        toValue PropagateModeDeleteFromList{} = 1-        fromValue 0 = PropagateModeAddToList-        fromValue 1 = PropagateModeDeleteFromList- -data GetExtensionVersion = MkGetExtensionVersion{name_len_GetExtensionVersion-                                                 :: Word16,-                                                 name_GetExtensionVersion :: [CChar]}-                         deriving (Show, Typeable)- -instance ExtensionRequest GetExtensionVersion where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 1-               let size__-                     = 4 + size (name_len_GetExtensionVersion x) + 2 +-                         sum (map size (name_GetExtensionVersion x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (name_len_GetExtensionVersion x)-               putSkip 2-               serializeList (name_GetExtensionVersion x)-               putSkip (requiredPadding size__)- -data GetExtensionVersionReply = MkGetExtensionVersionReply{server_major_GetExtensionVersionReply-                                                           :: Word16,-                                                           server_minor_GetExtensionVersionReply ::-                                                           Word16,-                                                           present_GetExtensionVersionReply ::-                                                           Word8}-                              deriving (Show, Typeable)- -instance Deserialize GetExtensionVersionReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               server_major <- deserialize-               server_minor <- deserialize-               present <- deserialize-               skip 19-               let _ = isCard32 length-               return-                 (MkGetExtensionVersionReply server_major server_minor present)- -data DeviceInfo = MkDeviceInfo{device_type_DeviceInfo :: ATOM,-                               device_id_DeviceInfo :: Word8, num_class_info_DeviceInfo :: Word8,-                               device_use_DeviceInfo :: Word8}-                deriving (Show, Typeable)- -instance Serialize DeviceInfo where-        serialize x-          = do serialize (device_type_DeviceInfo x)-               serialize (device_id_DeviceInfo x)-               serialize (num_class_info_DeviceInfo x)-               serialize (device_use_DeviceInfo x)-               putSkip 1-        size x-          = size (device_type_DeviceInfo x) + size (device_id_DeviceInfo x) +-              size (num_class_info_DeviceInfo x)-              + size (device_use_DeviceInfo x)-              + 1- -instance Deserialize DeviceInfo where-        deserialize-          = do device_type <- deserialize-               device_id <- deserialize-               num_class_info <- deserialize-               device_use <- deserialize-               skip 1-               return-                 (MkDeviceInfo device_type device_id num_class_info device_use)- -data ListInputDevices = MkListInputDevices{}-                      deriving (Show, Typeable)- -instance ExtensionRequest ListInputDevices where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 2-               let size__ = 4-               serialize (convertBytesToRequestSize size__ :: Int16)-               putSkip (requiredPadding size__)- -data ListInputDevicesReply = MkListInputDevicesReply{devices_len_ListInputDevicesReply-                                                     :: Word8,-                                                     devices_ListInputDevicesReply :: [DeviceInfo]}-                           deriving (Show, Typeable)- -instance Deserialize ListInputDevicesReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               devices_len <- deserialize-               skip 23-               devices <- deserializeList (fromIntegral devices_len)-               let _ = isCard32 length-               return (MkListInputDevicesReply devices_len devices)- -data DeviceUse = DeviceUseIsXPointer-               | DeviceUseIsXKeyboard-               | DeviceUseIsXExtensionDevice-               | DeviceUseIsXExtensionKeyboard-               | DeviceUseIsXExtensionPointer-               deriving Show- -instance SimpleEnum DeviceUse where-        toValue DeviceUseIsXPointer{} = 0-        toValue DeviceUseIsXKeyboard{} = 1-        toValue DeviceUseIsXExtensionDevice{} = 2-        toValue DeviceUseIsXExtensionKeyboard{} = 3-        toValue DeviceUseIsXExtensionPointer{} = 4-        fromValue 0 = DeviceUseIsXPointer-        fromValue 1 = DeviceUseIsXKeyboard-        fromValue 2 = DeviceUseIsXExtensionDevice-        fromValue 3 = DeviceUseIsXExtensionKeyboard-        fromValue 4 = DeviceUseIsXExtensionPointer- -data InputInfo = MkInputInfo{class_id_InputInfo :: Word8,-                             len_InputInfo :: Word8}-               deriving (Show, Typeable)- -instance Serialize InputInfo where-        serialize x-          = do serialize (class_id_InputInfo x)-               serialize (len_InputInfo x)-        size x = size (class_id_InputInfo x) + size (len_InputInfo x)- -instance Deserialize InputInfo where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               return (MkInputInfo class_id len)- -data KeyInfo = MkKeyInfo{class_id_KeyInfo :: Word8,-                         len_KeyInfo :: Word8, min_keycode_KeyInfo :: KeyCode,-                         max_keycode_KeyInfo :: KeyCode, num_keys_KeyInfo :: Word16}-             deriving (Show, Typeable)- -instance Serialize KeyInfo where-        serialize x-          = do serialize (class_id_KeyInfo x)-               serialize (len_KeyInfo x)-               serialize (min_keycode_KeyInfo x)-               serialize (max_keycode_KeyInfo x)-               serialize (num_keys_KeyInfo x)-               putSkip 2-        size x-          = size (class_id_KeyInfo x) + size (len_KeyInfo x) +-              size (min_keycode_KeyInfo x)-              + size (max_keycode_KeyInfo x)-              + size (num_keys_KeyInfo x)-              + 2- -instance Deserialize KeyInfo where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               min_keycode <- deserialize-               max_keycode <- deserialize-               num_keys <- deserialize-               skip 2-               return (MkKeyInfo class_id len min_keycode max_keycode num_keys)- -data ButtonInfo = MkButtonInfo{class_id_ButtonInfo :: Word8,-                               len_ButtonInfo :: Word8, num_buttons_ButtonInfo :: Word16}-                deriving (Show, Typeable)- -instance Serialize ButtonInfo where-        serialize x-          = do serialize (class_id_ButtonInfo x)-               serialize (len_ButtonInfo x)-               serialize (num_buttons_ButtonInfo x)-        size x-          = size (class_id_ButtonInfo x) + size (len_ButtonInfo x) +-              size (num_buttons_ButtonInfo x)- -instance Deserialize ButtonInfo where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               num_buttons <- deserialize-               return (MkButtonInfo class_id len num_buttons)- -data AxisInfo = MkAxisInfo{resolution_AxisInfo :: Word32,-                           minimum_AxisInfo :: Word32, maximum_AxisInfo :: Word32}-              deriving (Show, Typeable)- -instance Serialize AxisInfo where-        serialize x-          = do serialize (resolution_AxisInfo x)-               serialize (minimum_AxisInfo x)-               serialize (maximum_AxisInfo x)-        size x-          = size (resolution_AxisInfo x) + size (minimum_AxisInfo x) +-              size (maximum_AxisInfo x)- -instance Deserialize AxisInfo where-        deserialize-          = do resolution <- deserialize-               minimum <- deserialize-               maximum <- deserialize-               return (MkAxisInfo resolution minimum maximum)- -data ValuatorInfo = MkValuatorInfo{class_id_ValuatorInfo :: Word8,-                                   len_ValuatorInfo :: Word8, axes_len_ValuatorInfo :: Word8,-                                   mode_ValuatorInfo :: Word8, motion_size_ValuatorInfo :: Word32,-                                   axes_ValuatorInfo :: [AxisInfo]}-                  deriving (Show, Typeable)- -instance Serialize ValuatorInfo where-        serialize x-          = do serialize (class_id_ValuatorInfo x)-               serialize (len_ValuatorInfo x)-               serialize (axes_len_ValuatorInfo x)-               serialize (mode_ValuatorInfo x)-               serialize (motion_size_ValuatorInfo x)-               serializeList (axes_ValuatorInfo x)-        size x-          = size (class_id_ValuatorInfo x) + size (len_ValuatorInfo x) +-              size (axes_len_ValuatorInfo x)-              + size (mode_ValuatorInfo x)-              + size (motion_size_ValuatorInfo x)-              + sum (map size (axes_ValuatorInfo x))- -instance Deserialize ValuatorInfo where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               axes_len <- deserialize-               mode <- deserialize-               motion_size <- deserialize-               axes <- deserializeList (fromIntegral axes_len)-               return (MkValuatorInfo class_id len axes_len mode motion_size axes)- -data InputClassInfo = MkInputClassInfo{class_id_InputClassInfo ::-                                       Word8,-                                       event_type_base_InputClassInfo :: Word8}-                    deriving (Show, Typeable)- -instance Serialize InputClassInfo where-        serialize x-          = do serialize (class_id_InputClassInfo x)-               serialize (event_type_base_InputClassInfo x)-        size x-          = size (class_id_InputClassInfo x) +-              size (event_type_base_InputClassInfo x)- -instance Deserialize InputClassInfo where-        deserialize-          = do class_id <- deserialize-               event_type_base <- deserialize-               return (MkInputClassInfo class_id event_type_base)- -data OpenDevice = MkOpenDevice{device_id_OpenDevice :: Word8}-                deriving (Show, Typeable)- -instance ExtensionRequest OpenDevice where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 3-               let size__ = 4 + size (device_id_OpenDevice x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_OpenDevice x)-               putSkip 3-               putSkip (requiredPadding size__)- -data OpenDeviceReply = MkOpenDeviceReply{num_classes_OpenDeviceReply-                                         :: Word8,-                                         class_info_OpenDeviceReply :: [InputClassInfo]}-                     deriving (Show, Typeable)- -instance Deserialize OpenDeviceReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               num_classes <- deserialize-               skip 23-               class_info <- deserializeList (fromIntegral num_classes)-               let _ = isCard32 length-               return (MkOpenDeviceReply num_classes class_info)- -data InputClass = InputClassKey-                | InputClassButton-                | InputClassValuator-                | InputClassFeedback-                | InputClassProximity-                | InputClassFocus-                | InputClassOther-                deriving Show- -instance SimpleEnum InputClass where-        toValue InputClassKey{} = 0-        toValue InputClassButton{} = 1-        toValue InputClassValuator{} = 2-        toValue InputClassFeedback{} = 3-        toValue InputClassProximity{} = 4-        toValue InputClassFocus{} = 5-        toValue InputClassOther{} = 6-        fromValue 0 = InputClassKey-        fromValue 1 = InputClassButton-        fromValue 2 = InputClassValuator-        fromValue 3 = InputClassFeedback-        fromValue 4 = InputClassProximity-        fromValue 5 = InputClassFocus-        fromValue 6 = InputClassOther- -data CloseDevice = MkCloseDevice{device_id_CloseDevice :: Word8}-                 deriving (Show, Typeable)- -instance ExtensionRequest CloseDevice where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 4-               let size__ = 4 + size (device_id_CloseDevice x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_CloseDevice x)-               putSkip 3-               putSkip (requiredPadding size__)- -data SetDeviceMode = MkSetDeviceMode{device_id_SetDeviceMode ::-                                     Word8,-                                     mode_SetDeviceMode :: Word8}-                   deriving (Show, Typeable)- -instance ExtensionRequest SetDeviceMode where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 5-               let size__-                     = 4 + size (device_id_SetDeviceMode x) +-                         size (mode_SetDeviceMode x)-                         + 2-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_SetDeviceMode x)-               serialize (mode_SetDeviceMode x)-               putSkip 2-               putSkip (requiredPadding size__)- -data SetDeviceModeReply = MkSetDeviceModeReply{status_SetDeviceModeReply-                                               :: Word8}-                        deriving (Show, Typeable)- -instance Deserialize SetDeviceModeReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkSetDeviceModeReply status)- -data SelectExtensionEvent = MkSelectExtensionEvent{window_SelectExtensionEvent-                                                   :: WINDOW,-                                                   num_classes_SelectExtensionEvent :: Word16,-                                                   classes_SelectExtensionEvent :: [EventClass]}-                          deriving (Show, Typeable)- -instance ExtensionRequest SelectExtensionEvent where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 6-               let size__-                     = 4 + size (window_SelectExtensionEvent x) +-                         size (num_classes_SelectExtensionEvent x)-                         + 2-                         + sum (map size (classes_SelectExtensionEvent x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (window_SelectExtensionEvent x)-               serialize (num_classes_SelectExtensionEvent x)-               putSkip 2-               serializeList (classes_SelectExtensionEvent x)-               putSkip (requiredPadding size__)- -data GetSelectedExtensionEvents = MkGetSelectedExtensionEvents{window_GetSelectedExtensionEvents-                                                               :: WINDOW}-                                deriving (Show, Typeable)- -instance ExtensionRequest GetSelectedExtensionEvents where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 7-               let size__ = 4 + size (window_GetSelectedExtensionEvents x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (window_GetSelectedExtensionEvents x)-               putSkip (requiredPadding size__)- -data GetSelectedExtensionEventsReply = MkGetSelectedExtensionEventsReply{num_this_classes_GetSelectedExtensionEventsReply-                                                                         :: Word16,-                                                                         num_all_classes_GetSelectedExtensionEventsReply-                                                                         :: Word16,-                                                                         this_classes_GetSelectedExtensionEventsReply-                                                                         :: [EventClass],-                                                                         all_classes_GetSelectedExtensionEventsReply-                                                                         :: [EventClass]}-                                     deriving (Show, Typeable)- -instance Deserialize GetSelectedExtensionEventsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               num_this_classes <- deserialize-               num_all_classes <- deserialize-               skip 20-               this_classes <- deserializeList (fromIntegral num_this_classes)-               all_classes <- deserializeList (fromIntegral num_all_classes)-               let _ = isCard32 length-               return-                 (MkGetSelectedExtensionEventsReply num_this_classes num_all_classes-                    this_classes-                    all_classes)- -data ChangeDeviceDontPropagateList = MkChangeDeviceDontPropagateList{window_ChangeDeviceDontPropagateList-                                                                     :: WINDOW,-                                                                     num_classes_ChangeDeviceDontPropagateList-                                                                     :: Word16,-                                                                     mode_ChangeDeviceDontPropagateList-                                                                     :: Word8,-                                                                     classes_ChangeDeviceDontPropagateList-                                                                     :: [EventClass]}-                                   deriving (Show, Typeable)- -instance ExtensionRequest ChangeDeviceDontPropagateList where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 8-               let size__-                     = 4 + size (window_ChangeDeviceDontPropagateList x) +-                         size (num_classes_ChangeDeviceDontPropagateList x)-                         + size (mode_ChangeDeviceDontPropagateList x)-                         + 1-                         + sum (map size (classes_ChangeDeviceDontPropagateList x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (window_ChangeDeviceDontPropagateList x)-               serialize (num_classes_ChangeDeviceDontPropagateList x)-               serialize (mode_ChangeDeviceDontPropagateList x)-               putSkip 1-               serializeList (classes_ChangeDeviceDontPropagateList x)-               putSkip (requiredPadding size__)- -data GetDeviceDontPropagateList = MkGetDeviceDontPropagateList{window_GetDeviceDontPropagateList-                                                               :: WINDOW}-                                deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceDontPropagateList where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 9-               let size__ = 4 + size (window_GetDeviceDontPropagateList x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (window_GetDeviceDontPropagateList x)-               putSkip (requiredPadding size__)- -data GetDeviceDontPropagateListReply = MkGetDeviceDontPropagateListReply{num_classes_GetDeviceDontPropagateListReply-                                                                         :: Word16,-                                                                         classes_GetDeviceDontPropagateListReply-                                                                         :: [EventClass]}-                                     deriving (Show, Typeable)- -instance Deserialize GetDeviceDontPropagateListReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               num_classes <- deserialize-               skip 22-               classes <- deserializeList (fromIntegral num_classes)-               let _ = isCard32 length-               return (MkGetDeviceDontPropagateListReply num_classes classes)- -data GetDeviceMotionEvents = MkGetDeviceMotionEvents{start_GetDeviceMotionEvents-                                                     :: TIMESTAMP,-                                                     stop_GetDeviceMotionEvents :: TIMESTAMP,-                                                     device_id_GetDeviceMotionEvents :: Word8}-                           deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceMotionEvents where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 10-               let size__-                     = 4 + size (start_GetDeviceMotionEvents x) +-                         size (stop_GetDeviceMotionEvents x)-                         + size (device_id_GetDeviceMotionEvents x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (start_GetDeviceMotionEvents x)-               serialize (stop_GetDeviceMotionEvents x)-               serialize (device_id_GetDeviceMotionEvents x)-               putSkip (requiredPadding size__)- -data GetDeviceMotionEventsReply = MkGetDeviceMotionEventsReply{num_coords_GetDeviceMotionEventsReply-                                                               :: Word32,-                                                               num_axes_GetDeviceMotionEventsReply-                                                               :: Word8,-                                                               device_mode_GetDeviceMotionEventsReply-                                                               :: Word8}-                                deriving (Show, Typeable)- -instance Deserialize GetDeviceMotionEventsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               num_coords <- deserialize-               num_axes <- deserialize-               device_mode <- deserialize-               skip 18-               let _ = isCard32 length-               return-                 (MkGetDeviceMotionEventsReply num_coords num_axes device_mode)- -data DeviceTimeCoord = MkDeviceTimeCoord{time_DeviceTimeCoord ::-                                         TIMESTAMP}-                     deriving (Show, Typeable)- -instance Serialize DeviceTimeCoord where-        serialize x = do serialize (time_DeviceTimeCoord x)-        size x = size (time_DeviceTimeCoord x)- -instance Deserialize DeviceTimeCoord where-        deserialize-          = do time <- deserialize-               return (MkDeviceTimeCoord time)- -data ChangeKeyboardDevice = MkChangeKeyboardDevice{device_id_ChangeKeyboardDevice-                                                   :: Word8}-                          deriving (Show, Typeable)- -instance ExtensionRequest ChangeKeyboardDevice where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 11-               let size__ = 4 + size (device_id_ChangeKeyboardDevice x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_ChangeKeyboardDevice x)-               putSkip 3-               putSkip (requiredPadding size__)- -data ChangeKeyboardDeviceReply = MkChangeKeyboardDeviceReply{status_ChangeKeyboardDeviceReply-                                                             :: Word8}-                               deriving (Show, Typeable)- -instance Deserialize ChangeKeyboardDeviceReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkChangeKeyboardDeviceReply status)- -data ChangePointerDevice = MkChangePointerDevice{x_axis_ChangePointerDevice-                                                 :: Word8,-                                                 y_axis_ChangePointerDevice :: Word8,-                                                 device_id_ChangePointerDevice :: Word8}-                         deriving (Show, Typeable)- -instance ExtensionRequest ChangePointerDevice where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 12-               let size__-                     = 4 + size (x_axis_ChangePointerDevice x) +-                         size (y_axis_ChangePointerDevice x)-                         + size (device_id_ChangePointerDevice x)-                         + 1-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (x_axis_ChangePointerDevice x)-               serialize (y_axis_ChangePointerDevice x)-               serialize (device_id_ChangePointerDevice x)-               putSkip 1-               putSkip (requiredPadding size__)- -data ChangePointerDeviceReply = MkChangePointerDeviceReply{status_ChangePointerDeviceReply-                                                           :: Word8}-                              deriving (Show, Typeable)- -instance Deserialize ChangePointerDeviceReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkChangePointerDeviceReply status)- -data GrabDevice = MkGrabDevice{grab_window_GrabDevice :: WINDOW,-                               time_GrabDevice :: TIMESTAMP, num_classes_GrabDevice :: Word16,-                               this_device_mode_GrabDevice :: Word8,-                               other_device_mode_GrabDevice :: Word8,-                               owner_events_GrabDevice :: Bool, device_id_GrabDevice :: Word8,-                               classes_GrabDevice :: [EventClass]}-                deriving (Show, Typeable)- -instance ExtensionRequest GrabDevice where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 13-               let size__-                     = 4 + size (grab_window_GrabDevice x) + size (time_GrabDevice x) +-                         size (num_classes_GrabDevice x)-                         + size (this_device_mode_GrabDevice x)-                         + size (other_device_mode_GrabDevice x)-                         + size (owner_events_GrabDevice x)-                         + size (device_id_GrabDevice x)-                         + 2-                         + sum (map size (classes_GrabDevice x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (grab_window_GrabDevice x)-               serialize (time_GrabDevice x)-               serialize (num_classes_GrabDevice x)-               serialize (this_device_mode_GrabDevice x)-               serialize (other_device_mode_GrabDevice x)-               serialize (owner_events_GrabDevice x)-               serialize (device_id_GrabDevice x)-               putSkip 2-               serializeList (classes_GrabDevice x)-               putSkip (requiredPadding size__)- -data GrabDeviceReply = MkGrabDeviceReply{status_GrabDeviceReply ::-                                         Word8}-                     deriving (Show, Typeable)- -instance Deserialize GrabDeviceReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkGrabDeviceReply status)- -data UngrabDevice = MkUngrabDevice{time_UngrabDevice :: TIMESTAMP,-                                   device_id_UngrabDevice :: Word8}-                  deriving (Show, Typeable)- -instance ExtensionRequest UngrabDevice where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 14-               let size__-                     = 4 + size (time_UngrabDevice x) + size (device_id_UngrabDevice x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (time_UngrabDevice x)-               serialize (device_id_UngrabDevice x)-               putSkip (requiredPadding size__)- -data GrabDeviceKey = MkGrabDeviceKey{grab_window_GrabDeviceKey ::-                                     WINDOW,-                                     num_classes_GrabDeviceKey :: Word16,-                                     modifiers_GrabDeviceKey :: Word16,-                                     modifier_device_GrabDeviceKey :: Word8,-                                     grabbed_device_GrabDeviceKey :: Word8,-                                     key_GrabDeviceKey :: Word8,-                                     this_device_mode_GrabDeviceKey :: Word8,-                                     other_device_mode_GrabDeviceKey :: Word8,-                                     owner_events_GrabDeviceKey :: Bool,-                                     classes_GrabDeviceKey :: [EventClass]}-                   deriving (Show, Typeable)- -instance ExtensionRequest GrabDeviceKey where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 15-               let size__-                     = 4 + size (grab_window_GrabDeviceKey x) +-                         size (num_classes_GrabDeviceKey x)-                         + size (modifiers_GrabDeviceKey x)-                         + size (modifier_device_GrabDeviceKey x)-                         + size (grabbed_device_GrabDeviceKey x)-                         + size (key_GrabDeviceKey x)-                         + size (this_device_mode_GrabDeviceKey x)-                         + size (other_device_mode_GrabDeviceKey x)-                         + size (owner_events_GrabDeviceKey x)-                         + 2-                         + sum (map size (classes_GrabDeviceKey x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (grab_window_GrabDeviceKey x)-               serialize (num_classes_GrabDeviceKey x)-               serialize (modifiers_GrabDeviceKey x)-               serialize (modifier_device_GrabDeviceKey x)-               serialize (grabbed_device_GrabDeviceKey x)-               serialize (key_GrabDeviceKey x)-               serialize (this_device_mode_GrabDeviceKey x)-               serialize (other_device_mode_GrabDeviceKey x)-               serialize (owner_events_GrabDeviceKey x)-               putSkip 2-               serializeList (classes_GrabDeviceKey x)-               putSkip (requiredPadding size__)- -data UngrabDeviceKey = MkUngrabDeviceKey{grabWindow_UngrabDeviceKey-                                         :: WINDOW,-                                         modifiers_UngrabDeviceKey :: Word16,-                                         modifier_device_UngrabDeviceKey :: Word8,-                                         key_UngrabDeviceKey :: Word8,-                                         grabbed_device_UngrabDeviceKey :: Word8}-                     deriving (Show, Typeable)- -instance ExtensionRequest UngrabDeviceKey where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 16-               let size__-                     = 4 + size (grabWindow_UngrabDeviceKey x) +-                         size (modifiers_UngrabDeviceKey x)-                         + size (modifier_device_UngrabDeviceKey x)-                         + size (key_UngrabDeviceKey x)-                         + size (grabbed_device_UngrabDeviceKey x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (grabWindow_UngrabDeviceKey x)-               serialize (modifiers_UngrabDeviceKey x)-               serialize (modifier_device_UngrabDeviceKey x)-               serialize (key_UngrabDeviceKey x)-               serialize (grabbed_device_UngrabDeviceKey x)-               putSkip (requiredPadding size__)- -data GrabDeviceButton = MkGrabDeviceButton{grab_window_GrabDeviceButton-                                           :: WINDOW,-                                           grabbed_device_GrabDeviceButton :: Word8,-                                           modifier_device_GrabDeviceButton :: Word8,-                                           num_classes_GrabDeviceButton :: Word16,-                                           modifiers_GrabDeviceButton :: Word16,-                                           this_device_mode_GrabDeviceButton :: Word8,-                                           other_device_mode_GrabDeviceButton :: Word8,-                                           button_GrabDeviceButton :: Word8,-                                           owner_events_GrabDeviceButton :: Word8,-                                           classes_GrabDeviceButton :: [EventClass]}-                      deriving (Show, Typeable)- -instance ExtensionRequest GrabDeviceButton where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 17-               let size__-                     = 4 + size (grab_window_GrabDeviceButton x) +-                         size (grabbed_device_GrabDeviceButton x)-                         + size (modifier_device_GrabDeviceButton x)-                         + size (num_classes_GrabDeviceButton x)-                         + size (modifiers_GrabDeviceButton x)-                         + size (this_device_mode_GrabDeviceButton x)-                         + size (other_device_mode_GrabDeviceButton x)-                         + size (button_GrabDeviceButton x)-                         + size (owner_events_GrabDeviceButton x)-                         + 2-                         + sum (map size (classes_GrabDeviceButton x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (grab_window_GrabDeviceButton x)-               serialize (grabbed_device_GrabDeviceButton x)-               serialize (modifier_device_GrabDeviceButton x)-               serialize (num_classes_GrabDeviceButton x)-               serialize (modifiers_GrabDeviceButton x)-               serialize (this_device_mode_GrabDeviceButton x)-               serialize (other_device_mode_GrabDeviceButton x)-               serialize (button_GrabDeviceButton x)-               serialize (owner_events_GrabDeviceButton x)-               putSkip 2-               serializeList (classes_GrabDeviceButton x)-               putSkip (requiredPadding size__)- -data UngrabDeviceButton = MkUngrabDeviceButton{grab_window_UngrabDeviceButton-                                               :: WINDOW,-                                               modifiers_UngrabDeviceButton :: Word16,-                                               modifier_device_UngrabDeviceButton :: Word8,-                                               button_UngrabDeviceButton :: Word8,-                                               grabbed_device_UngrabDeviceButton :: Word8}-                        deriving (Show, Typeable)- -instance ExtensionRequest UngrabDeviceButton where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 18-               let size__-                     = 4 + size (grab_window_UngrabDeviceButton x) +-                         size (modifiers_UngrabDeviceButton x)-                         + size (modifier_device_UngrabDeviceButton x)-                         + size (button_UngrabDeviceButton x)-                         + size (grabbed_device_UngrabDeviceButton x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (grab_window_UngrabDeviceButton x)-               serialize (modifiers_UngrabDeviceButton x)-               serialize (modifier_device_UngrabDeviceButton x)-               serialize (button_UngrabDeviceButton x)-               serialize (grabbed_device_UngrabDeviceButton x)-               putSkip (requiredPadding size__)- -data AllowDeviceEvents = MkAllowDeviceEvents{time_AllowDeviceEvents-                                             :: TIMESTAMP,-                                             mode_AllowDeviceEvents :: Word8,-                                             device_id_AllowDeviceEvents :: Word8}-                       deriving (Show, Typeable)- -instance ExtensionRequest AllowDeviceEvents where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 19-               let size__-                     = 4 + size (time_AllowDeviceEvents x) +-                         size (mode_AllowDeviceEvents x)-                         + size (device_id_AllowDeviceEvents x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (time_AllowDeviceEvents x)-               serialize (mode_AllowDeviceEvents x)-               serialize (device_id_AllowDeviceEvents x)-               putSkip (requiredPadding size__)- -data GetDeviceFocus = MkGetDeviceFocus{device_id_GetDeviceFocus ::-                                       Word8}-                    deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceFocus where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 20-               let size__ = 4 + size (device_id_GetDeviceFocus x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_GetDeviceFocus x)-               putSkip 3-               putSkip (requiredPadding size__)- -data GetDeviceFocusReply = MkGetDeviceFocusReply{focus_GetDeviceFocusReply-                                                 :: WINDOW,-                                                 time_GetDeviceFocusReply :: TIMESTAMP,-                                                 revert_to_GetDeviceFocusReply :: Word8}-                         deriving (Show, Typeable)- -instance Deserialize GetDeviceFocusReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               focus <- deserialize-               time <- deserialize-               revert_to <- deserialize-               skip 15-               let _ = isCard32 length-               return (MkGetDeviceFocusReply focus time revert_to)- -data SetDeviceFocus = MkSetDeviceFocus{focus_SetDeviceFocus ::-                                       WINDOW,-                                       time_SetDeviceFocus :: TIMESTAMP,-                                       revert_to_SetDeviceFocus :: Word8,-                                       device_id_SetDeviceFocus :: Word8}-                    deriving (Show, Typeable)- -instance ExtensionRequest SetDeviceFocus where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 21-               let size__-                     = 4 + size (focus_SetDeviceFocus x) + size (time_SetDeviceFocus x)-                         + size (revert_to_SetDeviceFocus x)-                         + size (device_id_SetDeviceFocus x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (focus_SetDeviceFocus x)-               serialize (time_SetDeviceFocus x)-               serialize (revert_to_SetDeviceFocus x)-               serialize (device_id_SetDeviceFocus x)-               putSkip (requiredPadding size__)- -data GetFeedbackControl = MkGetFeedbackControl{device_id_GetFeedbackControl-                                               :: Word8}-                        deriving (Show, Typeable)- -instance ExtensionRequest GetFeedbackControl where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 22-               let size__ = 4 + size (device_id_GetFeedbackControl x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_GetFeedbackControl x)-               putSkip 3-               putSkip (requiredPadding size__)- -data GetFeedbackControlReply = MkGetFeedbackControlReply{num_feedback_GetFeedbackControlReply-                                                         :: Word16}-                             deriving (Show, Typeable)- -instance Deserialize GetFeedbackControlReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               num_feedback <- deserialize-               skip 22-               let _ = isCard32 length-               return (MkGetFeedbackControlReply num_feedback)- -data FeedbackState = MkFeedbackState{class_id_FeedbackState ::-                                     Word8,-                                     id_FeedbackState :: Word8, len_FeedbackState :: Word16}-                   deriving (Show, Typeable)- -instance Serialize FeedbackState where-        serialize x-          = do serialize (class_id_FeedbackState x)-               serialize (id_FeedbackState x)-               serialize (len_FeedbackState x)-        size x-          = size (class_id_FeedbackState x) + size (id_FeedbackState x) +-              size (len_FeedbackState x)- -instance Deserialize FeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               return (MkFeedbackState class_id id len)- -data KbdFeedbackState = MkKbdFeedbackState{class_id_KbdFeedbackState-                                           :: Word8,-                                           id_KbdFeedbackState :: Word8,-                                           len_KbdFeedbackState :: Word16,-                                           pitch_KbdFeedbackState :: Word16,-                                           duration_KbdFeedbackState :: Word16,-                                           led_mask_KbdFeedbackState :: Word32,-                                           led_values_KbdFeedbackState :: Word32,-                                           global_auto_repeat_KbdFeedbackState :: Bool,-                                           click_KbdFeedbackState :: Word8,-                                           percent_KbdFeedbackState :: Word8,-                                           auto_repeats_KbdFeedbackState :: [Word8]}-                      deriving (Show, Typeable)- -instance Serialize KbdFeedbackState where-        serialize x-          = do serialize (class_id_KbdFeedbackState x)-               serialize (id_KbdFeedbackState x)-               serialize (len_KbdFeedbackState x)-               serialize (pitch_KbdFeedbackState x)-               serialize (duration_KbdFeedbackState x)-               serialize (led_mask_KbdFeedbackState x)-               serialize (led_values_KbdFeedbackState x)-               serialize (global_auto_repeat_KbdFeedbackState x)-               serialize (click_KbdFeedbackState x)-               serialize (percent_KbdFeedbackState x)-               putSkip 1-               serializeList (auto_repeats_KbdFeedbackState x)-        size x-          = size (class_id_KbdFeedbackState x) + size (id_KbdFeedbackState x)-              + size (len_KbdFeedbackState x)-              + size (pitch_KbdFeedbackState x)-              + size (duration_KbdFeedbackState x)-              + size (led_mask_KbdFeedbackState x)-              + size (led_values_KbdFeedbackState x)-              + size (global_auto_repeat_KbdFeedbackState x)-              + size (click_KbdFeedbackState x)-              + size (percent_KbdFeedbackState x)-              + 1-              + sum (map size (auto_repeats_KbdFeedbackState x))- -instance Deserialize KbdFeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               pitch <- deserialize-               duration <- deserialize-               led_mask <- deserialize-               led_values <- deserialize-               global_auto_repeat <- deserialize-               click <- deserialize-               percent <- deserialize-               skip 1-               auto_repeats <- deserializeList (fromIntegral 32)-               return-                 (MkKbdFeedbackState class_id id len pitch duration led_mask-                    led_values-                    global_auto_repeat-                    click-                    percent-                    auto_repeats)- -data PtrFeedbackState = MkPtrFeedbackState{class_id_PtrFeedbackState-                                           :: Word8,-                                           id_PtrFeedbackState :: Word8,-                                           len_PtrFeedbackState :: Word16,-                                           accel_num_PtrFeedbackState :: Word16,-                                           accel_denom_PtrFeedbackState :: Word16,-                                           threshold_PtrFeedbackState :: Word16}-                      deriving (Show, Typeable)- -instance Serialize PtrFeedbackState where-        serialize x-          = do serialize (class_id_PtrFeedbackState x)-               serialize (id_PtrFeedbackState x)-               serialize (len_PtrFeedbackState x)-               putSkip 2-               serialize (accel_num_PtrFeedbackState x)-               serialize (accel_denom_PtrFeedbackState x)-               serialize (threshold_PtrFeedbackState x)-        size x-          = size (class_id_PtrFeedbackState x) + size (id_PtrFeedbackState x)-              + size (len_PtrFeedbackState x)-              + 2-              + size (accel_num_PtrFeedbackState x)-              + size (accel_denom_PtrFeedbackState x)-              + size (threshold_PtrFeedbackState x)- -instance Deserialize PtrFeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               skip 2-               accel_num <- deserialize-               accel_denom <- deserialize-               threshold <- deserialize-               return-                 (MkPtrFeedbackState class_id id len accel_num accel_denom-                    threshold)- -data IntegerFeedbackState = MkIntegerFeedbackState{class_id_IntegerFeedbackState-                                                   :: Word8,-                                                   id_IntegerFeedbackState :: Word8,-                                                   len_IntegerFeedbackState :: Word16,-                                                   resolution_IntegerFeedbackState :: Word32,-                                                   min_value_IntegerFeedbackState :: Int32,-                                                   max_value_IntegerFeedbackState :: Int32}-                          deriving (Show, Typeable)- -instance Serialize IntegerFeedbackState where-        serialize x-          = do serialize (class_id_IntegerFeedbackState x)-               serialize (id_IntegerFeedbackState x)-               serialize (len_IntegerFeedbackState x)-               serialize (resolution_IntegerFeedbackState x)-               serialize (min_value_IntegerFeedbackState x)-               serialize (max_value_IntegerFeedbackState x)-        size x-          = size (class_id_IntegerFeedbackState x) +-              size (id_IntegerFeedbackState x)-              + size (len_IntegerFeedbackState x)-              + size (resolution_IntegerFeedbackState x)-              + size (min_value_IntegerFeedbackState x)-              + size (max_value_IntegerFeedbackState x)- -instance Deserialize IntegerFeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               resolution <- deserialize-               min_value <- deserialize-               max_value <- deserialize-               return-                 (MkIntegerFeedbackState class_id id len resolution min_value-                    max_value)- -data StringFeedbackState = MkStringFeedbackState{class_id_StringFeedbackState-                                                 :: Word8,-                                                 id_StringFeedbackState :: Word8,-                                                 len_StringFeedbackState :: Word16,-                                                 max_symbols_StringFeedbackState :: Word16,-                                                 num_keysyms_StringFeedbackState :: Word16,-                                                 keysyms_StringFeedbackState :: [KEYSYM]}-                         deriving (Show, Typeable)- -instance Serialize StringFeedbackState where-        serialize x-          = do serialize (class_id_StringFeedbackState x)-               serialize (id_StringFeedbackState x)-               serialize (len_StringFeedbackState x)-               serialize (max_symbols_StringFeedbackState x)-               serialize (num_keysyms_StringFeedbackState x)-               serializeList (keysyms_StringFeedbackState x)-        size x-          = size (class_id_StringFeedbackState x) +-              size (id_StringFeedbackState x)-              + size (len_StringFeedbackState x)-              + size (max_symbols_StringFeedbackState x)-              + size (num_keysyms_StringFeedbackState x)-              + sum (map size (keysyms_StringFeedbackState x))- -instance Deserialize StringFeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               max_symbols <- deserialize-               num_keysyms <- deserialize-               keysyms <- deserializeList (fromIntegral num_keysyms)-               return-                 (MkStringFeedbackState class_id id len max_symbols num_keysyms-                    keysyms)- -data BellFeedbackState = MkBellFeedbackState{class_id_BellFeedbackState-                                             :: Word8,-                                             id_BellFeedbackState :: Word8,-                                             len_BellFeedbackState :: Word16,-                                             percent_BellFeedbackState :: Word8,-                                             pitch_BellFeedbackState :: Word16,-                                             duration_BellFeedbackState :: Word16}-                       deriving (Show, Typeable)- -instance Serialize BellFeedbackState where-        serialize x-          = do serialize (class_id_BellFeedbackState x)-               serialize (id_BellFeedbackState x)-               serialize (len_BellFeedbackState x)-               serialize (percent_BellFeedbackState x)-               putSkip 3-               serialize (pitch_BellFeedbackState x)-               serialize (duration_BellFeedbackState x)-        size x-          = size (class_id_BellFeedbackState x) +-              size (id_BellFeedbackState x)-              + size (len_BellFeedbackState x)-              + size (percent_BellFeedbackState x)-              + 3-              + size (pitch_BellFeedbackState x)-              + size (duration_BellFeedbackState x)- -instance Deserialize BellFeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               percent <- deserialize-               skip 3-               pitch <- deserialize-               duration <- deserialize-               return (MkBellFeedbackState class_id id len percent pitch duration)- -data LedFeedbackState = MkLedFeedbackState{class_id_LedFeedbackState-                                           :: Word8,-                                           id_LedFeedbackState :: Word8,-                                           len_LedFeedbackState :: Word16,-                                           led_mask_LedFeedbackState :: Word32,-                                           led_values_LedFeedbackState :: Word32}-                      deriving (Show, Typeable)- -instance Serialize LedFeedbackState where-        serialize x-          = do serialize (class_id_LedFeedbackState x)-               serialize (id_LedFeedbackState x)-               serialize (len_LedFeedbackState x)-               serialize (led_mask_LedFeedbackState x)-               serialize (led_values_LedFeedbackState x)-        size x-          = size (class_id_LedFeedbackState x) + size (id_LedFeedbackState x)-              + size (len_LedFeedbackState x)-              + size (led_mask_LedFeedbackState x)-              + size (led_values_LedFeedbackState x)- -instance Deserialize LedFeedbackState where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               led_mask <- deserialize-               led_values <- deserialize-               return (MkLedFeedbackState class_id id len led_mask led_values)- -data FeedbackCtl = MkFeedbackCtl{class_id_FeedbackCtl :: Word8,-                                 id_FeedbackCtl :: Word8, len_FeedbackCtl :: Word16}-                 deriving (Show, Typeable)- -instance Serialize FeedbackCtl where-        serialize x-          = do serialize (class_id_FeedbackCtl x)-               serialize (id_FeedbackCtl x)-               serialize (len_FeedbackCtl x)-        size x-          = size (class_id_FeedbackCtl x) + size (id_FeedbackCtl x) +-              size (len_FeedbackCtl x)- -instance Deserialize FeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               return (MkFeedbackCtl class_id id len)- -data KbdFeedbackCtl = MkKbdFeedbackCtl{class_id_KbdFeedbackCtl ::-                                       Word8,-                                       id_KbdFeedbackCtl :: Word8, len_KbdFeedbackCtl :: Word16,-                                       key_KbdFeedbackCtl :: KeyCode,-                                       auto_repeat_mode_KbdFeedbackCtl :: Word8,-                                       key_click_percent_KbdFeedbackCtl :: Int8,-                                       bell_percent_KbdFeedbackCtl :: Int8,-                                       bell_pitch_KbdFeedbackCtl :: Int16,-                                       bell_duration_KbdFeedbackCtl :: Int16,-                                       led_mask_KbdFeedbackCtl :: Word32,-                                       led_values_KbdFeedbackCtl :: Word32}-                    deriving (Show, Typeable)- -instance Serialize KbdFeedbackCtl where-        serialize x-          = do serialize (class_id_KbdFeedbackCtl x)-               serialize (id_KbdFeedbackCtl x)-               serialize (len_KbdFeedbackCtl x)-               serialize (key_KbdFeedbackCtl x)-               serialize (auto_repeat_mode_KbdFeedbackCtl x)-               serialize (key_click_percent_KbdFeedbackCtl x)-               serialize (bell_percent_KbdFeedbackCtl x)-               serialize (bell_pitch_KbdFeedbackCtl x)-               serialize (bell_duration_KbdFeedbackCtl x)-               serialize (led_mask_KbdFeedbackCtl x)-               serialize (led_values_KbdFeedbackCtl x)-        size x-          = size (class_id_KbdFeedbackCtl x) + size (id_KbdFeedbackCtl x) +-              size (len_KbdFeedbackCtl x)-              + size (key_KbdFeedbackCtl x)-              + size (auto_repeat_mode_KbdFeedbackCtl x)-              + size (key_click_percent_KbdFeedbackCtl x)-              + size (bell_percent_KbdFeedbackCtl x)-              + size (bell_pitch_KbdFeedbackCtl x)-              + size (bell_duration_KbdFeedbackCtl x)-              + size (led_mask_KbdFeedbackCtl x)-              + size (led_values_KbdFeedbackCtl x)- -instance Deserialize KbdFeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               key <- deserialize-               auto_repeat_mode <- deserialize-               key_click_percent <- deserialize-               bell_percent <- deserialize-               bell_pitch <- deserialize-               bell_duration <- deserialize-               led_mask <- deserialize-               led_values <- deserialize-               return-                 (MkKbdFeedbackCtl class_id id len key auto_repeat_mode-                    key_click_percent-                    bell_percent-                    bell_pitch-                    bell_duration-                    led_mask-                    led_values)- -data PtrFeedbackCtl = MkPtrFeedbackCtl{class_id_PtrFeedbackCtl ::-                                       Word8,-                                       id_PtrFeedbackCtl :: Word8, len_PtrFeedbackCtl :: Word16,-                                       num_PtrFeedbackCtl :: Int16, denom_PtrFeedbackCtl :: Int16,-                                       threshold_PtrFeedbackCtl :: Int16}-                    deriving (Show, Typeable)- -instance Serialize PtrFeedbackCtl where-        serialize x-          = do serialize (class_id_PtrFeedbackCtl x)-               serialize (id_PtrFeedbackCtl x)-               serialize (len_PtrFeedbackCtl x)-               putSkip 2-               serialize (num_PtrFeedbackCtl x)-               serialize (denom_PtrFeedbackCtl x)-               serialize (threshold_PtrFeedbackCtl x)-        size x-          = size (class_id_PtrFeedbackCtl x) + size (id_PtrFeedbackCtl x) +-              size (len_PtrFeedbackCtl x)-              + 2-              + size (num_PtrFeedbackCtl x)-              + size (denom_PtrFeedbackCtl x)-              + size (threshold_PtrFeedbackCtl x)- -instance Deserialize PtrFeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               skip 2-               num <- deserialize-               denom <- deserialize-               threshold <- deserialize-               return (MkPtrFeedbackCtl class_id id len num denom threshold)- -data IntegerFeedbackCtl = MkIntegerFeedbackCtl{class_id_IntegerFeedbackCtl-                                               :: Word8,-                                               id_IntegerFeedbackCtl :: Word8,-                                               len_IntegerFeedbackCtl :: Word16,-                                               int_to_display_IntegerFeedbackCtl :: Int32}-                        deriving (Show, Typeable)- -instance Serialize IntegerFeedbackCtl where-        serialize x-          = do serialize (class_id_IntegerFeedbackCtl x)-               serialize (id_IntegerFeedbackCtl x)-               serialize (len_IntegerFeedbackCtl x)-               serialize (int_to_display_IntegerFeedbackCtl x)-        size x-          = size (class_id_IntegerFeedbackCtl x) +-              size (id_IntegerFeedbackCtl x)-              + size (len_IntegerFeedbackCtl x)-              + size (int_to_display_IntegerFeedbackCtl x)- -instance Deserialize IntegerFeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               int_to_display <- deserialize-               return (MkIntegerFeedbackCtl class_id id len int_to_display)- -data StringFeedbackCtl = MkStringFeedbackCtl{class_id_StringFeedbackCtl-                                             :: Word8,-                                             id_StringFeedbackCtl :: Word8,-                                             len_StringFeedbackCtl :: Word16,-                                             num_keysyms_StringFeedbackCtl :: Word16,-                                             keysyms_StringFeedbackCtl :: [KEYSYM]}-                       deriving (Show, Typeable)- -instance Serialize StringFeedbackCtl where-        serialize x-          = do serialize (class_id_StringFeedbackCtl x)-               serialize (id_StringFeedbackCtl x)-               serialize (len_StringFeedbackCtl x)-               putSkip 2-               serialize (num_keysyms_StringFeedbackCtl x)-               serializeList (keysyms_StringFeedbackCtl x)-        size x-          = size (class_id_StringFeedbackCtl x) +-              size (id_StringFeedbackCtl x)-              + size (len_StringFeedbackCtl x)-              + 2-              + size (num_keysyms_StringFeedbackCtl x)-              + sum (map size (keysyms_StringFeedbackCtl x))- -instance Deserialize StringFeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               skip 2-               num_keysyms <- deserialize-               keysyms <- deserializeList (fromIntegral num_keysyms)-               return (MkStringFeedbackCtl class_id id len num_keysyms keysyms)- -data BellFeedbackCtl = MkBellFeedbackCtl{class_id_BellFeedbackCtl-                                         :: Word8,-                                         id_BellFeedbackCtl :: Word8, len_BellFeedbackCtl :: Word16,-                                         percent_BellFeedbackCtl :: Int8,-                                         pitch_BellFeedbackCtl :: Int16,-                                         duration_BellFeedbackCtl :: Int16}-                     deriving (Show, Typeable)- -instance Serialize BellFeedbackCtl where-        serialize x-          = do serialize (class_id_BellFeedbackCtl x)-               serialize (id_BellFeedbackCtl x)-               serialize (len_BellFeedbackCtl x)-               serialize (percent_BellFeedbackCtl x)-               putSkip 3-               serialize (pitch_BellFeedbackCtl x)-               serialize (duration_BellFeedbackCtl x)-        size x-          = size (class_id_BellFeedbackCtl x) + size (id_BellFeedbackCtl x) +-              size (len_BellFeedbackCtl x)-              + size (percent_BellFeedbackCtl x)-              + 3-              + size (pitch_BellFeedbackCtl x)-              + size (duration_BellFeedbackCtl x)- -instance Deserialize BellFeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               percent <- deserialize-               skip 3-               pitch <- deserialize-               duration <- deserialize-               return (MkBellFeedbackCtl class_id id len percent pitch duration)- -data LedFeedbackCtl = MkLedFeedbackCtl{class_id_LedFeedbackCtl ::-                                       Word8,-                                       id_LedFeedbackCtl :: Word8, len_LedFeedbackCtl :: Word16,-                                       led_mask_LedFeedbackCtl :: Word32,-                                       led_values_LedFeedbackCtl :: Word32}-                    deriving (Show, Typeable)- -instance Serialize LedFeedbackCtl where-        serialize x-          = do serialize (class_id_LedFeedbackCtl x)-               serialize (id_LedFeedbackCtl x)-               serialize (len_LedFeedbackCtl x)-               serialize (led_mask_LedFeedbackCtl x)-               serialize (led_values_LedFeedbackCtl x)-        size x-          = size (class_id_LedFeedbackCtl x) + size (id_LedFeedbackCtl x) +-              size (len_LedFeedbackCtl x)-              + size (led_mask_LedFeedbackCtl x)-              + size (led_values_LedFeedbackCtl x)- -instance Deserialize LedFeedbackCtl where-        deserialize-          = do class_id <- deserialize-               id <- deserialize-               len <- deserialize-               led_mask <- deserialize-               led_values <- deserialize-               return (MkLedFeedbackCtl class_id id len led_mask led_values)- -data GetDeviceKeyMapping = MkGetDeviceKeyMapping{device_id_GetDeviceKeyMapping-                                                 :: Word8,-                                                 first_keycode_GetDeviceKeyMapping :: KeyCode,-                                                 count_GetDeviceKeyMapping :: Word8}-                         deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceKeyMapping where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 24-               let size__-                     = 4 + size (device_id_GetDeviceKeyMapping x) +-                         size (first_keycode_GetDeviceKeyMapping x)-                         + size (count_GetDeviceKeyMapping x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_GetDeviceKeyMapping x)-               serialize (first_keycode_GetDeviceKeyMapping x)-               serialize (count_GetDeviceKeyMapping x)-               putSkip (requiredPadding size__)- -data GetDeviceKeyMappingReply = MkGetDeviceKeyMappingReply{keysyms_per_keycode_GetDeviceKeyMappingReply-                                                           :: Word8,-                                                           keysyms_GetDeviceKeyMappingReply ::-                                                           [KEYSYM]}-                              deriving (Show, Typeable)- -instance Deserialize GetDeviceKeyMappingReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               keysyms_per_keycode <- deserialize-               skip 23-               keysyms <- deserializeList (fromIntegral length)-               let _ = isCard32 length-               return (MkGetDeviceKeyMappingReply keysyms_per_keycode keysyms)- -data ChangeDeviceKeyMapping = MkChangeDeviceKeyMapping{device_id_ChangeDeviceKeyMapping-                                                       :: Word8,-                                                       first_keycode_ChangeDeviceKeyMapping ::-                                                       KeyCode,-                                                       keysyms_per_keycode_ChangeDeviceKeyMapping ::-                                                       Word8,-                                                       keycode_count_ChangeDeviceKeyMapping ::-                                                       Word8,-                                                       keysyms_ChangeDeviceKeyMapping :: [KEYSYM]}-                            deriving (Show, Typeable)- -instance ExtensionRequest ChangeDeviceKeyMapping where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 25-               let size__-                     = 4 + size (device_id_ChangeDeviceKeyMapping x) +-                         size (first_keycode_ChangeDeviceKeyMapping x)-                         + size (keysyms_per_keycode_ChangeDeviceKeyMapping x)-                         + size (keycode_count_ChangeDeviceKeyMapping x)-                         + sum (map size (keysyms_ChangeDeviceKeyMapping x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_ChangeDeviceKeyMapping x)-               serialize (first_keycode_ChangeDeviceKeyMapping x)-               serialize (keysyms_per_keycode_ChangeDeviceKeyMapping x)-               serialize (keycode_count_ChangeDeviceKeyMapping x)-               serializeList (keysyms_ChangeDeviceKeyMapping x)-               putSkip (requiredPadding size__)- -data GetDeviceModifierMapping = MkGetDeviceModifierMapping{device_id_GetDeviceModifierMapping-                                                           :: Word8}-                              deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceModifierMapping where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 26-               let size__ = 4 + size (device_id_GetDeviceModifierMapping x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_GetDeviceModifierMapping x)-               putSkip 3-               putSkip (requiredPadding size__)- -data GetDeviceModifierMappingReply = MkGetDeviceModifierMappingReply{keycodes_per_modifier_GetDeviceModifierMappingReply-                                                                     :: Word8,-                                                                     keymaps_GetDeviceModifierMappingReply-                                                                     :: [Word8]}-                                   deriving (Show, Typeable)- -instance Deserialize GetDeviceModifierMappingReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               keycodes_per_modifier <- deserialize-               skip 23-               keymaps <- deserializeList-                            (fromIntegral (fromIntegral (keycodes_per_modifier * 8)))-               let _ = isCard32 length-               return-                 (MkGetDeviceModifierMappingReply keycodes_per_modifier keymaps)- -data SetDeviceModifierMapping = MkSetDeviceModifierMapping{device_id_SetDeviceModifierMapping-                                                           :: Word8,-                                                           keycodes_per_modifier_SetDeviceModifierMapping-                                                           :: Word8,-                                                           keymaps_SetDeviceModifierMapping ::-                                                           [Word8]}-                              deriving (Show, Typeable)- -instance ExtensionRequest SetDeviceModifierMapping where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 27-               let size__-                     = 4 + size (device_id_SetDeviceModifierMapping x) +-                         size (keycodes_per_modifier_SetDeviceModifierMapping x)-                         + 1-                         + sum (map size (keymaps_SetDeviceModifierMapping x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_SetDeviceModifierMapping x)-               serialize (keycodes_per_modifier_SetDeviceModifierMapping x)-               putSkip 1-               serializeList (keymaps_SetDeviceModifierMapping x)-               putSkip (requiredPadding size__)- -data SetDeviceModifierMappingReply = MkSetDeviceModifierMappingReply{status_SetDeviceModifierMappingReply-                                                                     :: Word8}-                                   deriving (Show, Typeable)- -instance Deserialize SetDeviceModifierMappingReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkSetDeviceModifierMappingReply status)- -data GetDeviceButtonMapping = MkGetDeviceButtonMapping{device_id_GetDeviceButtonMapping-                                                       :: Word8}-                            deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceButtonMapping where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 28-               let size__ = 4 + size (device_id_GetDeviceButtonMapping x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_GetDeviceButtonMapping x)-               putSkip 3-               putSkip (requiredPadding size__)- -data GetDeviceButtonMappingReply = MkGetDeviceButtonMappingReply{map_size_GetDeviceButtonMappingReply-                                                                 :: Word8,-                                                                 map_GetDeviceButtonMappingReply ::-                                                                 [Word8]}-                                 deriving (Show, Typeable)- -instance Deserialize GetDeviceButtonMappingReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               map_size <- deserialize-               skip 23-               map <- deserializeList (fromIntegral map_size)-               let _ = isCard32 length-               return (MkGetDeviceButtonMappingReply map_size map)- -data SetDeviceButtonMapping = MkSetDeviceButtonMapping{device_id_SetDeviceButtonMapping-                                                       :: Word8,-                                                       map_size_SetDeviceButtonMapping :: Word8,-                                                       map_SetDeviceButtonMapping :: [Word8]}-                            deriving (Show, Typeable)- -instance ExtensionRequest SetDeviceButtonMapping where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 29-               let size__-                     = 4 + size (device_id_SetDeviceButtonMapping x) +-                         size (map_size_SetDeviceButtonMapping x)-                         + 2-                         + sum (map size (map_SetDeviceButtonMapping x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_SetDeviceButtonMapping x)-               serialize (map_size_SetDeviceButtonMapping x)-               putSkip 2-               serializeList (map_SetDeviceButtonMapping x)-               putSkip (requiredPadding size__)- -data SetDeviceButtonMappingReply = MkSetDeviceButtonMappingReply{status_SetDeviceButtonMappingReply-                                                                 :: Word8}-                                 deriving (Show, Typeable)- -instance Deserialize SetDeviceButtonMappingReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkSetDeviceButtonMappingReply status)- -data QueryDeviceState = MkQueryDeviceState{device_id_QueryDeviceState-                                           :: Word8}-                      deriving (Show, Typeable)- -instance ExtensionRequest QueryDeviceState where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 30-               let size__ = 4 + size (device_id_QueryDeviceState x) + 3-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_QueryDeviceState x)-               putSkip 3-               putSkip (requiredPadding size__)- -data QueryDeviceStateReply = MkQueryDeviceStateReply{num_classes_QueryDeviceStateReply-                                                     :: Word8}-                           deriving (Show, Typeable)- -instance Deserialize QueryDeviceStateReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               num_classes <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkQueryDeviceStateReply num_classes)- -data InputState = MkInputState{class_id_InputState :: Word8,-                               len_InputState :: Word8, num_items_InputState :: Word8}-                deriving (Show, Typeable)- -instance Serialize InputState where-        serialize x-          = do serialize (class_id_InputState x)-               serialize (len_InputState x)-               serialize (num_items_InputState x)-        size x-          = size (class_id_InputState x) + size (len_InputState x) +-              size (num_items_InputState x)- -instance Deserialize InputState where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               num_items <- deserialize-               return (MkInputState class_id len num_items)- -data KeyState = MkKeyState{class_id_KeyState :: Word8,-                           len_KeyState :: Word8, num_keys_KeyState :: Word8,-                           keys_KeyState :: [Word8]}-              deriving (Show, Typeable)- -instance Serialize KeyState where-        serialize x-          = do serialize (class_id_KeyState x)-               serialize (len_KeyState x)-               serialize (num_keys_KeyState x)-               putSkip 1-               serializeList (keys_KeyState x)-        size x-          = size (class_id_KeyState x) + size (len_KeyState x) +-              size (num_keys_KeyState x)-              + 1-              + sum (map size (keys_KeyState x))- -instance Deserialize KeyState where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               num_keys <- deserialize-               skip 1-               keys <- deserializeList (fromIntegral 32)-               return (MkKeyState class_id len num_keys keys)- -data ButtonState = MkButtonState{class_id_ButtonState :: Word8,-                                 len_ButtonState :: Word8, num_buttons_ButtonState :: Word8,-                                 buttons_ButtonState :: [Word8]}-                 deriving (Show, Typeable)- -instance Serialize ButtonState where-        serialize x-          = do serialize (class_id_ButtonState x)-               serialize (len_ButtonState x)-               serialize (num_buttons_ButtonState x)-               putSkip 1-               serializeList (buttons_ButtonState x)-        size x-          = size (class_id_ButtonState x) + size (len_ButtonState x) +-              size (num_buttons_ButtonState x)-              + 1-              + sum (map size (buttons_ButtonState x))- -instance Deserialize ButtonState where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               num_buttons <- deserialize-               skip 1-               buttons <- deserializeList (fromIntegral 32)-               return (MkButtonState class_id len num_buttons buttons)- -data ValuatorState = MkValuatorState{class_id_ValuatorState ::-                                     Word8,-                                     len_ValuatorState :: Word8,-                                     num_valuators_ValuatorState :: Word8,-                                     mode_ValuatorState :: Word8,-                                     valuators_ValuatorState :: [Word32]}-                   deriving (Show, Typeable)- -instance Serialize ValuatorState where-        serialize x-          = do serialize (class_id_ValuatorState x)-               serialize (len_ValuatorState x)-               serialize (num_valuators_ValuatorState x)-               serialize (mode_ValuatorState x)-               serializeList (valuators_ValuatorState x)-        size x-          = size (class_id_ValuatorState x) + size (len_ValuatorState x) +-              size (num_valuators_ValuatorState x)-              + size (mode_ValuatorState x)-              + sum (map size (valuators_ValuatorState x))- -instance Deserialize ValuatorState where-        deserialize-          = do class_id <- deserialize-               len <- deserialize-               num_valuators <- deserialize-               mode <- deserialize-               valuators <- deserializeList (fromIntegral num_valuators)-               return (MkValuatorState class_id len num_valuators mode valuators)- -data SendExtensionEvent = MkSendExtensionEvent{destination_SendExtensionEvent-                                               :: WINDOW,-                                               device_id_SendExtensionEvent :: Word8,-                                               propagate_SendExtensionEvent :: Bool,-                                               num_classes_SendExtensionEvent :: Word16,-                                               num_events_SendExtensionEvent :: Word8,-                                               events_SendExtensionEvent :: [CChar],-                                               classes_SendExtensionEvent :: [EventClass]}-                        deriving (Show, Typeable)- -instance ExtensionRequest SendExtensionEvent where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 31-               let size__-                     = 4 + size (destination_SendExtensionEvent x) +-                         size (device_id_SendExtensionEvent x)-                         + size (propagate_SendExtensionEvent x)-                         + size (num_classes_SendExtensionEvent x)-                         + size (num_events_SendExtensionEvent x)-                         + 3-                         + sum (map size (events_SendExtensionEvent x))-                         + sum (map size (classes_SendExtensionEvent x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (destination_SendExtensionEvent x)-               serialize (device_id_SendExtensionEvent x)-               serialize (propagate_SendExtensionEvent x)-               serialize (num_classes_SendExtensionEvent x)-               serialize (num_events_SendExtensionEvent x)-               putSkip 3-               serializeList (events_SendExtensionEvent x)-               serializeList (classes_SendExtensionEvent x)-               putSkip (requiredPadding size__)- -data DeviceBell = MkDeviceBell{device_id_DeviceBell :: Word8,-                               feedback_id_DeviceBell :: Word8,-                               feedback_class_DeviceBell :: Word8, percent_DeviceBell :: Int8}-                deriving (Show, Typeable)- -instance ExtensionRequest DeviceBell where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 32-               let size__-                     = 4 + size (device_id_DeviceBell x) +-                         size (feedback_id_DeviceBell x)-                         + size (feedback_class_DeviceBell x)-                         + size (percent_DeviceBell x)-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_DeviceBell x)-               serialize (feedback_id_DeviceBell x)-               serialize (feedback_class_DeviceBell x)-               serialize (percent_DeviceBell x)-               putSkip (requiredPadding size__)- -data SetDeviceValuators = MkSetDeviceValuators{device_id_SetDeviceValuators-                                               :: Word8,-                                               first_valuator_SetDeviceValuators :: Word8,-                                               num_valuators_SetDeviceValuators :: Word8,-                                               valuators_SetDeviceValuators :: [Int32]}-                        deriving (Show, Typeable)- -instance ExtensionRequest SetDeviceValuators where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 33-               let size__-                     = 4 + size (device_id_SetDeviceValuators x) +-                         size (first_valuator_SetDeviceValuators x)-                         + size (num_valuators_SetDeviceValuators x)-                         + 1-                         + sum (map size (valuators_SetDeviceValuators x))-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (device_id_SetDeviceValuators x)-               serialize (first_valuator_SetDeviceValuators x)-               serialize (num_valuators_SetDeviceValuators x)-               putSkip 1-               serializeList (valuators_SetDeviceValuators x)-               putSkip (requiredPadding size__)- -data SetDeviceValuatorsReply = MkSetDeviceValuatorsReply{status_SetDeviceValuatorsReply-                                                         :: Word8}-                             deriving (Show, Typeable)- -instance Deserialize SetDeviceValuatorsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkSetDeviceValuatorsReply status)- -data GetDeviceControl = MkGetDeviceControl{control_id_GetDeviceControl-                                           :: Word16,-                                           device_id_GetDeviceControl :: Word8}-                      deriving (Show, Typeable)- -instance ExtensionRequest GetDeviceControl where-        extensionId _ = "XInputExtension"-        serializeRequest x extOpCode-          = do putWord8 extOpCode-               putWord8 34-               let size__-                     = 4 + size (control_id_GetDeviceControl x) +-                         size (device_id_GetDeviceControl x)-                         + 1-               serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (control_id_GetDeviceControl x)-               serialize (device_id_GetDeviceControl x)-               putSkip 1-               putSkip (requiredPadding size__)- -data GetDeviceControlReply = MkGetDeviceControlReply{status_GetDeviceControlReply-                                                     :: Word8}-                           deriving (Show, Typeable)- -instance Deserialize GetDeviceControlReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               status <- deserialize-               skip 23-               let _ = isCard32 length-               return (MkGetDeviceControlReply status)- -data DeviceState = MkDeviceState{control_id_DeviceState :: Word16,-                                 len_DeviceState :: Word16}-                 deriving (Show, Typeable)- -instance Serialize DeviceState where-        serialize x-          = do serialize (control_id_DeviceState x)-               serialize (len_DeviceState x)-        size x = size (control_id_DeviceState x) + size (len_DeviceState x)- -instance Deserialize DeviceState where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               return (MkDeviceState control_id len)- -data DeviceResolutionState = MkDeviceResolutionState{control_id_DeviceResolutionState-                                                     :: Word16,-                                                     len_DeviceResolutionState :: Word16,-                                                     num_valuators_DeviceResolutionState :: Word32,-                                                     resolution_values_DeviceResolutionState ::-                                                     [Word32],-                                                     resolution_min_DeviceResolutionState ::-                                                     [Word32],-                                                     resolution_max_DeviceResolutionState ::-                                                     [Word32]}-                           deriving (Show, Typeable)- -instance Serialize DeviceResolutionState where-        serialize x-          = do serialize (control_id_DeviceResolutionState x)-               serialize (len_DeviceResolutionState x)-               serialize (num_valuators_DeviceResolutionState x)-               serializeList (resolution_values_DeviceResolutionState x)-               serializeList (resolution_min_DeviceResolutionState x)-               serializeList (resolution_max_DeviceResolutionState x)-        size x-          = size (control_id_DeviceResolutionState x) +-              size (len_DeviceResolutionState x)-              + size (num_valuators_DeviceResolutionState x)-              + sum (map size (resolution_values_DeviceResolutionState x))-              + sum (map size (resolution_min_DeviceResolutionState x))-              + sum (map size (resolution_max_DeviceResolutionState x))- -instance Deserialize DeviceResolutionState where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               num_valuators <- deserialize-               resolution_values <- deserializeList (fromIntegral num_valuators)-               resolution_min <- deserializeList (fromIntegral num_valuators)-               resolution_max <- deserializeList (fromIntegral num_valuators)-               return-                 (MkDeviceResolutionState control_id len num_valuators-                    resolution_values-                    resolution_min-                    resolution_max)- -data DeviceAbsCalibState = MkDeviceAbsCalibState{control_id_DeviceAbsCalibState-                                                 :: Word16,-                                                 len_DeviceAbsCalibState :: Word16,-                                                 min_x_DeviceAbsCalibState :: Int32,-                                                 max_x_DeviceAbsCalibState :: Int32,-                                                 min_y_DeviceAbsCalibState :: Int32,-                                                 max_y_DeviceAbsCalibState :: Int32,-                                                 flip_x_DeviceAbsCalibState :: Word32,-                                                 flip_y_DeviceAbsCalibState :: Word32,-                                                 rotation_DeviceAbsCalibState :: Word32,-                                                 button_threshold_DeviceAbsCalibState :: Word32}-                         deriving (Show, Typeable)- -instance Serialize DeviceAbsCalibState where-        serialize x-          = do serialize (control_id_DeviceAbsCalibState x)-               serialize (len_DeviceAbsCalibState x)-               serialize (min_x_DeviceAbsCalibState x)-               serialize (max_x_DeviceAbsCalibState x)-               serialize (min_y_DeviceAbsCalibState x)-               serialize (max_y_DeviceAbsCalibState x)-               serialize (flip_x_DeviceAbsCalibState x)-               serialize (flip_y_DeviceAbsCalibState x)-               serialize (rotation_DeviceAbsCalibState x)-               serialize (button_threshold_DeviceAbsCalibState x)-        size x-          = size (control_id_DeviceAbsCalibState x) +-              size (len_DeviceAbsCalibState x)-              + size (min_x_DeviceAbsCalibState x)-              + size (max_x_DeviceAbsCalibState x)-              + size (min_y_DeviceAbsCalibState x)-              + size (max_y_DeviceAbsCalibState x)-              + size (flip_x_DeviceAbsCalibState x)-              + size (flip_y_DeviceAbsCalibState x)-              + size (rotation_DeviceAbsCalibState x)-              + size (button_threshold_DeviceAbsCalibState x)- -instance Deserialize DeviceAbsCalibState where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               min_x <- deserialize-               max_x <- deserialize-               min_y <- deserialize-               max_y <- deserialize-               flip_x <- deserialize-               flip_y <- deserialize-               rotation <- deserialize-               button_threshold <- deserialize-               return-                 (MkDeviceAbsCalibState control_id len min_x max_x min_y max_y-                    flip_x-                    flip_y-                    rotation-                    button_threshold)- -data DeviceAbsAreaState = MkDeviceAbsAreaState{control_id_DeviceAbsAreaState-                                               :: Word16,-                                               len_DeviceAbsAreaState :: Word16,-                                               offset_x_DeviceAbsAreaState :: Word32,-                                               offset_y_DeviceAbsAreaState :: Word32,-                                               width_DeviceAbsAreaState :: Word32,-                                               height_DeviceAbsAreaState :: Word32,-                                               screen_DeviceAbsAreaState :: Word32,-                                               following_DeviceAbsAreaState :: Word32}-                        deriving (Show, Typeable)- -instance Serialize DeviceAbsAreaState where-        serialize x-          = do serialize (control_id_DeviceAbsAreaState x)-               serialize (len_DeviceAbsAreaState x)-               serialize (offset_x_DeviceAbsAreaState x)-               serialize (offset_y_DeviceAbsAreaState x)-               serialize (width_DeviceAbsAreaState x)-               serialize (height_DeviceAbsAreaState x)-               serialize (screen_DeviceAbsAreaState x)-               serialize (following_DeviceAbsAreaState x)-        size x-          = size (control_id_DeviceAbsAreaState x) +-              size (len_DeviceAbsAreaState x)-              + size (offset_x_DeviceAbsAreaState x)-              + size (offset_y_DeviceAbsAreaState x)-              + size (width_DeviceAbsAreaState x)-              + size (height_DeviceAbsAreaState x)-              + size (screen_DeviceAbsAreaState x)-              + size (following_DeviceAbsAreaState x)- -instance Deserialize DeviceAbsAreaState where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               offset_x <- deserialize-               offset_y <- deserialize-               width <- deserialize-               height <- deserialize-               screen <- deserialize-               following <- deserialize-               return-                 (MkDeviceAbsAreaState control_id len offset_x offset_y width height-                    screen-                    following)- -data DeviceCoreState = MkDeviceCoreState{control_id_DeviceCoreState-                                         :: Word16,-                                         len_DeviceCoreState :: Word16,-                                         status_DeviceCoreState :: Word8,-                                         iscore_DeviceCoreState :: Word8}-                     deriving (Show, Typeable)- -instance Serialize DeviceCoreState where-        serialize x-          = do serialize (control_id_DeviceCoreState x)-               serialize (len_DeviceCoreState x)-               serialize (status_DeviceCoreState x)-               serialize (iscore_DeviceCoreState x)-               putSkip 2-        size x-          = size (control_id_DeviceCoreState x) +-              size (len_DeviceCoreState x)-              + size (status_DeviceCoreState x)-              + size (iscore_DeviceCoreState x)-              + 2- -instance Deserialize DeviceCoreState where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               status <- deserialize-               iscore <- deserialize-               skip 2-               return (MkDeviceCoreState control_id len status iscore)- -data DeviceEnableState = MkDeviceEnableState{control_id_DeviceEnableState-                                             :: Word16,-                                             len_DeviceEnableState :: Word16,-                                             enable_DeviceEnableState :: Word8}-                       deriving (Show, Typeable)- -instance Serialize DeviceEnableState where-        serialize x-          = do serialize (control_id_DeviceEnableState x)-               serialize (len_DeviceEnableState x)-               serialize (enable_DeviceEnableState x)-               putSkip 3-        size x-          = size (control_id_DeviceEnableState x) +-              size (len_DeviceEnableState x)-              + size (enable_DeviceEnableState x)-              + 3- -instance Deserialize DeviceEnableState where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               enable <- deserialize-               skip 3-               return (MkDeviceEnableState control_id len enable)- -data DeviceCtl = MkDeviceCtl{control_id_DeviceCtl :: Word16,-                             len_DeviceCtl :: Word16}-               deriving (Show, Typeable)- -instance Serialize DeviceCtl where-        serialize x-          = do serialize (control_id_DeviceCtl x)-               serialize (len_DeviceCtl x)-        size x = size (control_id_DeviceCtl x) + size (len_DeviceCtl x)- -instance Deserialize DeviceCtl where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               return (MkDeviceCtl control_id len)- -data DeviceResolutionCtl = MkDeviceResolutionCtl{control_id_DeviceResolutionCtl-                                                 :: Word16,-                                                 len_DeviceResolutionCtl :: Word16,-                                                 first_valuator_DeviceResolutionCtl :: Word8,-                                                 num_valuators_DeviceResolutionCtl :: Word8,-                                                 resolution_values_DeviceResolutionCtl :: [Word32]}-                         deriving (Show, Typeable)- -instance Serialize DeviceResolutionCtl where-        serialize x-          = do serialize (control_id_DeviceResolutionCtl x)-               serialize (len_DeviceResolutionCtl x)-               serialize (first_valuator_DeviceResolutionCtl x)-               serialize (num_valuators_DeviceResolutionCtl x)-               serializeList (resolution_values_DeviceResolutionCtl x)-        size x-          = size (control_id_DeviceResolutionCtl x) +-              size (len_DeviceResolutionCtl x)-              + size (first_valuator_DeviceResolutionCtl x)-              + size (num_valuators_DeviceResolutionCtl x)-              + sum (map size (resolution_values_DeviceResolutionCtl x))- -instance Deserialize DeviceResolutionCtl where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               first_valuator <- deserialize-               num_valuators <- deserialize-               resolution_values <- deserializeList (fromIntegral num_valuators)-               return-                 (MkDeviceResolutionCtl control_id len first_valuator num_valuators-                    resolution_values)- -data DeviceAbsCalibCtl = MkDeviceAbsCalibCtl{control_id_DeviceAbsCalibCtl-                                             :: Word16,-                                             len_DeviceAbsCalibCtl :: Word16,-                                             min_x_DeviceAbsCalibCtl :: Int32,-                                             max_x_DeviceAbsCalibCtl :: Int32,-                                             min_y_DeviceAbsCalibCtl :: Int32,-                                             max_y_DeviceAbsCalibCtl :: Int32,-                                             flip_x_DeviceAbsCalibCtl :: Word32,-                                             flip_y_DeviceAbsCalibCtl :: Word32,-                                             rotation_DeviceAbsCalibCtl :: Word32,-                                             button_threshold_DeviceAbsCalibCtl :: Word32}-                       deriving (Show, Typeable)- -instance Serialize DeviceAbsCalibCtl where-        serialize x-          = do serialize (control_id_DeviceAbsCalibCtl x)-               serialize (len_DeviceAbsCalibCtl x)-               serialize (min_x_DeviceAbsCalibCtl x)-               serialize (max_x_DeviceAbsCalibCtl x)-               serialize (min_y_DeviceAbsCalibCtl x)-               serialize (max_y_DeviceAbsCalibCtl x)-               serialize (flip_x_DeviceAbsCalibCtl x)-               serialize (flip_y_DeviceAbsCalibCtl x)-               serialize (rotation_DeviceAbsCalibCtl x)-               serialize (button_threshold_DeviceAbsCalibCtl x)-        size x-          = size (control_id_DeviceAbsCalibCtl x) +-              size (len_DeviceAbsCalibCtl x)-              + size (min_x_DeviceAbsCalibCtl x)-              + size (max_x_DeviceAbsCalibCtl x)-              + size (min_y_DeviceAbsCalibCtl x)-              + size (max_y_DeviceAbsCalibCtl x)-              + size (flip_x_DeviceAbsCalibCtl x)-              + size (flip_y_DeviceAbsCalibCtl x)-              + size (rotation_DeviceAbsCalibCtl x)-              + size (button_threshold_DeviceAbsCalibCtl x)- -instance Deserialize DeviceAbsCalibCtl where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               min_x <- deserialize-               max_x <- deserialize-               min_y <- deserialize-               max_y <- deserialize-               flip_x <- deserialize-               flip_y <- deserialize-               rotation <- deserialize-               button_threshold <- deserialize-               return-                 (MkDeviceAbsCalibCtl control_id len min_x max_x min_y max_y flip_x-                    flip_y-                    rotation-                    button_threshold)- -data DeviceAbsAreaCtrl = MkDeviceAbsAreaCtrl{control_id_DeviceAbsAreaCtrl-                                             :: Word16,-                                             len_DeviceAbsAreaCtrl :: Word16,-                                             offset_x_DeviceAbsAreaCtrl :: Word32,-                                             offset_y_DeviceAbsAreaCtrl :: Word32,-                                             width_DeviceAbsAreaCtrl :: Int32,-                                             height_DeviceAbsAreaCtrl :: Int32,-                                             screen_DeviceAbsAreaCtrl :: Int32,-                                             following_DeviceAbsAreaCtrl :: Word32}-                       deriving (Show, Typeable)- -instance Serialize DeviceAbsAreaCtrl where-        serialize x-          = do serialize (control_id_DeviceAbsAreaCtrl x)-               serialize (len_DeviceAbsAreaCtrl x)-               serialize (offset_x_DeviceAbsAreaCtrl x)-               serialize (offset_y_DeviceAbsAreaCtrl x)-               serialize (width_DeviceAbsAreaCtrl x)-               serialize (height_DeviceAbsAreaCtrl x)-               serialize (screen_DeviceAbsAreaCtrl x)-               serialize (following_DeviceAbsAreaCtrl x)-        size x-          = size (control_id_DeviceAbsAreaCtrl x) +-              size (len_DeviceAbsAreaCtrl x)-              + size (offset_x_DeviceAbsAreaCtrl x)-              + size (offset_y_DeviceAbsAreaCtrl x)-              + size (width_DeviceAbsAreaCtrl x)-              + size (height_DeviceAbsAreaCtrl x)-              + size (screen_DeviceAbsAreaCtrl x)-              + size (following_DeviceAbsAreaCtrl x)- -instance Deserialize DeviceAbsAreaCtrl where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               offset_x <- deserialize-               offset_y <- deserialize-               width <- deserialize-               height <- deserialize-               screen <- deserialize-               following <- deserialize-               return-                 (MkDeviceAbsAreaCtrl control_id len offset_x offset_y width height-                    screen-                    following)- -data DeviceCoreCtrl = MkDeviceCoreCtrl{control_id_DeviceCoreCtrl ::-                                       Word16,-                                       len_DeviceCoreCtrl :: Word16, status_DeviceCoreCtrl :: Word8}-                    deriving (Show, Typeable)- -instance Serialize DeviceCoreCtrl where-        serialize x-          = do serialize (control_id_DeviceCoreCtrl x)-               serialize (len_DeviceCoreCtrl x)-               serialize (status_DeviceCoreCtrl x)-               putSkip 3-        size x-          = size (control_id_DeviceCoreCtrl x) + size (len_DeviceCoreCtrl x)-              + size (status_DeviceCoreCtrl x)-              + 3- -instance Deserialize DeviceCoreCtrl where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               status <- deserialize-               skip 3-               return (MkDeviceCoreCtrl control_id len status)- -data DeviceEnableCtrl = MkDeviceEnableCtrl{control_id_DeviceEnableCtrl-                                           :: Word16,-                                           len_DeviceEnableCtrl :: Word16,-                                           enable_DeviceEnableCtrl :: Word8}-                      deriving (Show, Typeable)- -instance Serialize DeviceEnableCtrl where-        serialize x-          = do serialize (control_id_DeviceEnableCtrl x)-               serialize (len_DeviceEnableCtrl x)-               serialize (enable_DeviceEnableCtrl x)-               putSkip 3-        size x-          = size (control_id_DeviceEnableCtrl x) +-              size (len_DeviceEnableCtrl x)-              + size (enable_DeviceEnableCtrl x)-              + 3- -instance Deserialize DeviceEnableCtrl where-        deserialize-          = do control_id <- deserialize-               len <- deserialize-               enable <- deserialize-               skip 3-               return (MkDeviceEnableCtrl control_id len enable)- -data DeviceValuator = MkDeviceValuator{device_id_DeviceValuator ::-                                       Word8,-                                       device_state_DeviceValuator :: Word16,-                                       num_valuators_DeviceValuator :: Word8,-                                       first_valuator_DeviceValuator :: Word8,-                                       valuators_DeviceValuator :: [Int32]}-                    deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceValuator- -instance Deserialize DeviceValuator where-        deserialize-          = do skip 1-               device_id <- deserialize-               skip 2-               device_state <- deserialize-               num_valuators <- deserialize-               first_valuator <- deserialize-               valuators <- deserializeList (fromIntegral 6)-               return-                 (MkDeviceValuator device_id device_state num_valuators-                    first_valuator-                    valuators)- -data DeviceKeyPress = MkDeviceKeyPress{detail_DeviceKeyPress ::-                                       Word8,-                                       time_DeviceKeyPress :: TIMESTAMP,-                                       root_DeviceKeyPress :: WINDOW,-                                       event_DeviceKeyPress :: WINDOW,-                                       child_DeviceKeyPress :: WINDOW,-                                       root_x_DeviceKeyPress :: Int16,-                                       root_y_DeviceKeyPress :: Int16,-                                       event_x_DeviceKeyPress :: Int16,-                                       event_y_DeviceKeyPress :: Int16,-                                       state_DeviceKeyPress :: Word16,-                                       same_screen_DeviceKeyPress :: Bool,-                                       device_id_DeviceKeyPress :: Word8}-                    deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceKeyPress- -instance Deserialize DeviceKeyPress where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkDeviceKeyPress detail time root event child root_x root_y-                    event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data DeviceKeyRelease = MkDeviceKeyRelease{detail_DeviceKeyRelease-                                           :: Word8,-                                           time_DeviceKeyRelease :: TIMESTAMP,-                                           root_DeviceKeyRelease :: WINDOW,-                                           event_DeviceKeyRelease :: WINDOW,-                                           child_DeviceKeyRelease :: WINDOW,-                                           root_x_DeviceKeyRelease :: Int16,-                                           root_y_DeviceKeyRelease :: Int16,-                                           event_x_DeviceKeyRelease :: Int16,-                                           event_y_DeviceKeyRelease :: Int16,-                                           state_DeviceKeyRelease :: Word16,-                                           same_screen_DeviceKeyRelease :: Bool,-                                           device_id_DeviceKeyRelease :: Word8}-                      deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceKeyRelease- -instance Deserialize DeviceKeyRelease where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkDeviceKeyRelease detail time root event child root_x root_y-                    event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data DeviceButtonPress = MkDeviceButtonPress{detail_DeviceButtonPress-                                             :: Word8,-                                             time_DeviceButtonPress :: TIMESTAMP,-                                             root_DeviceButtonPress :: WINDOW,-                                             event_DeviceButtonPress :: WINDOW,-                                             child_DeviceButtonPress :: WINDOW,-                                             root_x_DeviceButtonPress :: Int16,-                                             root_y_DeviceButtonPress :: Int16,-                                             event_x_DeviceButtonPress :: Int16,-                                             event_y_DeviceButtonPress :: Int16,-                                             state_DeviceButtonPress :: Word16,-                                             same_screen_DeviceButtonPress :: Bool,-                                             device_id_DeviceButtonPress :: Word8}-                       deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceButtonPress- -instance Deserialize DeviceButtonPress where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkDeviceButtonPress detail time root event child root_x root_y-                    event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data DeviceButtonRelease = MkDeviceButtonRelease{detail_DeviceButtonRelease-                                                 :: Word8,-                                                 time_DeviceButtonRelease :: TIMESTAMP,-                                                 root_DeviceButtonRelease :: WINDOW,-                                                 event_DeviceButtonRelease :: WINDOW,-                                                 child_DeviceButtonRelease :: WINDOW,-                                                 root_x_DeviceButtonRelease :: Int16,-                                                 root_y_DeviceButtonRelease :: Int16,-                                                 event_x_DeviceButtonRelease :: Int16,-                                                 event_y_DeviceButtonRelease :: Int16,-                                                 state_DeviceButtonRelease :: Word16,-                                                 same_screen_DeviceButtonRelease :: Bool,-                                                 device_id_DeviceButtonRelease :: Word8}-                         deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceButtonRelease- -instance Deserialize DeviceButtonRelease where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkDeviceButtonRelease detail time root event child root_x root_y-                    event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data DeviceMotionNotify = MkDeviceMotionNotify{detail_DeviceMotionNotify-                                               :: Word8,-                                               time_DeviceMotionNotify :: TIMESTAMP,-                                               root_DeviceMotionNotify :: WINDOW,-                                               event_DeviceMotionNotify :: WINDOW,-                                               child_DeviceMotionNotify :: WINDOW,-                                               root_x_DeviceMotionNotify :: Int16,-                                               root_y_DeviceMotionNotify :: Int16,-                                               event_x_DeviceMotionNotify :: Int16,-                                               event_y_DeviceMotionNotify :: Int16,-                                               state_DeviceMotionNotify :: Word16,-                                               same_screen_DeviceMotionNotify :: Bool,-                                               device_id_DeviceMotionNotify :: Word8}-                        deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceMotionNotify- -instance Deserialize DeviceMotionNotify where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkDeviceMotionNotify detail time root event child root_x root_y-                    event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data ProximityIn = MkProximityIn{detail_ProximityIn :: Word8,-                                 time_ProximityIn :: TIMESTAMP, root_ProximityIn :: WINDOW,-                                 event_ProximityIn :: WINDOW, child_ProximityIn :: WINDOW,-                                 root_x_ProximityIn :: Int16, root_y_ProximityIn :: Int16,-                                 event_x_ProximityIn :: Int16, event_y_ProximityIn :: Int16,-                                 state_ProximityIn :: Word16, same_screen_ProximityIn :: Bool,-                                 device_id_ProximityIn :: Word8}-                 deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ProximityIn- -instance Deserialize ProximityIn where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkProximityIn detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data ProximityOut = MkProximityOut{detail_ProximityOut :: Word8,-                                   time_ProximityOut :: TIMESTAMP, root_ProximityOut :: WINDOW,-                                   event_ProximityOut :: WINDOW, child_ProximityOut :: WINDOW,-                                   root_x_ProximityOut :: Int16, root_y_ProximityOut :: Int16,-                                   event_x_ProximityOut :: Int16, event_y_ProximityOut :: Int16,-                                   state_ProximityOut :: Word16, same_screen_ProximityOut :: Bool,-                                   device_id_ProximityOut :: Word8}-                  deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ProximityOut- -instance Deserialize ProximityOut where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkProximityOut detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data FocusIn = MkFocusIn{detail_FocusIn :: Word8,-                         time_FocusIn :: TIMESTAMP, window_FocusIn :: WINDOW,-                         mode_FocusIn :: Word8, device_id_FocusIn :: Word8}-             deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event FocusIn- -instance Deserialize FocusIn where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               window <- deserialize-               mode <- deserialize-               device_id <- deserialize-               skip 18-               return (MkFocusIn detail time window mode device_id)- -data FocusOut = MkFocusOut{detail_FocusOut :: Word8,-                           time_FocusOut :: TIMESTAMP, root_FocusOut :: WINDOW,-                           event_FocusOut :: WINDOW, child_FocusOut :: WINDOW,-                           root_x_FocusOut :: Int16, root_y_FocusOut :: Int16,-                           event_x_FocusOut :: Int16, event_y_FocusOut :: Int16,-                           state_FocusOut :: Word16, same_screen_FocusOut :: Bool,-                           device_id_FocusOut :: Word8}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event FocusOut- -instance Deserialize FocusOut where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               device_id <- deserialize-               return-                 (MkFocusOut detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen-                    device_id)- -data DeviceStateNotify = MkDeviceStateNotify{device_id_DeviceStateNotify-                                             :: Word8,-                                             time_DeviceStateNotify :: TIMESTAMP,-                                             num_keys_DeviceStateNotify :: Word8,-                                             num_buttons_DeviceStateNotify :: Word8,-                                             num_valuators_DeviceStateNotify :: Word8,-                                             classes_reported_DeviceStateNotify :: Word8,-                                             buttons_DeviceStateNotify :: [Word8],-                                             keys_DeviceStateNotify :: [Word8],-                                             valuators_DeviceStateNotify :: [Word32]}-                       deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceStateNotify- -instance Deserialize DeviceStateNotify where-        deserialize-          = do skip 1-               device_id <- deserialize-               skip 2-               time <- deserialize-               num_keys <- deserialize-               num_buttons <- deserialize-               num_valuators <- deserialize-               classes_reported <- deserialize-               buttons <- deserializeList (fromIntegral 4)-               keys <- deserializeList (fromIntegral 4)-               valuators <- deserializeList (fromIntegral 3)-               return-                 (MkDeviceStateNotify device_id time num_keys num_buttons-                    num_valuators-                    classes_reported-                    buttons-                    keys-                    valuators)- -data DeviceMappingNotify = MkDeviceMappingNotify{device_id_DeviceMappingNotify-                                                 :: Word8,-                                                 request_DeviceMappingNotify :: Word8,-                                                 first_keycode_DeviceMappingNotify :: KeyCode,-                                                 count_DeviceMappingNotify :: Word8,-                                                 time_DeviceMappingNotify :: TIMESTAMP}-                         deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceMappingNotify- -instance Deserialize DeviceMappingNotify where-        deserialize-          = do skip 1-               device_id <- deserialize-               skip 2-               request <- deserialize-               first_keycode <- deserialize-               count <- deserialize-               skip 1-               time <- deserialize-               skip 20-               return-                 (MkDeviceMappingNotify device_id request first_keycode count time)- -data ChangeDeviceNotify = MkChangeDeviceNotify{device_id_ChangeDeviceNotify-                                               :: Word8,-                                               time_ChangeDeviceNotify :: TIMESTAMP,-                                               request_ChangeDeviceNotify :: Word8}-                        deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ChangeDeviceNotify- -instance Deserialize ChangeDeviceNotify where-        deserialize-          = do skip 1-               device_id <- deserialize-               skip 2-               time <- deserialize-               request <- deserialize-               skip 23-               return (MkChangeDeviceNotify device_id time request)- -data DeviceKeyStateNotify = MkDeviceKeyStateNotify{device_id_DeviceKeyStateNotify-                                                   :: Word8,-                                                   keys_DeviceKeyStateNotify :: [Word8]}-                          deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceKeyStateNotify- -instance Deserialize DeviceKeyStateNotify where-        deserialize-          = do skip 1-               device_id <- deserialize-               skip 2-               keys <- deserializeList (fromIntegral 28)-               return (MkDeviceKeyStateNotify device_id keys)- -data DeviceButtonStateNotify = MkDeviceButtonStateNotify{device_id_DeviceButtonStateNotify-                                                         :: Word8,-                                                         buttons_DeviceButtonStateNotify :: [Word8]}-                             deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DeviceButtonStateNotify- -instance Deserialize DeviceButtonStateNotify where-        deserialize-          = do skip 1-               device_id <- deserialize-               skip 2-               buttons <- deserializeList (fromIntegral 28)-               return (MkDeviceButtonStateNotify device_id buttons)- -data DevicePresenceNotify = MkDevicePresenceNotify{time_DevicePresenceNotify-                                                   :: TIMESTAMP,-                                                   devchange_DevicePresenceNotify :: Word8,-                                                   device_id_DevicePresenceNotify :: Word8,-                                                   control_DevicePresenceNotify :: Word16}-                          deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DevicePresenceNotify- -instance Deserialize DevicePresenceNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               time <- deserialize-               devchange <- deserialize-               device_id <- deserialize-               control <- deserialize-               skip 20-               return (MkDevicePresenceNotify time devchange device_id control)+        GetExtensionVersionReply(..), DeviceUse(..), DeviceInfo(..),+        ListInputDevices(..), ListInputDevicesReply(..), InputClass(..),+        InputInfo(..), KeyInfo(..), ButtonInfo(..), AxisInfo(..),+        ValuatorInfo(..), InputClassInfo(..), OpenDevice(..),+        OpenDeviceReply(..), CloseDevice(..), SetDeviceMode(..),+        SetDeviceModeReply(..), SelectExtensionEvent(..),+        GetSelectedExtensionEvents(..),+        GetSelectedExtensionEventsReply(..),+        ChangeDeviceDontPropagateList(..), GetDeviceDontPropagateList(..),+        GetDeviceDontPropagateListReply(..), GetDeviceMotionEvents(..),+        GetDeviceMotionEventsReply(..), DeviceTimeCoord(..),+        ChangeKeyboardDevice(..), ChangeKeyboardDeviceReply(..),+        ChangePointerDevice(..), ChangePointerDeviceReply(..),+        GrabDevice(..), GrabDeviceReply(..), UngrabDevice(..),+        GrabDeviceKey(..), UngrabDeviceKey(..), GrabDeviceButton(..),+        UngrabDeviceButton(..), DeviceInputMode(..), AllowDeviceEvents(..),+        GetDeviceFocus(..), GetDeviceFocusReply(..), SetDeviceFocus(..),+        GetFeedbackControl(..), GetFeedbackControlReply(..),+        FeedbackClass(..), FeedbackState(..), KbdFeedbackState(..),+        PtrFeedbackState(..), IntegerFeedbackState(..),+        StringFeedbackState(..), BellFeedbackState(..),+        LedFeedbackState(..), FeedbackCtl(..), KbdFeedbackCtl(..),+        PtrFeedbackCtl(..), IntegerFeedbackCtl(..), StringFeedbackCtl(..),+        BellFeedbackCtl(..), LedFeedbackCtl(..), GetDeviceKeyMapping(..),+        GetDeviceKeyMappingReply(..), ChangeDeviceKeyMapping(..),+        GetDeviceModifierMapping(..), GetDeviceModifierMappingReply(..),+        SetDeviceModifierMapping(..), SetDeviceModifierMappingReply(..),+        GetDeviceButtonMapping(..), GetDeviceButtonMappingReply(..),+        SetDeviceButtonMapping(..), SetDeviceButtonMappingReply(..),+        QueryDeviceState(..), QueryDeviceStateReply(..), InputState(..),+        KeyState(..), ButtonState(..), ValuatorState(..),+        SendExtensionEvent(..), DeviceBell(..), SetDeviceValuators(..),+        SetDeviceValuatorsReply(..), GetDeviceControl(..),+        GetDeviceControlReply(..), DeviceState(..),+        DeviceResolutionState(..), DeviceAbsCalibState(..),+        DeviceAbsAreaState(..), DeviceCoreState(..), DeviceEnableState(..),+        DeviceCtl(..), DeviceResolutionCtl(..), DeviceAbsCalibCtl(..),+        DeviceAbsAreaCtrl(..), DeviceCoreCtrl(..), DeviceEnableCtrl(..),+        DeviceValuatorEvent(..), DeviceKeyPressEvent(..),+        DeviceKeyReleaseEvent(..), DeviceButtonPressEvent(..),+        DeviceButtonReleaseEvent(..), DeviceMotionNotifyEvent(..),+        ProximityInEvent(..), ProximityOutEvent(..), FocusInEvent(..),+        FocusOutEvent(..), DeviceStateNotifyEvent(..),+        DeviceMappingNotifyEvent(..), ChangeDeviceNotifyEvent(..),+        DeviceKeyStateNotifyEvent(..), DeviceButtonStateNotifyEvent(..),+        DevicePresenceNotifyEvent(..))+       where+import Data.Word+import Data.Int+import Foreign.C.Types+import Data.Bits+import Data.Binary.Put+import Data.Binary.Get+import Data.Typeable+import Control.Monad+import Control.Exception+import Data.List+import Graphics.XHB.Shared hiding (Event, Error)+import qualified Graphics.XHB.Shared+import Graphics.XHB.Gen.Xproto.Types+       hiding (FocusInEvent(..), FocusOutEvent(..), deserializeError,+               deserializeEvent)+import qualified Graphics.XHB.Gen.Xproto.Types+ +deserializeError :: Word8 -> Maybe (Get SomeError)+deserializeError _ = Nothing+ +deserializeEvent :: Word8 -> Maybe (Get SomeEvent)+deserializeEvent 0+  = return (liftM toEvent (deserialize :: Get DeviceValuatorEvent))+deserializeEvent 1+  = return (liftM toEvent (deserialize :: Get DeviceKeyPressEvent))+deserializeEvent 2+  = return (liftM toEvent (deserialize :: Get DeviceKeyReleaseEvent))+deserializeEvent 3+  = return+      (liftM toEvent (deserialize :: Get DeviceButtonPressEvent))+deserializeEvent 4+  = return+      (liftM toEvent (deserialize :: Get DeviceButtonReleaseEvent))+deserializeEvent 5+  = return+      (liftM toEvent (deserialize :: Get DeviceMotionNotifyEvent))+deserializeEvent 8+  = return (liftM toEvent (deserialize :: Get ProximityInEvent))+deserializeEvent 9+  = return (liftM toEvent (deserialize :: Get ProximityOutEvent))+deserializeEvent 6+  = return (liftM toEvent (deserialize :: Get FocusInEvent))+deserializeEvent 7+  = return (liftM toEvent (deserialize :: Get FocusOutEvent))+deserializeEvent 10+  = return+      (liftM toEvent (deserialize :: Get DeviceStateNotifyEvent))+deserializeEvent 11+  = return+      (liftM toEvent (deserialize :: Get DeviceMappingNotifyEvent))+deserializeEvent 12+  = return+      (liftM toEvent (deserialize :: Get ChangeDeviceNotifyEvent))+deserializeEvent 13+  = return+      (liftM toEvent (deserialize :: Get DeviceKeyStateNotifyEvent))+deserializeEvent 14+  = return+      (liftM toEvent (deserialize :: Get DeviceButtonStateNotifyEvent))+deserializeEvent 15+  = return+      (liftM toEvent (deserialize :: Get DevicePresenceNotifyEvent))+deserializeEvent _ = Nothing+ +type KeyCode = Word8+ +type EventClass = Word32+ +data ValuatorMode = ValuatorModeRelative+                  | ValuatorModeAbsolute+                  deriving Show+ +instance SimpleEnum ValuatorMode where+        toValue ValuatorModeRelative{} = 0+        toValue ValuatorModeAbsolute{} = 1+        fromValue 0 = ValuatorModeRelative+        fromValue 1 = ValuatorModeAbsolute+ +data PropagateMode = PropagateModeAddToList+                   | PropagateModeDeleteFromList+                   deriving Show+ +instance SimpleEnum PropagateMode where+        toValue PropagateModeAddToList{} = 0+        toValue PropagateModeDeleteFromList{} = 1+        fromValue 0 = PropagateModeAddToList+        fromValue 1 = PropagateModeDeleteFromList+ +data GetExtensionVersion = MkGetExtensionVersion{name_len_GetExtensionVersion+                                                 :: Word16,+                                                 name_GetExtensionVersion :: [CChar]}+                         deriving (Show, Typeable)+ +instance ExtensionRequest GetExtensionVersion where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 1+               let size__+                     = 4 + size (name_len_GetExtensionVersion x) + 2 ++                         sum (map size (name_GetExtensionVersion x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (name_len_GetExtensionVersion x)+               putSkip 2+               serializeList (name_GetExtensionVersion x)+               putSkip (requiredPadding size__)+ +data GetExtensionVersionReply = MkGetExtensionVersionReply{server_major_GetExtensionVersionReply+                                                           :: Word16,+                                                           server_minor_GetExtensionVersionReply ::+                                                           Word16,+                                                           present_GetExtensionVersionReply :: Bool}+                              deriving (Show, Typeable)+ +instance Deserialize GetExtensionVersionReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               server_major <- deserialize+               server_minor <- deserialize+               present <- deserialize+               skip 19+               let _ = isCard32 length+               return+                 (MkGetExtensionVersionReply server_major server_minor present)+ +data DeviceUse = DeviceUseIsXPointer+               | DeviceUseIsXKeyboard+               | DeviceUseIsXExtensionDevice+               | DeviceUseIsXExtensionKeyboard+               | DeviceUseIsXExtensionPointer+               deriving Show+ +instance SimpleEnum DeviceUse where+        toValue DeviceUseIsXPointer{} = 0+        toValue DeviceUseIsXKeyboard{} = 1+        toValue DeviceUseIsXExtensionDevice{} = 2+        toValue DeviceUseIsXExtensionKeyboard{} = 3+        toValue DeviceUseIsXExtensionPointer{} = 4+        fromValue 0 = DeviceUseIsXPointer+        fromValue 1 = DeviceUseIsXKeyboard+        fromValue 2 = DeviceUseIsXExtensionDevice+        fromValue 3 = DeviceUseIsXExtensionKeyboard+        fromValue 4 = DeviceUseIsXExtensionPointer+ +data DeviceInfo = MkDeviceInfo{device_type_DeviceInfo :: ATOM,+                               device_id_DeviceInfo :: Word8, num_class_info_DeviceInfo :: Word8,+                               device_use_DeviceInfo :: DeviceUse}+                deriving (Show, Typeable)+ +instance Serialize DeviceInfo where+        serialize x+          = do serialize (device_type_DeviceInfo x)+               serialize (device_id_DeviceInfo x)+               serialize (num_class_info_DeviceInfo x)+               serialize (toValue (device_use_DeviceInfo x) :: Word8)+               putSkip 1+        size x+          = size (device_type_DeviceInfo x) + size (device_id_DeviceInfo x) ++              size (num_class_info_DeviceInfo x)+              + size (undefined :: Word8)+              + 1+ +instance Deserialize DeviceInfo where+        deserialize+          = do device_type <- deserialize+               device_id <- deserialize+               num_class_info <- deserialize+               device_use <- liftM fromValue (deserialize :: Get Word8)+               skip 1+               return+                 (MkDeviceInfo device_type device_id num_class_info device_use)+ +data ListInputDevices = MkListInputDevices{}+                      deriving (Show, Typeable)+ +instance ExtensionRequest ListInputDevices where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 2+               let size__ = 4+               serialize (convertBytesToRequestSize size__ :: Int16)+               putSkip (requiredPadding size__)+ +data ListInputDevicesReply = MkListInputDevicesReply{devices_len_ListInputDevicesReply+                                                     :: Word8,+                                                     devices_ListInputDevicesReply :: [DeviceInfo]}+                           deriving (Show, Typeable)+ +instance Deserialize ListInputDevicesReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               devices_len <- deserialize+               skip 23+               devices <- deserializeList (fromIntegral devices_len)+               let _ = isCard32 length+               return (MkListInputDevicesReply devices_len devices)+ +data InputClass = InputClassKey+                | InputClassButton+                | InputClassValuator+                | InputClassFeedback+                | InputClassProximity+                | InputClassFocus+                | InputClassOther+                deriving Show+ +instance SimpleEnum InputClass where+        toValue InputClassKey{} = 0+        toValue InputClassButton{} = 1+        toValue InputClassValuator{} = 2+        toValue InputClassFeedback{} = 3+        toValue InputClassProximity{} = 4+        toValue InputClassFocus{} = 5+        toValue InputClassOther{} = 6+        fromValue 0 = InputClassKey+        fromValue 1 = InputClassButton+        fromValue 2 = InputClassValuator+        fromValue 3 = InputClassFeedback+        fromValue 4 = InputClassProximity+        fromValue 5 = InputClassFocus+        fromValue 6 = InputClassOther+ +data InputInfo = MkInputInfo{class_id_InputInfo :: InputClass,+                             len_InputInfo :: Word8}+               deriving (Show, Typeable)+ +instance Serialize InputInfo where+        serialize x+          = do serialize (toValue (class_id_InputInfo x) :: Word8)+               serialize (len_InputInfo x)+        size x = size (undefined :: Word8) + size (len_InputInfo x)+ +instance Deserialize InputInfo where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               return (MkInputInfo class_id len)+ +data KeyInfo = MkKeyInfo{class_id_KeyInfo :: InputClass,+                         len_KeyInfo :: Word8, min_keycode_KeyInfo :: KeyCode,+                         max_keycode_KeyInfo :: KeyCode, num_keys_KeyInfo :: Word16}+             deriving (Show, Typeable)+ +instance Serialize KeyInfo where+        serialize x+          = do serialize (toValue (class_id_KeyInfo x) :: Word8)+               serialize (len_KeyInfo x)+               serialize (min_keycode_KeyInfo x)+               serialize (max_keycode_KeyInfo x)+               serialize (num_keys_KeyInfo x)+               putSkip 2+        size x+          = size (undefined :: Word8) + size (len_KeyInfo x) ++              size (min_keycode_KeyInfo x)+              + size (max_keycode_KeyInfo x)+              + size (num_keys_KeyInfo x)+              + 2+ +instance Deserialize KeyInfo where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               min_keycode <- deserialize+               max_keycode <- deserialize+               num_keys <- deserialize+               skip 2+               return (MkKeyInfo class_id len min_keycode max_keycode num_keys)+ +data ButtonInfo = MkButtonInfo{class_id_ButtonInfo :: InputClass,+                               len_ButtonInfo :: Word8, num_buttons_ButtonInfo :: Word16}+                deriving (Show, Typeable)+ +instance Serialize ButtonInfo where+        serialize x+          = do serialize (toValue (class_id_ButtonInfo x) :: Word8)+               serialize (len_ButtonInfo x)+               serialize (num_buttons_ButtonInfo x)+        size x+          = size (undefined :: Word8) + size (len_ButtonInfo x) ++              size (num_buttons_ButtonInfo x)+ +instance Deserialize ButtonInfo where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               num_buttons <- deserialize+               return (MkButtonInfo class_id len num_buttons)+ +data AxisInfo = MkAxisInfo{resolution_AxisInfo :: Word32,+                           minimum_AxisInfo :: Int32, maximum_AxisInfo :: Int32}+              deriving (Show, Typeable)+ +instance Serialize AxisInfo where+        serialize x+          = do serialize (resolution_AxisInfo x)+               serialize (minimum_AxisInfo x)+               serialize (maximum_AxisInfo x)+        size x+          = size (resolution_AxisInfo x) + size (minimum_AxisInfo x) ++              size (maximum_AxisInfo x)+ +instance Deserialize AxisInfo where+        deserialize+          = do resolution <- deserialize+               minimum <- deserialize+               maximum <- deserialize+               return (MkAxisInfo resolution minimum maximum)+ +data ValuatorInfo = MkValuatorInfo{class_id_ValuatorInfo ::+                                   InputClass,+                                   len_ValuatorInfo :: Word8, axes_len_ValuatorInfo :: Word8,+                                   mode_ValuatorInfo :: ValuatorMode,+                                   motion_size_ValuatorInfo :: Word32,+                                   axes_ValuatorInfo :: [AxisInfo]}+                  deriving (Show, Typeable)+ +instance Serialize ValuatorInfo where+        serialize x+          = do serialize (toValue (class_id_ValuatorInfo x) :: Word8)+               serialize (len_ValuatorInfo x)+               serialize (axes_len_ValuatorInfo x)+               serialize (toValue (mode_ValuatorInfo x) :: Word8)+               serialize (motion_size_ValuatorInfo x)+               serializeList (axes_ValuatorInfo x)+        size x+          = size (undefined :: Word8) + size (len_ValuatorInfo x) ++              size (axes_len_ValuatorInfo x)+              + size (undefined :: Word8)+              + size (motion_size_ValuatorInfo x)+              + sum (map size (axes_ValuatorInfo x))+ +instance Deserialize ValuatorInfo where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               axes_len <- deserialize+               mode <- liftM fromValue (deserialize :: Get Word8)+               motion_size <- deserialize+               axes <- deserializeList (fromIntegral axes_len)+               return (MkValuatorInfo class_id len axes_len mode motion_size axes)+ +data InputClassInfo = MkInputClassInfo{class_id_InputClassInfo ::+                                       InputClass,+                                       event_type_base_InputClassInfo :: Word8}+                    deriving (Show, Typeable)+ +instance Serialize InputClassInfo where+        serialize x+          = do serialize (toValue (class_id_InputClassInfo x) :: Word8)+               serialize (event_type_base_InputClassInfo x)+        size x+          = size (undefined :: Word8) ++              size (event_type_base_InputClassInfo x)+ +instance Deserialize InputClassInfo where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               event_type_base <- deserialize+               return (MkInputClassInfo class_id event_type_base)+ +data OpenDevice = MkOpenDevice{device_id_OpenDevice :: Word8}+                deriving (Show, Typeable)+ +instance ExtensionRequest OpenDevice where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 3+               let size__ = 4 + size (device_id_OpenDevice x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_OpenDevice x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data OpenDeviceReply = MkOpenDeviceReply{num_classes_OpenDeviceReply+                                         :: Word8,+                                         class_info_OpenDeviceReply :: [InputClassInfo]}+                     deriving (Show, Typeable)+ +instance Deserialize OpenDeviceReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               num_classes <- deserialize+               skip 23+               class_info <- deserializeList (fromIntegral num_classes)+               let _ = isCard32 length+               return (MkOpenDeviceReply num_classes class_info)+ +data CloseDevice = MkCloseDevice{device_id_CloseDevice :: Word8}+                 deriving (Show, Typeable)+ +instance ExtensionRequest CloseDevice where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 4+               let size__ = 4 + size (device_id_CloseDevice x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_CloseDevice x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data SetDeviceMode = MkSetDeviceMode{device_id_SetDeviceMode ::+                                     Word8,+                                     mode_SetDeviceMode :: ValuatorMode}+                   deriving (Show, Typeable)+ +instance ExtensionRequest SetDeviceMode where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 5+               let size__+                     = 4 + size (device_id_SetDeviceMode x) + size (undefined :: Word8)+                         + 2+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_SetDeviceMode x)+               serialize (toValue (mode_SetDeviceMode x) :: Word8)+               putSkip 2+               putSkip (requiredPadding size__)+ +data SetDeviceModeReply = MkSetDeviceModeReply{status_SetDeviceModeReply+                                               :: Word8}+                        deriving (Show, Typeable)+ +instance Deserialize SetDeviceModeReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- deserialize+               skip 23+               let _ = isCard32 length+               return (MkSetDeviceModeReply status)+ +data SelectExtensionEvent = MkSelectExtensionEvent{window_SelectExtensionEvent+                                                   :: WINDOW,+                                                   num_classes_SelectExtensionEvent :: Word16,+                                                   classes_SelectExtensionEvent :: [EventClass]}+                          deriving (Show, Typeable)+ +instance ExtensionRequest SelectExtensionEvent where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 6+               let size__+                     = 4 + size (window_SelectExtensionEvent x) ++                         size (num_classes_SelectExtensionEvent x)+                         + 2+                         + sum (map size (classes_SelectExtensionEvent x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_SelectExtensionEvent x)+               serialize (num_classes_SelectExtensionEvent x)+               putSkip 2+               serializeList (classes_SelectExtensionEvent x)+               putSkip (requiredPadding size__)+ +data GetSelectedExtensionEvents = MkGetSelectedExtensionEvents{window_GetSelectedExtensionEvents+                                                               :: WINDOW}+                                deriving (Show, Typeable)+ +instance ExtensionRequest GetSelectedExtensionEvents where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 7+               let size__ = 4 + size (window_GetSelectedExtensionEvents x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_GetSelectedExtensionEvents x)+               putSkip (requiredPadding size__)+ +data GetSelectedExtensionEventsReply = MkGetSelectedExtensionEventsReply{num_this_classes_GetSelectedExtensionEventsReply+                                                                         :: Word16,+                                                                         num_all_classes_GetSelectedExtensionEventsReply+                                                                         :: Word16,+                                                                         this_classes_GetSelectedExtensionEventsReply+                                                                         :: [EventClass],+                                                                         all_classes_GetSelectedExtensionEventsReply+                                                                         :: [EventClass]}+                                     deriving (Show, Typeable)+ +instance Deserialize GetSelectedExtensionEventsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               num_this_classes <- deserialize+               num_all_classes <- deserialize+               skip 20+               this_classes <- deserializeList (fromIntegral num_this_classes)+               all_classes <- deserializeList (fromIntegral num_all_classes)+               let _ = isCard32 length+               return+                 (MkGetSelectedExtensionEventsReply num_this_classes num_all_classes+                    this_classes+                    all_classes)+ +data ChangeDeviceDontPropagateList = MkChangeDeviceDontPropagateList{window_ChangeDeviceDontPropagateList+                                                                     :: WINDOW,+                                                                     num_classes_ChangeDeviceDontPropagateList+                                                                     :: Word16,+                                                                     mode_ChangeDeviceDontPropagateList+                                                                     :: PropagateMode,+                                                                     classes_ChangeDeviceDontPropagateList+                                                                     :: [EventClass]}+                                   deriving (Show, Typeable)+ +instance ExtensionRequest ChangeDeviceDontPropagateList where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 8+               let size__+                     = 4 + size (window_ChangeDeviceDontPropagateList x) ++                         size (num_classes_ChangeDeviceDontPropagateList x)+                         + size (undefined :: Word8)+                         + 1+                         + sum (map size (classes_ChangeDeviceDontPropagateList x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_ChangeDeviceDontPropagateList x)+               serialize (num_classes_ChangeDeviceDontPropagateList x)+               serialize (toValue (mode_ChangeDeviceDontPropagateList x) :: Word8)+               putSkip 1+               serializeList (classes_ChangeDeviceDontPropagateList x)+               putSkip (requiredPadding size__)+ +data GetDeviceDontPropagateList = MkGetDeviceDontPropagateList{window_GetDeviceDontPropagateList+                                                               :: WINDOW}+                                deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceDontPropagateList where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 9+               let size__ = 4 + size (window_GetDeviceDontPropagateList x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_GetDeviceDontPropagateList x)+               putSkip (requiredPadding size__)+ +data GetDeviceDontPropagateListReply = MkGetDeviceDontPropagateListReply{num_classes_GetDeviceDontPropagateListReply+                                                                         :: Word16,+                                                                         classes_GetDeviceDontPropagateListReply+                                                                         :: [EventClass]}+                                     deriving (Show, Typeable)+ +instance Deserialize GetDeviceDontPropagateListReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               num_classes <- deserialize+               skip 22+               classes <- deserializeList (fromIntegral num_classes)+               let _ = isCard32 length+               return (MkGetDeviceDontPropagateListReply num_classes classes)+ +data GetDeviceMotionEvents = MkGetDeviceMotionEvents{start_GetDeviceMotionEvents+                                                     :: TIMESTAMP,+                                                     stop_GetDeviceMotionEvents :: TIMESTAMP,+                                                     device_id_GetDeviceMotionEvents :: Word8}+                           deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceMotionEvents where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 10+               let size__+                     = 4 + size (start_GetDeviceMotionEvents x) ++                         size (stop_GetDeviceMotionEvents x)+                         + size (device_id_GetDeviceMotionEvents x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (start_GetDeviceMotionEvents x)+               serialize (stop_GetDeviceMotionEvents x)+               serialize (device_id_GetDeviceMotionEvents x)+               putSkip (requiredPadding size__)+ +data GetDeviceMotionEventsReply = MkGetDeviceMotionEventsReply{num_coords_GetDeviceMotionEventsReply+                                                               :: Word32,+                                                               num_axes_GetDeviceMotionEventsReply+                                                               :: Word8,+                                                               device_mode_GetDeviceMotionEventsReply+                                                               :: ValuatorMode}+                                deriving (Show, Typeable)+ +instance Deserialize GetDeviceMotionEventsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               num_coords <- deserialize+               num_axes <- deserialize+               device_mode <- liftM fromValue (deserialize :: Get Word8)+               skip 18+               let _ = isCard32 length+               return+                 (MkGetDeviceMotionEventsReply num_coords num_axes device_mode)+ +data DeviceTimeCoord = MkDeviceTimeCoord{time_DeviceTimeCoord ::+                                         TIMESTAMP}+                     deriving (Show, Typeable)+ +instance Serialize DeviceTimeCoord where+        serialize x = do serialize (time_DeviceTimeCoord x)+        size x = size (time_DeviceTimeCoord x)+ +instance Deserialize DeviceTimeCoord where+        deserialize+          = do time <- deserialize+               return (MkDeviceTimeCoord time)+ +data ChangeKeyboardDevice = MkChangeKeyboardDevice{device_id_ChangeKeyboardDevice+                                                   :: Word8}+                          deriving (Show, Typeable)+ +instance ExtensionRequest ChangeKeyboardDevice where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 11+               let size__ = 4 + size (device_id_ChangeKeyboardDevice x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_ChangeKeyboardDevice x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data ChangeKeyboardDeviceReply = MkChangeKeyboardDeviceReply{status_ChangeKeyboardDeviceReply+                                                             :: Word8}+                               deriving (Show, Typeable)+ +instance Deserialize ChangeKeyboardDeviceReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- deserialize+               skip 23+               let _ = isCard32 length+               return (MkChangeKeyboardDeviceReply status)+ +data ChangePointerDevice = MkChangePointerDevice{x_axis_ChangePointerDevice+                                                 :: Word8,+                                                 y_axis_ChangePointerDevice :: Word8,+                                                 device_id_ChangePointerDevice :: Word8}+                         deriving (Show, Typeable)+ +instance ExtensionRequest ChangePointerDevice where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 12+               let size__+                     = 4 + size (x_axis_ChangePointerDevice x) ++                         size (y_axis_ChangePointerDevice x)+                         + size (device_id_ChangePointerDevice x)+                         + 1+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (x_axis_ChangePointerDevice x)+               serialize (y_axis_ChangePointerDevice x)+               serialize (device_id_ChangePointerDevice x)+               putSkip 1+               putSkip (requiredPadding size__)+ +data ChangePointerDeviceReply = MkChangePointerDeviceReply{status_ChangePointerDeviceReply+                                                           :: Word8}+                              deriving (Show, Typeable)+ +instance Deserialize ChangePointerDeviceReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- deserialize+               skip 23+               let _ = isCard32 length+               return (MkChangePointerDeviceReply status)+ +data GrabDevice = MkGrabDevice{grab_window_GrabDevice :: WINDOW,+                               time_GrabDevice :: TIMESTAMP, num_classes_GrabDevice :: Word16,+                               this_device_mode_GrabDevice :: GrabMode,+                               other_device_mode_GrabDevice :: GrabMode,+                               owner_events_GrabDevice :: Bool, device_id_GrabDevice :: Word8,+                               classes_GrabDevice :: [EventClass]}+                deriving (Show, Typeable)+ +instance ExtensionRequest GrabDevice where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 13+               let size__+                     = 4 + size (grab_window_GrabDevice x) + size (time_GrabDevice x) ++                         size (num_classes_GrabDevice x)+                         + size (undefined :: Word8)+                         + size (undefined :: Word8)+                         + size (owner_events_GrabDevice x)+                         + size (device_id_GrabDevice x)+                         + 2+                         + sum (map size (classes_GrabDevice x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (grab_window_GrabDevice x)+               serialize (time_GrabDevice x)+               serialize (num_classes_GrabDevice x)+               serialize (toValue (this_device_mode_GrabDevice x) :: Word8)+               serialize (toValue (other_device_mode_GrabDevice x) :: Word8)+               serialize (owner_events_GrabDevice x)+               serialize (device_id_GrabDevice x)+               putSkip 2+               serializeList (classes_GrabDevice x)+               putSkip (requiredPadding size__)+ +data GrabDeviceReply = MkGrabDeviceReply{status_GrabDeviceReply ::+                                         GrabStatus}+                     deriving (Show, Typeable)+ +instance Deserialize GrabDeviceReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 23+               let _ = isCard32 length+               return (MkGrabDeviceReply status)+ +data UngrabDevice = MkUngrabDevice{time_UngrabDevice :: TIMESTAMP,+                                   device_id_UngrabDevice :: Word8}+                  deriving (Show, Typeable)+ +instance ExtensionRequest UngrabDevice where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 14+               let size__+                     = 4 + size (time_UngrabDevice x) + size (device_id_UngrabDevice x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (time_UngrabDevice x)+               serialize (device_id_UngrabDevice x)+               putSkip (requiredPadding size__)+ +data GrabDeviceKey = MkGrabDeviceKey{grab_window_GrabDeviceKey ::+                                     WINDOW,+                                     num_classes_GrabDeviceKey :: Word16,+                                     modifiers_GrabDeviceKey :: [ModMask],+                                     modifier_device_GrabDeviceKey :: Word8,+                                     grabbed_device_GrabDeviceKey :: Word8,+                                     key_GrabDeviceKey :: Word8,+                                     this_device_mode_GrabDeviceKey :: GrabMode,+                                     other_device_mode_GrabDeviceKey :: GrabMode,+                                     owner_events_GrabDeviceKey :: Bool,+                                     classes_GrabDeviceKey :: [EventClass]}+                   deriving (Show, Typeable)+ +instance ExtensionRequest GrabDeviceKey where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 15+               let size__+                     = 4 + size (grab_window_GrabDeviceKey x) ++                         size (num_classes_GrabDeviceKey x)+                         + size (undefined :: Word16)+                         + size (modifier_device_GrabDeviceKey x)+                         + size (grabbed_device_GrabDeviceKey x)+                         + size (key_GrabDeviceKey x)+                         + size (undefined :: Word8)+                         + size (undefined :: Word8)+                         + size (owner_events_GrabDeviceKey x)+                         + 2+                         + sum (map size (classes_GrabDeviceKey x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (grab_window_GrabDeviceKey x)+               serialize (num_classes_GrabDeviceKey x)+               serialize (toMask (modifiers_GrabDeviceKey x) :: Word16)+               serialize (modifier_device_GrabDeviceKey x)+               serialize (grabbed_device_GrabDeviceKey x)+               serialize (key_GrabDeviceKey x)+               serialize (toValue (this_device_mode_GrabDeviceKey x) :: Word8)+               serialize (toValue (other_device_mode_GrabDeviceKey x) :: Word8)+               serialize (owner_events_GrabDeviceKey x)+               putSkip 2+               serializeList (classes_GrabDeviceKey x)+               putSkip (requiredPadding size__)+ +data UngrabDeviceKey = MkUngrabDeviceKey{grabWindow_UngrabDeviceKey+                                         :: WINDOW,+                                         modifiers_UngrabDeviceKey :: [ModMask],+                                         modifier_device_UngrabDeviceKey :: Word8,+                                         key_UngrabDeviceKey :: Word8,+                                         grabbed_device_UngrabDeviceKey :: Word8}+                     deriving (Show, Typeable)+ +instance ExtensionRequest UngrabDeviceKey where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 16+               let size__+                     = 4 + size (grabWindow_UngrabDeviceKey x) ++                         size (undefined :: Word16)+                         + size (modifier_device_UngrabDeviceKey x)+                         + size (key_UngrabDeviceKey x)+                         + size (grabbed_device_UngrabDeviceKey x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (grabWindow_UngrabDeviceKey x)+               serialize (toMask (modifiers_UngrabDeviceKey x) :: Word16)+               serialize (modifier_device_UngrabDeviceKey x)+               serialize (key_UngrabDeviceKey x)+               serialize (grabbed_device_UngrabDeviceKey x)+               putSkip (requiredPadding size__)+ +data GrabDeviceButton = MkGrabDeviceButton{grab_window_GrabDeviceButton+                                           :: WINDOW,+                                           grabbed_device_GrabDeviceButton :: Word8,+                                           modifier_device_GrabDeviceButton :: Word8,+                                           num_classes_GrabDeviceButton :: Word16,+                                           modifiers_GrabDeviceButton :: [ModMask],+                                           this_device_mode_GrabDeviceButton :: GrabMode,+                                           other_device_mode_GrabDeviceButton :: GrabMode,+                                           button_GrabDeviceButton :: Word8,+                                           owner_events_GrabDeviceButton :: Word8,+                                           classes_GrabDeviceButton :: [EventClass]}+                      deriving (Show, Typeable)+ +instance ExtensionRequest GrabDeviceButton where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 17+               let size__+                     = 4 + size (grab_window_GrabDeviceButton x) ++                         size (grabbed_device_GrabDeviceButton x)+                         + size (modifier_device_GrabDeviceButton x)+                         + size (num_classes_GrabDeviceButton x)+                         + size (undefined :: Word16)+                         + size (undefined :: Word8)+                         + size (undefined :: Word8)+                         + size (button_GrabDeviceButton x)+                         + size (owner_events_GrabDeviceButton x)+                         + 2+                         + sum (map size (classes_GrabDeviceButton x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (grab_window_GrabDeviceButton x)+               serialize (grabbed_device_GrabDeviceButton x)+               serialize (modifier_device_GrabDeviceButton x)+               serialize (num_classes_GrabDeviceButton x)+               serialize (toMask (modifiers_GrabDeviceButton x) :: Word16)+               serialize (toValue (this_device_mode_GrabDeviceButton x) :: Word8)+               serialize (toValue (other_device_mode_GrabDeviceButton x) :: Word8)+               serialize (button_GrabDeviceButton x)+               serialize (owner_events_GrabDeviceButton x)+               putSkip 2+               serializeList (classes_GrabDeviceButton x)+               putSkip (requiredPadding size__)+ +data UngrabDeviceButton = MkUngrabDeviceButton{grab_window_UngrabDeviceButton+                                               :: WINDOW,+                                               modifiers_UngrabDeviceButton :: [ModMask],+                                               modifier_device_UngrabDeviceButton :: Word8,+                                               button_UngrabDeviceButton :: Word8,+                                               grabbed_device_UngrabDeviceButton :: Word8}+                        deriving (Show, Typeable)+ +instance ExtensionRequest UngrabDeviceButton where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 18+               let size__+                     = 4 + size (grab_window_UngrabDeviceButton x) ++                         size (undefined :: Word16)+                         + size (modifier_device_UngrabDeviceButton x)+                         + size (button_UngrabDeviceButton x)+                         + size (grabbed_device_UngrabDeviceButton x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (grab_window_UngrabDeviceButton x)+               serialize (toMask (modifiers_UngrabDeviceButton x) :: Word16)+               serialize (modifier_device_UngrabDeviceButton x)+               serialize (button_UngrabDeviceButton x)+               serialize (grabbed_device_UngrabDeviceButton x)+               putSkip (requiredPadding size__)+ +data DeviceInputMode = DeviceInputModeAsyncThisDevice+                     | DeviceInputModeSyncThisDevice+                     | DeviceInputModeReplayThisDevice+                     | DeviceInputModeAsyncOtherDevices+                     | DeviceInputModeAsyncAll+                     | DeviceInputModeSyncAll+                     deriving Show+ +instance SimpleEnum DeviceInputMode where+        toValue DeviceInputModeAsyncThisDevice{} = 0+        toValue DeviceInputModeSyncThisDevice{} = 1+        toValue DeviceInputModeReplayThisDevice{} = 2+        toValue DeviceInputModeAsyncOtherDevices{} = 3+        toValue DeviceInputModeAsyncAll{} = 4+        toValue DeviceInputModeSyncAll{} = 5+        fromValue 0 = DeviceInputModeAsyncThisDevice+        fromValue 1 = DeviceInputModeSyncThisDevice+        fromValue 2 = DeviceInputModeReplayThisDevice+        fromValue 3 = DeviceInputModeAsyncOtherDevices+        fromValue 4 = DeviceInputModeAsyncAll+        fromValue 5 = DeviceInputModeSyncAll+ +data AllowDeviceEvents = MkAllowDeviceEvents{time_AllowDeviceEvents+                                             :: TIMESTAMP,+                                             mode_AllowDeviceEvents :: DeviceInputMode,+                                             device_id_AllowDeviceEvents :: Word8}+                       deriving (Show, Typeable)+ +instance ExtensionRequest AllowDeviceEvents where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 19+               let size__+                     = 4 + size (time_AllowDeviceEvents x) + size (undefined :: Word8) ++                         size (device_id_AllowDeviceEvents x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (time_AllowDeviceEvents x)+               serialize (toValue (mode_AllowDeviceEvents x) :: Word8)+               serialize (device_id_AllowDeviceEvents x)+               putSkip (requiredPadding size__)+ +data GetDeviceFocus = MkGetDeviceFocus{device_id_GetDeviceFocus ::+                                       Word8}+                    deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceFocus where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 20+               let size__ = 4 + size (device_id_GetDeviceFocus x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_GetDeviceFocus x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data GetDeviceFocusReply = MkGetDeviceFocusReply{focus_GetDeviceFocusReply+                                                 :: WINDOW,+                                                 time_GetDeviceFocusReply :: TIMESTAMP,+                                                 revert_to_GetDeviceFocusReply :: InputFocus}+                         deriving (Show, Typeable)+ +instance Deserialize GetDeviceFocusReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               focus <- deserialize+               time <- deserialize+               revert_to <- liftM fromValue (deserialize :: Get Word8)+               skip 15+               let _ = isCard32 length+               return (MkGetDeviceFocusReply focus time revert_to)+ +data SetDeviceFocus = MkSetDeviceFocus{focus_SetDeviceFocus ::+                                       WINDOW,+                                       time_SetDeviceFocus :: TIMESTAMP,+                                       revert_to_SetDeviceFocus :: InputFocus,+                                       device_id_SetDeviceFocus :: Word8}+                    deriving (Show, Typeable)+ +instance ExtensionRequest SetDeviceFocus where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 21+               let size__+                     = 4 + size (focus_SetDeviceFocus x) + size (time_SetDeviceFocus x)+                         + size (undefined :: Word8)+                         + size (device_id_SetDeviceFocus x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (focus_SetDeviceFocus x)+               serialize (time_SetDeviceFocus x)+               serialize (toValue (revert_to_SetDeviceFocus x) :: Word8)+               serialize (device_id_SetDeviceFocus x)+               putSkip (requiredPadding size__)+ +data GetFeedbackControl = MkGetFeedbackControl{device_id_GetFeedbackControl+                                               :: Word8}+                        deriving (Show, Typeable)+ +instance ExtensionRequest GetFeedbackControl where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 22+               let size__ = 4 + size (device_id_GetFeedbackControl x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_GetFeedbackControl x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data GetFeedbackControlReply = MkGetFeedbackControlReply{num_feedback_GetFeedbackControlReply+                                                         :: Word16}+                             deriving (Show, Typeable)+ +instance Deserialize GetFeedbackControlReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               num_feedback <- deserialize+               skip 22+               let _ = isCard32 length+               return (MkGetFeedbackControlReply num_feedback)+ +data FeedbackClass = FeedbackClassKeyboard+                   | FeedbackClassPointer+                   | FeedbackClassString+                   | FeedbackClassInteger+                   | FeedbackClassLed+                   | FeedbackClassBell+                   deriving Show+ +instance SimpleEnum FeedbackClass where+        toValue FeedbackClassKeyboard{} = 0+        toValue FeedbackClassPointer{} = 1+        toValue FeedbackClassString{} = 2+        toValue FeedbackClassInteger{} = 3+        toValue FeedbackClassLed{} = 4+        toValue FeedbackClassBell{} = 5+        fromValue 0 = FeedbackClassKeyboard+        fromValue 1 = FeedbackClassPointer+        fromValue 2 = FeedbackClassString+        fromValue 3 = FeedbackClassInteger+        fromValue 4 = FeedbackClassLed+        fromValue 5 = FeedbackClassBell+ +data FeedbackState = MkFeedbackState{class_id_FeedbackState ::+                                     FeedbackClass,+                                     id_FeedbackState :: Word8, len_FeedbackState :: Word16}+                   deriving (Show, Typeable)+ +instance Serialize FeedbackState where+        serialize x+          = do serialize (toValue (class_id_FeedbackState x) :: Word8)+               serialize (id_FeedbackState x)+               serialize (len_FeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_FeedbackState x) ++              size (len_FeedbackState x)+ +instance Deserialize FeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               return (MkFeedbackState class_id id len)+ +data KbdFeedbackState = MkKbdFeedbackState{class_id_KbdFeedbackState+                                           :: FeedbackClass,+                                           id_KbdFeedbackState :: Word8,+                                           len_KbdFeedbackState :: Word16,+                                           pitch_KbdFeedbackState :: Word16,+                                           duration_KbdFeedbackState :: Word16,+                                           led_mask_KbdFeedbackState :: Word32,+                                           led_values_KbdFeedbackState :: Word32,+                                           global_auto_repeat_KbdFeedbackState :: Bool,+                                           click_KbdFeedbackState :: Word8,+                                           percent_KbdFeedbackState :: Word8,+                                           auto_repeats_KbdFeedbackState :: [Word8]}+                      deriving (Show, Typeable)+ +instance Serialize KbdFeedbackState where+        serialize x+          = do serialize (toValue (class_id_KbdFeedbackState x) :: Word8)+               serialize (id_KbdFeedbackState x)+               serialize (len_KbdFeedbackState x)+               serialize (pitch_KbdFeedbackState x)+               serialize (duration_KbdFeedbackState x)+               serialize (led_mask_KbdFeedbackState x)+               serialize (led_values_KbdFeedbackState x)+               serialize (global_auto_repeat_KbdFeedbackState x)+               serialize (click_KbdFeedbackState x)+               serialize (percent_KbdFeedbackState x)+               putSkip 1+               serializeList (auto_repeats_KbdFeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_KbdFeedbackState x) ++              size (len_KbdFeedbackState x)+              + size (pitch_KbdFeedbackState x)+              + size (duration_KbdFeedbackState x)+              + size (led_mask_KbdFeedbackState x)+              + size (led_values_KbdFeedbackState x)+              + size (global_auto_repeat_KbdFeedbackState x)+              + size (click_KbdFeedbackState x)+              + size (percent_KbdFeedbackState x)+              + 1+              + sum (map size (auto_repeats_KbdFeedbackState x))+ +instance Deserialize KbdFeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               pitch <- deserialize+               duration <- deserialize+               led_mask <- deserialize+               led_values <- deserialize+               global_auto_repeat <- deserialize+               click <- deserialize+               percent <- deserialize+               skip 1+               auto_repeats <- deserializeList (fromIntegral 32)+               return+                 (MkKbdFeedbackState class_id id len pitch duration led_mask+                    led_values+                    global_auto_repeat+                    click+                    percent+                    auto_repeats)+ +data PtrFeedbackState = MkPtrFeedbackState{class_id_PtrFeedbackState+                                           :: FeedbackClass,+                                           id_PtrFeedbackState :: Word8,+                                           len_PtrFeedbackState :: Word16,+                                           accel_num_PtrFeedbackState :: Word16,+                                           accel_denom_PtrFeedbackState :: Word16,+                                           threshold_PtrFeedbackState :: Word16}+                      deriving (Show, Typeable)+ +instance Serialize PtrFeedbackState where+        serialize x+          = do serialize (toValue (class_id_PtrFeedbackState x) :: Word8)+               serialize (id_PtrFeedbackState x)+               serialize (len_PtrFeedbackState x)+               putSkip 2+               serialize (accel_num_PtrFeedbackState x)+               serialize (accel_denom_PtrFeedbackState x)+               serialize (threshold_PtrFeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_PtrFeedbackState x) ++              size (len_PtrFeedbackState x)+              + 2+              + size (accel_num_PtrFeedbackState x)+              + size (accel_denom_PtrFeedbackState x)+              + size (threshold_PtrFeedbackState x)+ +instance Deserialize PtrFeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               skip 2+               accel_num <- deserialize+               accel_denom <- deserialize+               threshold <- deserialize+               return+                 (MkPtrFeedbackState class_id id len accel_num accel_denom+                    threshold)+ +data IntegerFeedbackState = MkIntegerFeedbackState{class_id_IntegerFeedbackState+                                                   :: FeedbackClass,+                                                   id_IntegerFeedbackState :: Word8,+                                                   len_IntegerFeedbackState :: Word16,+                                                   resolution_IntegerFeedbackState :: Word32,+                                                   min_value_IntegerFeedbackState :: Int32,+                                                   max_value_IntegerFeedbackState :: Int32}+                          deriving (Show, Typeable)+ +instance Serialize IntegerFeedbackState where+        serialize x+          = do serialize (toValue (class_id_IntegerFeedbackState x) :: Word8)+               serialize (id_IntegerFeedbackState x)+               serialize (len_IntegerFeedbackState x)+               serialize (resolution_IntegerFeedbackState x)+               serialize (min_value_IntegerFeedbackState x)+               serialize (max_value_IntegerFeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_IntegerFeedbackState x) ++              size (len_IntegerFeedbackState x)+              + size (resolution_IntegerFeedbackState x)+              + size (min_value_IntegerFeedbackState x)+              + size (max_value_IntegerFeedbackState x)+ +instance Deserialize IntegerFeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               resolution <- deserialize+               min_value <- deserialize+               max_value <- deserialize+               return+                 (MkIntegerFeedbackState class_id id len resolution min_value+                    max_value)+ +data StringFeedbackState = MkStringFeedbackState{class_id_StringFeedbackState+                                                 :: FeedbackClass,+                                                 id_StringFeedbackState :: Word8,+                                                 len_StringFeedbackState :: Word16,+                                                 max_symbols_StringFeedbackState :: Word16,+                                                 num_keysyms_StringFeedbackState :: Word16,+                                                 keysyms_StringFeedbackState :: [KEYSYM]}+                         deriving (Show, Typeable)+ +instance Serialize StringFeedbackState where+        serialize x+          = do serialize (toValue (class_id_StringFeedbackState x) :: Word8)+               serialize (id_StringFeedbackState x)+               serialize (len_StringFeedbackState x)+               serialize (max_symbols_StringFeedbackState x)+               serialize (num_keysyms_StringFeedbackState x)+               serializeList (keysyms_StringFeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_StringFeedbackState x) ++              size (len_StringFeedbackState x)+              + size (max_symbols_StringFeedbackState x)+              + size (num_keysyms_StringFeedbackState x)+              + sum (map size (keysyms_StringFeedbackState x))+ +instance Deserialize StringFeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               max_symbols <- deserialize+               num_keysyms <- deserialize+               keysyms <- deserializeList (fromIntegral num_keysyms)+               return+                 (MkStringFeedbackState class_id id len max_symbols num_keysyms+                    keysyms)+ +data BellFeedbackState = MkBellFeedbackState{class_id_BellFeedbackState+                                             :: FeedbackClass,+                                             id_BellFeedbackState :: Word8,+                                             len_BellFeedbackState :: Word16,+                                             percent_BellFeedbackState :: Word8,+                                             pitch_BellFeedbackState :: Word16,+                                             duration_BellFeedbackState :: Word16}+                       deriving (Show, Typeable)+ +instance Serialize BellFeedbackState where+        serialize x+          = do serialize (toValue (class_id_BellFeedbackState x) :: Word8)+               serialize (id_BellFeedbackState x)+               serialize (len_BellFeedbackState x)+               serialize (percent_BellFeedbackState x)+               putSkip 3+               serialize (pitch_BellFeedbackState x)+               serialize (duration_BellFeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_BellFeedbackState x) ++              size (len_BellFeedbackState x)+              + size (percent_BellFeedbackState x)+              + 3+              + size (pitch_BellFeedbackState x)+              + size (duration_BellFeedbackState x)+ +instance Deserialize BellFeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               percent <- deserialize+               skip 3+               pitch <- deserialize+               duration <- deserialize+               return (MkBellFeedbackState class_id id len percent pitch duration)+ +data LedFeedbackState = MkLedFeedbackState{class_id_LedFeedbackState+                                           :: FeedbackClass,+                                           id_LedFeedbackState :: Word8,+                                           len_LedFeedbackState :: Word16,+                                           led_mask_LedFeedbackState :: Word32,+                                           led_values_LedFeedbackState :: Word32}+                      deriving (Show, Typeable)+ +instance Serialize LedFeedbackState where+        serialize x+          = do serialize (toValue (class_id_LedFeedbackState x) :: Word8)+               serialize (id_LedFeedbackState x)+               serialize (len_LedFeedbackState x)+               serialize (led_mask_LedFeedbackState x)+               serialize (led_values_LedFeedbackState x)+        size x+          = size (undefined :: Word8) + size (id_LedFeedbackState x) ++              size (len_LedFeedbackState x)+              + size (led_mask_LedFeedbackState x)+              + size (led_values_LedFeedbackState x)+ +instance Deserialize LedFeedbackState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               led_mask <- deserialize+               led_values <- deserialize+               return (MkLedFeedbackState class_id id len led_mask led_values)+ +data FeedbackCtl = MkFeedbackCtl{class_id_FeedbackCtl ::+                                 FeedbackClass,+                                 id_FeedbackCtl :: Word8, len_FeedbackCtl :: Word16}+                 deriving (Show, Typeable)+ +instance Serialize FeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_FeedbackCtl x) :: Word8)+               serialize (id_FeedbackCtl x)+               serialize (len_FeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_FeedbackCtl x) ++              size (len_FeedbackCtl x)+ +instance Deserialize FeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               return (MkFeedbackCtl class_id id len)+ +data KbdFeedbackCtl = MkKbdFeedbackCtl{class_id_KbdFeedbackCtl ::+                                       FeedbackClass,+                                       id_KbdFeedbackCtl :: Word8, len_KbdFeedbackCtl :: Word16,+                                       key_KbdFeedbackCtl :: KeyCode,+                                       auto_repeat_mode_KbdFeedbackCtl :: Word8,+                                       key_click_percent_KbdFeedbackCtl :: Int8,+                                       bell_percent_KbdFeedbackCtl :: Int8,+                                       bell_pitch_KbdFeedbackCtl :: Int16,+                                       bell_duration_KbdFeedbackCtl :: Int16,+                                       led_mask_KbdFeedbackCtl :: Word32,+                                       led_values_KbdFeedbackCtl :: Word32}+                    deriving (Show, Typeable)+ +instance Serialize KbdFeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_KbdFeedbackCtl x) :: Word8)+               serialize (id_KbdFeedbackCtl x)+               serialize (len_KbdFeedbackCtl x)+               serialize (key_KbdFeedbackCtl x)+               serialize (auto_repeat_mode_KbdFeedbackCtl x)+               serialize (key_click_percent_KbdFeedbackCtl x)+               serialize (bell_percent_KbdFeedbackCtl x)+               serialize (bell_pitch_KbdFeedbackCtl x)+               serialize (bell_duration_KbdFeedbackCtl x)+               serialize (led_mask_KbdFeedbackCtl x)+               serialize (led_values_KbdFeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_KbdFeedbackCtl x) ++              size (len_KbdFeedbackCtl x)+              + size (key_KbdFeedbackCtl x)+              + size (auto_repeat_mode_KbdFeedbackCtl x)+              + size (key_click_percent_KbdFeedbackCtl x)+              + size (bell_percent_KbdFeedbackCtl x)+              + size (bell_pitch_KbdFeedbackCtl x)+              + size (bell_duration_KbdFeedbackCtl x)+              + size (led_mask_KbdFeedbackCtl x)+              + size (led_values_KbdFeedbackCtl x)+ +instance Deserialize KbdFeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               key <- deserialize+               auto_repeat_mode <- deserialize+               key_click_percent <- deserialize+               bell_percent <- deserialize+               bell_pitch <- deserialize+               bell_duration <- deserialize+               led_mask <- deserialize+               led_values <- deserialize+               return+                 (MkKbdFeedbackCtl class_id id len key auto_repeat_mode+                    key_click_percent+                    bell_percent+                    bell_pitch+                    bell_duration+                    led_mask+                    led_values)+ +data PtrFeedbackCtl = MkPtrFeedbackCtl{class_id_PtrFeedbackCtl ::+                                       FeedbackClass,+                                       id_PtrFeedbackCtl :: Word8, len_PtrFeedbackCtl :: Word16,+                                       num_PtrFeedbackCtl :: Int16, denom_PtrFeedbackCtl :: Int16,+                                       threshold_PtrFeedbackCtl :: Int16}+                    deriving (Show, Typeable)+ +instance Serialize PtrFeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_PtrFeedbackCtl x) :: Word8)+               serialize (id_PtrFeedbackCtl x)+               serialize (len_PtrFeedbackCtl x)+               putSkip 2+               serialize (num_PtrFeedbackCtl x)+               serialize (denom_PtrFeedbackCtl x)+               serialize (threshold_PtrFeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_PtrFeedbackCtl x) ++              size (len_PtrFeedbackCtl x)+              + 2+              + size (num_PtrFeedbackCtl x)+              + size (denom_PtrFeedbackCtl x)+              + size (threshold_PtrFeedbackCtl x)+ +instance Deserialize PtrFeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               skip 2+               num <- deserialize+               denom <- deserialize+               threshold <- deserialize+               return (MkPtrFeedbackCtl class_id id len num denom threshold)+ +data IntegerFeedbackCtl = MkIntegerFeedbackCtl{class_id_IntegerFeedbackCtl+                                               :: FeedbackClass,+                                               id_IntegerFeedbackCtl :: Word8,+                                               len_IntegerFeedbackCtl :: Word16,+                                               int_to_display_IntegerFeedbackCtl :: Int32}+                        deriving (Show, Typeable)+ +instance Serialize IntegerFeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_IntegerFeedbackCtl x) :: Word8)+               serialize (id_IntegerFeedbackCtl x)+               serialize (len_IntegerFeedbackCtl x)+               serialize (int_to_display_IntegerFeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_IntegerFeedbackCtl x) ++              size (len_IntegerFeedbackCtl x)+              + size (int_to_display_IntegerFeedbackCtl x)+ +instance Deserialize IntegerFeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               int_to_display <- deserialize+               return (MkIntegerFeedbackCtl class_id id len int_to_display)+ +data StringFeedbackCtl = MkStringFeedbackCtl{class_id_StringFeedbackCtl+                                             :: FeedbackClass,+                                             id_StringFeedbackCtl :: Word8,+                                             len_StringFeedbackCtl :: Word16,+                                             num_keysyms_StringFeedbackCtl :: Word16,+                                             keysyms_StringFeedbackCtl :: [KEYSYM]}+                       deriving (Show, Typeable)+ +instance Serialize StringFeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_StringFeedbackCtl x) :: Word8)+               serialize (id_StringFeedbackCtl x)+               serialize (len_StringFeedbackCtl x)+               putSkip 2+               serialize (num_keysyms_StringFeedbackCtl x)+               serializeList (keysyms_StringFeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_StringFeedbackCtl x) ++              size (len_StringFeedbackCtl x)+              + 2+              + size (num_keysyms_StringFeedbackCtl x)+              + sum (map size (keysyms_StringFeedbackCtl x))+ +instance Deserialize StringFeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               skip 2+               num_keysyms <- deserialize+               keysyms <- deserializeList (fromIntegral num_keysyms)+               return (MkStringFeedbackCtl class_id id len num_keysyms keysyms)+ +data BellFeedbackCtl = MkBellFeedbackCtl{class_id_BellFeedbackCtl+                                         :: FeedbackClass,+                                         id_BellFeedbackCtl :: Word8, len_BellFeedbackCtl :: Word16,+                                         percent_BellFeedbackCtl :: Int8,+                                         pitch_BellFeedbackCtl :: Int16,+                                         duration_BellFeedbackCtl :: Int16}+                     deriving (Show, Typeable)+ +instance Serialize BellFeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_BellFeedbackCtl x) :: Word8)+               serialize (id_BellFeedbackCtl x)+               serialize (len_BellFeedbackCtl x)+               serialize (percent_BellFeedbackCtl x)+               putSkip 3+               serialize (pitch_BellFeedbackCtl x)+               serialize (duration_BellFeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_BellFeedbackCtl x) ++              size (len_BellFeedbackCtl x)+              + size (percent_BellFeedbackCtl x)+              + 3+              + size (pitch_BellFeedbackCtl x)+              + size (duration_BellFeedbackCtl x)+ +instance Deserialize BellFeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               percent <- deserialize+               skip 3+               pitch <- deserialize+               duration <- deserialize+               return (MkBellFeedbackCtl class_id id len percent pitch duration)+ +data LedFeedbackCtl = MkLedFeedbackCtl{class_id_LedFeedbackCtl ::+                                       FeedbackClass,+                                       id_LedFeedbackCtl :: Word8, len_LedFeedbackCtl :: Word16,+                                       led_mask_LedFeedbackCtl :: Word32,+                                       led_values_LedFeedbackCtl :: Word32}+                    deriving (Show, Typeable)+ +instance Serialize LedFeedbackCtl where+        serialize x+          = do serialize (toValue (class_id_LedFeedbackCtl x) :: Word8)+               serialize (id_LedFeedbackCtl x)+               serialize (len_LedFeedbackCtl x)+               serialize (led_mask_LedFeedbackCtl x)+               serialize (led_values_LedFeedbackCtl x)+        size x+          = size (undefined :: Word8) + size (id_LedFeedbackCtl x) ++              size (len_LedFeedbackCtl x)+              + size (led_mask_LedFeedbackCtl x)+              + size (led_values_LedFeedbackCtl x)+ +instance Deserialize LedFeedbackCtl where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               id <- deserialize+               len <- deserialize+               led_mask <- deserialize+               led_values <- deserialize+               return (MkLedFeedbackCtl class_id id len led_mask led_values)+ +data GetDeviceKeyMapping = MkGetDeviceKeyMapping{device_id_GetDeviceKeyMapping+                                                 :: Word8,+                                                 first_keycode_GetDeviceKeyMapping :: KeyCode,+                                                 count_GetDeviceKeyMapping :: Word8}+                         deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceKeyMapping where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 24+               let size__+                     = 4 + size (device_id_GetDeviceKeyMapping x) ++                         size (first_keycode_GetDeviceKeyMapping x)+                         + size (count_GetDeviceKeyMapping x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_GetDeviceKeyMapping x)+               serialize (first_keycode_GetDeviceKeyMapping x)+               serialize (count_GetDeviceKeyMapping x)+               putSkip (requiredPadding size__)+ +data GetDeviceKeyMappingReply = MkGetDeviceKeyMappingReply{keysyms_per_keycode_GetDeviceKeyMappingReply+                                                           :: Word8,+                                                           keysyms_GetDeviceKeyMappingReply ::+                                                           [KEYSYM]}+                              deriving (Show, Typeable)+ +instance Deserialize GetDeviceKeyMappingReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               keysyms_per_keycode <- deserialize+               skip 23+               keysyms <- deserializeList (fromIntegral length)+               let _ = isCard32 length+               return (MkGetDeviceKeyMappingReply keysyms_per_keycode keysyms)+ +data ChangeDeviceKeyMapping = MkChangeDeviceKeyMapping{device_id_ChangeDeviceKeyMapping+                                                       :: Word8,+                                                       first_keycode_ChangeDeviceKeyMapping ::+                                                       KeyCode,+                                                       keysyms_per_keycode_ChangeDeviceKeyMapping ::+                                                       Word8,+                                                       keycode_count_ChangeDeviceKeyMapping ::+                                                       Word8,+                                                       keysyms_ChangeDeviceKeyMapping :: [KEYSYM]}+                            deriving (Show, Typeable)+ +instance ExtensionRequest ChangeDeviceKeyMapping where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 25+               let size__+                     = 4 + size (device_id_ChangeDeviceKeyMapping x) ++                         size (first_keycode_ChangeDeviceKeyMapping x)+                         + size (keysyms_per_keycode_ChangeDeviceKeyMapping x)+                         + size (keycode_count_ChangeDeviceKeyMapping x)+                         + sum (map size (keysyms_ChangeDeviceKeyMapping x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_ChangeDeviceKeyMapping x)+               serialize (first_keycode_ChangeDeviceKeyMapping x)+               serialize (keysyms_per_keycode_ChangeDeviceKeyMapping x)+               serialize (keycode_count_ChangeDeviceKeyMapping x)+               serializeList (keysyms_ChangeDeviceKeyMapping x)+               putSkip (requiredPadding size__)+ +data GetDeviceModifierMapping = MkGetDeviceModifierMapping{device_id_GetDeviceModifierMapping+                                                           :: Word8}+                              deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceModifierMapping where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 26+               let size__ = 4 + size (device_id_GetDeviceModifierMapping x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_GetDeviceModifierMapping x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data GetDeviceModifierMappingReply = MkGetDeviceModifierMappingReply{keycodes_per_modifier_GetDeviceModifierMappingReply+                                                                     :: Word8,+                                                                     keymaps_GetDeviceModifierMappingReply+                                                                     :: [Word8]}+                                   deriving (Show, Typeable)+ +instance Deserialize GetDeviceModifierMappingReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               keycodes_per_modifier <- deserialize+               skip 23+               keymaps <- deserializeList+                            (fromIntegral (fromIntegral (keycodes_per_modifier * 8)))+               let _ = isCard32 length+               return+                 (MkGetDeviceModifierMappingReply keycodes_per_modifier keymaps)+ +data SetDeviceModifierMapping = MkSetDeviceModifierMapping{device_id_SetDeviceModifierMapping+                                                           :: Word8,+                                                           keycodes_per_modifier_SetDeviceModifierMapping+                                                           :: Word8,+                                                           keymaps_SetDeviceModifierMapping ::+                                                           [Word8]}+                              deriving (Show, Typeable)+ +instance ExtensionRequest SetDeviceModifierMapping where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 27+               let size__+                     = 4 + size (device_id_SetDeviceModifierMapping x) ++                         size (keycodes_per_modifier_SetDeviceModifierMapping x)+                         + 1+                         + sum (map size (keymaps_SetDeviceModifierMapping x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_SetDeviceModifierMapping x)+               serialize (keycodes_per_modifier_SetDeviceModifierMapping x)+               putSkip 1+               serializeList (keymaps_SetDeviceModifierMapping x)+               putSkip (requiredPadding size__)+ +data SetDeviceModifierMappingReply = MkSetDeviceModifierMappingReply{status_SetDeviceModifierMappingReply+                                                                     :: MappingStatus}+                                   deriving (Show, Typeable)+ +instance Deserialize SetDeviceModifierMappingReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 23+               let _ = isCard32 length+               return (MkSetDeviceModifierMappingReply status)+ +data GetDeviceButtonMapping = MkGetDeviceButtonMapping{device_id_GetDeviceButtonMapping+                                                       :: Word8}+                            deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceButtonMapping where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 28+               let size__ = 4 + size (device_id_GetDeviceButtonMapping x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_GetDeviceButtonMapping x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data GetDeviceButtonMappingReply = MkGetDeviceButtonMappingReply{map_size_GetDeviceButtonMappingReply+                                                                 :: Word8,+                                                                 map_GetDeviceButtonMappingReply ::+                                                                 [Word8]}+                                 deriving (Show, Typeable)+ +instance Deserialize GetDeviceButtonMappingReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               map_size <- deserialize+               skip 23+               map <- deserializeList (fromIntegral map_size)+               let _ = isCard32 length+               return (MkGetDeviceButtonMappingReply map_size map)+ +data SetDeviceButtonMapping = MkSetDeviceButtonMapping{device_id_SetDeviceButtonMapping+                                                       :: Word8,+                                                       map_size_SetDeviceButtonMapping :: Word8,+                                                       map_SetDeviceButtonMapping :: [Word8]}+                            deriving (Show, Typeable)+ +instance ExtensionRequest SetDeviceButtonMapping where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 29+               let size__+                     = 4 + size (device_id_SetDeviceButtonMapping x) ++                         size (map_size_SetDeviceButtonMapping x)+                         + 2+                         + sum (map size (map_SetDeviceButtonMapping x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_SetDeviceButtonMapping x)+               serialize (map_size_SetDeviceButtonMapping x)+               putSkip 2+               serializeList (map_SetDeviceButtonMapping x)+               putSkip (requiredPadding size__)+ +data SetDeviceButtonMappingReply = MkSetDeviceButtonMappingReply{status_SetDeviceButtonMappingReply+                                                                 :: MappingStatus}+                                 deriving (Show, Typeable)+ +instance Deserialize SetDeviceButtonMappingReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 23+               let _ = isCard32 length+               return (MkSetDeviceButtonMappingReply status)+ +data QueryDeviceState = MkQueryDeviceState{device_id_QueryDeviceState+                                           :: Word8}+                      deriving (Show, Typeable)+ +instance ExtensionRequest QueryDeviceState where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 30+               let size__ = 4 + size (device_id_QueryDeviceState x) + 3+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_QueryDeviceState x)+               putSkip 3+               putSkip (requiredPadding size__)+ +data QueryDeviceStateReply = MkQueryDeviceStateReply{num_classes_QueryDeviceStateReply+                                                     :: Word8}+                           deriving (Show, Typeable)+ +instance Deserialize QueryDeviceStateReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               num_classes <- deserialize+               skip 23+               let _ = isCard32 length+               return (MkQueryDeviceStateReply num_classes)+ +data InputState = MkInputState{class_id_InputState :: InputClass,+                               len_InputState :: Word8, num_items_InputState :: Word8}+                deriving (Show, Typeable)+ +instance Serialize InputState where+        serialize x+          = do serialize (toValue (class_id_InputState x) :: Word8)+               serialize (len_InputState x)+               serialize (num_items_InputState x)+        size x+          = size (undefined :: Word8) + size (len_InputState x) ++              size (num_items_InputState x)+ +instance Deserialize InputState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               num_items <- deserialize+               return (MkInputState class_id len num_items)+ +data KeyState = MkKeyState{class_id_KeyState :: InputClass,+                           len_KeyState :: Word8, num_keys_KeyState :: Word8,+                           keys_KeyState :: [Word8]}+              deriving (Show, Typeable)+ +instance Serialize KeyState where+        serialize x+          = do serialize (toValue (class_id_KeyState x) :: Word8)+               serialize (len_KeyState x)+               serialize (num_keys_KeyState x)+               putSkip 1+               serializeList (keys_KeyState x)+        size x+          = size (undefined :: Word8) + size (len_KeyState x) ++              size (num_keys_KeyState x)+              + 1+              + sum (map size (keys_KeyState x))+ +instance Deserialize KeyState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               num_keys <- deserialize+               skip 1+               keys <- deserializeList (fromIntegral 32)+               return (MkKeyState class_id len num_keys keys)+ +data ButtonState = MkButtonState{class_id_ButtonState ::+                                 InputClass,+                                 len_ButtonState :: Word8, num_buttons_ButtonState :: Word8,+                                 buttons_ButtonState :: [Word8]}+                 deriving (Show, Typeable)+ +instance Serialize ButtonState where+        serialize x+          = do serialize (toValue (class_id_ButtonState x) :: Word8)+               serialize (len_ButtonState x)+               serialize (num_buttons_ButtonState x)+               putSkip 1+               serializeList (buttons_ButtonState x)+        size x+          = size (undefined :: Word8) + size (len_ButtonState x) ++              size (num_buttons_ButtonState x)+              + 1+              + sum (map size (buttons_ButtonState x))+ +instance Deserialize ButtonState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               num_buttons <- deserialize+               skip 1+               buttons <- deserializeList (fromIntegral 32)+               return (MkButtonState class_id len num_buttons buttons)+ +data ValuatorState = MkValuatorState{class_id_ValuatorState ::+                                     InputClass,+                                     len_ValuatorState :: Word8,+                                     num_valuators_ValuatorState :: Word8,+                                     mode_ValuatorState :: Word8,+                                     valuators_ValuatorState :: [Word32]}+                   deriving (Show, Typeable)+ +instance Serialize ValuatorState where+        serialize x+          = do serialize (toValue (class_id_ValuatorState x) :: Word8)+               serialize (len_ValuatorState x)+               serialize (num_valuators_ValuatorState x)+               serialize (mode_ValuatorState x)+               serializeList (valuators_ValuatorState x)+        size x+          = size (undefined :: Word8) + size (len_ValuatorState x) ++              size (num_valuators_ValuatorState x)+              + size (mode_ValuatorState x)+              + sum (map size (valuators_ValuatorState x))+ +instance Deserialize ValuatorState where+        deserialize+          = do class_id <- liftM fromValue (deserialize :: Get Word8)+               len <- deserialize+               num_valuators <- deserialize+               mode <- deserialize+               valuators <- deserializeList (fromIntegral num_valuators)+               return (MkValuatorState class_id len num_valuators mode valuators)+ +data SendExtensionEvent = MkSendExtensionEvent{destination_SendExtensionEvent+                                               :: WINDOW,+                                               device_id_SendExtensionEvent :: Word8,+                                               propagate_SendExtensionEvent :: Bool,+                                               num_classes_SendExtensionEvent :: Word16,+                                               num_events_SendExtensionEvent :: Word8,+                                               events_SendExtensionEvent :: [CChar],+                                               classes_SendExtensionEvent :: [EventClass]}+                        deriving (Show, Typeable)+ +instance ExtensionRequest SendExtensionEvent where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 31+               let size__+                     = 4 + size (destination_SendExtensionEvent x) ++                         size (device_id_SendExtensionEvent x)+                         + size (propagate_SendExtensionEvent x)+                         + size (num_classes_SendExtensionEvent x)+                         + size (num_events_SendExtensionEvent x)+                         + 3+                         + sum (map size (events_SendExtensionEvent x))+                         + sum (map size (classes_SendExtensionEvent x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (destination_SendExtensionEvent x)+               serialize (device_id_SendExtensionEvent x)+               serialize (propagate_SendExtensionEvent x)+               serialize (num_classes_SendExtensionEvent x)+               serialize (num_events_SendExtensionEvent x)+               putSkip 3+               serializeList (events_SendExtensionEvent x)+               serializeList (classes_SendExtensionEvent x)+               putSkip (requiredPadding size__)+ +data DeviceBell = MkDeviceBell{device_id_DeviceBell :: Word8,+                               feedback_id_DeviceBell :: Word8,+                               feedback_class_DeviceBell :: Word8, percent_DeviceBell :: Int8}+                deriving (Show, Typeable)+ +instance ExtensionRequest DeviceBell where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 32+               let size__+                     = 4 + size (device_id_DeviceBell x) ++                         size (feedback_id_DeviceBell x)+                         + size (feedback_class_DeviceBell x)+                         + size (percent_DeviceBell x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_DeviceBell x)+               serialize (feedback_id_DeviceBell x)+               serialize (feedback_class_DeviceBell x)+               serialize (percent_DeviceBell x)+               putSkip (requiredPadding size__)+ +data SetDeviceValuators = MkSetDeviceValuators{device_id_SetDeviceValuators+                                               :: Word8,+                                               first_valuator_SetDeviceValuators :: Word8,+                                               num_valuators_SetDeviceValuators :: Word8,+                                               valuators_SetDeviceValuators :: [Int32]}+                        deriving (Show, Typeable)+ +instance ExtensionRequest SetDeviceValuators where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 33+               let size__+                     = 4 + size (device_id_SetDeviceValuators x) ++                         size (first_valuator_SetDeviceValuators x)+                         + size (num_valuators_SetDeviceValuators x)+                         + 1+                         + sum (map size (valuators_SetDeviceValuators x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (device_id_SetDeviceValuators x)+               serialize (first_valuator_SetDeviceValuators x)+               serialize (num_valuators_SetDeviceValuators x)+               putSkip 1+               serializeList (valuators_SetDeviceValuators x)+               putSkip (requiredPadding size__)+ +data SetDeviceValuatorsReply = MkSetDeviceValuatorsReply{status_SetDeviceValuatorsReply+                                                         :: GrabStatus}+                             deriving (Show, Typeable)+ +instance Deserialize SetDeviceValuatorsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 23+               let _ = isCard32 length+               return (MkSetDeviceValuatorsReply status)+ +data GetDeviceControl = MkGetDeviceControl{control_id_GetDeviceControl+                                           :: Word16,+                                           device_id_GetDeviceControl :: Word8}+                      deriving (Show, Typeable)+ +instance ExtensionRequest GetDeviceControl where+        extensionId _ = "XInputExtension"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 34+               let size__+                     = 4 + size (control_id_GetDeviceControl x) ++                         size (device_id_GetDeviceControl x)+                         + 1+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (control_id_GetDeviceControl x)+               serialize (device_id_GetDeviceControl x)+               putSkip 1+               putSkip (requiredPadding size__)+ +data GetDeviceControlReply = MkGetDeviceControlReply{status_GetDeviceControlReply+                                                     :: Word8}+                           deriving (Show, Typeable)+ +instance Deserialize GetDeviceControlReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               status <- deserialize+               skip 23+               let _ = isCard32 length+               return (MkGetDeviceControlReply status)+ +data DeviceState = MkDeviceState{control_id_DeviceState :: Word16,+                                 len_DeviceState :: Word16}+                 deriving (Show, Typeable)+ +instance Serialize DeviceState where+        serialize x+          = do serialize (control_id_DeviceState x)+               serialize (len_DeviceState x)+        size x = size (control_id_DeviceState x) + size (len_DeviceState x)+ +instance Deserialize DeviceState where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               return (MkDeviceState control_id len)+ +data DeviceResolutionState = MkDeviceResolutionState{control_id_DeviceResolutionState+                                                     :: Word16,+                                                     len_DeviceResolutionState :: Word16,+                                                     num_valuators_DeviceResolutionState :: Word32,+                                                     resolution_values_DeviceResolutionState ::+                                                     [Word32],+                                                     resolution_min_DeviceResolutionState ::+                                                     [Word32],+                                                     resolution_max_DeviceResolutionState ::+                                                     [Word32]}+                           deriving (Show, Typeable)+ +instance Serialize DeviceResolutionState where+        serialize x+          = do serialize (control_id_DeviceResolutionState x)+               serialize (len_DeviceResolutionState x)+               serialize (num_valuators_DeviceResolutionState x)+               serializeList (resolution_values_DeviceResolutionState x)+               serializeList (resolution_min_DeviceResolutionState x)+               serializeList (resolution_max_DeviceResolutionState x)+        size x+          = size (control_id_DeviceResolutionState x) ++              size (len_DeviceResolutionState x)+              + size (num_valuators_DeviceResolutionState x)+              + sum (map size (resolution_values_DeviceResolutionState x))+              + sum (map size (resolution_min_DeviceResolutionState x))+              + sum (map size (resolution_max_DeviceResolutionState x))+ +instance Deserialize DeviceResolutionState where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               num_valuators <- deserialize+               resolution_values <- deserializeList (fromIntegral num_valuators)+               resolution_min <- deserializeList (fromIntegral num_valuators)+               resolution_max <- deserializeList (fromIntegral num_valuators)+               return+                 (MkDeviceResolutionState control_id len num_valuators+                    resolution_values+                    resolution_min+                    resolution_max)+ +data DeviceAbsCalibState = MkDeviceAbsCalibState{control_id_DeviceAbsCalibState+                                                 :: Word16,+                                                 len_DeviceAbsCalibState :: Word16,+                                                 min_x_DeviceAbsCalibState :: Int32,+                                                 max_x_DeviceAbsCalibState :: Int32,+                                                 min_y_DeviceAbsCalibState :: Int32,+                                                 max_y_DeviceAbsCalibState :: Int32,+                                                 flip_x_DeviceAbsCalibState :: Word32,+                                                 flip_y_DeviceAbsCalibState :: Word32,+                                                 rotation_DeviceAbsCalibState :: Word32,+                                                 button_threshold_DeviceAbsCalibState :: Word32}+                         deriving (Show, Typeable)+ +instance Serialize DeviceAbsCalibState where+        serialize x+          = do serialize (control_id_DeviceAbsCalibState x)+               serialize (len_DeviceAbsCalibState x)+               serialize (min_x_DeviceAbsCalibState x)+               serialize (max_x_DeviceAbsCalibState x)+               serialize (min_y_DeviceAbsCalibState x)+               serialize (max_y_DeviceAbsCalibState x)+               serialize (flip_x_DeviceAbsCalibState x)+               serialize (flip_y_DeviceAbsCalibState x)+               serialize (rotation_DeviceAbsCalibState x)+               serialize (button_threshold_DeviceAbsCalibState x)+        size x+          = size (control_id_DeviceAbsCalibState x) ++              size (len_DeviceAbsCalibState x)+              + size (min_x_DeviceAbsCalibState x)+              + size (max_x_DeviceAbsCalibState x)+              + size (min_y_DeviceAbsCalibState x)+              + size (max_y_DeviceAbsCalibState x)+              + size (flip_x_DeviceAbsCalibState x)+              + size (flip_y_DeviceAbsCalibState x)+              + size (rotation_DeviceAbsCalibState x)+              + size (button_threshold_DeviceAbsCalibState x)+ +instance Deserialize DeviceAbsCalibState where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               min_x <- deserialize+               max_x <- deserialize+               min_y <- deserialize+               max_y <- deserialize+               flip_x <- deserialize+               flip_y <- deserialize+               rotation <- deserialize+               button_threshold <- deserialize+               return+                 (MkDeviceAbsCalibState control_id len min_x max_x min_y max_y+                    flip_x+                    flip_y+                    rotation+                    button_threshold)+ +data DeviceAbsAreaState = MkDeviceAbsAreaState{control_id_DeviceAbsAreaState+                                               :: Word16,+                                               len_DeviceAbsAreaState :: Word16,+                                               offset_x_DeviceAbsAreaState :: Word32,+                                               offset_y_DeviceAbsAreaState :: Word32,+                                               width_DeviceAbsAreaState :: Word32,+                                               height_DeviceAbsAreaState :: Word32,+                                               screen_DeviceAbsAreaState :: Word32,+                                               following_DeviceAbsAreaState :: Word32}+                        deriving (Show, Typeable)+ +instance Serialize DeviceAbsAreaState where+        serialize x+          = do serialize (control_id_DeviceAbsAreaState x)+               serialize (len_DeviceAbsAreaState x)+               serialize (offset_x_DeviceAbsAreaState x)+               serialize (offset_y_DeviceAbsAreaState x)+               serialize (width_DeviceAbsAreaState x)+               serialize (height_DeviceAbsAreaState x)+               serialize (screen_DeviceAbsAreaState x)+               serialize (following_DeviceAbsAreaState x)+        size x+          = size (control_id_DeviceAbsAreaState x) ++              size (len_DeviceAbsAreaState x)+              + size (offset_x_DeviceAbsAreaState x)+              + size (offset_y_DeviceAbsAreaState x)+              + size (width_DeviceAbsAreaState x)+              + size (height_DeviceAbsAreaState x)+              + size (screen_DeviceAbsAreaState x)+              + size (following_DeviceAbsAreaState x)+ +instance Deserialize DeviceAbsAreaState where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               offset_x <- deserialize+               offset_y <- deserialize+               width <- deserialize+               height <- deserialize+               screen <- deserialize+               following <- deserialize+               return+                 (MkDeviceAbsAreaState control_id len offset_x offset_y width height+                    screen+                    following)+ +data DeviceCoreState = MkDeviceCoreState{control_id_DeviceCoreState+                                         :: Word16,+                                         len_DeviceCoreState :: Word16,+                                         status_DeviceCoreState :: Word8,+                                         iscore_DeviceCoreState :: Word8}+                     deriving (Show, Typeable)+ +instance Serialize DeviceCoreState where+        serialize x+          = do serialize (control_id_DeviceCoreState x)+               serialize (len_DeviceCoreState x)+               serialize (status_DeviceCoreState x)+               serialize (iscore_DeviceCoreState x)+               putSkip 2+        size x+          = size (control_id_DeviceCoreState x) ++              size (len_DeviceCoreState x)+              + size (status_DeviceCoreState x)+              + size (iscore_DeviceCoreState x)+              + 2+ +instance Deserialize DeviceCoreState where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               status <- deserialize+               iscore <- deserialize+               skip 2+               return (MkDeviceCoreState control_id len status iscore)+ +data DeviceEnableState = MkDeviceEnableState{control_id_DeviceEnableState+                                             :: Word16,+                                             len_DeviceEnableState :: Word16,+                                             enable_DeviceEnableState :: Word8}+                       deriving (Show, Typeable)+ +instance Serialize DeviceEnableState where+        serialize x+          = do serialize (control_id_DeviceEnableState x)+               serialize (len_DeviceEnableState x)+               serialize (enable_DeviceEnableState x)+               putSkip 3+        size x+          = size (control_id_DeviceEnableState x) ++              size (len_DeviceEnableState x)+              + size (enable_DeviceEnableState x)+              + 3+ +instance Deserialize DeviceEnableState where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               enable <- deserialize+               skip 3+               return (MkDeviceEnableState control_id len enable)+ +data DeviceCtl = MkDeviceCtl{control_id_DeviceCtl :: Word16,+                             len_DeviceCtl :: Word16}+               deriving (Show, Typeable)+ +instance Serialize DeviceCtl where+        serialize x+          = do serialize (control_id_DeviceCtl x)+               serialize (len_DeviceCtl x)+        size x = size (control_id_DeviceCtl x) + size (len_DeviceCtl x)+ +instance Deserialize DeviceCtl where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               return (MkDeviceCtl control_id len)+ +data DeviceResolutionCtl = MkDeviceResolutionCtl{control_id_DeviceResolutionCtl+                                                 :: Word16,+                                                 len_DeviceResolutionCtl :: Word16,+                                                 first_valuator_DeviceResolutionCtl :: Word8,+                                                 num_valuators_DeviceResolutionCtl :: Word8,+                                                 resolution_values_DeviceResolutionCtl :: [Word32]}+                         deriving (Show, Typeable)+ +instance Serialize DeviceResolutionCtl where+        serialize x+          = do serialize (control_id_DeviceResolutionCtl x)+               serialize (len_DeviceResolutionCtl x)+               serialize (first_valuator_DeviceResolutionCtl x)+               serialize (num_valuators_DeviceResolutionCtl x)+               serializeList (resolution_values_DeviceResolutionCtl x)+        size x+          = size (control_id_DeviceResolutionCtl x) ++              size (len_DeviceResolutionCtl x)+              + size (first_valuator_DeviceResolutionCtl x)+              + size (num_valuators_DeviceResolutionCtl x)+              + sum (map size (resolution_values_DeviceResolutionCtl x))+ +instance Deserialize DeviceResolutionCtl where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               first_valuator <- deserialize+               num_valuators <- deserialize+               resolution_values <- deserializeList (fromIntegral num_valuators)+               return+                 (MkDeviceResolutionCtl control_id len first_valuator num_valuators+                    resolution_values)+ +data DeviceAbsCalibCtl = MkDeviceAbsCalibCtl{control_id_DeviceAbsCalibCtl+                                             :: Word16,+                                             len_DeviceAbsCalibCtl :: Word16,+                                             min_x_DeviceAbsCalibCtl :: Int32,+                                             max_x_DeviceAbsCalibCtl :: Int32,+                                             min_y_DeviceAbsCalibCtl :: Int32,+                                             max_y_DeviceAbsCalibCtl :: Int32,+                                             flip_x_DeviceAbsCalibCtl :: Word32,+                                             flip_y_DeviceAbsCalibCtl :: Word32,+                                             rotation_DeviceAbsCalibCtl :: Word32,+                                             button_threshold_DeviceAbsCalibCtl :: Word32}+                       deriving (Show, Typeable)+ +instance Serialize DeviceAbsCalibCtl where+        serialize x+          = do serialize (control_id_DeviceAbsCalibCtl x)+               serialize (len_DeviceAbsCalibCtl x)+               serialize (min_x_DeviceAbsCalibCtl x)+               serialize (max_x_DeviceAbsCalibCtl x)+               serialize (min_y_DeviceAbsCalibCtl x)+               serialize (max_y_DeviceAbsCalibCtl x)+               serialize (flip_x_DeviceAbsCalibCtl x)+               serialize (flip_y_DeviceAbsCalibCtl x)+               serialize (rotation_DeviceAbsCalibCtl x)+               serialize (button_threshold_DeviceAbsCalibCtl x)+        size x+          = size (control_id_DeviceAbsCalibCtl x) ++              size (len_DeviceAbsCalibCtl x)+              + size (min_x_DeviceAbsCalibCtl x)+              + size (max_x_DeviceAbsCalibCtl x)+              + size (min_y_DeviceAbsCalibCtl x)+              + size (max_y_DeviceAbsCalibCtl x)+              + size (flip_x_DeviceAbsCalibCtl x)+              + size (flip_y_DeviceAbsCalibCtl x)+              + size (rotation_DeviceAbsCalibCtl x)+              + size (button_threshold_DeviceAbsCalibCtl x)+ +instance Deserialize DeviceAbsCalibCtl where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               min_x <- deserialize+               max_x <- deserialize+               min_y <- deserialize+               max_y <- deserialize+               flip_x <- deserialize+               flip_y <- deserialize+               rotation <- deserialize+               button_threshold <- deserialize+               return+                 (MkDeviceAbsCalibCtl control_id len min_x max_x min_y max_y flip_x+                    flip_y+                    rotation+                    button_threshold)+ +data DeviceAbsAreaCtrl = MkDeviceAbsAreaCtrl{control_id_DeviceAbsAreaCtrl+                                             :: Word16,+                                             len_DeviceAbsAreaCtrl :: Word16,+                                             offset_x_DeviceAbsAreaCtrl :: Word32,+                                             offset_y_DeviceAbsAreaCtrl :: Word32,+                                             width_DeviceAbsAreaCtrl :: Int32,+                                             height_DeviceAbsAreaCtrl :: Int32,+                                             screen_DeviceAbsAreaCtrl :: Int32,+                                             following_DeviceAbsAreaCtrl :: Word32}+                       deriving (Show, Typeable)+ +instance Serialize DeviceAbsAreaCtrl where+        serialize x+          = do serialize (control_id_DeviceAbsAreaCtrl x)+               serialize (len_DeviceAbsAreaCtrl x)+               serialize (offset_x_DeviceAbsAreaCtrl x)+               serialize (offset_y_DeviceAbsAreaCtrl x)+               serialize (width_DeviceAbsAreaCtrl x)+               serialize (height_DeviceAbsAreaCtrl x)+               serialize (screen_DeviceAbsAreaCtrl x)+               serialize (following_DeviceAbsAreaCtrl x)+        size x+          = size (control_id_DeviceAbsAreaCtrl x) ++              size (len_DeviceAbsAreaCtrl x)+              + size (offset_x_DeviceAbsAreaCtrl x)+              + size (offset_y_DeviceAbsAreaCtrl x)+              + size (width_DeviceAbsAreaCtrl x)+              + size (height_DeviceAbsAreaCtrl x)+              + size (screen_DeviceAbsAreaCtrl x)+              + size (following_DeviceAbsAreaCtrl x)+ +instance Deserialize DeviceAbsAreaCtrl where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               offset_x <- deserialize+               offset_y <- deserialize+               width <- deserialize+               height <- deserialize+               screen <- deserialize+               following <- deserialize+               return+                 (MkDeviceAbsAreaCtrl control_id len offset_x offset_y width height+                    screen+                    following)+ +data DeviceCoreCtrl = MkDeviceCoreCtrl{control_id_DeviceCoreCtrl ::+                                       Word16,+                                       len_DeviceCoreCtrl :: Word16, status_DeviceCoreCtrl :: Word8}+                    deriving (Show, Typeable)+ +instance Serialize DeviceCoreCtrl where+        serialize x+          = do serialize (control_id_DeviceCoreCtrl x)+               serialize (len_DeviceCoreCtrl x)+               serialize (status_DeviceCoreCtrl x)+               putSkip 3+        size x+          = size (control_id_DeviceCoreCtrl x) + size (len_DeviceCoreCtrl x)+              + size (status_DeviceCoreCtrl x)+              + 3+ +instance Deserialize DeviceCoreCtrl where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               status <- deserialize+               skip 3+               return (MkDeviceCoreCtrl control_id len status)+ +data DeviceEnableCtrl = MkDeviceEnableCtrl{control_id_DeviceEnableCtrl+                                           :: Word16,+                                           len_DeviceEnableCtrl :: Word16,+                                           enable_DeviceEnableCtrl :: Word8}+                      deriving (Show, Typeable)+ +instance Serialize DeviceEnableCtrl where+        serialize x+          = do serialize (control_id_DeviceEnableCtrl x)+               serialize (len_DeviceEnableCtrl x)+               serialize (enable_DeviceEnableCtrl x)+               putSkip 3+        size x+          = size (control_id_DeviceEnableCtrl x) ++              size (len_DeviceEnableCtrl x)+              + size (enable_DeviceEnableCtrl x)+              + 3+ +instance Deserialize DeviceEnableCtrl where+        deserialize+          = do control_id <- deserialize+               len <- deserialize+               enable <- deserialize+               skip 3+               return (MkDeviceEnableCtrl control_id len enable)+ +data DeviceValuatorEvent = MkDeviceValuatorEvent{device_id_DeviceValuatorEvent+                                                 :: Word8,+                                                 device_state_DeviceValuatorEvent :: Word16,+                                                 num_valuators_DeviceValuatorEvent :: Word8,+                                                 first_valuator_DeviceValuatorEvent :: Word8,+                                                 valuators_DeviceValuatorEvent :: [Int32]}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceValuatorEvent+ +instance Deserialize DeviceValuatorEvent where+        deserialize+          = do skip 1+               device_id <- deserialize+               skip 2+               device_state <- deserialize+               num_valuators <- deserialize+               first_valuator <- deserialize+               valuators <- deserializeList (fromIntegral 6)+               return+                 (MkDeviceValuatorEvent device_id device_state num_valuators+                    first_valuator+                    valuators)+ +data DeviceKeyPressEvent = MkDeviceKeyPressEvent{detail_DeviceKeyPressEvent+                                                 :: Word8,+                                                 time_DeviceKeyPressEvent :: TIMESTAMP,+                                                 root_DeviceKeyPressEvent :: WINDOW,+                                                 event_DeviceKeyPressEvent :: WINDOW,+                                                 child_DeviceKeyPressEvent :: WINDOW,+                                                 root_x_DeviceKeyPressEvent :: Int16,+                                                 root_y_DeviceKeyPressEvent :: Int16,+                                                 event_x_DeviceKeyPressEvent :: Int16,+                                                 event_y_DeviceKeyPressEvent :: Int16,+                                                 state_DeviceKeyPressEvent :: Word16,+                                                 same_screen_DeviceKeyPressEvent :: Bool,+                                                 device_id_DeviceKeyPressEvent :: Word8}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceKeyPressEvent+ +instance Deserialize DeviceKeyPressEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkDeviceKeyPressEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data DeviceKeyReleaseEvent = MkDeviceKeyReleaseEvent{detail_DeviceKeyReleaseEvent+                                                     :: Word8,+                                                     time_DeviceKeyReleaseEvent :: TIMESTAMP,+                                                     root_DeviceKeyReleaseEvent :: WINDOW,+                                                     event_DeviceKeyReleaseEvent :: WINDOW,+                                                     child_DeviceKeyReleaseEvent :: WINDOW,+                                                     root_x_DeviceKeyReleaseEvent :: Int16,+                                                     root_y_DeviceKeyReleaseEvent :: Int16,+                                                     event_x_DeviceKeyReleaseEvent :: Int16,+                                                     event_y_DeviceKeyReleaseEvent :: Int16,+                                                     state_DeviceKeyReleaseEvent :: Word16,+                                                     same_screen_DeviceKeyReleaseEvent :: Bool,+                                                     device_id_DeviceKeyReleaseEvent :: Word8}+                           deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceKeyReleaseEvent+ +instance Deserialize DeviceKeyReleaseEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkDeviceKeyReleaseEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data DeviceButtonPressEvent = MkDeviceButtonPressEvent{detail_DeviceButtonPressEvent+                                                       :: Word8,+                                                       time_DeviceButtonPressEvent :: TIMESTAMP,+                                                       root_DeviceButtonPressEvent :: WINDOW,+                                                       event_DeviceButtonPressEvent :: WINDOW,+                                                       child_DeviceButtonPressEvent :: WINDOW,+                                                       root_x_DeviceButtonPressEvent :: Int16,+                                                       root_y_DeviceButtonPressEvent :: Int16,+                                                       event_x_DeviceButtonPressEvent :: Int16,+                                                       event_y_DeviceButtonPressEvent :: Int16,+                                                       state_DeviceButtonPressEvent :: Word16,+                                                       same_screen_DeviceButtonPressEvent :: Bool,+                                                       device_id_DeviceButtonPressEvent :: Word8}+                            deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceButtonPressEvent+ +instance Deserialize DeviceButtonPressEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkDeviceButtonPressEvent detail time root event child root_x+                    root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data DeviceButtonReleaseEvent = MkDeviceButtonReleaseEvent{detail_DeviceButtonReleaseEvent+                                                           :: Word8,+                                                           time_DeviceButtonReleaseEvent ::+                                                           TIMESTAMP,+                                                           root_DeviceButtonReleaseEvent :: WINDOW,+                                                           event_DeviceButtonReleaseEvent :: WINDOW,+                                                           child_DeviceButtonReleaseEvent :: WINDOW,+                                                           root_x_DeviceButtonReleaseEvent :: Int16,+                                                           root_y_DeviceButtonReleaseEvent :: Int16,+                                                           event_x_DeviceButtonReleaseEvent ::+                                                           Int16,+                                                           event_y_DeviceButtonReleaseEvent ::+                                                           Int16,+                                                           state_DeviceButtonReleaseEvent :: Word16,+                                                           same_screen_DeviceButtonReleaseEvent ::+                                                           Bool,+                                                           device_id_DeviceButtonReleaseEvent ::+                                                           Word8}+                              deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceButtonReleaseEvent+ +instance Deserialize DeviceButtonReleaseEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkDeviceButtonReleaseEvent detail time root event child root_x+                    root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data DeviceMotionNotifyEvent = MkDeviceMotionNotifyEvent{detail_DeviceMotionNotifyEvent+                                                         :: Word8,+                                                         time_DeviceMotionNotifyEvent :: TIMESTAMP,+                                                         root_DeviceMotionNotifyEvent :: WINDOW,+                                                         event_DeviceMotionNotifyEvent :: WINDOW,+                                                         child_DeviceMotionNotifyEvent :: WINDOW,+                                                         root_x_DeviceMotionNotifyEvent :: Int16,+                                                         root_y_DeviceMotionNotifyEvent :: Int16,+                                                         event_x_DeviceMotionNotifyEvent :: Int16,+                                                         event_y_DeviceMotionNotifyEvent :: Int16,+                                                         state_DeviceMotionNotifyEvent :: Word16,+                                                         same_screen_DeviceMotionNotifyEvent ::+                                                         Bool,+                                                         device_id_DeviceMotionNotifyEvent :: Word8}+                             deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceMotionNotifyEvent+ +instance Deserialize DeviceMotionNotifyEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkDeviceMotionNotifyEvent detail time root event child root_x+                    root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data ProximityInEvent = MkProximityInEvent{detail_ProximityInEvent+                                           :: Word8,+                                           time_ProximityInEvent :: TIMESTAMP,+                                           root_ProximityInEvent :: WINDOW,+                                           event_ProximityInEvent :: WINDOW,+                                           child_ProximityInEvent :: WINDOW,+                                           root_x_ProximityInEvent :: Int16,+                                           root_y_ProximityInEvent :: Int16,+                                           event_x_ProximityInEvent :: Int16,+                                           event_y_ProximityInEvent :: Int16,+                                           state_ProximityInEvent :: Word16,+                                           same_screen_ProximityInEvent :: Bool,+                                           device_id_ProximityInEvent :: Word8}+                      deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ProximityInEvent+ +instance Deserialize ProximityInEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkProximityInEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data ProximityOutEvent = MkProximityOutEvent{detail_ProximityOutEvent+                                             :: Word8,+                                             time_ProximityOutEvent :: TIMESTAMP,+                                             root_ProximityOutEvent :: WINDOW,+                                             event_ProximityOutEvent :: WINDOW,+                                             child_ProximityOutEvent :: WINDOW,+                                             root_x_ProximityOutEvent :: Int16,+                                             root_y_ProximityOutEvent :: Int16,+                                             event_x_ProximityOutEvent :: Int16,+                                             event_y_ProximityOutEvent :: Int16,+                                             state_ProximityOutEvent :: Word16,+                                             same_screen_ProximityOutEvent :: Bool,+                                             device_id_ProximityOutEvent :: Word8}+                       deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ProximityOutEvent+ +instance Deserialize ProximityOutEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- deserialize+               same_screen <- deserialize+               device_id <- deserialize+               return+                 (MkProximityOutEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen+                    device_id)+ +data FocusInEvent = MkFocusInEvent{detail_FocusInEvent ::+                                   NotifyDetail,+                                   time_FocusInEvent :: TIMESTAMP, window_FocusInEvent :: WINDOW,+                                   mode_FocusInEvent :: NotifyMode, device_id_FocusInEvent :: Word8}+                  deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event FocusInEvent+ +instance Deserialize FocusInEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               time <- deserialize+               window <- deserialize+               mode <- liftM fromValue (deserialize :: Get Word8)+               device_id <- deserialize+               skip 18+               return (MkFocusInEvent detail time window mode device_id)+ +data FocusOutEvent = MkFocusOutEvent{detail_FocusOutEvent ::+                                     NotifyDetail,+                                     time_FocusOutEvent :: TIMESTAMP,+                                     window_FocusOutEvent :: WINDOW,+                                     mode_FocusOutEvent :: NotifyMode,+                                     device_id_FocusOutEvent :: Word8}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event FocusOutEvent+ +instance Deserialize FocusOutEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               time <- deserialize+               window <- deserialize+               mode <- liftM fromValue (deserialize :: Get Word8)+               device_id <- deserialize+               skip 18+               return (MkFocusOutEvent detail time window mode device_id)+ +data DeviceStateNotifyEvent = MkDeviceStateNotifyEvent{device_id_DeviceStateNotifyEvent+                                                       :: Word8,+                                                       time_DeviceStateNotifyEvent :: TIMESTAMP,+                                                       num_keys_DeviceStateNotifyEvent :: Word8,+                                                       num_buttons_DeviceStateNotifyEvent :: Word8,+                                                       num_valuators_DeviceStateNotifyEvent ::+                                                       Word8,+                                                       classes_reported_DeviceStateNotifyEvent ::+                                                       Word8,+                                                       buttons_DeviceStateNotifyEvent :: [Word8],+                                                       keys_DeviceStateNotifyEvent :: [Word8],+                                                       valuators_DeviceStateNotifyEvent :: [Word32]}+                            deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceStateNotifyEvent+ +instance Deserialize DeviceStateNotifyEvent where+        deserialize+          = do skip 1+               device_id <- deserialize+               skip 2+               time <- deserialize+               num_keys <- deserialize+               num_buttons <- deserialize+               num_valuators <- deserialize+               classes_reported <- deserialize+               buttons <- deserializeList (fromIntegral 4)+               keys <- deserializeList (fromIntegral 4)+               valuators <- deserializeList (fromIntegral 3)+               return+                 (MkDeviceStateNotifyEvent device_id time num_keys num_buttons+                    num_valuators+                    classes_reported+                    buttons+                    keys+                    valuators)+ +data DeviceMappingNotifyEvent = MkDeviceMappingNotifyEvent{device_id_DeviceMappingNotifyEvent+                                                           :: Word8,+                                                           request_DeviceMappingNotifyEvent ::+                                                           Word8,+                                                           first_keycode_DeviceMappingNotifyEvent ::+                                                           KeyCode,+                                                           count_DeviceMappingNotifyEvent :: Word8,+                                                           time_DeviceMappingNotifyEvent ::+                                                           TIMESTAMP}+                              deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceMappingNotifyEvent+ +instance Deserialize DeviceMappingNotifyEvent where+        deserialize+          = do skip 1+               device_id <- deserialize+               skip 2+               request <- deserialize+               first_keycode <- deserialize+               count <- deserialize+               skip 1+               time <- deserialize+               skip 20+               return+                 (MkDeviceMappingNotifyEvent device_id request first_keycode count+                    time)+ +data ChangeDeviceNotifyEvent = MkChangeDeviceNotifyEvent{device_id_ChangeDeviceNotifyEvent+                                                         :: Word8,+                                                         time_ChangeDeviceNotifyEvent :: TIMESTAMP,+                                                         request_ChangeDeviceNotifyEvent :: Word8}+                             deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ChangeDeviceNotifyEvent+ +instance Deserialize ChangeDeviceNotifyEvent where+        deserialize+          = do skip 1+               device_id <- deserialize+               skip 2+               time <- deserialize+               request <- deserialize+               skip 23+               return (MkChangeDeviceNotifyEvent device_id time request)+ +data DeviceKeyStateNotifyEvent = MkDeviceKeyStateNotifyEvent{device_id_DeviceKeyStateNotifyEvent+                                                             :: Word8,+                                                             keys_DeviceKeyStateNotifyEvent ::+                                                             [Word8]}+                               deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceKeyStateNotifyEvent+ +instance Deserialize DeviceKeyStateNotifyEvent where+        deserialize+          = do skip 1+               device_id <- deserialize+               skip 2+               keys <- deserializeList (fromIntegral 28)+               return (MkDeviceKeyStateNotifyEvent device_id keys)+ +data DeviceButtonStateNotifyEvent = MkDeviceButtonStateNotifyEvent{device_id_DeviceButtonStateNotifyEvent+                                                                   :: Word8,+                                                                   buttons_DeviceButtonStateNotifyEvent+                                                                   :: [Word8]}+                                  deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DeviceButtonStateNotifyEvent+ +instance Deserialize DeviceButtonStateNotifyEvent where+        deserialize+          = do skip 1+               device_id <- deserialize+               skip 2+               buttons <- deserializeList (fromIntegral 28)+               return (MkDeviceButtonStateNotifyEvent device_id buttons)+ +data DevicePresenceNotifyEvent = MkDevicePresenceNotifyEvent{time_DevicePresenceNotifyEvent+                                                             :: TIMESTAMP,+                                                             devchange_DevicePresenceNotifyEvent ::+                                                             Word8,+                                                             device_id_DevicePresenceNotifyEvent ::+                                                             Word8,+                                                             control_DevicePresenceNotifyEvent ::+                                                             Word16}+                               deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DevicePresenceNotifyEvent+ +instance Deserialize DevicePresenceNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               time <- deserialize+               devchange <- deserialize+               device_id <- deserialize+               control <- deserialize+               skip 20+               return+                 (MkDevicePresenceNotifyEvent time devchange device_id control)
patched/Graphics/XHB/Gen/RandR.hs view
@@ -6,6 +6,8 @@         deleteOutputProperty, getOutputProperty, createMode, destroyMode,         addOutputMode, deleteOutputMode, getCrtcInfo, setCrtcConfig,         getCrtcGammaSize, getCrtcGamma, setCrtcGamma,+        getScreenResourcesCurrent, setCrtcTransform, getCrtcTransform,+        getPanning, setPanning, setOutputPrimary, getOutputPrimary,         module Graphics.XHB.Gen.RandR.Types)        where import Graphics.XHB.Gen.RandR.Types@@ -22,6 +24,10 @@ import Graphics.XHB.Gen.Xproto.Types        hiding (deserializeError, deserializeEvent) import qualified Graphics.XHB.Gen.Xproto.Types+import Graphics.XHB.Gen.Render.Types+       hiding (QueryVersion(..), QueryVersionReply(..), deserializeError,+               deserializeEvent)+import qualified Graphics.XHB.Gen.Render.Types   extension :: ExtensionId extension = "RANDR"@@ -49,7 +55,7 @@   selectInput ::               Graphics.XHB.Connection.Types.Connection ->-                WINDOW -> Word16 -> IO ()+                WINDOW -> [NotifyMask] -> IO () selectInput c window enable   = do let req = MkSelectInput window enable        putAction <- serializeExtensionRequest c req@@ -248,3 +254,75 @@   = do putAction <- serializeExtensionRequest c req        let chunk = runPut putAction        sendRequest c chunk+ +getScreenResourcesCurrent ::+                            Graphics.XHB.Connection.Types.Connection ->+                              WINDOW -> IO (Receipt GetScreenResourcesCurrentReply)+getScreenResourcesCurrent c window+  = do (receipt, rReceipt) <- newDeserReceipt+       let req = MkGetScreenResourcesCurrent window+       putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequestWithReply c chunk rReceipt+       return receipt+ +setCrtcTransform ::+                   Graphics.XHB.Connection.Types.Connection ->+                     SetCrtcTransform -> IO ()+setCrtcTransform c req+  = do putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequest c chunk+ +getCrtcTransform ::+                   Graphics.XHB.Connection.Types.Connection ->+                     CRTC -> IO (Receipt GetCrtcTransformReply)+getCrtcTransform c crtc+  = do (receipt, rReceipt) <- newDeserReceipt+       let req = MkGetCrtcTransform crtc+       putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequestWithReply c chunk rReceipt+       return receipt+ +getPanning ::+             Graphics.XHB.Connection.Types.Connection ->+               CRTC -> IO (Receipt GetPanningReply)+getPanning c crtc+  = do (receipt, rReceipt) <- newDeserReceipt+       let req = MkGetPanning crtc+       putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequestWithReply c chunk rReceipt+       return receipt+ +setPanning ::+             Graphics.XHB.Connection.Types.Connection ->+               SetPanning -> IO (Receipt SetPanningReply)+setPanning c req+  = do (receipt, rReceipt) <- newDeserReceipt+       putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequestWithReply c chunk rReceipt+       return receipt+ +setOutputPrimary ::+                   Graphics.XHB.Connection.Types.Connection ->+                     WINDOW -> OUTPUT -> IO ()+setOutputPrimary c window output+  = do let req = MkSetOutputPrimary window output+       putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequest c chunk+ +getOutputPrimary ::+                   Graphics.XHB.Connection.Types.Connection ->+                     WINDOW -> IO (Receipt OUTPUT)+getOutputPrimary c window+  = do (receipt, rReceipt) <- newEmptyReceipt+                                (runGet (output_GetOutputPrimaryReply `fmap` deserialize))+       let req = MkGetOutputPrimary window+       putAction <- serializeExtensionRequest c req+       let chunk = runPut putAction+       sendRequestWithReply c chunk rReceipt+       return receipt
patched/Graphics/XHB/Gen/RandR/Types.hs view
@@ -1,8 +1,8 @@ module Graphics.XHB.Gen.RandR.Types        (deserializeError, deserializeEvent, MODE, CRTC, OUTPUT,         Rotation(..), ScreenSize(..), RefreshRates(..), QueryVersion(..),-        QueryVersionReply(..), SetScreenConfig(..),-        SetScreenConfigReply(..), SetConfig(..), SelectInput(..),+        QueryVersionReply(..), SetConfig(..), SetScreenConfig(..),+        SetScreenConfigReply(..), NotifyMask(..), SelectInput(..),         GetScreenInfo(..), GetScreenInfoReply(..), GetScreenSizeRange(..),         GetScreenSizeRangeReply(..), SetScreenSize(..), ModeFlag(..),         ModeInfo(..), GetScreenResources(..), GetScreenResourcesReply(..),@@ -16,9 +16,14 @@         GetCrtcInfo(..), GetCrtcInfoReply(..), SetCrtcConfig(..),         SetCrtcConfigReply(..), GetCrtcGammaSize(..),         GetCrtcGammaSizeReply(..), GetCrtcGamma(..), GetCrtcGammaReply(..),-        SetCrtcGamma(..), NotifyMask(..), ScreenChangeNotify(..),-        NotifyEnum(..), CrtcChange(..), OutputChange(..), OutputProperty(..),-        Notify(..),NotifyData(..))+        SetCrtcGamma(..), GetScreenResourcesCurrent(..),+        GetScreenResourcesCurrentReply(..), SetCrtcTransform(..),+        GetCrtcTransform(..), GetCrtcTransformReply(..), GetPanning(..),+        GetPanningReply(..), SetPanning(..), SetPanningReply(..),+        SetOutputPrimary(..), GetOutputPrimary(..),+        GetOutputPrimaryReply(..), ScreenChangeNotifyEvent(..), Notify(..),+        CrtcChange(..), OutputChange(..), OutputProperty(..),+        NotifyEvent(..), NotifyData(..))        where import Data.Word import Data.Int@@ -35,15 +40,20 @@ import Graphics.XHB.Gen.Xproto.Types        hiding (deserializeError, deserializeEvent) import qualified Graphics.XHB.Gen.Xproto.Types+import Graphics.XHB.Gen.Render.Types+       hiding (QueryVersion(..), QueryVersionReply(..), deserializeError,+               deserializeEvent)+import qualified Graphics.XHB.Gen.Render.Types   deserializeError :: Word8 -> Maybe (Get SomeError) deserializeError _ = Nothing   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get ScreenChangeNotify))+  = return+      (liftM toEvent (deserialize :: Get ScreenChangeNotifyEvent)) deserializeEvent 1-  = return (liftM toEvent (deserialize :: Get Notify))+  = return (liftM toEvent (deserialize :: Get NotifyEvent)) deserializeEvent _ = Nothing   newtype MODE = MkMODE Xid@@ -154,12 +164,28 @@                let _ = isCard32 length                return (MkQueryVersionReply major_version minor_version)  +data SetConfig = SetConfigSuccess+               | SetConfigInvalidConfigTime+               | SetConfigInvalidTime+               | SetConfigFailed+               deriving Show+ +instance SimpleEnum SetConfig where+        toValue SetConfigSuccess{} = 0+        toValue SetConfigInvalidConfigTime{} = 1+        toValue SetConfigInvalidTime{} = 2+        toValue SetConfigFailed{} = 3+        fromValue 0 = SetConfigSuccess+        fromValue 1 = SetConfigInvalidConfigTime+        fromValue 2 = SetConfigInvalidTime+        fromValue 3 = SetConfigFailed+  data SetScreenConfig = MkSetScreenConfig{window_SetScreenConfig ::                                          WINDOW,                                          timestamp_SetScreenConfig :: TIMESTAMP,                                          config_timestamp_SetScreenConfig :: TIMESTAMP,                                          sizeID_SetScreenConfig :: Word16,-                                         rotation_SetScreenConfig :: Word16,+                                         rotation_SetScreenConfig :: [Rotation],                                          rate_SetScreenConfig :: Word16}                      deriving (Show, Typeable)  @@ -173,7 +199,7 @@                          size (timestamp_SetScreenConfig x)                          + size (config_timestamp_SetScreenConfig x)                          + size (sizeID_SetScreenConfig x)-                         + size (rotation_SetScreenConfig x)+                         + size (undefined :: Word16)                          + size (rate_SetScreenConfig x)                          + 2                serialize (convertBytesToRequestSize size__ :: Int16)@@ -181,54 +207,54 @@                serialize (timestamp_SetScreenConfig x)                serialize (config_timestamp_SetScreenConfig x)                serialize (sizeID_SetScreenConfig x)-               serialize (rotation_SetScreenConfig x)+               serialize (toMask (rotation_SetScreenConfig x) :: Word16)                serialize (rate_SetScreenConfig x)                putSkip 2                putSkip (requiredPadding size__)   data SetScreenConfigReply = MkSetScreenConfigReply{status_SetScreenConfigReply-                                                   :: Word8,+                                                   :: SetConfig,                                                    new_timestamp_SetScreenConfigReply :: TIMESTAMP,                                                    config_timestamp_SetScreenConfigReply ::                                                    TIMESTAMP,                                                    root_SetScreenConfigReply :: WINDOW,-                                                   subpixel_order_SetScreenConfigReply :: Word16}+                                                   subpixel_order_SetScreenConfigReply :: SubPixel}                           deriving (Show, Typeable)   instance Deserialize SetScreenConfigReply where         deserialize           = do skip 1-               status <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)                skip 2                length <- deserialize                new_timestamp <- deserialize                config_timestamp <- deserialize                root <- deserialize-               subpixel_order <- deserialize+               subpixel_order <- liftM fromValue (deserialize :: Get Word16)                skip 10                let _ = isCard32 length                return                  (MkSetScreenConfigReply status new_timestamp config_timestamp root                     subpixel_order)  -data SetConfig = SetConfigSuccess-               | SetConfigInvalidConfigTime-               | SetConfigInvalidTime-               | SetConfigFailed-               deriving Show+data NotifyMask = NotifyMaskScreenChange+                | NotifyMaskCrtcChange+                | NotifyMaskOutputChange+                | NotifyMaskOutputProperty+                deriving Show  -instance SimpleEnum SetConfig where-        toValue SetConfigSuccess{} = 0-        toValue SetConfigInvalidConfigTime{} = 1-        toValue SetConfigInvalidTime{} = 2-        toValue SetConfigFailed{} = 3-        fromValue 0 = SetConfigSuccess-        fromValue 1 = SetConfigInvalidConfigTime-        fromValue 2 = SetConfigInvalidTime-        fromValue 3 = SetConfigFailed+instance BitEnum NotifyMask where+        toBit NotifyMaskScreenChange{} = 0+        toBit NotifyMaskCrtcChange{} = 1+        toBit NotifyMaskOutputChange{} = 2+        toBit NotifyMaskOutputProperty{} = 3+        fromBit 0 = NotifyMaskScreenChange+        fromBit 1 = NotifyMaskCrtcChange+        fromBit 2 = NotifyMaskOutputChange+        fromBit 3 = NotifyMaskOutputProperty   data SelectInput = MkSelectInput{window_SelectInput :: WINDOW,-                                 enable_SelectInput :: Word16}+                                 enable_SelectInput :: [NotifyMask]}                  deriving (Show, Typeable)   instance ExtensionRequest SelectInput where@@ -237,10 +263,10 @@           = do putWord8 extOpCode                putWord8 4                let size__-                     = 4 + size (window_SelectInput x) + size (enable_SelectInput x) + 2+                     = 4 + size (window_SelectInput x) + size (undefined :: Word16) + 2                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_SelectInput x)-               serialize (enable_SelectInput x)+               serialize (toMask (enable_SelectInput x) :: Word16)                putSkip 2                putSkip (requiredPadding size__)  @@ -259,13 +285,13 @@                putSkip (requiredPadding size__)   data GetScreenInfoReply = MkGetScreenInfoReply{rotations_GetScreenInfoReply-                                               :: Word8,+                                               :: [Rotation],                                                root_GetScreenInfoReply :: WINDOW,                                                timestamp_GetScreenInfoReply :: TIMESTAMP,                                                config_timestamp_GetScreenInfoReply :: TIMESTAMP,                                                nSizes_GetScreenInfoReply :: Word16,                                                sizeID_GetScreenInfoReply :: Word16,-                                               rotation_GetScreenInfoReply :: Word16,+                                               rotation_GetScreenInfoReply :: [Rotation],                                                rate_GetScreenInfoReply :: Word16,                                                nInfo_GetScreenInfoReply :: Word16,                                                sizes_GetScreenInfoReply :: [ScreenSize],@@ -275,7 +301,7 @@ instance Deserialize GetScreenInfoReply where         deserialize           = do skip 1-               rotations <- deserialize+               rotations <- liftM fromMask (deserialize :: Get Word8)                skip 2                length <- deserialize                root <- deserialize@@ -283,7 +309,7 @@                config_timestamp <- deserialize                nSizes <- deserialize                sizeID <- deserialize-               rotation <- deserialize+               rotation <- liftM fromMask (deserialize :: Get Word16)                rate <- deserialize                nInfo <- deserialize                skip 2@@ -418,7 +444,7 @@                            hsync_end_ModeInfo :: Word16, htotal_ModeInfo :: Word16,                            hskew_ModeInfo :: Word16, vsync_start_ModeInfo :: Word16,                            vsync_end_ModeInfo :: Word16, vtotal_ModeInfo :: Word16,-                           name_len_ModeInfo :: Word16, mode_flags_ModeInfo :: Word32}+                           name_len_ModeInfo :: Word16, mode_flags_ModeInfo :: [ModeFlag]}               deriving (Show, Typeable)   instance Serialize ModeInfo where@@ -435,7 +461,7 @@                serialize (vsync_end_ModeInfo x)                serialize (vtotal_ModeInfo x)                serialize (name_len_ModeInfo x)-               serialize (mode_flags_ModeInfo x)+               serialize (toMask (mode_flags_ModeInfo x) :: Word32)         size x           = size (id_ModeInfo x) + size (width_ModeInfo x) +               size (height_ModeInfo x)@@ -448,7 +474,7 @@               + size (vsync_end_ModeInfo x)               + size (vtotal_ModeInfo x)               + size (name_len_ModeInfo x)-              + size (mode_flags_ModeInfo x)+              + size (undefined :: Word32)   instance Deserialize ModeInfo where         deserialize@@ -464,7 +490,7 @@                vsync_end <- deserialize                vtotal <- deserialize                name_len <- deserialize-               mode_flags <- deserialize+               mode_flags <- liftM fromMask (deserialize :: Get Word32)                return                  (MkModeInfo id width height dot_clock hsync_start hsync_end htotal                     hskew@@ -568,13 +594,13 @@                putSkip (requiredPadding size__)   data GetOutputInfoReply = MkGetOutputInfoReply{status_GetOutputInfoReply-                                               :: Word8,+                                               :: SetConfig,                                                timestamp_GetOutputInfoReply :: TIMESTAMP,                                                crtc_GetOutputInfoReply :: CRTC,                                                mm_width_GetOutputInfoReply :: Word32,                                                mm_height_GetOutputInfoReply :: Word32,-                                               connection_GetOutputInfoReply :: Word8,-                                               subpixel_order_GetOutputInfoReply :: Word8,+                                               connection_GetOutputInfoReply :: Connection,+                                               subpixel_order_GetOutputInfoReply :: SubPixel,                                                num_crtcs_GetOutputInfoReply :: Word16,                                                num_modes_GetOutputInfoReply :: Word16,                                                num_preferred_GetOutputInfoReply :: Word16,@@ -589,15 +615,15 @@ instance Deserialize GetOutputInfoReply where         deserialize           = do skip 1-               status <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)                skip 2                length <- deserialize                timestamp <- deserialize                crtc <- deserialize                mm_width <- deserialize                mm_height <- deserialize-               connection <- deserialize-               subpixel_order <- deserialize+               connection <- liftM fromValue (deserialize :: Get Word8)+               subpixel_order <- liftM fromValue (deserialize :: Get Word8)                num_crtcs <- deserialize                num_modes <- deserialize                num_preferred <- deserialize@@ -730,7 +756,7 @@                                                    property_ChangeOutputProperty :: ATOM,                                                    type_ChangeOutputProperty :: ATOM,                                                    format_ChangeOutputProperty :: Word8,-                                                   mode_ChangeOutputProperty :: Word8,+                                                   mode_ChangeOutputProperty :: PropMode,                                                    num_units_ChangeOutputProperty :: Word32,                                                    data_ChangeOutputProperty :: [Word8]}                           deriving (Show, Typeable)@@ -745,7 +771,7 @@                          size (property_ChangeOutputProperty x)                          + size (type_ChangeOutputProperty x)                          + size (format_ChangeOutputProperty x)-                         + size (mode_ChangeOutputProperty x)+                         + size (undefined :: Word8)                          + 2                          + size (num_units_ChangeOutputProperty x)                          + sum (map size (data_ChangeOutputProperty x))@@ -754,7 +780,7 @@                serialize (property_ChangeOutputProperty x)                serialize (type_ChangeOutputProperty x)                serialize (format_ChangeOutputProperty x)-               serialize (mode_ChangeOutputProperty x)+               serialize (toValue (mode_ChangeOutputProperty x) :: Word8)                putSkip 2                serialize (num_units_ChangeOutputProperty x)                serializeList (data_ChangeOutputProperty x)@@ -937,14 +963,14 @@                putSkip (requiredPadding size__)   data GetCrtcInfoReply = MkGetCrtcInfoReply{status_GetCrtcInfoReply-                                           :: Word8,+                                           :: SetConfig,                                            timestamp_GetCrtcInfoReply :: TIMESTAMP,                                            x_GetCrtcInfoReply :: Int16, y_GetCrtcInfoReply :: Int16,                                            width_GetCrtcInfoReply :: Word16,                                            height_GetCrtcInfoReply :: Word16,                                            mode_GetCrtcInfoReply :: MODE,-                                           rotation_GetCrtcInfoReply :: Word16,-                                           rotations_GetCrtcInfoReply :: Word16,+                                           rotation_GetCrtcInfoReply :: [Rotation],+                                           rotations_GetCrtcInfoReply :: [Rotation],                                            num_outputs_GetCrtcInfoReply :: Word16,                                            num_possible_outputs_GetCrtcInfoReply :: Word16,                                            outputs_GetCrtcInfoReply :: [OUTPUT],@@ -954,7 +980,7 @@ instance Deserialize GetCrtcInfoReply where         deserialize           = do skip 1-               status <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)                skip 2                length <- deserialize                timestamp <- deserialize@@ -963,8 +989,8 @@                width <- deserialize                height <- deserialize                mode <- deserialize-               rotation <- deserialize-               rotations <- deserialize+               rotation <- liftM fromMask (deserialize :: Get Word16)+               rotations <- liftM fromMask (deserialize :: Get Word16)                num_outputs <- deserialize                num_possible_outputs <- deserialize                outputs <- deserializeList (fromIntegral num_outputs)@@ -982,7 +1008,8 @@                                      timestamp_SetCrtcConfig :: TIMESTAMP,                                      config_timestamp_SetCrtcConfig :: TIMESTAMP,                                      x_SetCrtcConfig :: Int16, y_SetCrtcConfig :: Int16,-                                     mode_SetCrtcConfig :: MODE, rotation_SetCrtcConfig :: Word16,+                                     mode_SetCrtcConfig :: MODE,+                                     rotation_SetCrtcConfig :: [Rotation],                                      outputs_SetCrtcConfig :: [OUTPUT]}                    deriving (Show, Typeable)  @@ -998,7 +1025,7 @@                          + size (x_SetCrtcConfig x)                          + size (y_SetCrtcConfig x)                          + size (mode_SetCrtcConfig x)-                         + size (rotation_SetCrtcConfig x)+                         + size (undefined :: Word16)                          + 2                          + sum (map size (outputs_SetCrtcConfig x))                serialize (convertBytesToRequestSize size__ :: Int16)@@ -1008,20 +1035,20 @@                serialize (x_SetCrtcConfig x)                serialize (y_SetCrtcConfig x)                serialize (mode_SetCrtcConfig x)-               serialize (rotation_SetCrtcConfig x)+               serialize (toMask (rotation_SetCrtcConfig x) :: Word16)                putSkip 2                serializeList (outputs_SetCrtcConfig x)                putSkip (requiredPadding size__)   data SetCrtcConfigReply = MkSetCrtcConfigReply{status_SetCrtcConfigReply-                                               :: Word8,+                                               :: SetConfig,                                                timestamp_SetCrtcConfigReply :: TIMESTAMP}                         deriving (Show, Typeable)   instance Deserialize SetCrtcConfigReply where         deserialize           = do skip 1-               status <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)                skip 2                length <- deserialize                timestamp <- deserialize@@ -1116,55 +1143,372 @@                serializeList (blue_SetCrtcGamma x)                putSkip (requiredPadding size__)  -data NotifyMask = NotifyMaskScreenChange-                | NotifyMaskCrtcChange-                | NotifyMaskOutputChange-                | NotifyMaskOutputProperty-                deriving Show+data GetScreenResourcesCurrent = MkGetScreenResourcesCurrent{window_GetScreenResourcesCurrent+                                                             :: WINDOW}+                               deriving (Show, Typeable)  -instance BitEnum NotifyMask where-        toBit NotifyMaskScreenChange{} = 0-        toBit NotifyMaskCrtcChange{} = 1-        toBit NotifyMaskOutputChange{} = 2-        toBit NotifyMaskOutputProperty{} = 3-        fromBit 0 = NotifyMaskScreenChange-        fromBit 1 = NotifyMaskCrtcChange-        fromBit 2 = NotifyMaskOutputChange-        fromBit 3 = NotifyMaskOutputProperty+instance ExtensionRequest GetScreenResourcesCurrent where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 25+               let size__ = 4 + size (window_GetScreenResourcesCurrent x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_GetScreenResourcesCurrent x)+               putSkip (requiredPadding size__)  -data ScreenChangeNotify = MkScreenChangeNotify{rotation_ScreenChangeNotify-                                               :: Word8,-                                               timestamp_ScreenChangeNotify :: TIMESTAMP,-                                               config_timestamp_ScreenChangeNotify :: TIMESTAMP,-                                               root_ScreenChangeNotify :: WINDOW,-                                               request_window_ScreenChangeNotify :: WINDOW,-                                               sizeID_ScreenChangeNotify :: Word16,-                                               subpixel_order_ScreenChangeNotify :: Word16,-                                               width_ScreenChangeNotify :: Word16,-                                               height_ScreenChangeNotify :: Word16,-                                               mwidth_ScreenChangeNotify :: Word16,-                                               mheight_ScreenChangeNotify :: Word16}-                        deriving (Show, Typeable)+data GetScreenResourcesCurrentReply = MkGetScreenResourcesCurrentReply{timestamp_GetScreenResourcesCurrentReply+                                                                       :: TIMESTAMP,+                                                                       config_timestamp_GetScreenResourcesCurrentReply+                                                                       :: TIMESTAMP,+                                                                       num_crtcs_GetScreenResourcesCurrentReply+                                                                       :: Word16,+                                                                       num_outputs_GetScreenResourcesCurrentReply+                                                                       :: Word16,+                                                                       num_modes_GetScreenResourcesCurrentReply+                                                                       :: Word16,+                                                                       names_len_GetScreenResourcesCurrentReply+                                                                       :: Word16,+                                                                       crtcs_GetScreenResourcesCurrentReply+                                                                       :: [CRTC],+                                                                       outputs_GetScreenResourcesCurrentReply+                                                                       :: [OUTPUT],+                                                                       modes_GetScreenResourcesCurrentReply+                                                                       :: [ModeInfo],+                                                                       names_GetScreenResourcesCurrentReply+                                                                       :: [Word8]}+                                    deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event ScreenChangeNotify+instance Deserialize GetScreenResourcesCurrentReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               timestamp <- deserialize+               config_timestamp <- deserialize+               num_crtcs <- deserialize+               num_outputs <- deserialize+               num_modes <- deserialize+               names_len <- deserialize+               skip 8+               crtcs <- deserializeList (fromIntegral num_crtcs)+               outputs <- deserializeList (fromIntegral num_outputs)+               modes <- deserializeList (fromIntegral num_modes)+               names <- deserializeList (fromIntegral names_len)+               let _ = isCard32 length+               return+                 (MkGetScreenResourcesCurrentReply timestamp config_timestamp+                    num_crtcs+                    num_outputs+                    num_modes+                    names_len+                    crtcs+                    outputs+                    modes+                    names)  -instance Deserialize ScreenChangeNotify where+data SetCrtcTransform = MkSetCrtcTransform{crtc_SetCrtcTransform ::+                                           CRTC,+                                           transform_SetCrtcTransform :: TRANSFORM,+                                           filter_len_SetCrtcTransform :: Word16,+                                           filter_name_SetCrtcTransform :: [CChar],+                                           filter_params_SetCrtcTransform :: [FIXED]}+                      deriving (Show, Typeable)+ +instance ExtensionRequest SetCrtcTransform where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 26+               let size__+                     = 4 + size (crtc_SetCrtcTransform x) ++                         size (transform_SetCrtcTransform x)+                         + size (filter_len_SetCrtcTransform x)+                         + 2+                         + sum (map size (filter_name_SetCrtcTransform x))+                         + sum (map size (filter_params_SetCrtcTransform x))+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (crtc_SetCrtcTransform x)+               serialize (transform_SetCrtcTransform x)+               serialize (filter_len_SetCrtcTransform x)+               putSkip 2+               serializeList (filter_name_SetCrtcTransform x)+               serializeList (filter_params_SetCrtcTransform x)+               putSkip (requiredPadding size__)+ +data GetCrtcTransform = MkGetCrtcTransform{crtc_GetCrtcTransform ::+                                           CRTC}+                      deriving (Show, Typeable)+ +instance ExtensionRequest GetCrtcTransform where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 27+               let size__ = 4 + size (crtc_GetCrtcTransform x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (crtc_GetCrtcTransform x)+               putSkip (requiredPadding size__)+ +data GetCrtcTransformReply = MkGetCrtcTransformReply{pending_transform_GetCrtcTransformReply+                                                     :: TRANSFORM,+                                                     has_transforms_GetCrtcTransformReply :: Bool,+                                                     current_transform_GetCrtcTransformReply ::+                                                     TRANSFORM,+                                                     pending_len_GetCrtcTransformReply :: Word16,+                                                     pending_nparams_GetCrtcTransformReply ::+                                                     Word16,+                                                     current_len_GetCrtcTransformReply :: Word16,+                                                     current_nparams_GetCrtcTransformReply ::+                                                     Word16,+                                                     pending_filter_name_GetCrtcTransformReply ::+                                                     [CChar],+                                                     pending_params_GetCrtcTransformReply ::+                                                     [FIXED],+                                                     current_filter_name_GetCrtcTransformReply ::+                                                     [CChar],+                                                     current_params_GetCrtcTransformReply ::+                                                     [FIXED]}+                           deriving (Show, Typeable)+ +instance Deserialize GetCrtcTransformReply where         deserialize           = do skip 1-               rotation <- deserialize+               skip 1                skip 2+               length <- deserialize+               pending_transform <- deserialize+               has_transforms <- deserialize+               skip 3+               current_transform <- deserialize+               skip 4+               pending_len <- deserialize+               pending_nparams <- deserialize+               current_len <- deserialize+               current_nparams <- deserialize+               pending_filter_name <- deserializeList (fromIntegral pending_len)+               pending_params <- deserializeList (fromIntegral pending_nparams)+               current_filter_name <- deserializeList (fromIntegral current_len)+               current_params <- deserializeList (fromIntegral current_nparams)+               let _ = isCard32 length+               return+                 (MkGetCrtcTransformReply pending_transform has_transforms+                    current_transform+                    pending_len+                    pending_nparams+                    current_len+                    current_nparams+                    pending_filter_name+                    pending_params+                    current_filter_name+                    current_params)+ +data GetPanning = MkGetPanning{crtc_GetPanning :: CRTC}+                deriving (Show, Typeable)+ +instance ExtensionRequest GetPanning where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 28+               let size__ = 4 + size (crtc_GetPanning x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (crtc_GetPanning x)+               putSkip (requiredPadding size__)+ +data GetPanningReply = MkGetPanningReply{status_GetPanningReply ::+                                         SetConfig,+                                         timestamp_GetPanningReply :: TIMESTAMP,+                                         left_GetPanningReply :: Word16,+                                         top_GetPanningReply :: Word16,+                                         width_GetPanningReply :: Word16,+                                         height_GetPanningReply :: Word16,+                                         track_left_GetPanningReply :: Word16,+                                         track_top_GetPanningReply :: Word16,+                                         track_width_GetPanningReply :: Word16,+                                         track_height_GetPanningReply :: Word16,+                                         border_left_GetPanningReply :: Int16,+                                         border_top_GetPanningReply :: Int16,+                                         border_right_GetPanningReply :: Int16,+                                         border_bottom_GetPanningReply :: Int16}+                     deriving (Show, Typeable)+ +instance Deserialize GetPanningReply where+        deserialize+          = do skip 1+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize                timestamp <- deserialize+               left <- deserialize+               top <- deserialize+               width <- deserialize+               height <- deserialize+               track_left <- deserialize+               track_top <- deserialize+               track_width <- deserialize+               track_height <- deserialize+               border_left <- deserialize+               border_top <- deserialize+               border_right <- deserialize+               border_bottom <- deserialize+               let _ = isCard32 length+               return+                 (MkGetPanningReply status timestamp left top width height+                    track_left+                    track_top+                    track_width+                    track_height+                    border_left+                    border_top+                    border_right+                    border_bottom)+ +data SetPanning = MkSetPanning{crtc_SetPanning :: CRTC,+                               timestamp_SetPanning :: TIMESTAMP, left_SetPanning :: Word16,+                               top_SetPanning :: Word16, width_SetPanning :: Word16,+                               height_SetPanning :: Word16, track_left_SetPanning :: Word16,+                               track_top_SetPanning :: Word16, track_width_SetPanning :: Word16,+                               track_height_SetPanning :: Word16, border_left_SetPanning :: Int16,+                               border_top_SetPanning :: Int16, border_right_SetPanning :: Int16,+                               border_bottom_SetPanning :: Int16}+                deriving (Show, Typeable)+ +instance ExtensionRequest SetPanning where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 29+               let size__+                     = 4 + size (crtc_SetPanning x) + size (timestamp_SetPanning x) ++                         size (left_SetPanning x)+                         + size (top_SetPanning x)+                         + size (width_SetPanning x)+                         + size (height_SetPanning x)+                         + size (track_left_SetPanning x)+                         + size (track_top_SetPanning x)+                         + size (track_width_SetPanning x)+                         + size (track_height_SetPanning x)+                         + size (border_left_SetPanning x)+                         + size (border_top_SetPanning x)+                         + size (border_right_SetPanning x)+                         + size (border_bottom_SetPanning x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (crtc_SetPanning x)+               serialize (timestamp_SetPanning x)+               serialize (left_SetPanning x)+               serialize (top_SetPanning x)+               serialize (width_SetPanning x)+               serialize (height_SetPanning x)+               serialize (track_left_SetPanning x)+               serialize (track_top_SetPanning x)+               serialize (track_width_SetPanning x)+               serialize (track_height_SetPanning x)+               serialize (border_left_SetPanning x)+               serialize (border_top_SetPanning x)+               serialize (border_right_SetPanning x)+               serialize (border_bottom_SetPanning x)+               putSkip (requiredPadding size__)+ +data SetPanningReply = MkSetPanningReply{status_SetPanningReply ::+                                         SetConfig,+                                         timestamp_SetPanningReply :: TIMESTAMP}+                     deriving (Show, Typeable)+ +instance Deserialize SetPanningReply where+        deserialize+          = do skip 1+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               timestamp <- deserialize+               let _ = isCard32 length+               return (MkSetPanningReply status timestamp)+ +data SetOutputPrimary = MkSetOutputPrimary{window_SetOutputPrimary+                                           :: WINDOW,+                                           output_SetOutputPrimary :: OUTPUT}+                      deriving (Show, Typeable)+ +instance ExtensionRequest SetOutputPrimary where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 30+               let size__+                     = 4 + size (window_SetOutputPrimary x) ++                         size (output_SetOutputPrimary x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_SetOutputPrimary x)+               serialize (output_SetOutputPrimary x)+               putSkip (requiredPadding size__)+ +data GetOutputPrimary = MkGetOutputPrimary{window_GetOutputPrimary+                                           :: WINDOW}+                      deriving (Show, Typeable)+ +instance ExtensionRequest GetOutputPrimary where+        extensionId _ = "RANDR"+        serializeRequest x extOpCode+          = do putWord8 extOpCode+               putWord8 31+               let size__ = 4 + size (window_GetOutputPrimary x)+               serialize (convertBytesToRequestSize size__ :: Int16)+               serialize (window_GetOutputPrimary x)+               putSkip (requiredPadding size__)+ +data GetOutputPrimaryReply = MkGetOutputPrimaryReply{output_GetOutputPrimaryReply+                                                     :: OUTPUT}+                           deriving (Show, Typeable)+ +instance Deserialize GetOutputPrimaryReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               output <- deserialize+               let _ = isCard32 length+               return (MkGetOutputPrimaryReply output)+ +data ScreenChangeNotifyEvent = MkScreenChangeNotifyEvent{rotation_ScreenChangeNotifyEvent+                                                         :: [Rotation],+                                                         timestamp_ScreenChangeNotifyEvent ::+                                                         TIMESTAMP,+                                                         config_timestamp_ScreenChangeNotifyEvent ::+                                                         TIMESTAMP,+                                                         root_ScreenChangeNotifyEvent :: WINDOW,+                                                         request_window_ScreenChangeNotifyEvent ::+                                                         WINDOW,+                                                         sizeID_ScreenChangeNotifyEvent :: Word16,+                                                         subpixel_order_ScreenChangeNotifyEvent ::+                                                         SubPixel,+                                                         width_ScreenChangeNotifyEvent :: Word16,+                                                         height_ScreenChangeNotifyEvent :: Word16,+                                                         mwidth_ScreenChangeNotifyEvent :: Word16,+                                                         mheight_ScreenChangeNotifyEvent :: Word16}+                             deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ScreenChangeNotifyEvent+ +instance Deserialize ScreenChangeNotifyEvent where+        deserialize+          = do skip 1+               rotation <- liftM fromMask (deserialize :: Get Word8)+               skip 2+               timestamp <- deserialize                config_timestamp <- deserialize                root <- deserialize                request_window <- deserialize                sizeID <- deserialize-               subpixel_order <- deserialize+               subpixel_order <- liftM fromValue (deserialize :: Get Word16)                width <- deserialize                height <- deserialize                mwidth <- deserialize                mheight <- deserialize                return-                 (MkScreenChangeNotify rotation timestamp config_timestamp root+                 (MkScreenChangeNotifyEvent rotation timestamp config_timestamp root                     request_window                     sizeID                     subpixel_order@@ -1173,12 +1517,12 @@                     mwidth                     mheight)  -data NotifyEnum = NotifyCrtcChange+data Notify = NotifyCrtcChange             | NotifyOutputChange             | NotifyOutputProperty             deriving Show  -instance SimpleEnum NotifyEnum where+instance SimpleEnum Notify where         toValue NotifyCrtcChange{} = 0         toValue NotifyOutputChange{} = 1         toValue NotifyOutputProperty{} = 2@@ -1188,7 +1532,7 @@   data CrtcChange = MkCrtcChange{timestamp_CrtcChange :: TIMESTAMP,                                window_CrtcChange :: WINDOW, crtc_CrtcChange :: CRTC,-                               mode_CrtcChange :: MODE, rotation_CrtcChange :: Word16,+                               mode_CrtcChange :: MODE, rotation_CrtcChange :: [Rotation],                                x_CrtcChange :: Int16, y_CrtcChange :: Int16,                                width_CrtcChange :: Word16, height_CrtcChange :: Word16}                 deriving (Show, Typeable)@@ -1199,7 +1543,7 @@                serialize (window_CrtcChange x)                serialize (crtc_CrtcChange x)                serialize (mode_CrtcChange x)-               serialize (rotation_CrtcChange x)+               serialize (toMask (rotation_CrtcChange x) :: Word16)                putSkip 2                serialize (x_CrtcChange x)                serialize (y_CrtcChange x)@@ -1209,7 +1553,7 @@           = size (timestamp_CrtcChange x) + size (window_CrtcChange x) +               size (crtc_CrtcChange x)               + size (mode_CrtcChange x)-              + size (rotation_CrtcChange x)+              + size (undefined :: Word16)               + 2               + size (x_CrtcChange x)               + size (y_CrtcChange x)@@ -1222,7 +1566,7 @@                window <- deserialize                crtc <- deserialize                mode <- deserialize-               rotation <- deserialize+               rotation <- liftM fromMask (deserialize :: Get Word16)                skip 2                x <- deserialize                y <- deserialize@@ -1236,9 +1580,9 @@                                    config_timestamp_OutputChange :: TIMESTAMP,                                    window_OutputChange :: WINDOW, output_OutputChange :: OUTPUT,                                    crtc_OutputChange :: CRTC, mode_OutputChange :: MODE,-                                   rotation_OutputChange :: Word16,-                                   connection_OutputChange :: Word8,-                                   subpixel_order_OutputChange :: Word8}+                                   rotation_OutputChange :: [Rotation],+                                   connection_OutputChange :: Connection,+                                   subpixel_order_OutputChange :: SubPixel}                   deriving (Show, Typeable)   instance Serialize OutputChange where@@ -1249,9 +1593,9 @@                serialize (output_OutputChange x)                serialize (crtc_OutputChange x)                serialize (mode_OutputChange x)-               serialize (rotation_OutputChange x)-               serialize (connection_OutputChange x)-               serialize (subpixel_order_OutputChange x)+               serialize (toMask (rotation_OutputChange x) :: Word16)+               serialize (toValue (connection_OutputChange x) :: Word8)+               serialize (toValue (subpixel_order_OutputChange x) :: Word8)         size x           = size (timestamp_OutputChange x) +               size (config_timestamp_OutputChange x)@@ -1259,9 +1603,9 @@               + size (output_OutputChange x)               + size (crtc_OutputChange x)               + size (mode_OutputChange x)-              + size (rotation_OutputChange x)-              + size (connection_OutputChange x)-              + size (subpixel_order_OutputChange x)+              + size (undefined :: Word16)+              + size (undefined :: Word8)+              + size (undefined :: Word8)   instance Deserialize OutputChange where         deserialize@@ -1271,9 +1615,9 @@                output <- deserialize                crtc <- deserialize                mode <- deserialize-               rotation <- deserialize-               connection <- deserialize-               subpixel_order <- deserialize+               rotation <- liftM fromMask (deserialize :: Get Word16)+               connection <- liftM fromValue (deserialize :: Get Word8)+               subpixel_order <- liftM fromValue (deserialize :: Get Word8)                return                  (MkOutputChange timestamp config_timestamp window output crtc mode                     rotation@@ -1284,7 +1628,7 @@                                        WINDOW,                                        output_OutputProperty :: OUTPUT, atom_OutputProperty :: ATOM,                                        timestamp_OutputProperty :: TIMESTAMP,-                                       status_OutputProperty :: Word8}+                                       status_OutputProperty :: Property}                     deriving (Show, Typeable)   instance Serialize OutputProperty where@@ -1293,13 +1637,13 @@                serialize (output_OutputProperty x)                serialize (atom_OutputProperty x)                serialize (timestamp_OutputProperty x)-               serialize (status_OutputProperty x)+               serialize (toValue (status_OutputProperty x) :: Word8)                putSkip 11         size x           = size (window_OutputProperty x) + size (output_OutputProperty x) +               size (atom_OutputProperty x)               + size (timestamp_OutputProperty x)-              + size (status_OutputProperty x)+              + size (undefined :: Word8)               + 11   instance Deserialize OutputProperty where@@ -1308,7 +1652,7 @@                output <- deserialize                atom <- deserialize                timestamp <- deserialize-               status <- deserialize+               status <- liftM fromValue (deserialize :: Get Word8)                skip 11                return (MkOutputProperty window output atom timestamp status) @@ -1322,32 +1666,31 @@     serialize  (NotifyDataCrtcChange x) = serialize x     serialize  (NotifyDataOutputChange x) = serialize x     serialize  (NotifyDataOutputProperty x) = serialize x-     size (NotifyDataCrtcChange x) = size x     size (NotifyDataOutputChange x) = size x     size (NotifyDataOutputProperty x) = size x -deserializeNotifyData :: NotifyEnum -> Get NotifyData+deserializeNotifyData :: Notify -> Get NotifyData deserializeNotifyData NotifyCrtcChange = NotifyDataCrtcChange `liftM` deserialize deserializeNotifyData NotifyOutputChange = NotifyDataOutputChange `liftM` deserialize deserializeNotifyData NotifyOutputProperty = NotifyDataOutputProperty `liftM` deserialize -subCodeToNotifyEnum :: Word8 -> NotifyEnum+subCodeToNotifyEnum :: Word8 -> Notify subCodeToNotifyEnum 0 = NotifyCrtcChange subCodeToNotifyEnum 1 = NotifyOutputChange subCodeToNotifyEnum 2 = NotifyOutputProperty --data Notify = MkNotify{subCode_Notify :: Word8,-                       u_Notify :: NotifyData}-            deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event Notify+data NotifyEvent = MkNotifyEvent{subCode_NotifyEvent :: Notify,+                                 u_NotifyEvent :: NotifyData}+                 deriving (Show, Typeable)++instance Graphics.XHB.Shared.Event NotifyEvent  -instance Deserialize Notify where+instance Deserialize NotifyEvent where         deserialize           = do skip 1-               subCode <- deserialize+               subCode <- liftM fromValue (deserialize :: Get Word8)                skip 2-               u <- deserializeNotifyData (subCodeToNotifyEnum subCode)-               return (MkNotify subCode u)+               u <- deserializeNotifyData subCode+               return (MkNotifyEvent subCode u)
patched/Graphics/XHB/Gen/Record/Types.hs view
@@ -1,7 +1,7 @@ module Graphics.XHB.Gen.Record.Types        (deserializeError, deserializeEvent, CONTEXT, Range8(..),         Range16(..), ExtRange(..), Range(..), ElementHeader, HType(..),-        ClientSpec, CS(..), ClientInfo(..), BadContext(..),+        ClientSpec, CS(..), ClientInfo(..), BadContextError(..),         QueryVersion(..), QueryVersionReply(..), CreateContext(..),         RegisterClients(..), UnregisterClients(..), GetContext(..),         GetContextReply(..), EnableContext(..), EnableContextReply(..),@@ -22,7 +22,7 @@   deserializeError :: Word8 -> Maybe (Get SomeError) deserializeError 0-  = return (liftM toError (deserialize :: Get BadContext))+  = return (liftM toError (deserialize :: Get BadContextError)) deserializeError _ = Nothing   deserializeEvent :: Word8 -> Maybe (Get SomeEvent)@@ -177,16 +177,17 @@                ranges <- deserializeList (fromIntegral num_ranges)                return (MkClientInfo client_resource num_ranges ranges)  -data BadContext = MkBadContext{invalid_record_BadContext :: Word32}-                deriving (Show, Typeable)+data BadContextError = MkBadContextError{invalid_record_BadContextError+                                         :: Word32}+                     deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadContext+instance Graphics.XHB.Shared.Error BadContextError  -instance Deserialize BadContext where+instance Deserialize BadContextError where         deserialize           = do skip 4                invalid_record <- deserialize-               return (MkBadContext invalid_record)+               return (MkBadContextError invalid_record)   data QueryVersion = MkQueryVersion{major_version_QueryVersion ::                                    Word16,
patched/Graphics/XHB/Gen/Render/Types.hs view
@@ -1,11 +1,11 @@ module Graphics.XHB.Gen.Render.Types-       (deserializeError, deserializeEvent, PictType(..), PictOp(..),-        PolyEdge(..), PolyMode(..), CP(..), SubPixel(..), Repeat(..),-        GLYPH, GLYPHSET, PICTURE, PICTFORMAT, FIXED, DIRECTFORMAT(..),-        PICTFORMINFO(..), PICTVISUAL(..), PICTDEPTH(..), PICTSCREEN(..),-        INDEXVALUE(..), COLOR(..), POINTFIX(..), LINEFIX(..), TRIANGLE(..),-        TRAPEZOID(..), GLYPHINFO(..), QueryVersion(..),-        QueryVersionReply(..), QueryPictFormats(..),+       (deserializeError, deserializeEvent, PictType(..), Picture(..),+        PictOp(..), PolyEdge(..), PolyMode(..), CP(..), SubPixel(..),+        Repeat(..), GLYPH, GLYPHSET, PICTURE, PICTFORMAT, FIXED,+        DIRECTFORMAT(..), PICTFORMINFO(..), PICTVISUAL(..), PICTDEPTH(..),+        PICTSCREEN(..), INDEXVALUE(..), COLOR(..), POINTFIX(..),+        LINEFIX(..), TRIANGLE(..), TRAPEZOID(..), GLYPHINFO(..),+        QueryVersion(..), QueryVersionReply(..), QueryPictFormats(..),         QueryPictFormatsReply(..), QueryPictIndexValues(..),         QueryPictIndexValuesReply(..), CreatePicture(..),         ChangePicture(..), SetPictureClipRectangles(..), FreePicture(..),@@ -52,6 +52,13 @@         fromValue 0 = PictTypeIndexed         fromValue 1 = PictTypeDirect  +data Picture = PictureNone+             deriving Show+ +instance SimpleEnum Picture where+        toValue PictureNone{} = 0+        fromValue 0 = PictureNone+  data PictOp = PictOpClear             | PictOpSrc             | PictOpDst@@ -332,7 +339,7 @@                     alpha_mask)   data PICTFORMINFO = MkPICTFORMINFO{id_PICTFORMINFO :: PICTFORMAT,-                                   type_PICTFORMINFO :: Word8, depth_PICTFORMINFO :: Word8,+                                   type_PICTFORMINFO :: PictType, depth_PICTFORMINFO :: Word8,                                    direct_PICTFORMINFO :: DIRECTFORMAT,                                    colormap_PICTFORMINFO :: COLORMAP}                   deriving (Show, Typeable)@@ -340,13 +347,13 @@ instance Serialize PICTFORMINFO where         serialize x           = do serialize (id_PICTFORMINFO x)-               serialize (type_PICTFORMINFO x)+               serialize (toValue (type_PICTFORMINFO x) :: Word8)                serialize (depth_PICTFORMINFO x)                putSkip 2                serialize (direct_PICTFORMINFO x)                serialize (colormap_PICTFORMINFO x)         size x-          = size (id_PICTFORMINFO x) + size (type_PICTFORMINFO x) ++          = size (id_PICTFORMINFO x) + size (undefined :: Word8) +               size (depth_PICTFORMINFO x)               + 2               + size (direct_PICTFORMINFO x)@@ -355,7 +362,7 @@ instance Deserialize PICTFORMINFO where         deserialize           = do id <- deserialize-               type_ <- deserialize+               type_ <- liftM fromValue (deserialize :: Get Word8)                depth <- deserialize                skip 2                direct <- deserialize@@ -635,7 +642,7 @@                                                      formats_QueryPictFormatsReply ::                                                      [PICTFORMINFO],                                                      screens_QueryPictFormatsReply :: [PICTSCREEN],-                                                     subpixels_QueryPictFormatsReply :: [Word32]}+                                                     subpixels_QueryPictFormatsReply :: [SubPixel]}                            deriving (Show, Typeable)   instance Deserialize QueryPictFormatsReply where@@ -652,7 +659,8 @@                skip 4                formats <- deserializeList (fromIntegral num_formats)                screens <- deserializeList (fromIntegral num_screens)-               subpixels <- deserializeList (fromIntegral num_subpixel)+               subpixels <- liftM (liftM fromValue)+                              (deserializeList (fromIntegral num_subpixel) :: Get [Word32])                let _ = isCard32 length                return                  (MkQueryPictFormatsReply num_formats num_screens num_depths@@ -773,7 +781,7 @@                serialize (picture_FreePicture x)                putSkip (requiredPadding size__)  -data Composite = MkComposite{op_Composite :: Word8,+data Composite = MkComposite{op_Composite :: PictOp,                              src_Composite :: PICTURE, mask_Composite :: PICTURE,                              dst_Composite :: PICTURE, src_x_Composite :: Int16,                              src_y_Composite :: Int16, mask_x_Composite :: Int16,@@ -788,7 +796,7 @@           = do putWord8 extOpCode                putWord8 8                let size__-                     = 4 + size (op_Composite x) + 3 + size (src_Composite x) ++                     = 4 + size (undefined :: Word8) + 3 + size (src_Composite x) +                          size (mask_Composite x)                          + size (dst_Composite x)                          + size (src_x_Composite x)@@ -800,7 +808,7 @@                          + size (width_Composite x)                          + size (height_Composite x)                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_Composite x)+               serialize (toValue (op_Composite x) :: Word8)                putSkip 3                serialize (src_Composite x)                serialize (mask_Composite x)@@ -815,7 +823,7 @@                serialize (height_Composite x)                putSkip (requiredPadding size__)  -data Trapezoids = MkTrapezoids{op_Trapezoids :: Word8,+data Trapezoids = MkTrapezoids{op_Trapezoids :: PictOp,                                src_Trapezoids :: PICTURE, dst_Trapezoids :: PICTURE,                                mask_format_Trapezoids :: PICTFORMAT, src_x_Trapezoids :: Int16,                                src_y_Trapezoids :: Int16, traps_Trapezoids :: [TRAPEZOID]}@@ -827,14 +835,14 @@           = do putWord8 extOpCode                putWord8 10                let size__-                     = 4 + size (op_Trapezoids x) + 3 + size (src_Trapezoids x) ++                     = 4 + size (undefined :: Word8) + 3 + size (src_Trapezoids x) +                          size (dst_Trapezoids x)                          + size (mask_format_Trapezoids x)                          + size (src_x_Trapezoids x)                          + size (src_y_Trapezoids x)                          + sum (map size (traps_Trapezoids x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_Trapezoids x)+               serialize (toValue (op_Trapezoids x) :: Word8)                putSkip 3                serialize (src_Trapezoids x)                serialize (dst_Trapezoids x)@@ -844,7 +852,7 @@                serializeList (traps_Trapezoids x)                putSkip (requiredPadding size__)  -data Triangles = MkTriangles{op_Triangles :: Word8,+data Triangles = MkTriangles{op_Triangles :: PictOp,                              src_Triangles :: PICTURE, dst_Triangles :: PICTURE,                              mask_format_Triangles :: PICTFORMAT, src_x_Triangles :: Int16,                              src_y_Triangles :: Int16, triangles_Triangles :: [TRIANGLE]}@@ -856,14 +864,14 @@           = do putWord8 extOpCode                putWord8 11                let size__-                     = 4 + size (op_Triangles x) + 3 + size (src_Triangles x) ++                     = 4 + size (undefined :: Word8) + 3 + size (src_Triangles x) +                          size (dst_Triangles x)                          + size (mask_format_Triangles x)                          + size (src_x_Triangles x)                          + size (src_y_Triangles x)                          + sum (map size (triangles_Triangles x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_Triangles x)+               serialize (toValue (op_Triangles x) :: Word8)                putSkip 3                serialize (src_Triangles x)                serialize (dst_Triangles x)@@ -873,7 +881,7 @@                serializeList (triangles_Triangles x)                putSkip (requiredPadding size__)  -data TriStrip = MkTriStrip{op_TriStrip :: Word8,+data TriStrip = MkTriStrip{op_TriStrip :: PictOp,                            src_TriStrip :: PICTURE, dst_TriStrip :: PICTURE,                            mask_format_TriStrip :: PICTFORMAT, src_x_TriStrip :: Int16,                            src_y_TriStrip :: Int16, points_TriStrip :: [POINTFIX]}@@ -885,14 +893,14 @@           = do putWord8 extOpCode                putWord8 12                let size__-                     = 4 + size (op_TriStrip x) + 3 + size (src_TriStrip x) ++                     = 4 + size (undefined :: Word8) + 3 + size (src_TriStrip x) +                          size (dst_TriStrip x)                          + size (mask_format_TriStrip x)                          + size (src_x_TriStrip x)                          + size (src_y_TriStrip x)                          + sum (map size (points_TriStrip x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_TriStrip x)+               serialize (toValue (op_TriStrip x) :: Word8)                putSkip 3                serialize (src_TriStrip x)                serialize (dst_TriStrip x)@@ -902,7 +910,7 @@                serializeList (points_TriStrip x)                putSkip (requiredPadding size__)  -data TriFan = MkTriFan{op_TriFan :: Word8, src_TriFan :: PICTURE,+data TriFan = MkTriFan{op_TriFan :: PictOp, src_TriFan :: PICTURE,                        dst_TriFan :: PICTURE, mask_format_TriFan :: PICTFORMAT,                        src_x_TriFan :: Int16, src_y_TriFan :: Int16,                        points_TriFan :: [POINTFIX]}@@ -914,14 +922,14 @@           = do putWord8 extOpCode                putWord8 13                let size__-                     = 4 + size (op_TriFan x) + 3 + size (src_TriFan x) ++                     = 4 + size (undefined :: Word8) + 3 + size (src_TriFan x) +                          size (dst_TriFan x)                          + size (mask_format_TriFan x)                          + size (src_x_TriFan x)                          + size (src_y_TriFan x)                          + sum (map size (points_TriFan x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_TriFan x)+               serialize (toValue (op_TriFan x) :: Word8)                putSkip 3                serialize (src_TriFan x)                serialize (dst_TriFan x)@@ -1021,7 +1029,7 @@                putSkip (requiredPadding size__)   data CompositeGlyphs8 = MkCompositeGlyphs8{op_CompositeGlyphs8 ::-                                           Word8,+                                           PictOp,                                            src_CompositeGlyphs8 :: PICTURE,                                            dst_CompositeGlyphs8 :: PICTURE,                                            mask_format_CompositeGlyphs8 :: PICTFORMAT,@@ -1037,8 +1045,7 @@           = do putWord8 extOpCode                putWord8 23                let size__-                     = 4 + size (op_CompositeGlyphs8 x) + 3 +-                         size (src_CompositeGlyphs8 x)+                     = 4 + size (undefined :: Word8) + 3 + size (src_CompositeGlyphs8 x)                          + size (dst_CompositeGlyphs8 x)                          + size (mask_format_CompositeGlyphs8 x)                          + size (glyphset_CompositeGlyphs8 x)@@ -1046,7 +1053,7 @@                          + size (src_y_CompositeGlyphs8 x)                          + sum (map size (glyphcmds_CompositeGlyphs8 x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_CompositeGlyphs8 x)+               serialize (toValue (op_CompositeGlyphs8 x) :: Word8)                putSkip 3                serialize (src_CompositeGlyphs8 x)                serialize (dst_CompositeGlyphs8 x)@@ -1058,7 +1065,7 @@                putSkip (requiredPadding size__)   data CompositeGlyphs16 = MkCompositeGlyphs16{op_CompositeGlyphs16-                                             :: Word8,+                                             :: PictOp,                                              src_CompositeGlyphs16 :: PICTURE,                                              dst_CompositeGlyphs16 :: PICTURE,                                              mask_format_CompositeGlyphs16 :: PICTFORMAT,@@ -1074,7 +1081,7 @@           = do putWord8 extOpCode                putWord8 24                let size__-                     = 4 + size (op_CompositeGlyphs16 x) + 3 ++                     = 4 + size (undefined :: Word8) + 3 +                          size (src_CompositeGlyphs16 x)                          + size (dst_CompositeGlyphs16 x)                          + size (mask_format_CompositeGlyphs16 x)@@ -1083,7 +1090,7 @@                          + size (src_y_CompositeGlyphs16 x)                          + sum (map size (glyphcmds_CompositeGlyphs16 x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_CompositeGlyphs16 x)+               serialize (toValue (op_CompositeGlyphs16 x) :: Word8)                putSkip 3                serialize (src_CompositeGlyphs16 x)                serialize (dst_CompositeGlyphs16 x)@@ -1095,7 +1102,7 @@                putSkip (requiredPadding size__)   data CompositeGlyphs32 = MkCompositeGlyphs32{op_CompositeGlyphs32-                                             :: Word8,+                                             :: PictOp,                                              src_CompositeGlyphs32 :: PICTURE,                                              dst_CompositeGlyphs32 :: PICTURE,                                              mask_format_CompositeGlyphs32 :: PICTFORMAT,@@ -1111,7 +1118,7 @@           = do putWord8 extOpCode                putWord8 25                let size__-                     = 4 + size (op_CompositeGlyphs32 x) + 3 ++                     = 4 + size (undefined :: Word8) + 3 +                          size (src_CompositeGlyphs32 x)                          + size (dst_CompositeGlyphs32 x)                          + size (mask_format_CompositeGlyphs32 x)@@ -1120,7 +1127,7 @@                          + size (src_y_CompositeGlyphs32 x)                          + sum (map size (glyphcmds_CompositeGlyphs32 x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_CompositeGlyphs32 x)+               serialize (toValue (op_CompositeGlyphs32 x) :: Word8)                putSkip 3                serialize (src_CompositeGlyphs32 x)                serialize (dst_CompositeGlyphs32 x)@@ -1131,7 +1138,7 @@                serializeList (glyphcmds_CompositeGlyphs32 x)                putSkip (requiredPadding size__)  -data FillRectangles = MkFillRectangles{op_FillRectangles :: Word8,+data FillRectangles = MkFillRectangles{op_FillRectangles :: PictOp,                                        dst_FillRectangles :: PICTURE, color_FillRectangles :: COLOR,                                        rects_FillRectangles :: [RECTANGLE]}                     deriving (Show, Typeable)@@ -1142,11 +1149,11 @@           = do putWord8 extOpCode                putWord8 26                let size__-                     = 4 + size (op_FillRectangles x) + 3 + size (dst_FillRectangles x)-                         + size (color_FillRectangles x)+                     = 4 + size (undefined :: Word8) + 3 + size (dst_FillRectangles x) ++                         size (color_FillRectangles x)                          + sum (map size (rects_FillRectangles x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (op_FillRectangles x)+               serialize (toValue (op_FillRectangles x) :: Word8)                putSkip 3                serialize (dst_FillRectangles x)                serialize (color_FillRectangles x)
patched/Graphics/XHB/Gen/ScreenSaver/Types.hs view
@@ -2,7 +2,7 @@        (deserializeError, deserializeEvent, Kind(..), Event(..),         State(..), QueryVersion(..), QueryVersionReply(..), QueryInfo(..),         QueryInfoReply(..), SelectInput(..), SetAttributes(..),-        UnsetAttributes(..), Suspend(..), Notify(..))+        UnsetAttributes(..), Suspend(..), NotifyEvent(..))        where import Data.Word import Data.Int@@ -25,7 +25,7 @@   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get Notify))+  = return (liftM toEvent (deserialize :: Get NotifyEvent)) deserializeEvent _ = Nothing   data Kind = KindBlanked@@ -229,15 +229,16 @@                putSkip 3                putSkip (requiredPadding size__)  -data Notify = MkNotify{code_Notify :: Word8, state_Notify :: Word8,-                       sequence_number_Notify :: Word16, time_Notify :: TIMESTAMP,-                       root_Notify :: WINDOW, window_Notify :: WINDOW,-                       kind_Notify :: Word8, forced_Notify :: Bool}-            deriving (Show, Typeable)+data NotifyEvent = MkNotifyEvent{code_NotifyEvent :: Word8,+                                 state_NotifyEvent :: Word8, sequence_number_NotifyEvent :: Word16,+                                 time_NotifyEvent :: TIMESTAMP, root_NotifyEvent :: WINDOW,+                                 window_NotifyEvent :: WINDOW, kind_NotifyEvent :: Word8,+                                 forced_NotifyEvent :: Bool}+                 deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event Notify+instance Graphics.XHB.Shared.Event NotifyEvent  -instance Deserialize Notify where+instance Deserialize NotifyEvent where         deserialize           = do skip 1                code <- deserialize@@ -252,4 +253,5 @@                forced <- deserialize                skip 14                return-                 (MkNotify code state sequence_number time root window kind forced)+                 (MkNotifyEvent code state sequence_number time root window kind+                    forced)
patched/Graphics/XHB/Gen/Shape.hs view
@@ -92,7 +92,7 @@   getRectangles ::                 Graphics.XHB.Connection.Types.Connection ->-                  WINDOW -> KIND -> IO (Receipt GetRectanglesReply)+                  WINDOW -> SK -> IO (Receipt GetRectanglesReply) getRectangles c window source_kind   = do (receipt, rReceipt) <- newDeserReceipt        let req = MkGetRectangles window source_kind
patched/Graphics/XHB/Gen/Shape/Types.hs view
@@ -1,6 +1,6 @@ module Graphics.XHB.Gen.Shape.Types        (deserializeError, deserializeEvent, OP, KIND, SO(..), SK(..),-        Notify(..), QueryVersion(..), QueryVersionReply(..),+        NotifyEvent(..), QueryVersion(..), QueryVersionReply(..),         Rectangles(..), Mask(..), Combine(..), Offset(..),         QueryExtents(..), QueryExtentsReply(..), SelectInput(..),         InputSelected(..), InputSelectedReply(..), GetRectangles(..),@@ -27,7 +27,7 @@   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get Notify))+  = return (liftM toEvent (deserialize :: Get NotifyEvent)) deserializeEvent _ = Nothing   type OP = Word8@@ -66,19 +66,20 @@         fromValue 1 = SKClip         fromValue 2 = SKInput  -data Notify = MkNotify{shape_kind_Notify :: KIND,-                       affected_window_Notify :: WINDOW, extents_x_Notify :: Int16,-                       extents_y_Notify :: Int16, extents_width_Notify :: Word16,-                       extents_height_Notify :: Word16, server_time_Notify :: TIMESTAMP,-                       shaped_Notify :: Bool}-            deriving (Show, Typeable)+data NotifyEvent = MkNotifyEvent{shape_kind_NotifyEvent :: SK,+                                 affected_window_NotifyEvent :: WINDOW,+                                 extents_x_NotifyEvent :: Int16, extents_y_NotifyEvent :: Int16,+                                 extents_width_NotifyEvent :: Word16,+                                 extents_height_NotifyEvent :: Word16,+                                 server_time_NotifyEvent :: TIMESTAMP, shaped_NotifyEvent :: Bool}+                 deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event Notify+instance Graphics.XHB.Shared.Event NotifyEvent  -instance Deserialize Notify where+instance Deserialize NotifyEvent where         deserialize           = do skip 1-               shape_kind <- deserialize+               shape_kind <- liftM fromValue (deserialize :: Get KIND)                skip 2                affected_window <- deserialize                extents_x <- deserialize@@ -89,7 +90,7 @@                shaped <- deserialize                skip 11                return-                 (MkNotify shape_kind affected_window extents_x extents_y+                 (MkNotifyEvent shape_kind affected_window extents_x extents_y                     extents_width                     extents_height                     server_time@@ -123,8 +124,9 @@                let _ = isCard32 length                return (MkQueryVersionReply major_version minor_version)  -data Rectangles = MkRectangles{operation_Rectangles :: OP,-                               destination_kind_Rectangles :: KIND, ordering_Rectangles :: Word8,+data Rectangles = MkRectangles{operation_Rectangles :: SO,+                               destination_kind_Rectangles :: SK,+                               ordering_Rectangles :: ClipOrdering,                                destination_window_Rectangles :: WINDOW,                                x_offset_Rectangles :: Int16, y_offset_Rectangles :: Int16,                                rectangles_Rectangles :: [RECTANGLE]}@@ -136,18 +138,17 @@           = do putWord8 extOpCode                putWord8 1                let size__-                     = 4 + size (operation_Rectangles x) +-                         size (destination_kind_Rectangles x)-                         + size (ordering_Rectangles x)+                     = 4 + size (undefined :: OP) + size (undefined :: KIND) ++                         size (undefined :: Word8)                          + 1                          + size (destination_window_Rectangles x)                          + size (x_offset_Rectangles x)                          + size (y_offset_Rectangles x)                          + sum (map size (rectangles_Rectangles x))                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (operation_Rectangles x)-               serialize (destination_kind_Rectangles x)-               serialize (ordering_Rectangles x)+               serialize (toValue (operation_Rectangles x) :: OP)+               serialize (toValue (destination_kind_Rectangles x) :: KIND)+               serialize (toValue (ordering_Rectangles x) :: Word8)                putSkip 1                serialize (destination_window_Rectangles x)                serialize (x_offset_Rectangles x)@@ -155,8 +156,8 @@                serializeList (rectangles_Rectangles x)                putSkip (requiredPadding size__)  -data Mask = MkMask{operation_Mask :: OP,-                   destination_kind_Mask :: KIND, destination_window_Mask :: WINDOW,+data Mask = MkMask{operation_Mask :: SO,+                   destination_kind_Mask :: SK, destination_window_Mask :: WINDOW,                    x_offset_Mask :: Int16, y_offset_Mask :: Int16,                    source_bitmap_Mask :: PIXMAP}           deriving (Show, Typeable)@@ -167,14 +168,14 @@           = do putWord8 extOpCode                putWord8 2                let size__-                     = 4 + size (operation_Mask x) + size (destination_kind_Mask x) + 2-                         + size (destination_window_Mask x)+                     = 4 + size (undefined :: OP) + size (undefined :: KIND) + 2 ++                         size (destination_window_Mask x)                          + size (x_offset_Mask x)                          + size (y_offset_Mask x)                          + size (source_bitmap_Mask x)                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (operation_Mask x)-               serialize (destination_kind_Mask x)+               serialize (toValue (operation_Mask x) :: OP)+               serialize (toValue (destination_kind_Mask x) :: KIND)                putSkip 2                serialize (destination_window_Mask x)                serialize (x_offset_Mask x)@@ -182,8 +183,8 @@                serialize (source_bitmap_Mask x)                putSkip (requiredPadding size__)  -data Combine = MkCombine{operation_Combine :: OP,-                         destination_kind_Combine :: KIND, source_kind_Combine :: KIND,+data Combine = MkCombine{operation_Combine :: SO,+                         destination_kind_Combine :: SK, source_kind_Combine :: SK,                          destination_window_Combine :: WINDOW, x_offset_Combine :: Int16,                          y_offset_Combine :: Int16, source_window_Combine :: WINDOW}              deriving (Show, Typeable)@@ -194,18 +195,17 @@           = do putWord8 extOpCode                putWord8 3                let size__-                     = 4 + size (operation_Combine x) +-                         size (destination_kind_Combine x)-                         + size (source_kind_Combine x)+                     = 4 + size (undefined :: OP) + size (undefined :: KIND) ++                         size (undefined :: KIND)                          + 1                          + size (destination_window_Combine x)                          + size (x_offset_Combine x)                          + size (y_offset_Combine x)                          + size (source_window_Combine x)                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (operation_Combine x)-               serialize (destination_kind_Combine x)-               serialize (source_kind_Combine x)+               serialize (toValue (operation_Combine x) :: OP)+               serialize (toValue (destination_kind_Combine x) :: KIND)+               serialize (toValue (source_kind_Combine x) :: KIND)                putSkip 1                serialize (destination_window_Combine x)                serialize (x_offset_Combine x)@@ -213,7 +213,7 @@                serialize (source_window_Combine x)                putSkip (requiredPadding size__)  -data Offset = MkOffset{destination_kind_Offset :: KIND,+data Offset = MkOffset{destination_kind_Offset :: SK,                        destination_window_Offset :: WINDOW, x_offset_Offset :: Int16,                        y_offset_Offset :: Int16}             deriving (Show, Typeable)@@ -224,12 +224,12 @@           = do putWord8 extOpCode                putWord8 4                let size__-                     = 4 + size (destination_kind_Offset x) + 3 ++                     = 4 + size (undefined :: KIND) + 3 +                          size (destination_window_Offset x)                          + size (x_offset_Offset x)                          + size (y_offset_Offset x)                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (destination_kind_Offset x)+               serialize (toValue (destination_kind_Offset x) :: KIND)                putSkip 3                serialize (destination_window_Offset x)                serialize (x_offset_Offset x)@@ -343,7 +343,7 @@   data GetRectangles = MkGetRectangles{window_GetRectangles ::                                      WINDOW,-                                     source_kind_GetRectangles :: KIND}+                                     source_kind_GetRectangles :: SK}                    deriving (Show, Typeable)   instance ExtensionRequest GetRectangles where@@ -352,17 +352,15 @@           = do putWord8 extOpCode                putWord8 8                let size__-                     = 4 + size (window_GetRectangles x) +-                         size (source_kind_GetRectangles x)-                         + 3+                     = 4 + size (window_GetRectangles x) + size (undefined :: KIND) + 3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_GetRectangles x)-               serialize (source_kind_GetRectangles x)+               serialize (toValue (source_kind_GetRectangles x) :: KIND)                putSkip 3                putSkip (requiredPadding size__)   data GetRectanglesReply = MkGetRectanglesReply{ordering_GetRectanglesReply-                                               :: Word8,+                                               :: ClipOrdering,                                                rectangles_len_GetRectanglesReply :: Word32,                                                rectangles_GetRectanglesReply :: [RECTANGLE]}                         deriving (Show, Typeable)@@ -370,7 +368,7 @@ instance Deserialize GetRectanglesReply where         deserialize           = do skip 1-               ordering <- deserialize+               ordering <- liftM fromValue (deserialize :: Get Word8)                skip 2                length <- deserialize                rectangles_len <- deserialize
patched/Graphics/XHB/Gen/Shm/Types.hs view
@@ -1,8 +1,8 @@ module Graphics.XHB.Gen.Shm.Types-       (deserializeError, deserializeEvent, SEG, Completion(..),-        BadSeg(..), QueryVersion(..), QueryVersionReply(..), Attach(..),-        Detach(..), PutImage(..), GetImage(..), GetImageReply(..),-        CreatePixmap(..))+       (deserializeError, deserializeEvent, SEG, CompletionEvent(..),+        BadSegError(..), QueryVersion(..), QueryVersionReply(..),+        Attach(..), Detach(..), PutImage(..), GetImage(..),+        GetImageReply(..), CreatePixmap(..))        where import Data.Word import Data.Int@@ -23,52 +23,56 @@   deserializeError :: Word8 -> Maybe (Get SomeError) deserializeError 0-  = return (liftM toError (deserialize :: Get BadSeg))+  = return (liftM toError (deserialize :: Get BadSegError)) deserializeError _ = Nothing   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get Completion))+  = return (liftM toEvent (deserialize :: Get CompletionEvent)) deserializeEvent _ = Nothing   newtype SEG = MkSEG Xid               deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)  -data Completion = MkCompletion{drawable_Completion :: DRAWABLE,-                               shmseg_Completion :: SEG, minor_event_Completion :: Word16,-                               major_event_Completion :: Word8, offset_Completion :: Word32}-                deriving (Show, Typeable)+data CompletionEvent = MkCompletionEvent{drawable_CompletionEvent+                                         :: DRAWABLE,+                                         minor_event_CompletionEvent :: Word16,+                                         major_event_CompletionEvent :: Word8,+                                         shmseg_CompletionEvent :: SEG,+                                         offset_CompletionEvent :: Word32}+                     deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event Completion+instance Graphics.XHB.Shared.Event CompletionEvent  -instance Deserialize Completion where+instance Deserialize CompletionEvent where         deserialize           = do skip 1                skip 1                skip 2                drawable <- deserialize-               shmseg <- deserialize                minor_event <- deserialize                major_event <- deserialize                skip 1+               shmseg <- deserialize                offset <- deserialize                return-                 (MkCompletion drawable shmseg minor_event major_event offset)+                 (MkCompletionEvent drawable minor_event major_event shmseg offset)  -data BadSeg = MkBadSeg{bad_value_BadSeg :: Word32,-                       minor_opcode_BadSeg :: Word16, major_opcode_BadSeg :: Word8}-            deriving (Show, Typeable)+data BadSegError = MkBadSegError{bad_value_BadSegError :: Word32,+                                 minor_opcode_BadSegError :: Word16,+                                 major_opcode_BadSegError :: Word8}+                 deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error BadSeg+instance Graphics.XHB.Shared.Error BadSegError  -instance Deserialize BadSeg where+instance Deserialize BadSegError where         deserialize           = do skip 4                bad_value <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize                skip 1-               return (MkBadSeg bad_value minor_opcode major_opcode)+               return (MkBadSegError bad_value minor_opcode major_opcode)   data QueryVersion = MkQueryVersion{}                   deriving (Show, Typeable)
patched/Graphics/XHB/Gen/Sync/Types.hs view
@@ -1,15 +1,15 @@ module Graphics.XHB.Gen.Sync.Types        (deserializeError, deserializeEvent, ALARM, ALARMSTATE(..),         COUNTER, TESTTYPE(..), VALUETYPE(..), CA(..), INT64(..),-        SYSTEMCOUNTER(..), TRIGGER(..), WAITCONDITION(..), Counter(..),-        Alarm(..), Initialize(..), InitializeReply(..),-        ListSystemCounters(..), ListSystemCountersReply(..),-        CreateCounter(..), DestroyCounter(..), QueryCounter(..),-        QueryCounterReply(..), Await(..), ChangeCounter(..),-        SetCounter(..), CreateAlarm(..), ChangeAlarm(..), DestroyAlarm(..),-        QueryAlarm(..), QueryAlarmReply(..), SetPriority(..),-        GetPriority(..), GetPriorityReply(..), CounterNotify(..),-        AlarmNotify(..))+        SYSTEMCOUNTER(..), TRIGGER(..), WAITCONDITION(..),+        CounterError(..), AlarmError(..), Initialize(..),+        InitializeReply(..), ListSystemCounters(..),+        ListSystemCountersReply(..), CreateCounter(..), DestroyCounter(..),+        QueryCounter(..), QueryCounterReply(..), Await(..),+        ChangeCounter(..), SetCounter(..), CreateAlarm(..),+        ChangeAlarm(..), DestroyAlarm(..), QueryAlarm(..),+        QueryAlarmReply(..), SetPriority(..), GetPriority(..),+        GetPriorityReply(..), CounterNotifyEvent(..), AlarmNotifyEvent(..))        where import Data.Word import Data.Int@@ -29,16 +29,16 @@   deserializeError :: Word8 -> Maybe (Get SomeError) deserializeError 0-  = return (liftM toError (deserialize :: Get Counter))+  = return (liftM toError (deserialize :: Get CounterError)) deserializeError 1-  = return (liftM toError (deserialize :: Get Alarm))+  = return (liftM toError (deserialize :: Get AlarmError)) deserializeError _ = Nothing   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get CounterNotify))+  = return (liftM toEvent (deserialize :: Get CounterNotifyEvent)) deserializeEvent 1-  = return (liftM toEvent (deserialize :: Get AlarmNotify))+  = return (liftM toEvent (deserialize :: Get AlarmNotifyEvent)) deserializeEvent _ = Nothing   newtype ALARM = MkALARM Xid@@ -151,27 +151,27 @@                return (MkSYSTEMCOUNTER counter resolution name_len name)   data TRIGGER = MkTRIGGER{counter_TRIGGER :: COUNTER,-                         wait_type_TRIGGER :: Word32, wait_value_TRIGGER :: INT64,-                         test_type_TRIGGER :: Word32}+                         wait_type_TRIGGER :: VALUETYPE, wait_value_TRIGGER :: INT64,+                         test_type_TRIGGER :: TESTTYPE}              deriving (Show, Typeable)   instance Serialize TRIGGER where         serialize x           = do serialize (counter_TRIGGER x)-               serialize (wait_type_TRIGGER x)+               serialize (toValue (wait_type_TRIGGER x) :: Word32)                serialize (wait_value_TRIGGER x)-               serialize (test_type_TRIGGER x)+               serialize (toValue (test_type_TRIGGER x) :: Word32)         size x-          = size (counter_TRIGGER x) + size (wait_type_TRIGGER x) ++          = size (counter_TRIGGER x) + size (undefined :: Word32) +               size (wait_value_TRIGGER x)-              + size (test_type_TRIGGER x)+              + size (undefined :: Word32)   instance Deserialize TRIGGER where         deserialize           = do counter <- deserialize-               wait_type <- deserialize+               wait_type <- liftM fromValue (deserialize :: Get Word32)                wait_value <- deserialize-               test_type <- deserialize+               test_type <- liftM fromValue (deserialize :: Get Word32)                return (MkTRIGGER counter wait_type wait_value test_type)   data WAITCONDITION = MkWAITCONDITION{trigger_WAITCONDITION ::@@ -193,33 +193,36 @@                event_threshold <- deserialize                return (MkWAITCONDITION trigger event_threshold)  -data Counter = MkCounter{bad_counter_Counter :: Word32,-                         minor_opcode_Counter :: Word16, major_opcode_Counter :: Word8}-             deriving (Show, Typeable)+data CounterError = MkCounterError{bad_counter_CounterError ::+                                   Word32,+                                   minor_opcode_CounterError :: Word16,+                                   major_opcode_CounterError :: Word8}+                  deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error Counter+instance Graphics.XHB.Shared.Error CounterError  -instance Deserialize Counter where+instance Deserialize CounterError where         deserialize           = do skip 4                bad_counter <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize-               return (MkCounter bad_counter minor_opcode major_opcode)+               return (MkCounterError bad_counter minor_opcode major_opcode)  -data Alarm = MkAlarm{bad_alarm_Alarm :: Word32,-                     minor_opcode_Alarm :: Word16, major_opcode_Alarm :: Word8}-           deriving (Show, Typeable)+data AlarmError = MkAlarmError{bad_alarm_AlarmError :: Word32,+                               minor_opcode_AlarmError :: Word16,+                               major_opcode_AlarmError :: Word8}+                deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Error Alarm+instance Graphics.XHB.Shared.Error AlarmError  -instance Deserialize Alarm where+instance Deserialize AlarmError where         deserialize           = do skip 4                bad_alarm <- deserialize                minor_opcode <- deserialize                major_opcode <- deserialize-               return (MkAlarm bad_alarm minor_opcode major_opcode)+               return (MkAlarmError bad_alarm minor_opcode major_opcode)   data Initialize = MkInitialize{desired_major_version_Initialize ::                                Word8,@@ -453,7 +456,7 @@                                          TRIGGER,                                          delta_QueryAlarmReply :: INT64,                                          events_QueryAlarmReply :: Bool,-                                         state_QueryAlarmReply :: Word8}+                                         state_QueryAlarmReply :: ALARMSTATE}                      deriving (Show, Typeable)   instance Deserialize QueryAlarmReply where@@ -465,7 +468,7 @@                trigger <- deserialize                delta <- deserialize                events <- deserialize-               state <- deserialize+               state <- liftM fromValue (deserialize :: Get Word8)                skip 2                let _ = isCard32 length                return (MkQueryAlarmReply trigger delta events state)@@ -513,17 +516,19 @@                let _ = isCard32 length                return (MkGetPriorityReply priority)  -data CounterNotify = MkCounterNotify{kind_CounterNotify :: Word8,-                                     counter_CounterNotify :: COUNTER,-                                     wait_value_CounterNotify :: INT64,-                                     counter_value_CounterNotify :: INT64,-                                     timestamp_CounterNotify :: TIMESTAMP,-                                     count_CounterNotify :: Word16, destroyed_CounterNotify :: Bool}-                   deriving (Show, Typeable)+data CounterNotifyEvent = MkCounterNotifyEvent{kind_CounterNotifyEvent+                                               :: Word8,+                                               counter_CounterNotifyEvent :: COUNTER,+                                               wait_value_CounterNotifyEvent :: INT64,+                                               counter_value_CounterNotifyEvent :: INT64,+                                               timestamp_CounterNotifyEvent :: TIMESTAMP,+                                               count_CounterNotifyEvent :: Word16,+                                               destroyed_CounterNotifyEvent :: Bool}+                        deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event CounterNotify+instance Graphics.XHB.Shared.Event CounterNotifyEvent  -instance Deserialize CounterNotify where+instance Deserialize CounterNotifyEvent where         deserialize           = do skip 1                kind <- deserialize@@ -536,19 +541,23 @@                destroyed <- deserialize                skip 1                return-                 (MkCounterNotify kind counter wait_value counter_value timestamp+                 (MkCounterNotifyEvent kind counter wait_value counter_value+                    timestamp                     count                     destroyed)  -data AlarmNotify = MkAlarmNotify{kind_AlarmNotify :: Word8,-                                 alarm_AlarmNotify :: ALARM, counter_value_AlarmNotify :: INT64,-                                 alarm_value_AlarmNotify :: INT64,-                                 timestamp_AlarmNotify :: TIMESTAMP}-                 deriving (Show, Typeable)+data AlarmNotifyEvent = MkAlarmNotifyEvent{kind_AlarmNotifyEvent ::+                                           Word8,+                                           alarm_AlarmNotifyEvent :: ALARM,+                                           counter_value_AlarmNotifyEvent :: INT64,+                                           alarm_value_AlarmNotifyEvent :: INT64,+                                           timestamp_AlarmNotifyEvent :: TIMESTAMP,+                                           state_AlarmNotifyEvent :: ALARMSTATE}+                      deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event AlarmNotify+instance Graphics.XHB.Shared.Event AlarmNotifyEvent  -instance Deserialize AlarmNotify where+instance Deserialize AlarmNotifyEvent where         deserialize           = do skip 1                kind <- deserialize@@ -557,5 +566,8 @@                counter_value <- deserialize                alarm_value <- deserialize                timestamp <- deserialize+               state <- liftM fromValue (deserialize :: Get Word8)+               skip 3                return-                 (MkAlarmNotify kind alarm counter_value alarm_value timestamp)+                 (MkAlarmNotifyEvent kind alarm counter_value alarm_value timestamp+                    state)
patched/Graphics/XHB/Gen/Test/Types.hs view
@@ -100,7 +100,7 @@   data FakeInput = MkFakeInput{type_FakeInput :: Word8,                              detail_FakeInput :: Word8, time_FakeInput :: Word32,-                             window_FakeInput :: WINDOW, rootX_FakeInput :: Word16,+                             root_FakeInput :: WINDOW, rootX_FakeInput :: Word16,                              rootY_FakeInput :: Word16, deviceid_FakeInput :: Word8}                deriving (Show, Typeable)  @@ -112,7 +112,7 @@                let size__                      = 4 + size (type_FakeInput x) + size (detail_FakeInput x) + 2 +                          size (time_FakeInput x)-                         + size (window_FakeInput x)+                         + size (root_FakeInput x)                          + 8                          + size (rootX_FakeInput x)                          + size (rootY_FakeInput x)@@ -123,7 +123,7 @@                serialize (detail_FakeInput x)                putSkip 2                serialize (time_FakeInput x)-               serialize (window_FakeInput x)+               serialize (root_FakeInput x)                putSkip 8                serialize (rootX_FakeInput x)                serialize (rootY_FakeInput x)
patched/Graphics/XHB/Gen/XFixes.hs view
@@ -22,8 +22,8 @@ import Data.Binary.Put (runPut) import Graphics.XHB.Shared hiding (Event(..), Error(..)) import Graphics.XHB.Gen.Xproto.Types-       hiding (ChangeSaveSet(..), SelectionNotify(..), deserializeError,-               deserializeEvent)+       hiding (ChangeSaveSet(..), SelectionNotifyEvent(..),+               deserializeError, deserializeEvent) import qualified Graphics.XHB.Gen.Xproto.Types import Graphics.XHB.Gen.Render.Types        hiding (QueryVersion(..), QueryVersionReply(..), deserializeError,@@ -65,7 +65,7 @@   selectCursorInput ::                     Graphics.XHB.Connection.Types.Connection ->-                      WINDOW -> Word32 -> IO ()+                      WINDOW -> [CursorNotifyMask] -> IO () selectCursorInput c window event_mask   = do let req = MkSelectCursorInput window event_mask        putAction <- serializeExtensionRequest c req
patched/Graphics/XHB/Gen/XFixes/Types.hs view
@@ -2,10 +2,10 @@        (deserializeError, deserializeEvent, QueryVersion(..),         QueryVersionReply(..), SaveSetMode(..), SaveSetTarget(..),         SaveSetMapping(..), ChangeSaveSet(..), SelectionEvent(..),-        SelectionEventMask(..), SelectionNotify(..),-        SelectSelectionInput(..), CursorNotifyEnum(..), CursorNotifyMask(..),-        CursorNotify(..), SelectCursorInput(..), GetCursorImage(..),-        GetCursorImageReply(..), REGION, CreateRegion(..),+        SelectionEventMask(..), SelectionNotifyEvent(..),+        SelectSelectionInput(..), CursorNotify(..), CursorNotifyMask(..),+        CursorNotifyEvent(..), SelectCursorInput(..), GetCursorImage(..),+        GetCursorImageReply(..), REGION, Region(..), CreateRegion(..),         CreateRegionFromBitmap(..), CreateRegionFromWindow(..),         CreateRegionFromGC(..), CreateRegionFromPicture(..),         DestroyRegion(..), SetRegion(..), CopyRegion(..), UnionRegion(..),@@ -31,8 +31,8 @@ import Graphics.XHB.Shared hiding (Event, Error) import qualified Graphics.XHB.Shared import Graphics.XHB.Gen.Xproto.Types-       hiding (ChangeSaveSet(..), SelectionNotify(..), deserializeError,-               deserializeEvent)+       hiding (ChangeSaveSet(..), SelectionNotifyEvent(..),+               deserializeError, deserializeEvent) import qualified Graphics.XHB.Gen.Xproto.Types import Graphics.XHB.Gen.Render.Types        hiding (QueryVersion(..), QueryVersionReply(..), deserializeError,@@ -48,9 +48,9 @@   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get SelectionNotify))+  = return (liftM toEvent (deserialize :: Get SelectionNotifyEvent)) deserializeEvent 1-  = return (liftM toEvent (deserialize :: Get CursorNotify))+  = return (liftM toEvent (deserialize :: Get CursorNotifyEvent)) deserializeEvent _ = Nothing   data QueryVersion = MkQueryVersion{client_major_version_QueryVersion@@ -118,8 +118,10 @@         fromValue 0 = SaveSetMappingMap         fromValue 1 = SaveSetMappingUnmap  -data ChangeSaveSet = MkChangeSaveSet{mode_ChangeSaveSet :: Word8,-                                     target_ChangeSaveSet :: Word8, map_ChangeSaveSet :: Word8,+data ChangeSaveSet = MkChangeSaveSet{mode_ChangeSaveSet ::+                                     SaveSetMode,+                                     target_ChangeSaveSet :: SaveSetTarget,+                                     map_ChangeSaveSet :: SaveSetMapping,                                      window_ChangeSaveSet :: WINDOW}                    deriving (Show, Typeable)  @@ -129,14 +131,14 @@           = do putWord8 extOpCode                putWord8 1                let size__-                     = 4 + size (mode_ChangeSaveSet x) + size (target_ChangeSaveSet x) +-                         size (map_ChangeSaveSet x)+                     = 4 + size (undefined :: Word8) + size (undefined :: Word8) ++                         size (undefined :: Word8)                          + 1                          + size (window_ChangeSaveSet x)                serialize (convertBytesToRequestSize size__ :: Int16)-               serialize (mode_ChangeSaveSet x)-               serialize (target_ChangeSaveSet x)-               serialize (map_ChangeSaveSet x)+               serialize (toValue (mode_ChangeSaveSet x) :: Word8)+               serialize (toValue (target_ChangeSaveSet x) :: Word8)+               serialize (toValue (map_ChangeSaveSet x) :: Word8)                putSkip 1                serialize (window_ChangeSaveSet x)                putSkip (requiredPadding size__)@@ -167,21 +169,22 @@         fromBit 1 = SelectionEventMaskSelectionWindowDestroy         fromBit 2 = SelectionEventMaskSelectionClientClose  -data SelectionNotify = MkSelectionNotify{subtype_SelectionNotify ::-                                         Word8,-                                         window_SelectionNotify :: WINDOW,-                                         owner_SelectionNotify :: WINDOW,-                                         selection_SelectionNotify :: ATOM,-                                         timestamp_SelectionNotify :: TIMESTAMP,-                                         selection_timestamp_SelectionNotify :: TIMESTAMP}-                     deriving (Show, Typeable)+data SelectionNotifyEvent = MkSelectionNotifyEvent{subtype_SelectionNotifyEvent+                                                   :: SelectionEvent,+                                                   window_SelectionNotifyEvent :: WINDOW,+                                                   owner_SelectionNotifyEvent :: WINDOW,+                                                   selection_SelectionNotifyEvent :: ATOM,+                                                   timestamp_SelectionNotifyEvent :: TIMESTAMP,+                                                   selection_timestamp_SelectionNotifyEvent ::+                                                   TIMESTAMP}+                          deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event SelectionNotify+instance Graphics.XHB.Shared.Event SelectionNotifyEvent  -instance Deserialize SelectionNotify where+instance Deserialize SelectionNotifyEvent where         deserialize           = do skip 1-               subtype <- deserialize+               subtype <- liftM fromValue (deserialize :: Get Word8)                skip 2                window <- deserialize                owner <- deserialize@@ -190,13 +193,14 @@                selection_timestamp <- deserialize                skip 8                return-                 (MkSelectionNotify subtype window owner selection timestamp+                 (MkSelectionNotifyEvent subtype window owner selection timestamp                     selection_timestamp)   data SelectSelectionInput = MkSelectSelectionInput{window_SelectSelectionInput                                                    :: WINDOW,                                                    selection_SelectSelectionInput :: ATOM,-                                                   event_mask_SelectSelectionInput :: Word32}+                                                   event_mask_SelectSelectionInput ::+                                                   [SelectionEventMask]}                           deriving (Show, Typeable)   instance ExtensionRequest SelectSelectionInput where@@ -207,17 +211,17 @@                let size__                      = 4 + size (window_SelectSelectionInput x) +                          size (selection_SelectSelectionInput x)-                         + size (event_mask_SelectSelectionInput x)+                         + size (undefined :: Word32)                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_SelectSelectionInput x)                serialize (selection_SelectSelectionInput x)-               serialize (event_mask_SelectSelectionInput x)+               serialize (toMask (event_mask_SelectSelectionInput x) :: Word32)                putSkip (requiredPadding size__)  -data CursorNotifyEnum = CursorNotifyDisplayCursor+data CursorNotify = CursorNotifyDisplayCursor                   deriving Show  -instance SimpleEnum CursorNotifyEnum where+instance SimpleEnum CursorNotify where         toValue CursorNotifyDisplayCursor{} = 0         fromValue 0 = CursorNotifyDisplayCursor  @@ -228,29 +232,32 @@         toBit CursorNotifyMaskDisplayCursor{} = 0         fromBit 0 = CursorNotifyMaskDisplayCursor  -data CursorNotify = MkCursorNotify{subtype_CursorNotify :: Word8,-                                   window_CursorNotify :: WINDOW,-                                   cursor_serial_CursorNotify :: Word32,-                                   timestamp_CursorNotify :: TIMESTAMP, name_CursorNotify :: ATOM}-                  deriving (Show, Typeable)+data CursorNotifyEvent = MkCursorNotifyEvent{subtype_CursorNotifyEvent+                                             :: CursorNotify,+                                             window_CursorNotifyEvent :: WINDOW,+                                             cursor_serial_CursorNotifyEvent :: Word32,+                                             timestamp_CursorNotifyEvent :: TIMESTAMP,+                                             name_CursorNotifyEvent :: ATOM}+                       deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event CursorNotify+instance Graphics.XHB.Shared.Event CursorNotifyEvent  -instance Deserialize CursorNotify where+instance Deserialize CursorNotifyEvent where         deserialize           = do skip 1-               subtype <- deserialize+               subtype <- liftM fromValue (deserialize :: Get Word8)                skip 2                window <- deserialize                cursor_serial <- deserialize                timestamp <- deserialize                name <- deserialize                skip 12-               return (MkCursorNotify subtype window cursor_serial timestamp name)+               return+                 (MkCursorNotifyEvent subtype window cursor_serial timestamp name)   data SelectCursorInput = MkSelectCursorInput{window_SelectCursorInput                                              :: WINDOW,-                                             event_mask_SelectCursorInput :: Word32}+                                             event_mask_SelectCursorInput :: [CursorNotifyMask]}                        deriving (Show, Typeable)   instance ExtensionRequest SelectCursorInput where@@ -260,10 +267,10 @@                putWord8 3                let size__                      = 4 + size (window_SelectCursorInput x) +-                         size (event_mask_SelectCursorInput x)+                         size (undefined :: Word32)                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (window_SelectCursorInput x)-               serialize (event_mask_SelectCursorInput x)+               serialize (toMask (event_mask_SelectCursorInput x) :: Word32)                putSkip (requiredPadding size__)   data GetCursorImage = MkGetCursorImage{}@@ -313,6 +320,13 @@ newtype REGION = MkREGION Xid                  deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)  +data Region = RegionNone+            deriving Show+ +instance SimpleEnum Region where+        toValue RegionNone{} = 0+        fromValue 0 = RegionNone+  data CreateRegion = MkCreateRegion{region_CreateRegion :: REGION,                                    rectangles_CreateRegion :: [RECTANGLE]}                   deriving (Show, Typeable)@@ -351,8 +365,7 @@ data CreateRegionFromWindow = MkCreateRegionFromWindow{region_CreateRegionFromWindow                                                        :: REGION,                                                        window_CreateRegionFromWindow :: WINDOW,-                                                       kind_CreateRegionFromWindow ::-                                                       Graphics.XHB.Gen.Shape.Types.KIND}+                                                       kind_CreateRegionFromWindow :: SK}                             deriving (Show, Typeable)   instance ExtensionRequest CreateRegionFromWindow where@@ -363,12 +376,14 @@                let size__                      = 4 + size (region_CreateRegionFromWindow x) +                          size (window_CreateRegionFromWindow x)-                         + size (kind_CreateRegionFromWindow x)+                         + size (undefined :: Graphics.XHB.Gen.Shape.Types.KIND)                          + 3                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (region_CreateRegionFromWindow x)                serialize (window_CreateRegionFromWindow x)-               serialize (kind_CreateRegionFromWindow x)+               serialize+                 (toValue (kind_CreateRegionFromWindow x) ::+                      Graphics.XHB.Gen.Shape.Types.KIND)                putSkip 3                putSkip (requiredPadding size__)  @@ -626,8 +641,7 @@   data SetWindowShapeRegion = MkSetWindowShapeRegion{dest_SetWindowShapeRegion                                                    :: WINDOW,-                                                   dest_kind_SetWindowShapeRegion ::-                                                   Graphics.XHB.Gen.Shape.Types.KIND,+                                                   dest_kind_SetWindowShapeRegion :: SK,                                                    x_offset_SetWindowShapeRegion :: Int16,                                                    y_offset_SetWindowShapeRegion :: Int16,                                                    region_SetWindowShapeRegion :: REGION}@@ -640,14 +654,16 @@                putWord8 21                let size__                      = 4 + size (dest_SetWindowShapeRegion x) +-                         size (dest_kind_SetWindowShapeRegion x)+                         size (undefined :: Graphics.XHB.Gen.Shape.Types.KIND)                          + 3                          + size (x_offset_SetWindowShapeRegion x)                          + size (y_offset_SetWindowShapeRegion x)                          + size (region_SetWindowShapeRegion x)                serialize (convertBytesToRequestSize size__ :: Int16)                serialize (dest_SetWindowShapeRegion x)-               serialize (dest_kind_SetWindowShapeRegion x)+               serialize+                 (toValue (dest_kind_SetWindowShapeRegion x) ::+                      Graphics.XHB.Gen.Shape.Types.KIND)                putSkip 3                serialize (x_offset_SetWindowShapeRegion x)                serialize (y_offset_SetWindowShapeRegion x)
patched/Graphics/XHB/Gen/XPrint/Types.hs view
@@ -17,7 +17,8 @@         PrintGetPageDimensionsReply(..), PrintQueryScreens(..),         PrintQueryScreensReply(..), PrintSetImageResolution(..),         PrintSetImageResolutionReply(..), PrintGetImageResolution(..),-        PrintGetImageResolutionReply(..), Notify(..), AttributNotify(..))+        PrintGetImageResolutionReply(..), NotifyEvent(..),+        AttributNotifyEvent(..))        where import Data.Word import Data.Int@@ -40,9 +41,9 @@   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get Notify))+  = return (liftM toEvent (deserialize :: Get NotifyEvent)) deserializeEvent 1-  = return (liftM toEvent (deserialize :: Get AttributNotify))+  = return (liftM toEvent (deserialize :: Get AttributNotifyEvent)) deserializeEvent _ = Nothing   type STRING8 = CChar@@ -776,32 +777,32 @@                let _ = isCard32 length                return (MkPrintGetImageResolutionReply image_resolution)  -data Notify = MkNotify{detail_Notify :: Word8,-                       context_Notify :: PCONTEXT, cancel_Notify :: Bool}-            deriving (Show, Typeable)+data NotifyEvent = MkNotifyEvent{detail_NotifyEvent :: Word8,+                                 context_NotifyEvent :: PCONTEXT, cancel_NotifyEvent :: Bool}+                 deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event Notify+instance Graphics.XHB.Shared.Event NotifyEvent  -instance Deserialize Notify where+instance Deserialize NotifyEvent where         deserialize           = do skip 1                detail <- deserialize                skip 2                context <- deserialize                cancel <- deserialize-               return (MkNotify detail context cancel)+               return (MkNotifyEvent detail context cancel)  -data AttributNotify = MkAttributNotify{detail_AttributNotify ::-                                       Word8,-                                       context_AttributNotify :: PCONTEXT}-                    deriving (Show, Typeable)+data AttributNotifyEvent = MkAttributNotifyEvent{detail_AttributNotifyEvent+                                                 :: Word8,+                                                 context_AttributNotifyEvent :: PCONTEXT}+                         deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event AttributNotify+instance Graphics.XHB.Shared.Event AttributNotifyEvent  -instance Deserialize AttributNotify where+instance Deserialize AttributNotifyEvent where         deserialize           = do skip 1                detail <- deserialize                skip 2                context <- deserialize-               return (MkAttributNotify detail context)+               return (MkAttributNotifyEvent detail context)
patched/Graphics/XHB/Gen/Xproto.hs view
@@ -882,7 +882,7 @@        sendRequest c chunk   killClient ::-             Graphics.XHB.Connection.Types.Connection -> Kill -> IO ()+             Graphics.XHB.Connection.Types.Connection -> Word32 -> IO () killClient c resource   = do let req = MkKillClient resource        let chunk = runPut (serialize req)
patched/Graphics/XHB/Gen/Xproto/Types.hs view
@@ -3,6020 +3,6210 @@         CURSOR, FONT, GCONTEXT, COLORMAP, ATOM, DRAWABLE, FONTABLE,         VISUALID, TIMESTAMP, KEYSYM, KEYCODE, BUTTON, POINT(..),         RECTANGLE(..), ARC(..), FORMAT(..), VisualClass(..),-        VISUALTYPE(..), DEPTH(..), SCREEN(..), SetupRequest(..),-        SetupFailed(..), SetupAuthenticate(..), ImageOrder(..), Setup(..),-        ModMask(..), KeyPress(..), KeyRelease(..), ButtonMask(..),-        ButtonPress(..), ButtonRelease(..), Motion(..), MotionNotify(..),-        NotifyDetail(..), NotifyMode(..), EnterNotify(..), LeaveNotify(..),-        FocusIn(..), FocusOut(..), KeymapNotify(..), Expose(..),-        GraphicsExposure(..), NoExposure(..), Visibility(..),-        VisibilityNotify(..), CreateNotify(..), DestroyNotify(..),-        UnmapNotify(..), MapNotify(..), MapRequest(..), ReparentNotify(..),-        ConfigureNotify(..), ConfigureRequest(..), GravityNotify(..),-        ResizeRequest(..), Place(..), CirculateNotify(..),-        CirculateRequest(..), Property(..), PropertyNotify(..),-        SelectionClear(..), SelectionRequest(..), SelectionNotify(..),-        ColormapState(..), ColormapNotify(..), ClientMessage(..),ClientMessageData(..),-        Mapping(..), MappingNotify(..), Request(..), Value(..), Window(..),-        Pixmap(..), Atom(..), Cursor(..), Font(..), Match(..),-        Drawable(..), Access(..), Alloc(..), Colormap(..), GContext(..),-        IDChoice(..), Name(..), Length(..), Implementation(..),-        WindowClass(..), CW(..), BackPixmap(..), Gravity(..),-        BackingStore(..), EventMask(..), CreateWindow(..),-        ChangeWindowAttributes(..), MapState(..), GetWindowAttributes(..),-        GetWindowAttributesReply(..), DestroyWindow(..),-        DestroySubwindows(..), SetMode(..), ChangeSaveSet(..),-        ReparentWindow(..), MapWindow(..), MapSubwindows(..),-        UnmapWindow(..), UnmapSubwindows(..), ConfigWindow(..),-        StackMode(..), ConfigureWindow(..), Circulate(..),-        CirculateWindow(..), GetGeometry(..), GetGeometryReply(..),-        QueryTree(..), QueryTreeReply(..), InternAtom(..),-        InternAtomReply(..), GetAtomName(..), GetAtomNameReply(..),-        PropMode(..), ChangeProperty(..), DeleteProperty(..),-        GetPropertyType(..), GetProperty(..), GetPropertyReply(..),-        ListProperties(..), ListPropertiesReply(..), SetSelectionOwner(..),-        GetSelectionOwner(..), GetSelectionOwnerReply(..),-        ConvertSelection(..), SendEventDest(..), SendEvent(..),-        GrabMode(..), GrabStatus(..), GrabPointer(..),-        GrabPointerReply(..), UngrabPointer(..), ButtonIndex(..),-        GrabButton(..), UngrabButton(..), ChangeActivePointerGrab(..),-        GrabKeyboard(..), GrabKeyboardReply(..), UngrabKeyboard(..),-        Grab(..), GrabKey(..), UngrabKey(..), Allow(..), AllowEvents(..),-        QueryPointer(..), QueryPointerReply(..), TIMECOORD(..),-        GetMotionEvents(..), GetMotionEventsReply(..),-        TranslateCoordinates(..), TranslateCoordinatesReply(..),-        WarpPointer(..), InputFocus(..), SetInputFocus(..),-        GetInputFocus(..), GetInputFocusReply(..), QueryKeymap(..),-        QueryKeymapReply(..), OpenFont(..), CloseFont(..), FontDraw(..),-        FONTPROP(..), CHARINFO(..), QueryFont(..), QueryFontReply(..),-        odd_length_QueryTextExtents, QueryTextExtents(..),-        QueryTextExtentsReply(..), STR(..), ListFonts(..),-        ListFontsReply(..), ListFontsWithInfo(..),-        ListFontsWithInfoReply(..), SetFontPath(..), GetFontPath(..),-        GetFontPathReply(..), CreatePixmap(..), FreePixmap(..), GC(..),-        GX(..), LineStyle(..), CapStyle(..), JoinStyle(..), FillStyle(..),-        FillRule(..), SubwindowMode(..), ArcMode(..), CreateGC(..),-        ChangeGC(..), CopyGC(..), SetDashes(..), ClipOrdering(..),-        SetClipRectangles(..), FreeGC(..), ClearArea(..), CopyArea(..),-        CopyPlane(..), CoordMode(..), PolyPoint(..), PolyLine(..),-        SEGMENT(..), PolySegment(..), PolyRectangle(..), PolyArc(..),-        PolyShape(..), FillPoly(..), PolyFillRectangle(..),-        PolyFillArc(..), ImageFormat(..), PutImage(..), GetImage(..),-        GetImageReply(..), PolyText8(..), PolyText16(..), ImageText8(..),-        ImageText16(..), ColormapAlloc(..), CreateColormap(..),-        FreeColormap(..), CopyColormapAndFree(..), InstallColormap(..),-        UninstallColormap(..), ListInstalledColormaps(..),-        ListInstalledColormapsReply(..), AllocColor(..),-        AllocColorReply(..), AllocNamedColor(..), AllocNamedColorReply(..),-        AllocColorCells(..), AllocColorCellsReply(..),-        AllocColorPlanes(..), AllocColorPlanesReply(..), FreeColors(..),-        ColorFlag(..), COLORITEM(..), StoreColors(..), StoreNamedColor(..),-        RGB(..), QueryColors(..), QueryColorsReply(..), LookupColor(..),-        LookupColorReply(..), CreateCursor(..), CreateGlyphCursor(..),-        FreeCursor(..), RecolorCursor(..), QueryShapeOf(..),-        QueryBestSize(..), QueryBestSizeReply(..), QueryExtension(..),-        QueryExtensionReply(..), ListExtensions(..),-        ListExtensionsReply(..), ChangeKeyboardMapping(..),-        GetKeyboardMapping(..), GetKeyboardMappingReply(..), KB(..),-        LedMode(..), AutoRepeatMode(..), ChangeKeyboardControl(..),-        GetKeyboardControl(..), GetKeyboardControlReply(..), Bell(..),-        ChangePointerControl(..), GetPointerControl(..),-        GetPointerControlReply(..), Blanking(..), Exposures(..),-        SetScreenSaver(..), GetScreenSaver(..), GetScreenSaverReply(..),-        HostMode(..), Family(..), ChangeHosts(..), HOST(..), ListHosts(..),-        ListHostsReply(..), AccessControl(..), SetAccessControl(..),-        CloseDown(..), SetCloseDownMode(..), Kill(..), KillClient(..),-        RotateProperties(..), ScreenSaver(..), ForceScreenSaver(..),-        MappingStatus(..), SetPointerMapping(..),-        SetPointerMappingReply(..), GetPointerMapping(..),-        GetPointerMappingReply(..), MapIndex(..), SetModifierMapping(..),-        SetModifierMappingReply(..), GetModifierMapping(..),-        GetModifierMappingReply(..))-       where-import Data.Word-import Data.Int-import Foreign.C.Types-import Data.Bits-import Data.Binary.Put-import Data.Binary.Get-import Data.Typeable-import Control.Monad-import Control.Exception-import Data.List-import Graphics.XHB.Shared hiding (Event, Error)-import qualified Graphics.XHB.Shared- -deserializeError :: Word8 -> Maybe (Get SomeError)-deserializeError 1-  = return (liftM toError (deserialize :: Get Request))-deserializeError 2-  = return (liftM toError (deserialize :: Get Value))-deserializeError 3-  = return (liftM toError (deserialize :: Get Window))-deserializeError 4-  = return (liftM toError (deserialize :: Get Pixmap))-deserializeError 5-  = return (liftM toError (deserialize :: Get Atom))-deserializeError 6-  = return (liftM toError (deserialize :: Get Cursor))-deserializeError 7-  = return (liftM toError (deserialize :: Get Font))-deserializeError 8-  = return (liftM toError (deserialize :: Get Match))-deserializeError 9-  = return (liftM toError (deserialize :: Get Drawable))-deserializeError 10-  = return (liftM toError (deserialize :: Get Access))-deserializeError 11-  = return (liftM toError (deserialize :: Get Alloc))-deserializeError 12-  = return (liftM toError (deserialize :: Get Colormap))-deserializeError 13-  = return (liftM toError (deserialize :: Get GContext))-deserializeError 14-  = return (liftM toError (deserialize :: Get IDChoice))-deserializeError 15-  = return (liftM toError (deserialize :: Get Name))-deserializeError 16-  = return (liftM toError (deserialize :: Get Length))-deserializeError 17-  = return (liftM toError (deserialize :: Get Implementation))-deserializeError _ = Nothing- -deserializeEvent :: Word8 -> Maybe (Get SomeEvent)-deserializeEvent 2-  = return (liftM toEvent (deserialize :: Get KeyPress))-deserializeEvent 3-  = return (liftM toEvent (deserialize :: Get KeyRelease))-deserializeEvent 4-  = return (liftM toEvent (deserialize :: Get ButtonPress))-deserializeEvent 5-  = return (liftM toEvent (deserialize :: Get ButtonRelease))-deserializeEvent 6-  = return (liftM toEvent (deserialize :: Get MotionNotify))-deserializeEvent 7-  = return (liftM toEvent (deserialize :: Get EnterNotify))-deserializeEvent 8-  = return (liftM toEvent (deserialize :: Get LeaveNotify))-deserializeEvent 9-  = return (liftM toEvent (deserialize :: Get FocusIn))-deserializeEvent 10-  = return (liftM toEvent (deserialize :: Get FocusOut))-deserializeEvent 11-  = return (liftM toEvent (deserialize :: Get KeymapNotify))-deserializeEvent 12-  = return (liftM toEvent (deserialize :: Get Expose))-deserializeEvent 13-  = return (liftM toEvent (deserialize :: Get GraphicsExposure))-deserializeEvent 14-  = return (liftM toEvent (deserialize :: Get NoExposure))-deserializeEvent 15-  = return (liftM toEvent (deserialize :: Get VisibilityNotify))-deserializeEvent 16-  = return (liftM toEvent (deserialize :: Get CreateNotify))-deserializeEvent 17-  = return (liftM toEvent (deserialize :: Get DestroyNotify))-deserializeEvent 18-  = return (liftM toEvent (deserialize :: Get UnmapNotify))-deserializeEvent 19-  = return (liftM toEvent (deserialize :: Get MapNotify))-deserializeEvent 20-  = return (liftM toEvent (deserialize :: Get MapRequest))-deserializeEvent 21-  = return (liftM toEvent (deserialize :: Get ReparentNotify))-deserializeEvent 22-  = return (liftM toEvent (deserialize :: Get ConfigureNotify))-deserializeEvent 23-  = return (liftM toEvent (deserialize :: Get ConfigureRequest))-deserializeEvent 24-  = return (liftM toEvent (deserialize :: Get GravityNotify))-deserializeEvent 25-  = return (liftM toEvent (deserialize :: Get ResizeRequest))-deserializeEvent 26-  = return (liftM toEvent (deserialize :: Get CirculateNotify))-deserializeEvent 27-  = return (liftM toEvent (deserialize :: Get CirculateRequest))-deserializeEvent 28-  = return (liftM toEvent (deserialize :: Get PropertyNotify))-deserializeEvent 29-  = return (liftM toEvent (deserialize :: Get SelectionClear))-deserializeEvent 30-  = return (liftM toEvent (deserialize :: Get SelectionRequest))-deserializeEvent 31-  = return (liftM toEvent (deserialize :: Get SelectionNotify))-deserializeEvent 32-  = return (liftM toEvent (deserialize :: Get ColormapNotify))-deserializeEvent 33-  = return (liftM toEvent (deserialize :: Get ClientMessage))-deserializeEvent 34-  = return (liftM toEvent (deserialize :: Get MappingNotify))-deserializeEvent _ = Nothing- -data CHAR2B = MkCHAR2B{byte1_CHAR2B :: Word8,-                       byte2_CHAR2B :: Word8}-            deriving (Show, Typeable)- -instance Serialize CHAR2B where-        serialize x-          = do serialize (byte1_CHAR2B x)-               serialize (byte2_CHAR2B x)-        size x = size (byte1_CHAR2B x) + size (byte2_CHAR2B x)- -instance Deserialize CHAR2B where-        deserialize-          = do byte1 <- deserialize-               byte2 <- deserialize-               return (MkCHAR2B byte1 byte2)- -newtype WINDOW = MkWINDOW Xid-                 deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype PIXMAP = MkPIXMAP Xid-                 deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype CURSOR = MkCURSOR Xid-                 deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype FONT = MkFONT Xid-               deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype GCONTEXT = MkGCONTEXT Xid-                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype COLORMAP = MkCOLORMAP Xid-                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype ATOM = MkATOM Xid-               deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype DRAWABLE = MkDRAWABLE Xid-                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -newtype FONTABLE = MkFONTABLE Xid-                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)- -type VISUALID = Word32- -type TIMESTAMP = Word32- -type KEYSYM = Word32- -type KEYCODE = Word8- -type BUTTON = Word8- -data POINT = MkPOINT{x_POINT :: Int16, y_POINT :: Int16}-           deriving (Show, Typeable)- -instance Serialize POINT where-        serialize x-          = do serialize (x_POINT x)-               serialize (y_POINT x)-        size x = size (x_POINT x) + size (y_POINT x)- -instance Deserialize POINT where-        deserialize-          = do x <- deserialize-               y <- deserialize-               return (MkPOINT x y)- -data RECTANGLE = MkRECTANGLE{x_RECTANGLE :: Int16,-                             y_RECTANGLE :: Int16, width_RECTANGLE :: Word16,-                             height_RECTANGLE :: Word16}-               deriving (Show, Typeable)- -instance Serialize RECTANGLE where-        serialize x-          = do serialize (x_RECTANGLE x)-               serialize (y_RECTANGLE x)-               serialize (width_RECTANGLE x)-               serialize (height_RECTANGLE x)-        size x-          = size (x_RECTANGLE x) + size (y_RECTANGLE x) +-              size (width_RECTANGLE x)-              + size (height_RECTANGLE x)- -instance Deserialize RECTANGLE where-        deserialize-          = do x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               return (MkRECTANGLE x y width height)- -data ARC = MkARC{x_ARC :: Int16, y_ARC :: Int16,-                 width_ARC :: Word16, height_ARC :: Word16, angle1_ARC :: Int16,-                 angle2_ARC :: Int16}-         deriving (Show, Typeable)- -instance Serialize ARC where-        serialize x-          = do serialize (x_ARC x)-               serialize (y_ARC x)-               serialize (width_ARC x)-               serialize (height_ARC x)-               serialize (angle1_ARC x)-               serialize (angle2_ARC x)-        size x-          = size (x_ARC x) + size (y_ARC x) + size (width_ARC x) +-              size (height_ARC x)-              + size (angle1_ARC x)-              + size (angle2_ARC x)- -instance Deserialize ARC where-        deserialize-          = do x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               angle1 <- deserialize-               angle2 <- deserialize-               return (MkARC x y width height angle1 angle2)- -data FORMAT = MkFORMAT{depth_FORMAT :: Word8,-                       bits_per_pixel_FORMAT :: Word8, scanline_pad_FORMAT :: Word8}-            deriving (Show, Typeable)- -instance Serialize FORMAT where-        serialize x-          = do serialize (depth_FORMAT x)-               serialize (bits_per_pixel_FORMAT x)-               serialize (scanline_pad_FORMAT x)-               putSkip 5-        size x-          = size (depth_FORMAT x) + size (bits_per_pixel_FORMAT x) +-              size (scanline_pad_FORMAT x)-              + 5- -instance Deserialize FORMAT where-        deserialize-          = do depth <- deserialize-               bits_per_pixel <- deserialize-               scanline_pad <- deserialize-               skip 5-               return (MkFORMAT depth bits_per_pixel scanline_pad)- -data VisualClass = VisualClassStaticGray-                 | VisualClassGrayScale-                 | VisualClassStaticColor-                 | VisualClassPseudoColor-                 | VisualClassTrueColor-                 | VisualClassDirectColor-                 deriving Show- -instance SimpleEnum VisualClass where-        toValue VisualClassStaticGray{} = 0-        toValue VisualClassGrayScale{} = 1-        toValue VisualClassStaticColor{} = 2-        toValue VisualClassPseudoColor{} = 3-        toValue VisualClassTrueColor{} = 4-        toValue VisualClassDirectColor{} = 5-        fromValue 0 = VisualClassStaticGray-        fromValue 1 = VisualClassGrayScale-        fromValue 2 = VisualClassStaticColor-        fromValue 3 = VisualClassPseudoColor-        fromValue 4 = VisualClassTrueColor-        fromValue 5 = VisualClassDirectColor- -data VISUALTYPE = MkVISUALTYPE{visual_id_VISUALTYPE :: VISUALID,-                               class_VISUALTYPE :: VisualClass,-                               bits_per_rgb_value_VISUALTYPE :: Word8,-                               colormap_entries_VISUALTYPE :: Word16,-                               red_mask_VISUALTYPE :: Word32, green_mask_VISUALTYPE :: Word32,-                               blue_mask_VISUALTYPE :: Word32}-                deriving (Show, Typeable)- -instance Serialize VISUALTYPE where-        serialize x-          = do serialize (visual_id_VISUALTYPE x)-               serialize (toValue (class_VISUALTYPE x) :: Word8)-               serialize (bits_per_rgb_value_VISUALTYPE x)-               serialize (colormap_entries_VISUALTYPE x)-               serialize (red_mask_VISUALTYPE x)-               serialize (green_mask_VISUALTYPE x)-               serialize (blue_mask_VISUALTYPE x)-               putSkip 4-        size x-          = size (visual_id_VISUALTYPE x) + size (undefined :: Word8) +-              size (bits_per_rgb_value_VISUALTYPE x)-              + size (colormap_entries_VISUALTYPE x)-              + size (red_mask_VISUALTYPE x)-              + size (green_mask_VISUALTYPE x)-              + size (blue_mask_VISUALTYPE x)-              + 4- -instance Deserialize VISUALTYPE where-        deserialize-          = do visual_id <- deserialize-               class_ <- liftM fromValue (deserialize :: Get Word8)-               bits_per_rgb_value <- deserialize-               colormap_entries <- deserialize-               red_mask <- deserialize-               green_mask <- deserialize-               blue_mask <- deserialize-               skip 4-               return-                 (MkVISUALTYPE visual_id class_ bits_per_rgb_value colormap_entries-                    red_mask-                    green_mask-                    blue_mask)- -data DEPTH = MkDEPTH{depth_DEPTH :: Word8,-                     visuals_len_DEPTH :: Word16, visuals_DEPTH :: [VISUALTYPE]}-           deriving (Show, Typeable)- -instance Serialize DEPTH where-        serialize x-          = do serialize (depth_DEPTH x)-               putSkip 1-               serialize (visuals_len_DEPTH x)-               putSkip 4-               serializeList (visuals_DEPTH x)-        size x-          = size (depth_DEPTH x) + 1 + size (visuals_len_DEPTH x) + 4 +-              sum (map size (visuals_DEPTH x))- -instance Deserialize DEPTH where-        deserialize-          = do depth <- deserialize-               skip 1-               visuals_len <- deserialize-               skip 4-               visuals <- deserializeList (fromIntegral visuals_len)-               return (MkDEPTH depth visuals_len visuals)- -data SCREEN = MkSCREEN{root_SCREEN :: WINDOW,-                       default_colormap_SCREEN :: COLORMAP, white_pixel_SCREEN :: Word32,-                       black_pixel_SCREEN :: Word32,-                       current_input_masks_SCREEN :: [EventMask],-                       width_in_pixels_SCREEN :: Word16,-                       height_in_pixels_SCREEN :: Word16,-                       width_in_millimeters_SCREEN :: Word16,-                       height_in_millimeters_SCREEN :: Word16,-                       min_installed_maps_SCREEN :: Word16,-                       max_installed_maps_SCREEN :: Word16,-                       root_visual_SCREEN :: VISUALID,-                       backing_stores_SCREEN :: BackingStore, save_unders_SCREEN :: Bool,-                       root_depth_SCREEN :: Word8, allowed_depths_len_SCREEN :: Word8,-                       allowed_depths_SCREEN :: [DEPTH]}-            deriving (Show, Typeable)- -instance Serialize SCREEN where-        serialize x-          = do serialize (root_SCREEN x)-               serialize (default_colormap_SCREEN x)-               serialize (white_pixel_SCREEN x)-               serialize (black_pixel_SCREEN x)-               serialize (toMask (current_input_masks_SCREEN x) :: Word32)-               serialize (width_in_pixels_SCREEN x)-               serialize (height_in_pixels_SCREEN x)-               serialize (width_in_millimeters_SCREEN x)-               serialize (height_in_millimeters_SCREEN x)-               serialize (min_installed_maps_SCREEN x)-               serialize (max_installed_maps_SCREEN x)-               serialize (root_visual_SCREEN x)-               serialize (toValue (backing_stores_SCREEN x) :: Word8)-               serialize (save_unders_SCREEN x)-               serialize (root_depth_SCREEN x)-               serialize (allowed_depths_len_SCREEN x)-               serializeList (allowed_depths_SCREEN x)-        size x-          = size (root_SCREEN x) + size (default_colormap_SCREEN x) +-              size (white_pixel_SCREEN x)-              + size (black_pixel_SCREEN x)-              + size (undefined :: Word32)-              + size (width_in_pixels_SCREEN x)-              + size (height_in_pixels_SCREEN x)-              + size (width_in_millimeters_SCREEN x)-              + size (height_in_millimeters_SCREEN x)-              + size (min_installed_maps_SCREEN x)-              + size (max_installed_maps_SCREEN x)-              + size (root_visual_SCREEN x)-              + size (undefined :: Word8)-              + size (save_unders_SCREEN x)-              + size (root_depth_SCREEN x)-              + size (allowed_depths_len_SCREEN x)-              + sum (map size (allowed_depths_SCREEN x))- -instance Deserialize SCREEN where-        deserialize-          = do root <- deserialize-               default_colormap <- deserialize-               white_pixel <- deserialize-               black_pixel <- deserialize-               current_input_masks <- liftM fromMask (deserialize :: Get Word32)-               width_in_pixels <- deserialize-               height_in_pixels <- deserialize-               width_in_millimeters <- deserialize-               height_in_millimeters <- deserialize-               min_installed_maps <- deserialize-               max_installed_maps <- deserialize-               root_visual <- deserialize-               backing_stores <- liftM fromValue (deserialize :: Get Word8)-               save_unders <- deserialize-               root_depth <- deserialize-               allowed_depths_len <- deserialize-               allowed_depths <- deserializeList (fromIntegral allowed_depths_len)-               return-                 (MkSCREEN root default_colormap white_pixel black_pixel-                    current_input_masks-                    width_in_pixels-                    height_in_pixels-                    width_in_millimeters-                    height_in_millimeters-                    min_installed_maps-                    max_installed_maps-                    root_visual-                    backing_stores-                    save_unders-                    root_depth-                    allowed_depths_len-                    allowed_depths)- -data SetupRequest = MkSetupRequest{byte_order_SetupRequest ::-                                   Word8,-                                   protocol_major_version_SetupRequest :: Word16,-                                   protocol_minor_version_SetupRequest :: Word16,-                                   authorization_protocol_name_len_SetupRequest :: Word16,-                                   authorization_protocol_data_len_SetupRequest :: Word16,-                                   authorization_protocol_name_SetupRequest :: [CChar],-                                   authorization_protocol_data_SetupRequest :: [CChar]}-                  deriving (Show, Typeable)- -instance Serialize SetupRequest where-        serialize x-          = do serialize (byte_order_SetupRequest x)-               putSkip 1-               serialize (protocol_major_version_SetupRequest x)-               serialize (protocol_minor_version_SetupRequest x)-               serialize (authorization_protocol_name_len_SetupRequest x)-               serialize (authorization_protocol_data_len_SetupRequest x)-               putSkip 2-               serializeList (authorization_protocol_name_SetupRequest x)-               serializeList (authorization_protocol_data_SetupRequest x)-        size x-          = size (byte_order_SetupRequest x) + 1 +-              size (protocol_major_version_SetupRequest x)-              + size (protocol_minor_version_SetupRequest x)-              + size (authorization_protocol_name_len_SetupRequest x)-              + size (authorization_protocol_data_len_SetupRequest x)-              + 2-              + sum (map size (authorization_protocol_name_SetupRequest x))-              + sum (map size (authorization_protocol_data_SetupRequest x))- -instance Deserialize SetupRequest where-        deserialize-          = do byte_order <- deserialize-               skip 1-               protocol_major_version <- deserialize-               protocol_minor_version <- deserialize-               authorization_protocol_name_len <- deserialize-               authorization_protocol_data_len <- deserialize-               skip 2-               authorization_protocol_name <- deserializeList-                                                (fromIntegral authorization_protocol_name_len)-               authorization_protocol_data <- deserializeList-                                                (fromIntegral authorization_protocol_data_len)-               return-                 (MkSetupRequest byte_order protocol_major_version-                    protocol_minor_version-                    authorization_protocol_name_len-                    authorization_protocol_data_len-                    authorization_protocol_name-                    authorization_protocol_data)- -data SetupFailed = MkSetupFailed{status_SetupFailed :: Word8,-                                 reason_len_SetupFailed :: Word8,-                                 protocol_major_version_SetupFailed :: Word16,-                                 protocol_minor_version_SetupFailed :: Word16,-                                 length_SetupFailed :: Word16, reason_SetupFailed :: [CChar]}-                 deriving (Show, Typeable)- -instance Serialize SetupFailed where-        serialize x-          = do serialize (status_SetupFailed x)-               serialize (reason_len_SetupFailed x)-               serialize (protocol_major_version_SetupFailed x)-               serialize (protocol_minor_version_SetupFailed x)-               serialize (length_SetupFailed x)-               serializeList (reason_SetupFailed x)-        size x-          = size (status_SetupFailed x) + size (reason_len_SetupFailed x) +-              size (protocol_major_version_SetupFailed x)-              + size (protocol_minor_version_SetupFailed x)-              + size (length_SetupFailed x)-              + sum (map size (reason_SetupFailed x))- -instance Deserialize SetupFailed where-        deserialize-          = do status <- deserialize-               reason_len <- deserialize-               protocol_major_version <- deserialize-               protocol_minor_version <- deserialize-               length <- deserialize-               reason <- deserializeList (fromIntegral reason_len)-               return-                 (MkSetupFailed status reason_len protocol_major_version-                    protocol_minor_version-                    length-                    reason)- -data SetupAuthenticate = MkSetupAuthenticate{status_SetupAuthenticate-                                             :: Word8,-                                             length_SetupAuthenticate :: Word16,-                                             reason_SetupAuthenticate :: [CChar]}-                       deriving (Show, Typeable)- -instance Serialize SetupAuthenticate where-        serialize x-          = do serialize (status_SetupAuthenticate x)-               putSkip 5-               serialize (length_SetupAuthenticate x)-               serializeList (reason_SetupAuthenticate x)-        size x-          = size (status_SetupAuthenticate x) + 5 +-              size (length_SetupAuthenticate x)-              + sum (map size (reason_SetupAuthenticate x))- -instance Deserialize SetupAuthenticate where-        deserialize-          = do status <- deserialize-               skip 5-               length <- deserialize-               reason <- deserializeList-                           (fromIntegral (fromIntegral (length * 4)))-               return (MkSetupAuthenticate status length reason)- -data ImageOrder = ImageOrderLSBFirst-                | ImageOrderMSBFirst-                deriving Show- -instance SimpleEnum ImageOrder where-        toValue ImageOrderLSBFirst{} = 0-        toValue ImageOrderMSBFirst{} = 1-        fromValue 0 = ImageOrderLSBFirst-        fromValue 1 = ImageOrderMSBFirst- -data Setup = MkSetup{status_Setup :: Word8,-                     protocol_major_version_Setup :: Word16,-                     protocol_minor_version_Setup :: Word16, length_Setup :: Word16,-                     release_number_Setup :: Word32, resource_id_base_Setup :: Word32,-                     resource_id_mask_Setup :: Word32,-                     motion_buffer_size_Setup :: Word32, vendor_len_Setup :: Word16,-                     maximum_request_length_Setup :: Word16, roots_len_Setup :: Word8,-                     pixmap_formats_len_Setup :: Word8,-                     image_byte_order_Setup :: ImageOrder,-                     bitmap_format_bit_order_Setup :: ImageOrder,-                     bitmap_format_scanline_unit_Setup :: Word8,-                     bitmap_format_scanline_pad_Setup :: Word8,-                     min_keycode_Setup :: KEYCODE, max_keycode_Setup :: KEYCODE,-                     vendor_Setup :: [CChar], pixmap_formats_Setup :: [FORMAT],-                     roots_Setup :: [SCREEN]}-           deriving (Show, Typeable)- -instance Serialize Setup where-        serialize x-          = do serialize (status_Setup x)-               putSkip 1-               serialize (protocol_major_version_Setup x)-               serialize (protocol_minor_version_Setup x)-               serialize (length_Setup x)-               serialize (release_number_Setup x)-               serialize (resource_id_base_Setup x)-               serialize (resource_id_mask_Setup x)-               serialize (motion_buffer_size_Setup x)-               serialize (vendor_len_Setup x)-               serialize (maximum_request_length_Setup x)-               serialize (roots_len_Setup x)-               serialize (pixmap_formats_len_Setup x)-               serialize (toValue (image_byte_order_Setup x) :: Word8)-               serialize (toValue (bitmap_format_bit_order_Setup x) :: Word8)-               serialize (bitmap_format_scanline_unit_Setup x)-               serialize (bitmap_format_scanline_pad_Setup x)-               serialize (min_keycode_Setup x)-               serialize (max_keycode_Setup x)-               putSkip 4-               serializeList (vendor_Setup x)-               serializeList (pixmap_formats_Setup x)-               serializeList (roots_Setup x)-        size x-          = size (status_Setup x) + 1 + size (protocol_major_version_Setup x)-              + size (protocol_minor_version_Setup x)-              + size (length_Setup x)-              + size (release_number_Setup x)-              + size (resource_id_base_Setup x)-              + size (resource_id_mask_Setup x)-              + size (motion_buffer_size_Setup x)-              + size (vendor_len_Setup x)-              + size (maximum_request_length_Setup x)-              + size (roots_len_Setup x)-              + size (pixmap_formats_len_Setup x)-              + size (undefined :: Word8)-              + size (undefined :: Word8)-              + size (bitmap_format_scanline_unit_Setup x)-              + size (bitmap_format_scanline_pad_Setup x)-              + size (min_keycode_Setup x)-              + size (max_keycode_Setup x)-              + 4-              + sum (map size (vendor_Setup x))-              + sum (map size (pixmap_formats_Setup x))-              + sum (map size (roots_Setup x))- -instance Deserialize Setup where-        deserialize-          = do status <- deserialize-               skip 1-               protocol_major_version <- deserialize-               protocol_minor_version <- deserialize-               length <- deserialize-               release_number <- deserialize-               resource_id_base <- deserialize-               resource_id_mask <- deserialize-               motion_buffer_size <- deserialize-               vendor_len <- deserialize-               maximum_request_length <- deserialize-               roots_len <- deserialize-               pixmap_formats_len <- deserialize-               image_byte_order <- liftM fromValue (deserialize :: Get Word8)-               bitmap_format_bit_order <- liftM fromValue-                                            (deserialize :: Get Word8)-               bitmap_format_scanline_unit <- deserialize-               bitmap_format_scanline_pad <- deserialize-               min_keycode <- deserialize-               max_keycode <- deserialize-               skip 4-               vendor <- deserializeList (fromIntegral vendor_len)-               pixmap_formats <- deserializeList (fromIntegral pixmap_formats_len)-               roots <- deserializeList (fromIntegral roots_len)-               return-                 (MkSetup status protocol_major_version protocol_minor_version-                    length-                    release_number-                    resource_id_base-                    resource_id_mask-                    motion_buffer_size-                    vendor_len-                    maximum_request_length-                    roots_len-                    pixmap_formats_len-                    image_byte_order-                    bitmap_format_bit_order-                    bitmap_format_scanline_unit-                    bitmap_format_scanline_pad-                    min_keycode-                    max_keycode-                    vendor-                    pixmap_formats-                    roots)- -data ModMask = ModMaskShift-             | ModMaskLock-             | ModMaskControl-             | ModMask1-             | ModMask2-             | ModMask3-             | ModMask4-             | ModMask5-             deriving Show- -instance BitEnum ModMask where-        toBit ModMaskShift{} = 0-        toBit ModMaskLock{} = 1-        toBit ModMaskControl{} = 2-        toBit ModMask1{} = 3-        toBit ModMask2{} = 4-        toBit ModMask3{} = 5-        toBit ModMask4{} = 6-        toBit ModMask5{} = 7-        fromBit 0 = ModMaskShift-        fromBit 1 = ModMaskLock-        fromBit 2 = ModMaskControl-        fromBit 3 = ModMask1-        fromBit 4 = ModMask2-        fromBit 5 = ModMask3-        fromBit 6 = ModMask4-        fromBit 7 = ModMask5- -data KeyPress = MkKeyPress{detail_KeyPress :: KEYCODE,-                           time_KeyPress :: TIMESTAMP, root_KeyPress :: WINDOW,-                           event_KeyPress :: WINDOW, child_KeyPress :: WINDOW,-                           root_x_KeyPress :: Int16, root_y_KeyPress :: Int16,-                           event_x_KeyPress :: Int16, event_y_KeyPress :: Int16,-                           state_KeyPress :: Word16, same_screen_KeyPress :: Bool}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event KeyPress- -instance Deserialize KeyPress where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               skip 1-               return-                 (MkKeyPress detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen)- -data KeyRelease = MkKeyRelease{detail_KeyRelease :: KEYCODE,-                               time_KeyRelease :: TIMESTAMP, root_KeyRelease :: WINDOW,-                               event_KeyRelease :: WINDOW, child_KeyRelease :: WINDOW,-                               root_x_KeyRelease :: Int16, root_y_KeyRelease :: Int16,-                               event_x_KeyRelease :: Int16, event_y_KeyRelease :: Int16,-                               state_KeyRelease :: Word16, same_screen_KeyRelease :: Bool}-                deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event KeyRelease- -instance Deserialize KeyRelease where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               skip 1-               return-                 (MkKeyRelease detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen)- -data ButtonMask = ButtonMask1-                | ButtonMask2-                | ButtonMask3-                | ButtonMask4-                | ButtonMask5-                | ButtonMaskAny-                deriving Show- -instance BitEnum ButtonMask where-        toBit ButtonMask1{} = 8-        toBit ButtonMask2{} = 9-        toBit ButtonMask3{} = 10-        toBit ButtonMask4{} = 11-        toBit ButtonMask5{} = 12-        toBit ButtonMaskAny{} = 15-        fromBit 8 = ButtonMask1-        fromBit 9 = ButtonMask2-        fromBit 10 = ButtonMask3-        fromBit 11 = ButtonMask4-        fromBit 12 = ButtonMask5-        fromBit 15 = ButtonMaskAny- -data ButtonPress = MkButtonPress{detail_ButtonPress :: BUTTON,-                                 time_ButtonPress :: TIMESTAMP, root_ButtonPress :: WINDOW,-                                 event_ButtonPress :: WINDOW, child_ButtonPress :: WINDOW,-                                 root_x_ButtonPress :: Int16, root_y_ButtonPress :: Int16,-                                 event_x_ButtonPress :: Int16, event_y_ButtonPress :: Int16,-                                 state_ButtonPress :: Word16, same_screen_ButtonPress :: Bool}-                 deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ButtonPress- -instance Deserialize ButtonPress where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               skip 1-               return-                 (MkButtonPress detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen)- -data ButtonRelease = MkButtonRelease{detail_ButtonRelease ::-                                     BUTTON,-                                     time_ButtonRelease :: TIMESTAMP, root_ButtonRelease :: WINDOW,-                                     event_ButtonRelease :: WINDOW, child_ButtonRelease :: WINDOW,-                                     root_x_ButtonRelease :: Int16, root_y_ButtonRelease :: Int16,-                                     event_x_ButtonRelease :: Int16, event_y_ButtonRelease :: Int16,-                                     state_ButtonRelease :: Word16,-                                     same_screen_ButtonRelease :: Bool}-                   deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ButtonRelease- -instance Deserialize ButtonRelease where-        deserialize-          = do skip 1-               detail <- deserialize-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               skip 1-               return-                 (MkButtonRelease detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen)- -data Motion = MotionNormal-            | MotionHint-            deriving Show- -instance SimpleEnum Motion where-        toValue MotionNormal{} = 0-        toValue MotionHint{} = 1-        fromValue 0 = MotionNormal-        fromValue 1 = MotionHint- -data MotionNotify = MkMotionNotify{detail_MotionNotify :: Motion,-                                   time_MotionNotify :: TIMESTAMP, root_MotionNotify :: WINDOW,-                                   event_MotionNotify :: WINDOW, child_MotionNotify :: WINDOW,-                                   root_x_MotionNotify :: Int16, root_y_MotionNotify :: Int16,-                                   event_x_MotionNotify :: Int16, event_y_MotionNotify :: Int16,-                                   state_MotionNotify :: Word16, same_screen_MotionNotify :: Bool}-                  deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event MotionNotify- -instance Deserialize MotionNotify where-        deserialize-          = do skip 1-               detail <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               same_screen <- deserialize-               skip 1-               return-                 (MkMotionNotify detail time root event child root_x root_y event_x-                    event_y-                    state-                    same_screen)- -data NotifyDetail = NotifyDetailAncestor-                  | NotifyDetailVirtual-                  | NotifyDetailInferior-                  | NotifyDetailNonlinear-                  | NotifyDetailNonlinearVirtual-                  | NotifyDetailPointer-                  | NotifyDetailPointerRoot-                  | NotifyDetailNone-                  deriving Show- -instance SimpleEnum NotifyDetail where-        toValue NotifyDetailAncestor{} = 0-        toValue NotifyDetailVirtual{} = 1-        toValue NotifyDetailInferior{} = 2-        toValue NotifyDetailNonlinear{} = 3-        toValue NotifyDetailNonlinearVirtual{} = 4-        toValue NotifyDetailPointer{} = 5-        toValue NotifyDetailPointerRoot{} = 6-        toValue NotifyDetailNone{} = 7-        fromValue 0 = NotifyDetailAncestor-        fromValue 1 = NotifyDetailVirtual-        fromValue 2 = NotifyDetailInferior-        fromValue 3 = NotifyDetailNonlinear-        fromValue 4 = NotifyDetailNonlinearVirtual-        fromValue 5 = NotifyDetailPointer-        fromValue 6 = NotifyDetailPointerRoot-        fromValue 7 = NotifyDetailNone- -data NotifyMode = NotifyModeNormal-                | NotifyModeGrab-                | NotifyModeUngrab-                | NotifyModeWhileGrabbed-                deriving Show- -instance SimpleEnum NotifyMode where-        toValue NotifyModeNormal{} = 0-        toValue NotifyModeGrab{} = 1-        toValue NotifyModeUngrab{} = 2-        toValue NotifyModeWhileGrabbed{} = 3-        fromValue 0 = NotifyModeNormal-        fromValue 1 = NotifyModeGrab-        fromValue 2 = NotifyModeUngrab-        fromValue 3 = NotifyModeWhileGrabbed- -data EnterNotify = MkEnterNotify{detail_EnterNotify ::-                                 NotifyDetail,-                                 time_EnterNotify :: TIMESTAMP, root_EnterNotify :: WINDOW,-                                 event_EnterNotify :: WINDOW, child_EnterNotify :: WINDOW,-                                 root_x_EnterNotify :: Int16, root_y_EnterNotify :: Int16,-                                 event_x_EnterNotify :: Int16, event_y_EnterNotify :: Int16,-                                 state_EnterNotify :: Word16, mode_EnterNotify :: NotifyMode,-                                 same_screen_focus_EnterNotify :: Word8}-                 deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event EnterNotify- -instance Deserialize EnterNotify where-        deserialize-          = do skip 1-               detail <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               mode <- liftM fromValue (deserialize :: Get Word8)-               same_screen_focus <- deserialize-               return-                 (MkEnterNotify detail time root event child root_x root_y event_x-                    event_y-                    state-                    mode-                    same_screen_focus)- -data LeaveNotify = MkLeaveNotify{detail_LeaveNotify ::-                                 NotifyDetail,-                                 time_LeaveNotify :: TIMESTAMP, root_LeaveNotify :: WINDOW,-                                 event_LeaveNotify :: WINDOW, child_LeaveNotify :: WINDOW,-                                 root_x_LeaveNotify :: Int16, root_y_LeaveNotify :: Int16,-                                 event_x_LeaveNotify :: Int16, event_y_LeaveNotify :: Int16,-                                 state_LeaveNotify :: Word16, mode_LeaveNotify :: NotifyMode,-                                 same_screen_focus_LeaveNotify :: Word8}-                 deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event LeaveNotify- -instance Deserialize LeaveNotify where-        deserialize-          = do skip 1-               detail <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               time <- deserialize-               root <- deserialize-               event <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               event_x <- deserialize-               event_y <- deserialize-               state <- deserialize-               mode <- liftM fromValue (deserialize :: Get Word8)-               same_screen_focus <- deserialize-               return-                 (MkLeaveNotify detail time root event child root_x root_y event_x-                    event_y-                    state-                    mode-                    same_screen_focus)- -data FocusIn = MkFocusIn{detail_FocusIn :: NotifyDetail,-                         event_FocusIn :: WINDOW, mode_FocusIn :: NotifyMode}-             deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event FocusIn- -instance Deserialize FocusIn where-        deserialize-          = do skip 1-               detail <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               event <- deserialize-               mode <- liftM fromValue (deserialize :: Get Word8)-               skip 3-               return (MkFocusIn detail event mode)- -data FocusOut = MkFocusOut{detail_FocusOut :: NotifyDetail,-                           event_FocusOut :: WINDOW, mode_FocusOut :: NotifyMode}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event FocusOut- -instance Deserialize FocusOut where-        deserialize-          = do skip 1-               detail <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               event <- deserialize-               mode <- liftM fromValue (deserialize :: Get Word8)-               skip 3-               return (MkFocusOut detail event mode)- -data KeymapNotify = MkKeymapNotify{keys_KeymapNotify :: [Word8]}-                  deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event KeymapNotify- -instance Deserialize KeymapNotify where-        deserialize-          = do skip 1-               keys <- deserializeList (fromIntegral 31)-               return (MkKeymapNotify keys)- -data Expose = MkExpose{window_Expose :: WINDOW, x_Expose :: Word16,-                       y_Expose :: Word16, width_Expose :: Word16,-                       height_Expose :: Word16, count_Expose :: Word16}-            deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event Expose- -instance Deserialize Expose where-        deserialize-          = do skip 1-               skip 1-               skip 2-               window <- deserialize-               x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               count <- deserialize-               skip 2-               return (MkExpose window x y width height count)- -data GraphicsExposure = MkGraphicsExposure{drawable_GraphicsExposure-                                           :: DRAWABLE,-                                           x_GraphicsExposure :: Word16,-                                           y_GraphicsExposure :: Word16,-                                           width_GraphicsExposure :: Word16,-                                           height_GraphicsExposure :: Word16,-                                           minor_opcode_GraphicsExposure :: Word16,-                                           count_GraphicsExposure :: Word16,-                                           major_opcode_GraphicsExposure :: Word8}-                      deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event GraphicsExposure- -instance Deserialize GraphicsExposure where-        deserialize-          = do skip 1-               skip 1-               skip 2-               drawable <- deserialize-               x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               minor_opcode <- deserialize-               count <- deserialize-               major_opcode <- deserialize-               skip 3-               return-                 (MkGraphicsExposure drawable x y width height minor_opcode count-                    major_opcode)- -data NoExposure = MkNoExposure{drawable_NoExposure :: DRAWABLE,-                               minor_opcode_NoExposure :: Word16,-                               major_opcode_NoExposure :: Word8}-                deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event NoExposure- -instance Deserialize NoExposure where-        deserialize-          = do skip 1-               skip 1-               skip 2-               drawable <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkNoExposure drawable minor_opcode major_opcode)- -data Visibility = VisibilityUnobscured-                | VisibilityPartiallyObscured-                | VisibilityFullyObscured-                deriving Show- -instance SimpleEnum Visibility where-        toValue VisibilityUnobscured{} = 0-        toValue VisibilityPartiallyObscured{} = 1-        toValue VisibilityFullyObscured{} = 2-        fromValue 0 = VisibilityUnobscured-        fromValue 1 = VisibilityPartiallyObscured-        fromValue 2 = VisibilityFullyObscured- -data VisibilityNotify = MkVisibilityNotify{window_VisibilityNotify-                                           :: WINDOW,-                                           state_VisibilityNotify :: Visibility}-                      deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event VisibilityNotify- -instance Deserialize VisibilityNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               window <- deserialize-               state <- liftM fromValue (deserialize :: Get Word8)-               skip 3-               return (MkVisibilityNotify window state)- -data CreateNotify = MkCreateNotify{parent_CreateNotify :: WINDOW,-                                   window_CreateNotify :: WINDOW, x_CreateNotify :: Int16,-                                   y_CreateNotify :: Int16, width_CreateNotify :: Word16,-                                   height_CreateNotify :: Word16,-                                   border_width_CreateNotify :: Word16,-                                   override_redirect_CreateNotify :: Bool}-                  deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event CreateNotify- -instance Deserialize CreateNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               parent <- deserialize-               window <- deserialize-               x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               border_width <- deserialize-               override_redirect <- deserialize-               skip 1-               return-                 (MkCreateNotify parent window x y width height border_width-                    override_redirect)- -data DestroyNotify = MkDestroyNotify{event_DestroyNotify :: WINDOW,-                                     window_DestroyNotify :: WINDOW}-                   deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event DestroyNotify- -instance Deserialize DestroyNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               return (MkDestroyNotify event window)- -data UnmapNotify = MkUnmapNotify{event_UnmapNotify :: WINDOW,-                                 window_UnmapNotify :: WINDOW, from_configure_UnmapNotify :: Bool}-                 deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event UnmapNotify- -instance Deserialize UnmapNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               from_configure <- deserialize-               skip 3-               return (MkUnmapNotify event window from_configure)- -data MapNotify = MkMapNotify{event_MapNotify :: WINDOW,-                             window_MapNotify :: WINDOW, override_redirect_MapNotify :: Bool}-               deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event MapNotify- -instance Deserialize MapNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               override_redirect <- deserialize-               skip 3-               return (MkMapNotify event window override_redirect)- -data MapRequest = MkMapRequest{parent_MapRequest :: WINDOW,-                               window_MapRequest :: WINDOW}-                deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event MapRequest- -instance Deserialize MapRequest where-        deserialize-          = do skip 1-               skip 1-               skip 2-               parent <- deserialize-               window <- deserialize-               return (MkMapRequest parent window)- -data ReparentNotify = MkReparentNotify{event_ReparentNotify ::-                                       WINDOW,-                                       window_ReparentNotify :: WINDOW,-                                       parent_ReparentNotify :: WINDOW, x_ReparentNotify :: Int16,-                                       y_ReparentNotify :: Int16,-                                       override_redirect_ReparentNotify :: Bool}-                    deriving (Show, Typeable)-- -data ClientMessageData = ClientData8  [Word8]  -- ^length 20-                       | ClientData16 [Word16] -- ^length 10-                       | ClientData32 [Word32] -- ^length 5-                   deriving (Show, Typeable)-- -data ClientMessageDataType = CDType8-                           | CDType16-                           | CDType32- -clientMessageDataType :: ClientMessageData -> ClientMessageDataType-clientMessageDataType ClientData8{}  = CDType8-clientMessageDataType ClientData16{} = CDType16-clientMessageDataType ClientData32{} = CDType32- -instance Serialize ClientMessageData where-    serialize (ClientData8 xs) = assert (length xs == 20) $-                                    serializeList xs-    serialize (ClientData16 xs) = assert (length xs == 10) $-                                     serializeList xs-    serialize (ClientData32 xs) = assert (length xs == 5) $-                                     serializeList xs-    size cd = assert-         (case cd of-            ClientData8  xs -> length xs == 20-            ClientData16 xs -> length xs == 10-            ClientData32 xs -> length xs == 5)-         20--deserializeClientData :: ClientMessageDataType -> Get ClientMessageData-deserializeClientData CDType8-    = ClientData8 `liftM` deserializeList 20-deserializeClientData CDType16-    = ClientData16 `liftM` deserializeList 10-deserializeClientData CDType32-    = ClientData32 `liftM` deserializeList 5- -clientDataFormatToType :: Word8 -> ClientMessageDataType-clientDataFormatToType 8 = CDType8-clientDataFormatToType 16 = CDType16-clientDataFormatToType 32 = CDType32-clientDataFormatToType _ = CDType8 -- should we throw an error here?-- -instance Graphics.XHB.Shared.Event ReparentNotify- -instance Deserialize ReparentNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               parent <- deserialize-               x <- deserialize-               y <- deserialize-               override_redirect <- deserialize-               skip 3-               return (MkReparentNotify event window parent x y override_redirect)- -data ConfigureNotify = MkConfigureNotify{event_ConfigureNotify ::-                                         WINDOW,-                                         window_ConfigureNotify :: WINDOW,-                                         above_sibling_ConfigureNotify :: WINDOW,-                                         x_ConfigureNotify :: Int16, y_ConfigureNotify :: Int16,-                                         width_ConfigureNotify :: Word16,-                                         height_ConfigureNotify :: Word16,-                                         border_width_ConfigureNotify :: Word16,-                                         override_redirect_ConfigureNotify :: Bool}-                     deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ConfigureNotify- -instance Deserialize ConfigureNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               above_sibling <- deserialize-               x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               border_width <- deserialize-               override_redirect <- deserialize-               skip 1-               return-                 (MkConfigureNotify event window above_sibling x y width height-                    border_width-                    override_redirect)- -data ConfigureRequest = MkConfigureRequest{stack_mode_ConfigureRequest-                                           :: StackMode,-                                           parent_ConfigureRequest :: WINDOW,-                                           window_ConfigureRequest :: WINDOW,-                                           sibling_ConfigureRequest :: WINDOW,-                                           x_ConfigureRequest :: Int16, y_ConfigureRequest :: Int16,-                                           width_ConfigureRequest :: Word16,-                                           height_ConfigureRequest :: Word16,-                                           border_width_ConfigureRequest :: Word16,-                                           value_mask_ConfigureRequest :: [ConfigWindow]}-                      deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ConfigureRequest- -instance Deserialize ConfigureRequest where-        deserialize-          = do skip 1-               stack_mode <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               parent <- deserialize-               window <- deserialize-               sibling <- deserialize-               x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               border_width <- deserialize-               value_mask <- liftM fromMask (deserialize :: Get Word16)-               return-                 (MkConfigureRequest stack_mode parent window sibling x y width-                    height-                    border_width-                    value_mask)- -data GravityNotify = MkGravityNotify{event_GravityNotify :: WINDOW,-                                     window_GravityNotify :: WINDOW, x_GravityNotify :: Int16,-                                     y_GravityNotify :: Int16}-                   deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event GravityNotify- -instance Deserialize GravityNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               x <- deserialize-               y <- deserialize-               return (MkGravityNotify event window x y)- -data ResizeRequest = MkResizeRequest{window_ResizeRequest ::-                                     WINDOW,-                                     width_ResizeRequest :: Word16, height_ResizeRequest :: Word16}-                   deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ResizeRequest- -instance Deserialize ResizeRequest where-        deserialize-          = do skip 1-               skip 1-               skip 2-               window <- deserialize-               width <- deserialize-               height <- deserialize-               return (MkResizeRequest window width height)- -data Place = PlaceOnTop-           | PlaceOnBottom-           deriving Show- -instance SimpleEnum Place where-        toValue PlaceOnTop{} = 0-        toValue PlaceOnBottom{} = 1-        fromValue 0 = PlaceOnTop-        fromValue 1 = PlaceOnBottom- -data CirculateNotify = MkCirculateNotify{event_CirculateNotify ::-                                         WINDOW,-                                         window_CirculateNotify :: WINDOW,-                                         place_CirculateNotify :: Place}-                     deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event CirculateNotify- -instance Deserialize CirculateNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               skip 4-               place <- liftM fromValue (deserialize :: Get Word8)-               skip 3-               return (MkCirculateNotify event window place)- -data CirculateRequest = MkCirculateRequest{event_CirculateRequest-                                           :: WINDOW,-                                           window_CirculateRequest :: WINDOW,-                                           place_CirculateRequest :: Place}-                      deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event CirculateRequest- -instance Deserialize CirculateRequest where-        deserialize-          = do skip 1-               skip 1-               skip 2-               event <- deserialize-               window <- deserialize-               skip 4-               place <- liftM fromValue (deserialize :: Get Word8)-               skip 3-               return (MkCirculateRequest event window place)- -data Property = PropertyNewValue-              | PropertyDelete-              deriving Show- -instance SimpleEnum Property where-        toValue PropertyNewValue{} = 0-        toValue PropertyDelete{} = 1-        fromValue 0 = PropertyNewValue-        fromValue 1 = PropertyDelete- -data PropertyNotify = MkPropertyNotify{window_PropertyNotify ::-                                       WINDOW,-                                       atom_PropertyNotify :: ATOM,-                                       time_PropertyNotify :: TIMESTAMP,-                                       state_PropertyNotify :: Property}-                    deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event PropertyNotify- -instance Deserialize PropertyNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               window <- deserialize-               atom <- deserialize-               time <- deserialize-               state <- liftM fromValue (deserialize :: Get Word8)-               skip 3-               return (MkPropertyNotify window atom time state)- -data SelectionClear = MkSelectionClear{time_SelectionClear ::-                                       TIMESTAMP,-                                       owner_SelectionClear :: WINDOW,-                                       selection_SelectionClear :: ATOM}-                    deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event SelectionClear- -instance Deserialize SelectionClear where-        deserialize-          = do skip 1-               skip 1-               skip 2-               time <- deserialize-               owner <- deserialize-               selection <- deserialize-               return (MkSelectionClear time owner selection)- -data SelectionRequest = MkSelectionRequest{time_SelectionRequest ::-                                           TIMESTAMP,-                                           owner_SelectionRequest :: WINDOW,-                                           requestor_SelectionRequest :: WINDOW,-                                           selection_SelectionRequest :: ATOM,-                                           target_SelectionRequest :: ATOM,-                                           property_SelectionRequest :: ATOM}-                      deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event SelectionRequest- -instance Deserialize SelectionRequest where-        deserialize-          = do skip 1-               skip 1-               skip 2-               time <- deserialize-               owner <- deserialize-               requestor <- deserialize-               selection <- deserialize-               target <- deserialize-               property <- deserialize-               return-                 (MkSelectionRequest time owner requestor selection target property)- -data SelectionNotify = MkSelectionNotify{time_SelectionNotify ::-                                         TIMESTAMP,-                                         requestor_SelectionNotify :: WINDOW,-                                         selection_SelectionNotify :: ATOM,-                                         target_SelectionNotify :: ATOM,-                                         property_SelectionNotify :: ATOM}-                     deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event SelectionNotify- -instance Deserialize SelectionNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               time <- deserialize-               requestor <- deserialize-               selection <- deserialize-               target <- deserialize-               property <- deserialize-               return (MkSelectionNotify time requestor selection target property)- -data ColormapState = ColormapStateUninstalled-                   | ColormapStateInstalled-                   deriving Show- -instance SimpleEnum ColormapState where-        toValue ColormapStateUninstalled{} = 0-        toValue ColormapStateInstalled{} = 1-        fromValue 0 = ColormapStateUninstalled-        fromValue 1 = ColormapStateInstalled- -data ColormapNotify = MkColormapNotify{window_ColormapNotify ::-                                       WINDOW,-                                       colormap_ColormapNotify :: COLORMAP,-                                       new_ColormapNotify :: Bool,-                                       state_ColormapNotify :: ColormapState}-                    deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ColormapNotify- -instance Deserialize ColormapNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               window <- deserialize-               colormap <- deserialize-               new <- deserialize-               state <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               return (MkColormapNotify window colormap new state)- -data ClientMessage = MkClientMessage{format_ClientMessage :: Word8,-                                     window_ClientMessage :: WINDOW, type_ClientMessage :: ATOM,-                                     data_ClientMessage :: ClientMessageData}-                   deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event ClientMessage- -instance Deserialize ClientMessage where-        deserialize-          = do skip 1-               format <- deserialize-               skip 2-               window <- deserialize-               type_ <- deserialize-               data_ <- deserializeClientData (clientDataFormatToType format)-               return (MkClientMessage format window type_ data_)- -data Mapping = MappingModifier-             | MappingKeyboard-             | MappingPointer-             deriving Show- -instance SimpleEnum Mapping where-        toValue MappingModifier{} = 0-        toValue MappingKeyboard{} = 1-        toValue MappingPointer{} = 2-        fromValue 0 = MappingModifier-        fromValue 1 = MappingKeyboard-        fromValue 2 = MappingPointer- -data MappingNotify = MkMappingNotify{request_MappingNotify ::-                                     Mapping,-                                     first_keycode_MappingNotify :: KEYCODE,-                                     count_MappingNotify :: Word8}-                   deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Event MappingNotify- -instance Deserialize MappingNotify where-        deserialize-          = do skip 1-               skip 1-               skip 2-               request <- liftM fromValue (deserialize :: Get Word8)-               first_keycode <- deserialize-               count <- deserialize-               skip 1-               return (MkMappingNotify request first_keycode count)- -data Request = MkRequest{bad_value_Request :: Word32,-                         minor_opcode_Request :: Word16, major_opcode_Request :: Word8}-             deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Request- -instance Deserialize Request where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkRequest bad_value minor_opcode major_opcode)- -data Value = MkValue{bad_value_Value :: Word32,-                     minor_opcode_Value :: Word16, major_opcode_Value :: Word8}-           deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Value- -instance Deserialize Value where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkValue bad_value minor_opcode major_opcode)- -data Window = MkWindow{bad_value_Window :: Word32,-                       minor_opcode_Window :: Word16, major_opcode_Window :: Word8}-            deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Window- -instance Deserialize Window where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkWindow bad_value minor_opcode major_opcode)- -data Pixmap = MkPixmap{bad_value_Pixmap :: Word32,-                       minor_opcode_Pixmap :: Word16, major_opcode_Pixmap :: Word8}-            deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Pixmap- -instance Deserialize Pixmap where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkPixmap bad_value minor_opcode major_opcode)- -data Atom = MkAtom{bad_value_Atom :: Word32,-                   minor_opcode_Atom :: Word16, major_opcode_Atom :: Word8}-          deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Atom- -instance Deserialize Atom where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkAtom bad_value minor_opcode major_opcode)- -data Cursor = MkCursor{bad_value_Cursor :: Word32,-                       minor_opcode_Cursor :: Word16, major_opcode_Cursor :: Word8}-            deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Cursor- -instance Deserialize Cursor where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkCursor bad_value minor_opcode major_opcode)- -data Font = MkFont{bad_value_Font :: Word32,-                   minor_opcode_Font :: Word16, major_opcode_Font :: Word8}-          deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Font- -instance Deserialize Font where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkFont bad_value minor_opcode major_opcode)- -data Match = MkMatch{bad_value_Match :: Word32,-                     minor_opcode_Match :: Word16, major_opcode_Match :: Word8}-           deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Match- -instance Deserialize Match where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkMatch bad_value minor_opcode major_opcode)- -data Drawable = MkDrawable{bad_value_Drawable :: Word32,-                           minor_opcode_Drawable :: Word16, major_opcode_Drawable :: Word8}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Drawable- -instance Deserialize Drawable where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkDrawable bad_value minor_opcode major_opcode)- -data Access = MkAccess{bad_value_Access :: Word32,-                       minor_opcode_Access :: Word16, major_opcode_Access :: Word8}-            deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Access- -instance Deserialize Access where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkAccess bad_value minor_opcode major_opcode)- -data Alloc = MkAlloc{bad_value_Alloc :: Word32,-                     minor_opcode_Alloc :: Word16, major_opcode_Alloc :: Word8}-           deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Alloc- -instance Deserialize Alloc where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkAlloc bad_value minor_opcode major_opcode)- -data Colormap = MkColormap{bad_value_Colormap :: Word32,-                           minor_opcode_Colormap :: Word16, major_opcode_Colormap :: Word8}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Colormap- -instance Deserialize Colormap where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkColormap bad_value minor_opcode major_opcode)- -data GContext = MkGContext{bad_value_GContext :: Word32,-                           minor_opcode_GContext :: Word16, major_opcode_GContext :: Word8}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error GContext- -instance Deserialize GContext where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkGContext bad_value minor_opcode major_opcode)- -data IDChoice = MkIDChoice{bad_value_IDChoice :: Word32,-                           minor_opcode_IDChoice :: Word16, major_opcode_IDChoice :: Word8}-              deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error IDChoice- -instance Deserialize IDChoice where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkIDChoice bad_value minor_opcode major_opcode)- -data Name = MkName{bad_value_Name :: Word32,-                   minor_opcode_Name :: Word16, major_opcode_Name :: Word8}-          deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Name- -instance Deserialize Name where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkName bad_value minor_opcode major_opcode)- -data Length = MkLength{bad_value_Length :: Word32,-                       minor_opcode_Length :: Word16, major_opcode_Length :: Word8}-            deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Length- -instance Deserialize Length where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkLength bad_value minor_opcode major_opcode)- -data Implementation = MkImplementation{bad_value_Implementation ::-                                       Word32,-                                       minor_opcode_Implementation :: Word16,-                                       major_opcode_Implementation :: Word8}-                    deriving (Show, Typeable)- -instance Graphics.XHB.Shared.Error Implementation- -instance Deserialize Implementation where-        deserialize-          = do skip 4-               bad_value <- deserialize-               minor_opcode <- deserialize-               major_opcode <- deserialize-               skip 1-               return (MkImplementation bad_value minor_opcode major_opcode)- -data WindowClass = WindowClassCopyFromParent-                 | WindowClassInputOutput-                 | WindowClassInputOnly-                 deriving Show- -instance SimpleEnum WindowClass where-        toValue WindowClassCopyFromParent{} = 0-        toValue WindowClassInputOutput{} = 1-        toValue WindowClassInputOnly{} = 2-        fromValue 0 = WindowClassCopyFromParent-        fromValue 1 = WindowClassInputOutput-        fromValue 2 = WindowClassInputOnly- -data CW = CWBackPixmap-        | CWBackPixel-        | CWBorderPixmap-        | CWBorderPixel-        | CWBitGravity-        | CWWinGravity-        | CWBackingStore-        | CWBackingPlanes-        | CWBackingPixel-        | CWOverrideRedirect-        | CWSaveUnder-        | CWEventMask-        | CWDontPropagate-        | CWColormap-        | CWCursor-        deriving Show- -instance BitEnum CW where-        toBit CWBackPixmap{} = 0-        toBit CWBackPixel{} = 1-        toBit CWBorderPixmap{} = 2-        toBit CWBorderPixel{} = 3-        toBit CWBitGravity{} = 4-        toBit CWWinGravity{} = 5-        toBit CWBackingStore{} = 6-        toBit CWBackingPlanes{} = 7-        toBit CWBackingPixel{} = 8-        toBit CWOverrideRedirect{} = 9-        toBit CWSaveUnder{} = 10-        toBit CWEventMask{} = 11-        toBit CWDontPropagate{} = 12-        toBit CWColormap{} = 13-        toBit CWCursor{} = 14-        fromBit 0 = CWBackPixmap-        fromBit 1 = CWBackPixel-        fromBit 2 = CWBorderPixmap-        fromBit 3 = CWBorderPixel-        fromBit 4 = CWBitGravity-        fromBit 5 = CWWinGravity-        fromBit 6 = CWBackingStore-        fromBit 7 = CWBackingPlanes-        fromBit 8 = CWBackingPixel-        fromBit 9 = CWOverrideRedirect-        fromBit 10 = CWSaveUnder-        fromBit 11 = CWEventMask-        fromBit 12 = CWDontPropagate-        fromBit 13 = CWColormap-        fromBit 14 = CWCursor- -data BackPixmap = BackPixmapNone-                | BackPixmapParentRelative-                deriving Show- -instance SimpleEnum BackPixmap where-        toValue BackPixmapNone{} = 0-        toValue BackPixmapParentRelative{} = 1-        fromValue 0 = BackPixmapNone-        fromValue 1 = BackPixmapParentRelative- -data Gravity = GravityBitForget-             | GravityWinUnmap-             | GravityNorthWest-             | GravityNorth-             | GravityNorthEast-             | GravityWest-             | GravityCenter-             | GravityEast-             | GravitySouthWest-             | GravitySouth-             | GravitySouthEast-             | GravityStatic-             deriving Show- -instance SimpleEnum Gravity where-        toValue GravityBitForget{} = 0-        toValue GravityWinUnmap{} = 0-        toValue GravityNorthWest{} = 1-        toValue GravityNorth{} = 2-        toValue GravityNorthEast{} = 3-        toValue GravityWest{} = 4-        toValue GravityCenter{} = 5-        toValue GravityEast{} = 6-        toValue GravitySouthWest{} = 7-        toValue GravitySouth{} = 8-        toValue GravitySouthEast{} = 9-        toValue GravityStatic{} = 10-        fromValue 0 = GravityBitForget-        fromValue 0 = GravityWinUnmap-        fromValue 1 = GravityNorthWest-        fromValue 2 = GravityNorth-        fromValue 3 = GravityNorthEast-        fromValue 4 = GravityWest-        fromValue 5 = GravityCenter-        fromValue 6 = GravityEast-        fromValue 7 = GravitySouthWest-        fromValue 8 = GravitySouth-        fromValue 9 = GravitySouthEast-        fromValue 10 = GravityStatic- -data BackingStore = BackingStoreNotUseful-                  | BackingStoreWhenMapped-                  | BackingStoreAlways-                  deriving Show- -instance SimpleEnum BackingStore where-        toValue BackingStoreNotUseful{} = 0-        toValue BackingStoreWhenMapped{} = 1-        toValue BackingStoreAlways{} = 2-        fromValue 0 = BackingStoreNotUseful-        fromValue 1 = BackingStoreWhenMapped-        fromValue 2 = BackingStoreAlways- -data EventMask = EventMaskKeyPress-               | EventMaskKeyRelease-               | EventMaskButtonPress-               | EventMaskButtonRelease-               | EventMaskEnterWindow-               | EventMaskLeaveWindow-               | EventMaskPointerMotion-               | EventMaskPointerMotionHint-               | EventMaskButton1Motion-               | EventMaskButton2Motion-               | EventMaskButton3Motion-               | EventMaskButton4Motion-               | EventMaskButton5Motion-               | EventMaskButtonMotion-               | EventMaskKeymapState-               | EventMaskExposure-               | EventMaskVisibilityChange-               | EventMaskStructureNotify-               | EventMaskResizeRedirect-               | EventMaskSubstructureNotify-               | EventMaskSubstructureRedirect-               | EventMaskFocusChange-               | EventMaskPropertyChange-               | EventMaskColorMapChange-               | EventMaskOwnerGrabButton-               deriving Show- -instance BitEnum EventMask where-        toBit EventMaskKeyPress{} = 0-        toBit EventMaskKeyRelease{} = 1-        toBit EventMaskButtonPress{} = 2-        toBit EventMaskButtonRelease{} = 3-        toBit EventMaskEnterWindow{} = 4-        toBit EventMaskLeaveWindow{} = 5-        toBit EventMaskPointerMotion{} = 6-        toBit EventMaskPointerMotionHint{} = 7-        toBit EventMaskButton1Motion{} = 8-        toBit EventMaskButton2Motion{} = 9-        toBit EventMaskButton3Motion{} = 10-        toBit EventMaskButton4Motion{} = 11-        toBit EventMaskButton5Motion{} = 12-        toBit EventMaskButtonMotion{} = 13-        toBit EventMaskKeymapState{} = 14-        toBit EventMaskExposure{} = 15-        toBit EventMaskVisibilityChange{} = 16-        toBit EventMaskStructureNotify{} = 17-        toBit EventMaskResizeRedirect{} = 18-        toBit EventMaskSubstructureNotify{} = 19-        toBit EventMaskSubstructureRedirect{} = 20-        toBit EventMaskFocusChange{} = 21-        toBit EventMaskPropertyChange{} = 22-        toBit EventMaskColorMapChange{} = 23-        toBit EventMaskOwnerGrabButton{} = 24-        fromBit 0 = EventMaskKeyPress-        fromBit 1 = EventMaskKeyRelease-        fromBit 2 = EventMaskButtonPress-        fromBit 3 = EventMaskButtonRelease-        fromBit 4 = EventMaskEnterWindow-        fromBit 5 = EventMaskLeaveWindow-        fromBit 6 = EventMaskPointerMotion-        fromBit 7 = EventMaskPointerMotionHint-        fromBit 8 = EventMaskButton1Motion-        fromBit 9 = EventMaskButton2Motion-        fromBit 10 = EventMaskButton3Motion-        fromBit 11 = EventMaskButton4Motion-        fromBit 12 = EventMaskButton5Motion-        fromBit 13 = EventMaskButtonMotion-        fromBit 14 = EventMaskKeymapState-        fromBit 15 = EventMaskExposure-        fromBit 16 = EventMaskVisibilityChange-        fromBit 17 = EventMaskStructureNotify-        fromBit 18 = EventMaskResizeRedirect-        fromBit 19 = EventMaskSubstructureNotify-        fromBit 20 = EventMaskSubstructureRedirect-        fromBit 21 = EventMaskFocusChange-        fromBit 22 = EventMaskPropertyChange-        fromBit 23 = EventMaskColorMapChange-        fromBit 24 = EventMaskOwnerGrabButton- -data CreateWindow = MkCreateWindow{depth_CreateWindow :: Word8,-                                   wid_CreateWindow :: WINDOW, parent_CreateWindow :: WINDOW,-                                   x_CreateWindow :: Int16, y_CreateWindow :: Int16,-                                   width_CreateWindow :: Word16, height_CreateWindow :: Word16,-                                   border_width_CreateWindow :: Word16,-                                   class_CreateWindow :: WindowClass,-                                   visual_CreateWindow :: VISUALID,-                                   value_CreateWindow :: ValueParam Word32}-                  deriving (Show, Typeable)- -instance Serialize CreateWindow where-        serialize x-          = do putWord8 1-               serialize (depth_CreateWindow x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (wid_CreateWindow x)-               serialize (parent_CreateWindow x)-               serialize (x_CreateWindow x)-               serialize (y_CreateWindow x)-               serialize (width_CreateWindow x)-               serialize (height_CreateWindow x)-               serialize (border_width_CreateWindow x)-               serialize (toValue (class_CreateWindow x) :: Word16)-               serialize (visual_CreateWindow x)-               serialize (value_CreateWindow x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (depth_CreateWindow x) + size (wid_CreateWindow x) +-              size (parent_CreateWindow x)-              + size (x_CreateWindow x)-              + size (y_CreateWindow x)-              + size (width_CreateWindow x)-              + size (height_CreateWindow x)-              + size (border_width_CreateWindow x)-              + size (undefined :: Word16)-              + size (visual_CreateWindow x)-              + size (value_CreateWindow x)- -data ChangeWindowAttributes = MkChangeWindowAttributes{window_ChangeWindowAttributes-                                                       :: WINDOW,-                                                       value_ChangeWindowAttributes ::-                                                       ValueParam Word32}-                            deriving (Show, Typeable)- -instance Serialize ChangeWindowAttributes where-        serialize x-          = do putWord8 2-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ChangeWindowAttributes x)-               serialize (value_ChangeWindowAttributes x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (window_ChangeWindowAttributes x) +-              size (value_ChangeWindowAttributes x)- -data MapState = MapStateUnmapped-              | MapStateUnviewable-              | MapStateViewable-              deriving Show- -instance SimpleEnum MapState where-        toValue MapStateUnmapped{} = 0-        toValue MapStateUnviewable{} = 1-        toValue MapStateViewable{} = 2-        fromValue 0 = MapStateUnmapped-        fromValue 1 = MapStateUnviewable-        fromValue 2 = MapStateViewable- -data GetWindowAttributes = MkGetWindowAttributes{window_GetWindowAttributes-                                                 :: WINDOW}-                         deriving (Show, Typeable)- -instance Serialize GetWindowAttributes where-        serialize x-          = do putWord8 3-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_GetWindowAttributes x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_GetWindowAttributes x)- -data GetWindowAttributesReply = MkGetWindowAttributesReply{backing_store_GetWindowAttributesReply-                                                           :: BackingStore,-                                                           visual_GetWindowAttributesReply ::-                                                           VISUALID,-                                                           class_GetWindowAttributesReply ::-                                                           WindowClass,-                                                           bit_gravity_GetWindowAttributesReply ::-                                                           Gravity,-                                                           win_gravity_GetWindowAttributesReply ::-                                                           Gravity,-                                                           backing_planes_GetWindowAttributesReply-                                                           :: Word32,-                                                           backing_pixel_GetWindowAttributesReply ::-                                                           Word32,-                                                           save_under_GetWindowAttributesReply ::-                                                           Bool,-                                                           map_is_installed_GetWindowAttributesReply-                                                           :: Bool,-                                                           map_state_GetWindowAttributesReply ::-                                                           MapState,-                                                           override_redirect_GetWindowAttributesReply-                                                           :: Bool,-                                                           colormap_GetWindowAttributesReply ::-                                                           COLORMAP,-                                                           all_event_masks_GetWindowAttributesReply-                                                           :: [EventMask],-                                                           your_event_mask_GetWindowAttributesReply-                                                           :: [EventMask],-                                                           do_not_propagate_mask_GetWindowAttributesReply-                                                           :: [EventMask]}-                              deriving (Show, Typeable)- -instance Deserialize GetWindowAttributesReply where-        deserialize-          = do skip 1-               backing_store <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               visual <- deserialize-               class_ <- liftM fromValue (deserialize :: Get Word16)-               bit_gravity <- liftM fromValue (deserialize :: Get Word8)-               win_gravity <- liftM fromValue (deserialize :: Get Word8)-               backing_planes <- deserialize-               backing_pixel <- deserialize-               save_under <- deserialize-               map_is_installed <- deserialize-               map_state <- liftM fromValue (deserialize :: Get Word8)-               override_redirect <- deserialize-               colormap <- deserialize-               all_event_masks <- liftM fromMask (deserialize :: Get Word32)-               your_event_mask <- liftM fromMask (deserialize :: Get Word32)-               do_not_propagate_mask <- liftM fromMask (deserialize :: Get Word16)-               skip 2-               let _ = isCard32 length-               return-                 (MkGetWindowAttributesReply backing_store visual class_ bit_gravity-                    win_gravity-                    backing_planes-                    backing_pixel-                    save_under-                    map_is_installed-                    map_state-                    override_redirect-                    colormap-                    all_event_masks-                    your_event_mask-                    do_not_propagate_mask)- -data DestroyWindow = MkDestroyWindow{window_DestroyWindow ::-                                     WINDOW}-                   deriving (Show, Typeable)- -instance Serialize DestroyWindow where-        serialize x-          = do putWord8 4-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_DestroyWindow x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_DestroyWindow x)- -data DestroySubwindows = MkDestroySubwindows{window_DestroySubwindows-                                             :: WINDOW}-                       deriving (Show, Typeable)- -instance Serialize DestroySubwindows where-        serialize x-          = do putWord8 5-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_DestroySubwindows x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_DestroySubwindows x)- -data SetMode = SetModeInsert-             | SetModeDelete-             deriving Show- -instance SimpleEnum SetMode where-        toValue SetModeInsert{} = 0-        toValue SetModeDelete{} = 1-        fromValue 0 = SetModeInsert-        fromValue 1 = SetModeDelete- -data ChangeSaveSet = MkChangeSaveSet{mode_ChangeSaveSet :: SetMode,-                                     window_ChangeSaveSet :: WINDOW}-                   deriving (Show, Typeable)- -instance Serialize ChangeSaveSet where-        serialize x-          = do putWord8 6-               serialize (toValue (mode_ChangeSaveSet x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ChangeSaveSet x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (window_ChangeSaveSet x)- -data ReparentWindow = MkReparentWindow{window_ReparentWindow ::-                                       WINDOW,-                                       parent_ReparentWindow :: WINDOW, x_ReparentWindow :: Int16,-                                       y_ReparentWindow :: Int16}-                    deriving (Show, Typeable)- -instance Serialize ReparentWindow where-        serialize x-          = do putWord8 7-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ReparentWindow x)-               serialize (parent_ReparentWindow x)-               serialize (x_ReparentWindow x)-               serialize (y_ReparentWindow x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (window_ReparentWindow x) +-              size (parent_ReparentWindow x)-              + size (x_ReparentWindow x)-              + size (y_ReparentWindow x)- -data MapWindow = MkMapWindow{window_MapWindow :: WINDOW}-               deriving (Show, Typeable)- -instance Serialize MapWindow where-        serialize x-          = do putWord8 8-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_MapWindow x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_MapWindow x)- -data MapSubwindows = MkMapSubwindows{window_MapSubwindows ::-                                     WINDOW}-                   deriving (Show, Typeable)- -instance Serialize MapSubwindows where-        serialize x-          = do putWord8 9-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_MapSubwindows x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_MapSubwindows x)- -data UnmapWindow = MkUnmapWindow{window_UnmapWindow :: WINDOW}-                 deriving (Show, Typeable)- -instance Serialize UnmapWindow where-        serialize x-          = do putWord8 10-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_UnmapWindow x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_UnmapWindow x)- -data UnmapSubwindows = MkUnmapSubwindows{window_UnmapSubwindows ::-                                         WINDOW}-                     deriving (Show, Typeable)- -instance Serialize UnmapSubwindows where-        serialize x-          = do putWord8 11-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_UnmapSubwindows x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_UnmapSubwindows x)- -data ConfigWindow = ConfigWindowX-                  | ConfigWindowY-                  | ConfigWindowWidth-                  | ConfigWindowHeight-                  | ConfigWindowBorderWidth-                  | ConfigWindowSibling-                  | ConfigWindowStackMode-                  deriving Show- -instance BitEnum ConfigWindow where-        toBit ConfigWindowX{} = 0-        toBit ConfigWindowY{} = 1-        toBit ConfigWindowWidth{} = 2-        toBit ConfigWindowHeight{} = 3-        toBit ConfigWindowBorderWidth{} = 4-        toBit ConfigWindowSibling{} = 5-        toBit ConfigWindowStackMode{} = 6-        fromBit 0 = ConfigWindowX-        fromBit 1 = ConfigWindowY-        fromBit 2 = ConfigWindowWidth-        fromBit 3 = ConfigWindowHeight-        fromBit 4 = ConfigWindowBorderWidth-        fromBit 5 = ConfigWindowSibling-        fromBit 6 = ConfigWindowStackMode- -data StackMode = StackModeAbove-               | StackModeBelow-               | StackModeTopIf-               | StackModeBottomIf-               | StackModeOpposite-               deriving Show- -instance SimpleEnum StackMode where-        toValue StackModeAbove{} = 0-        toValue StackModeBelow{} = 1-        toValue StackModeTopIf{} = 2-        toValue StackModeBottomIf{} = 3-        toValue StackModeOpposite{} = 4-        fromValue 0 = StackModeAbove-        fromValue 1 = StackModeBelow-        fromValue 2 = StackModeTopIf-        fromValue 3 = StackModeBottomIf-        fromValue 4 = StackModeOpposite- -data ConfigureWindow = MkConfigureWindow{window_ConfigureWindow ::-                                         WINDOW,-                                         value_ConfigureWindow :: ValueParam Word16}-                     deriving (Show, Typeable)- -instance Serialize ConfigureWindow where-        serialize x-          = do putWord8 12-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ConfigureWindow x)-               serializeValueParam 2 (value_ConfigureWindow x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (window_ConfigureWindow x) +-              (size (value_ConfigureWindow x) + 2)- -data Circulate = CirculateRaiseLowest-               | CirculateLowerHighest-               deriving Show- -instance SimpleEnum Circulate where-        toValue CirculateRaiseLowest{} = 0-        toValue CirculateLowerHighest{} = 1-        fromValue 0 = CirculateRaiseLowest-        fromValue 1 = CirculateLowerHighest- -data CirculateWindow = MkCirculateWindow{direction_CirculateWindow-                                         :: Circulate,-                                         window_CirculateWindow :: WINDOW}-                     deriving (Show, Typeable)- -instance Serialize CirculateWindow where-        serialize x-          = do putWord8 13-               serialize (toValue (direction_CirculateWindow x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_CirculateWindow x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (window_CirculateWindow x)- -data GetGeometry = MkGetGeometry{drawable_GetGeometry :: DRAWABLE}-                 deriving (Show, Typeable)- -instance Serialize GetGeometry where-        serialize x-          = do putWord8 14-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_GetGeometry x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (drawable_GetGeometry x)- -data GetGeometryReply = MkGetGeometryReply{depth_GetGeometryReply-                                           :: Word8,-                                           root_GetGeometryReply :: WINDOW,-                                           x_GetGeometryReply :: Int16, y_GetGeometryReply :: Int16,-                                           width_GetGeometryReply :: Word16,-                                           height_GetGeometryReply :: Word16,-                                           border_width_GetGeometryReply :: Word16}-                      deriving (Show, Typeable)- -instance Deserialize GetGeometryReply where-        deserialize-          = do skip 1-               depth <- deserialize-               skip 2-               length <- deserialize-               root <- deserialize-               x <- deserialize-               y <- deserialize-               width <- deserialize-               height <- deserialize-               border_width <- deserialize-               skip 2-               let _ = isCard32 length-               return-                 (MkGetGeometryReply depth root x y width height border_width)- -data QueryTree = MkQueryTree{window_QueryTree :: WINDOW}-               deriving (Show, Typeable)- -instance Serialize QueryTree where-        serialize x-          = do putWord8 15-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_QueryTree x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_QueryTree x)- -data QueryTreeReply = MkQueryTreeReply{root_QueryTreeReply ::-                                       WINDOW,-                                       parent_QueryTreeReply :: WINDOW,-                                       children_len_QueryTreeReply :: Word16,-                                       children_QueryTreeReply :: [WINDOW]}-                    deriving (Show, Typeable)- -instance Deserialize QueryTreeReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               root <- deserialize-               parent <- deserialize-               children_len <- deserialize-               skip 14-               children <- deserializeList (fromIntegral children_len)-               let _ = isCard32 length-               return (MkQueryTreeReply root parent children_len children)- -data InternAtom = MkInternAtom{only_if_exists_InternAtom :: Bool,-                               name_len_InternAtom :: Word16, name_InternAtom :: [CChar]}-                deriving (Show, Typeable)- -instance Serialize InternAtom where-        serialize x-          = do putWord8 16-               serialize (only_if_exists_InternAtom x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (name_len_InternAtom x)-               putSkip 2-               serializeList (name_InternAtom x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (only_if_exists_InternAtom x) +-              size (name_len_InternAtom x)-              + 2-              + sum (map size (name_InternAtom x))- -data InternAtomReply = MkInternAtomReply{atom_InternAtomReply ::-                                         ATOM}-                     deriving (Show, Typeable)- -instance Deserialize InternAtomReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               atom <- deserialize-               let _ = isCard32 length-               return (MkInternAtomReply atom)- -data GetAtomName = MkGetAtomName{atom_GetAtomName :: ATOM}-                 deriving (Show, Typeable)- -instance Serialize GetAtomName where-        serialize x-          = do putWord8 17-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (atom_GetAtomName x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (atom_GetAtomName x)- -data GetAtomNameReply = MkGetAtomNameReply{name_len_GetAtomNameReply-                                           :: Word16,-                                           name_GetAtomNameReply :: [CChar]}-                      deriving (Show, Typeable)- -instance Deserialize GetAtomNameReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               name_len <- deserialize-               skip 22-               name <- deserializeList (fromIntegral name_len)-               let _ = isCard32 length-               return (MkGetAtomNameReply name_len name)- -data PropMode = PropModeReplace-              | PropModePrepend-              | PropModeAppend-              deriving Show- -instance SimpleEnum PropMode where-        toValue PropModeReplace{} = 0-        toValue PropModePrepend{} = 1-        toValue PropModeAppend{} = 2-        fromValue 0 = PropModeReplace-        fromValue 1 = PropModePrepend-        fromValue 2 = PropModeAppend- -data ChangeProperty = MkChangeProperty{mode_ChangeProperty ::-                                       PropMode,-                                       window_ChangeProperty :: WINDOW,-                                       property_ChangeProperty :: ATOM, type_ChangeProperty :: ATOM,-                                       format_ChangeProperty :: Word8,-                                       data_len_ChangeProperty :: Word32,-                                       data_ChangeProperty :: [Word8]}-                    deriving (Show, Typeable)- -instance Serialize ChangeProperty where-        serialize x-          = do putWord8 18-               serialize (toValue (mode_ChangeProperty x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ChangeProperty x)-               serialize (property_ChangeProperty x)-               serialize (type_ChangeProperty x)-               serialize (format_ChangeProperty x)-               putSkip 3-               serialize (data_len_ChangeProperty x)-               serializeList (data_ChangeProperty x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (window_ChangeProperty x) +-              size (property_ChangeProperty x)-              + size (type_ChangeProperty x)-              + size (format_ChangeProperty x)-              + 3-              + size (data_len_ChangeProperty x)-              + sum (map size (data_ChangeProperty x))- -data DeleteProperty = MkDeleteProperty{window_DeleteProperty ::-                                       WINDOW,-                                       property_DeleteProperty :: ATOM}-                    deriving (Show, Typeable)- -instance Serialize DeleteProperty where-        serialize x-          = do putWord8 19-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_DeleteProperty x)-               serialize (property_DeleteProperty x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (window_DeleteProperty x) +-              size (property_DeleteProperty x)- -data GetPropertyType = GetPropertyTypeAny-                     deriving Show- -instance SimpleEnum GetPropertyType where-        toValue GetPropertyTypeAny{} = 0-        fromValue 0 = GetPropertyTypeAny- -data GetProperty = MkGetProperty{delete_GetProperty :: Bool,-                                 window_GetProperty :: WINDOW, property_GetProperty :: ATOM,-                                 type_GetProperty :: ATOM,-                                 long_offset_GetProperty :: Word32,-                                 long_length_GetProperty :: Word32}-                 deriving (Show, Typeable)- -instance Serialize GetProperty where-        serialize x-          = do putWord8 20-               serialize (delete_GetProperty x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_GetProperty x)-               serialize (property_GetProperty x)-               serialize (type_GetProperty x)-               serialize (long_offset_GetProperty x)-               serialize (long_length_GetProperty x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (delete_GetProperty x) + size (window_GetProperty x) +-              size (property_GetProperty x)-              + size (undefined :: ATOM)-              + size (long_offset_GetProperty x)-              + size (long_length_GetProperty x)- -data GetPropertyReply = MkGetPropertyReply{format_GetPropertyReply-                                           :: Word8,-                                           type_GetPropertyReply :: ATOM,-                                           bytes_after_GetPropertyReply :: Word32,-                                           value_len_GetPropertyReply :: Word32,-                                           value_GetPropertyReply :: [Word8]}-                      deriving (Show, Typeable)- -instance Deserialize GetPropertyReply where-        deserialize-          = do skip 1-               format <- deserialize-               skip 2-               length <- deserialize-               type_ <- deserialize-               bytes_after <- deserialize-               value_len <- deserialize-               skip 12-               value <- deserializeList (fromIntegral value_len)-               let _ = isCard32 length-               return-                 (MkGetPropertyReply format type_ bytes_after value_len value)- -data ListProperties = MkListProperties{window_ListProperties ::-                                       WINDOW}-                    deriving (Show, Typeable)- -instance Serialize ListProperties where-        serialize x-          = do putWord8 21-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ListProperties x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_ListProperties x)- -data ListPropertiesReply = MkListPropertiesReply{atoms_len_ListPropertiesReply-                                                 :: Word16,-                                                 atoms_ListPropertiesReply :: [ATOM]}-                         deriving (Show, Typeable)- -instance Deserialize ListPropertiesReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               atoms_len <- deserialize-               skip 22-               atoms <- deserializeList (fromIntegral atoms_len)-               let _ = isCard32 length-               return (MkListPropertiesReply atoms_len atoms)- -data SetSelectionOwner = MkSetSelectionOwner{owner_SetSelectionOwner-                                             :: WINDOW,-                                             selection_SetSelectionOwner :: ATOM,-                                             time_SetSelectionOwner :: TIMESTAMP}-                       deriving (Show, Typeable)- -instance Serialize SetSelectionOwner where-        serialize x-          = do putWord8 22-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (owner_SetSelectionOwner x)-               serialize (selection_SetSelectionOwner x)-               serialize (time_SetSelectionOwner x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (owner_SetSelectionOwner x) +-              size (selection_SetSelectionOwner x)-              + size (time_SetSelectionOwner x)- -data GetSelectionOwner = MkGetSelectionOwner{selection_GetSelectionOwner-                                             :: ATOM}-                       deriving (Show, Typeable)- -instance Serialize GetSelectionOwner where-        serialize x-          = do putWord8 23-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (selection_GetSelectionOwner x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (selection_GetSelectionOwner x)- -data GetSelectionOwnerReply = MkGetSelectionOwnerReply{owner_GetSelectionOwnerReply-                                                       :: WINDOW}-                            deriving (Show, Typeable)- -instance Deserialize GetSelectionOwnerReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               owner <- deserialize-               let _ = isCard32 length-               return (MkGetSelectionOwnerReply owner)- -data ConvertSelection = MkConvertSelection{requestor_ConvertSelection-                                           :: WINDOW,-                                           selection_ConvertSelection :: ATOM,-                                           target_ConvertSelection :: ATOM,-                                           property_ConvertSelection :: ATOM,-                                           time_ConvertSelection :: TIMESTAMP}-                      deriving (Show, Typeable)- -instance Serialize ConvertSelection where-        serialize x-          = do putWord8 24-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (requestor_ConvertSelection x)-               serialize (selection_ConvertSelection x)-               serialize (target_ConvertSelection x)-               serialize (property_ConvertSelection x)-               serialize (time_ConvertSelection x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (requestor_ConvertSelection x) +-              size (selection_ConvertSelection x)-              + size (target_ConvertSelection x)-              + size (property_ConvertSelection x)-              + size (time_ConvertSelection x)- -data SendEventDest = SendEventDestPointerWindow-                   | SendEventDestItemFocus-                   deriving Show- -instance SimpleEnum SendEventDest where-        toValue SendEventDestPointerWindow{} = 0-        toValue SendEventDestItemFocus{} = 1-        fromValue 0 = SendEventDestPointerWindow-        fromValue 1 = SendEventDestItemFocus- -data SendEvent = MkSendEvent{propagate_SendEvent :: Bool,-                             destination_SendEvent :: WINDOW,-                             event_mask_SendEvent :: [EventMask], event_SendEvent :: [CChar]}-               deriving (Show, Typeable)- -instance Serialize SendEvent where-        serialize x-          = do putWord8 25-               serialize (propagate_SendEvent x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (destination_SendEvent x)-               serialize (toMask (event_mask_SendEvent x) :: Word32)-               serializeList (event_SendEvent x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (propagate_SendEvent x) + size (destination_SendEvent x)-              + size (undefined :: Word32)-              + sum (map size (event_SendEvent x))- -data GrabMode = GrabModeSync-              | GrabModeAsync-              deriving Show- -instance SimpleEnum GrabMode where-        toValue GrabModeSync{} = 0-        toValue GrabModeAsync{} = 1-        fromValue 0 = GrabModeSync-        fromValue 1 = GrabModeAsync- -data GrabStatus = GrabStatusSuccess-                | GrabStatusAlreadyGrabbed-                | GrabStatusInvalidTime-                | GrabStatusNotViewable-                | GrabStatusFrozen-                deriving Show- -instance SimpleEnum GrabStatus where-        toValue GrabStatusSuccess{} = 0-        toValue GrabStatusAlreadyGrabbed{} = 1-        toValue GrabStatusInvalidTime{} = 2-        toValue GrabStatusNotViewable{} = 3-        toValue GrabStatusFrozen{} = 4-        fromValue 0 = GrabStatusSuccess-        fromValue 1 = GrabStatusAlreadyGrabbed-        fromValue 2 = GrabStatusInvalidTime-        fromValue 3 = GrabStatusNotViewable-        fromValue 4 = GrabStatusFrozen- -data GrabPointer = MkGrabPointer{owner_events_GrabPointer :: Bool,-                                 grab_window_GrabPointer :: WINDOW,-                                 event_mask_GrabPointer :: [EventMask],-                                 pointer_mode_GrabPointer :: GrabMode,-                                 keyboard_mode_GrabPointer :: GrabMode,-                                 confine_to_GrabPointer :: WINDOW, cursor_GrabPointer :: CURSOR,-                                 time_GrabPointer :: TIMESTAMP}-                 deriving (Show, Typeable)- -instance Serialize GrabPointer where-        serialize x-          = do putWord8 26-               serialize (owner_events_GrabPointer x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (grab_window_GrabPointer x)-               serialize (toMask (event_mask_GrabPointer x) :: Word16)-               serialize (toValue (pointer_mode_GrabPointer x) :: Word8)-               serialize (toValue (keyboard_mode_GrabPointer x) :: Word8)-               serialize (confine_to_GrabPointer x)-               serialize (cursor_GrabPointer x)-               serialize (time_GrabPointer x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (owner_events_GrabPointer x) +-              size (grab_window_GrabPointer x)-              + size (undefined :: Word16)-              + size (undefined :: Word8)-              + size (undefined :: Word8)-              + size (confine_to_GrabPointer x)-              + size (cursor_GrabPointer x)-              + size (time_GrabPointer x)- -data GrabPointerReply = MkGrabPointerReply{status_GrabPointerReply-                                           :: GrabStatus}-                      deriving (Show, Typeable)- -instance Deserialize GrabPointerReply where-        deserialize-          = do skip 1-               status <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               let _ = isCard32 length-               return (MkGrabPointerReply status)- -data UngrabPointer = MkUngrabPointer{time_UngrabPointer ::-                                     TIMESTAMP}-                   deriving (Show, Typeable)- -instance Serialize UngrabPointer where-        serialize x-          = do putWord8 27-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (time_UngrabPointer x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (time_UngrabPointer x)- -data ButtonIndex = ButtonIndexAny-                 | ButtonIndex1-                 | ButtonIndex2-                 | ButtonIndex3-                 | ButtonIndex4-                 | ButtonIndex5-                 deriving Show- -instance SimpleEnum ButtonIndex where-        toValue ButtonIndexAny{} = 0-        toValue ButtonIndex1{} = 1-        toValue ButtonIndex2{} = 2-        toValue ButtonIndex3{} = 3-        toValue ButtonIndex4{} = 4-        toValue ButtonIndex5{} = 5-        fromValue 0 = ButtonIndexAny-        fromValue 1 = ButtonIndex1-        fromValue 2 = ButtonIndex2-        fromValue 3 = ButtonIndex3-        fromValue 4 = ButtonIndex4-        fromValue 5 = ButtonIndex5- -data GrabButton = MkGrabButton{owner_events_GrabButton :: Bool,-                               grab_window_GrabButton :: WINDOW,-                               event_mask_GrabButton :: [EventMask],-                               pointer_mode_GrabButton :: GrabMode,-                               keyboard_mode_GrabButton :: GrabMode,-                               confine_to_GrabButton :: WINDOW, cursor_GrabButton :: CURSOR,-                               button_GrabButton :: ButtonIndex,-                               modifiers_GrabButton :: [ModMask]}-                deriving (Show, Typeable)- -instance Serialize GrabButton where-        serialize x-          = do putWord8 28-               serialize (owner_events_GrabButton x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (grab_window_GrabButton x)-               serialize (toMask (event_mask_GrabButton x) :: Word16)-               serialize (toValue (pointer_mode_GrabButton x) :: Word8)-               serialize (toValue (keyboard_mode_GrabButton x) :: Word8)-               serialize (confine_to_GrabButton x)-               serialize (cursor_GrabButton x)-               serialize (toValue (button_GrabButton x) :: Word8)-               putSkip 1-               serialize (toMask (modifiers_GrabButton x) :: Word16)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (owner_events_GrabButton x) +-              size (grab_window_GrabButton x)-              + size (undefined :: Word16)-              + size (undefined :: Word8)-              + size (undefined :: Word8)-              + size (confine_to_GrabButton x)-              + size (cursor_GrabButton x)-              + size (undefined :: Word8)-              + 1-              + size (undefined :: Word16)- -data UngrabButton = MkUngrabButton{button_UngrabButton ::-                                   ButtonIndex,-                                   grab_window_UngrabButton :: WINDOW,-                                   modifiers_UngrabButton :: [ModMask]}-                  deriving (Show, Typeable)- -instance Serialize UngrabButton where-        serialize x-          = do putWord8 29-               serialize (toValue (button_UngrabButton x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (grab_window_UngrabButton x)-               serialize (toMask (modifiers_UngrabButton x) :: Word16)-               putSkip 2-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (grab_window_UngrabButton x)-              + size (undefined :: Word16)-              + 2- -data ChangeActivePointerGrab = MkChangeActivePointerGrab{cursor_ChangeActivePointerGrab-                                                         :: CURSOR,-                                                         time_ChangeActivePointerGrab :: TIMESTAMP,-                                                         event_mask_ChangeActivePointerGrab ::-                                                         [EventMask]}-                             deriving (Show, Typeable)- -instance Serialize ChangeActivePointerGrab where-        serialize x-          = do putWord8 30-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cursor_ChangeActivePointerGrab x)-               serialize (time_ChangeActivePointerGrab x)-               serialize (toMask (event_mask_ChangeActivePointerGrab x) :: Word16)-               putSkip 2-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cursor_ChangeActivePointerGrab x) +-              size (time_ChangeActivePointerGrab x)-              + size (undefined :: Word16)-              + 2- -data GrabKeyboard = MkGrabKeyboard{owner_events_GrabKeyboard ::-                                   Bool,-                                   grab_window_GrabKeyboard :: WINDOW,-                                   time_GrabKeyboard :: TIMESTAMP,-                                   pointer_mode_GrabKeyboard :: GrabMode,-                                   keyboard_mode_GrabKeyboard :: GrabMode}-                  deriving (Show, Typeable)- -instance Serialize GrabKeyboard where-        serialize x-          = do putWord8 31-               serialize (owner_events_GrabKeyboard x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (grab_window_GrabKeyboard x)-               serialize (time_GrabKeyboard x)-               serialize (toValue (pointer_mode_GrabKeyboard x) :: Word8)-               serialize (toValue (keyboard_mode_GrabKeyboard x) :: Word8)-               putSkip 2-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (owner_events_GrabKeyboard x) +-              size (grab_window_GrabKeyboard x)-              + size (time_GrabKeyboard x)-              + size (undefined :: Word8)-              + size (undefined :: Word8)-              + 2- -data GrabKeyboardReply = MkGrabKeyboardReply{status_GrabKeyboardReply-                                             :: GrabStatus}-                       deriving (Show, Typeable)- -instance Deserialize GrabKeyboardReply where-        deserialize-          = do skip 1-               status <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               let _ = isCard32 length-               return (MkGrabKeyboardReply status)- -data UngrabKeyboard = MkUngrabKeyboard{time_UngrabKeyboard ::-                                       TIMESTAMP}-                    deriving (Show, Typeable)- -instance Serialize UngrabKeyboard where-        serialize x-          = do putWord8 32-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (time_UngrabKeyboard x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (time_UngrabKeyboard x)- -data Grab = GrabAny-          deriving Show- -instance SimpleEnum Grab where-        toValue GrabAny{} = 0-        fromValue 0 = GrabAny- -data GrabKey = MkGrabKey{owner_events_GrabKey :: Bool,-                         grab_window_GrabKey :: WINDOW, modifiers_GrabKey :: [ModMask],-                         key_GrabKey :: KEYCODE, pointer_mode_GrabKey :: GrabMode,-                         keyboard_mode_GrabKey :: GrabMode}-             deriving (Show, Typeable)- -instance Serialize GrabKey where-        serialize x-          = do putWord8 33-               serialize (owner_events_GrabKey x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (grab_window_GrabKey x)-               serialize (toMask (modifiers_GrabKey x) :: Word16)-               serialize (key_GrabKey x)-               serialize (toValue (pointer_mode_GrabKey x) :: Word8)-               serialize (toValue (keyboard_mode_GrabKey x) :: Word8)-               putSkip 3-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (owner_events_GrabKey x) + size (grab_window_GrabKey x)-              + size (undefined :: Word16)-              + size (key_GrabKey x)-              + size (undefined :: Word8)-              + size (undefined :: Word8)-              + 3- -data UngrabKey = MkUngrabKey{key_UngrabKey :: KEYCODE,-                             grab_window_UngrabKey :: WINDOW, modifiers_UngrabKey :: [ModMask]}-               deriving (Show, Typeable)- -instance Serialize UngrabKey where-        serialize x-          = do putWord8 34-               serialize (key_UngrabKey x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (grab_window_UngrabKey x)-               serialize (toMask (modifiers_UngrabKey x) :: Word16)-               putSkip 2-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (key_UngrabKey x) + size (grab_window_UngrabKey x) +-              size (undefined :: Word16)-              + 2- -data Allow = AllowAsyncPointer-           | AllowSyncPointer-           | AllowReplayPointer-           | AllowAsyncKeyboard-           | AllowSyncKeyboard-           | AllowReplayKeyboard-           | AllowAsyncBoth-           | AllowSyncBoth-           deriving Show- -instance SimpleEnum Allow where-        toValue AllowAsyncPointer{} = 0-        toValue AllowSyncPointer{} = 1-        toValue AllowReplayPointer{} = 2-        toValue AllowAsyncKeyboard{} = 3-        toValue AllowSyncKeyboard{} = 4-        toValue AllowReplayKeyboard{} = 5-        toValue AllowAsyncBoth{} = 6-        toValue AllowSyncBoth{} = 7-        fromValue 0 = AllowAsyncPointer-        fromValue 1 = AllowSyncPointer-        fromValue 2 = AllowReplayPointer-        fromValue 3 = AllowAsyncKeyboard-        fromValue 4 = AllowSyncKeyboard-        fromValue 5 = AllowReplayKeyboard-        fromValue 6 = AllowAsyncBoth-        fromValue 7 = AllowSyncBoth- -data AllowEvents = MkAllowEvents{mode_AllowEvents :: Allow,-                                 time_AllowEvents :: TIMESTAMP}-                 deriving (Show, Typeable)- -instance Serialize AllowEvents where-        serialize x-          = do putWord8 35-               serialize (toValue (mode_AllowEvents x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (time_AllowEvents x)-               putSkip (requiredPadding (size x))-        size x = 3 + size (undefined :: Word8) + size (time_AllowEvents x)- -data QueryPointer = MkQueryPointer{window_QueryPointer :: WINDOW}-                  deriving (Show, Typeable)- -instance Serialize QueryPointer where-        serialize x-          = do putWord8 38-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_QueryPointer x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_QueryPointer x)- -data QueryPointerReply = MkQueryPointerReply{same_screen_QueryPointerReply-                                             :: Bool,-                                             root_QueryPointerReply :: WINDOW,-                                             child_QueryPointerReply :: WINDOW,-                                             root_x_QueryPointerReply :: Int16,-                                             root_y_QueryPointerReply :: Int16,-                                             win_x_QueryPointerReply :: Int16,-                                             win_y_QueryPointerReply :: Int16,-                                             mask_QueryPointerReply :: Word16}-                       deriving (Show, Typeable)- -instance Deserialize QueryPointerReply where-        deserialize-          = do skip 1-               same_screen <- deserialize-               skip 2-               length <- deserialize-               root <- deserialize-               child <- deserialize-               root_x <- deserialize-               root_y <- deserialize-               win_x <- deserialize-               win_y <- deserialize-               mask <- deserialize-               skip 2-               let _ = isCard32 length-               return-                 (MkQueryPointerReply same_screen root child root_x root_y win_x-                    win_y-                    mask)- -data TIMECOORD = MkTIMECOORD{time_TIMECOORD :: TIMESTAMP,-                             x_TIMECOORD :: Int16, y_TIMECOORD :: Int16}-               deriving (Show, Typeable)- -instance Serialize TIMECOORD where-        serialize x-          = do serialize (time_TIMECOORD x)-               serialize (x_TIMECOORD x)-               serialize (y_TIMECOORD x)-        size x-          = size (time_TIMECOORD x) + size (x_TIMECOORD x) +-              size (y_TIMECOORD x)- -instance Deserialize TIMECOORD where-        deserialize-          = do time <- deserialize-               x <- deserialize-               y <- deserialize-               return (MkTIMECOORD time x y)- -data GetMotionEvents = MkGetMotionEvents{window_GetMotionEvents ::-                                         WINDOW,-                                         start_GetMotionEvents :: TIMESTAMP,-                                         stop_GetMotionEvents :: TIMESTAMP}-                     deriving (Show, Typeable)- -instance Serialize GetMotionEvents where-        serialize x-          = do putWord8 39-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_GetMotionEvents x)-               serialize (start_GetMotionEvents x)-               serialize (stop_GetMotionEvents x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (window_GetMotionEvents x) +-              size (start_GetMotionEvents x)-              + size (stop_GetMotionEvents x)- -data GetMotionEventsReply = MkGetMotionEventsReply{events_len_GetMotionEventsReply-                                                   :: Word32,-                                                   events_GetMotionEventsReply :: [TIMECOORD]}-                          deriving (Show, Typeable)- -instance Deserialize GetMotionEventsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               events_len <- deserialize-               skip 20-               events <- deserializeList (fromIntegral events_len)-               let _ = isCard32 length-               return (MkGetMotionEventsReply events_len events)- -data TranslateCoordinates = MkTranslateCoordinates{src_window_TranslateCoordinates-                                                   :: WINDOW,-                                                   dst_window_TranslateCoordinates :: WINDOW,-                                                   src_x_TranslateCoordinates :: Int16,-                                                   src_y_TranslateCoordinates :: Int16}-                          deriving (Show, Typeable)- -instance Serialize TranslateCoordinates where-        serialize x-          = do putWord8 40-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (src_window_TranslateCoordinates x)-               serialize (dst_window_TranslateCoordinates x)-               serialize (src_x_TranslateCoordinates x)-               serialize (src_y_TranslateCoordinates x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (src_window_TranslateCoordinates x) +-              size (dst_window_TranslateCoordinates x)-              + size (src_x_TranslateCoordinates x)-              + size (src_y_TranslateCoordinates x)- -data TranslateCoordinatesReply = MkTranslateCoordinatesReply{same_screen_TranslateCoordinatesReply-                                                             :: Bool,-                                                             child_TranslateCoordinatesReply ::-                                                             WINDOW,-                                                             dst_x_TranslateCoordinatesReply ::-                                                             Word16,-                                                             dst_y_TranslateCoordinatesReply ::-                                                             Word16}-                               deriving (Show, Typeable)- -instance Deserialize TranslateCoordinatesReply where-        deserialize-          = do skip 1-               same_screen <- deserialize-               skip 2-               length <- deserialize-               child <- deserialize-               dst_x <- deserialize-               dst_y <- deserialize-               let _ = isCard32 length-               return (MkTranslateCoordinatesReply same_screen child dst_x dst_y)- -data WarpPointer = MkWarpPointer{src_window_WarpPointer :: WINDOW,-                                 dst_window_WarpPointer :: WINDOW, src_x_WarpPointer :: Int16,-                                 src_y_WarpPointer :: Int16, src_width_WarpPointer :: Word16,-                                 src_height_WarpPointer :: Word16, dst_x_WarpPointer :: Int16,-                                 dst_y_WarpPointer :: Int16}-                 deriving (Show, Typeable)- -instance Serialize WarpPointer where-        serialize x-          = do putWord8 41-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (src_window_WarpPointer x)-               serialize (dst_window_WarpPointer x)-               serialize (src_x_WarpPointer x)-               serialize (src_y_WarpPointer x)-               serialize (src_width_WarpPointer x)-               serialize (src_height_WarpPointer x)-               serialize (dst_x_WarpPointer x)-               serialize (dst_y_WarpPointer x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (src_window_WarpPointer x) +-              size (dst_window_WarpPointer x)-              + size (src_x_WarpPointer x)-              + size (src_y_WarpPointer x)-              + size (src_width_WarpPointer x)-              + size (src_height_WarpPointer x)-              + size (dst_x_WarpPointer x)-              + size (dst_y_WarpPointer x)- -data InputFocus = InputFocusNone-                | InputFocusPointerRoot-                | InputFocusParent-                deriving Show- -instance SimpleEnum InputFocus where-        toValue InputFocusNone{} = 0-        toValue InputFocusPointerRoot{} = 1-        toValue InputFocusParent{} = 2-        fromValue 0 = InputFocusNone-        fromValue 1 = InputFocusPointerRoot-        fromValue 2 = InputFocusParent- -data SetInputFocus = MkSetInputFocus{revert_to_SetInputFocus ::-                                     InputFocus,-                                     focus_SetInputFocus :: WINDOW, time_SetInputFocus :: TIMESTAMP}-                   deriving (Show, Typeable)- -instance Serialize SetInputFocus where-        serialize x-          = do putWord8 42-               serialize (toValue (revert_to_SetInputFocus x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (focus_SetInputFocus x)-               serialize (time_SetInputFocus x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (focus_SetInputFocus x) +-              size (time_SetInputFocus x)- -data GetInputFocus = MkGetInputFocus{}-                   deriving (Show, Typeable)- -instance Serialize GetInputFocus where-        serialize x-          = do putWord8 43-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data GetInputFocusReply = MkGetInputFocusReply{revert_to_GetInputFocusReply-                                               :: InputFocus,-                                               focus_GetInputFocusReply :: WINDOW}-                        deriving (Show, Typeable)- -instance Deserialize GetInputFocusReply where-        deserialize-          = do skip 1-               revert_to <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               focus <- deserialize-               let _ = isCard32 length-               return (MkGetInputFocusReply revert_to focus)- -data QueryKeymap = MkQueryKeymap{}-                 deriving (Show, Typeable)- -instance Serialize QueryKeymap where-        serialize x-          = do putWord8 44-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data QueryKeymapReply = MkQueryKeymapReply{keys_QueryKeymapReply ::-                                           [Word8]}-                      deriving (Show, Typeable)- -instance Deserialize QueryKeymapReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               keys <- deserializeList (fromIntegral 32)-               let _ = isCard32 length-               return (MkQueryKeymapReply keys)- -data OpenFont = MkOpenFont{fid_OpenFont :: FONT,-                           name_len_OpenFont :: Word16, name_OpenFont :: [CChar]}-              deriving (Show, Typeable)- -instance Serialize OpenFont where-        serialize x-          = do putWord8 45-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (fid_OpenFont x)-               serialize (name_len_OpenFont x)-               putSkip 2-               serializeList (name_OpenFont x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (fid_OpenFont x) + size (name_len_OpenFont x) + 2 +-              sum (map size (name_OpenFont x))- -data CloseFont = MkCloseFont{font_CloseFont :: FONT}-               deriving (Show, Typeable)- -instance Serialize CloseFont where-        serialize x-          = do putWord8 46-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (font_CloseFont x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (font_CloseFont x)- -data FontDraw = FontDrawLeftToRight-              | FontDrawRightToLeft-              deriving Show- -instance SimpleEnum FontDraw where-        toValue FontDrawLeftToRight{} = 0-        toValue FontDrawRightToLeft{} = 1-        fromValue 0 = FontDrawLeftToRight-        fromValue 1 = FontDrawRightToLeft- -data FONTPROP = MkFONTPROP{name_FONTPROP :: ATOM,-                           value_FONTPROP :: Word32}-              deriving (Show, Typeable)- -instance Serialize FONTPROP where-        serialize x-          = do serialize (name_FONTPROP x)-               serialize (value_FONTPROP x)-        size x = size (name_FONTPROP x) + size (value_FONTPROP x)- -instance Deserialize FONTPROP where-        deserialize-          = do name <- deserialize-               value <- deserialize-               return (MkFONTPROP name value)- -data CHARINFO = MkCHARINFO{left_side_bearing_CHARINFO :: Int16,-                           right_side_bearing_CHARINFO :: Int16,-                           character_width_CHARINFO :: Int16, ascent_CHARINFO :: Int16,-                           descent_CHARINFO :: Int16, attributes_CHARINFO :: Word16}-              deriving (Show, Typeable)- -instance Serialize CHARINFO where-        serialize x-          = do serialize (left_side_bearing_CHARINFO x)-               serialize (right_side_bearing_CHARINFO x)-               serialize (character_width_CHARINFO x)-               serialize (ascent_CHARINFO x)-               serialize (descent_CHARINFO x)-               serialize (attributes_CHARINFO x)-        size x-          = size (left_side_bearing_CHARINFO x) +-              size (right_side_bearing_CHARINFO x)-              + size (character_width_CHARINFO x)-              + size (ascent_CHARINFO x)-              + size (descent_CHARINFO x)-              + size (attributes_CHARINFO x)- -instance Deserialize CHARINFO where-        deserialize-          = do left_side_bearing <- deserialize-               right_side_bearing <- deserialize-               character_width <- deserialize-               ascent <- deserialize-               descent <- deserialize-               attributes <- deserialize-               return-                 (MkCHARINFO left_side_bearing right_side_bearing character_width-                    ascent-                    descent-                    attributes)- -data QueryFont = MkQueryFont{font_QueryFont :: FONTABLE}-               deriving (Show, Typeable)- -instance Serialize QueryFont where-        serialize x-          = do putWord8 47-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (font_QueryFont x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (font_QueryFont x)- -data QueryFontReply = MkQueryFontReply{min_bounds_QueryFontReply ::-                                       CHARINFO,-                                       max_bounds_QueryFontReply :: CHARINFO,-                                       min_char_or_byte2_QueryFontReply :: Word16,-                                       max_char_or_byte2_QueryFontReply :: Word16,-                                       default_char_QueryFontReply :: Word16,-                                       properties_len_QueryFontReply :: Word16,-                                       draw_direction_QueryFontReply :: FontDraw,-                                       min_byte1_QueryFontReply :: Word8,-                                       max_byte1_QueryFontReply :: Word8,-                                       all_chars_exist_QueryFontReply :: Bool,-                                       font_ascent_QueryFontReply :: Int16,-                                       font_descent_QueryFontReply :: Int16,-                                       char_infos_len_QueryFontReply :: Word32,-                                       properties_QueryFontReply :: [FONTPROP],-                                       char_infos_QueryFontReply :: [CHARINFO]}-                    deriving (Show, Typeable)- -instance Deserialize QueryFontReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               min_bounds <- deserialize-               skip 4-               max_bounds <- deserialize-               skip 4-               min_char_or_byte2 <- deserialize-               max_char_or_byte2 <- deserialize-               default_char <- deserialize-               properties_len <- deserialize-               draw_direction <- liftM fromValue (deserialize :: Get Word8)-               min_byte1 <- deserialize-               max_byte1 <- deserialize-               all_chars_exist <- deserialize-               font_ascent <- deserialize-               font_descent <- deserialize-               char_infos_len <- deserialize-               properties <- deserializeList (fromIntegral properties_len)-               char_infos <- deserializeList (fromIntegral char_infos_len)-               let _ = isCard32 length-               return-                 (MkQueryFontReply min_bounds max_bounds min_char_or_byte2-                    max_char_or_byte2-                    default_char-                    properties_len-                    draw_direction-                    min_byte1-                    max_byte1-                    all_chars_exist-                    font_ascent-                    font_descent-                    char_infos_len-                    properties-                    char_infos)- -data QueryTextExtents = MkQueryTextExtents{font_QueryTextExtents ::-                                           FONTABLE,-                                           string_QueryTextExtents :: [CHAR2B]}-                      deriving (Show, Typeable)- -odd_length_QueryTextExtents :: QueryTextExtents -> Bool-odd_length_QueryTextExtents x-  = wordToBool (string_len_QueryTextExtents x .&. 1)--string_len_QueryTextExtents :: QueryTextExtents -> Word8-string_len_QueryTextExtents x = genericLength $ string_QueryTextExtents x- -instance Serialize QueryTextExtents where-        serialize x-          = do putWord8 48-               serialize (odd_length_QueryTextExtents x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (font_QueryTextExtents x)-               serializeList (string_QueryTextExtents x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (odd_length_QueryTextExtents x) +-              size (font_QueryTextExtents x)-              + sum (map size (string_QueryTextExtents x))- -data QueryTextExtentsReply = MkQueryTextExtentsReply{draw_direction_QueryTextExtentsReply-                                                     :: FontDraw,-                                                     font_ascent_QueryTextExtentsReply :: Int16,-                                                     font_descent_QueryTextExtentsReply :: Int16,-                                                     overall_ascent_QueryTextExtentsReply :: Int16,-                                                     overall_descent_QueryTextExtentsReply :: Int16,-                                                     overall_width_QueryTextExtentsReply :: Int32,-                                                     overall_left_QueryTextExtentsReply :: Int32,-                                                     overall_right_QueryTextExtentsReply :: Int32}-                           deriving (Show, Typeable)- -instance Deserialize QueryTextExtentsReply where-        deserialize-          = do skip 1-               draw_direction <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               font_ascent <- deserialize-               font_descent <- deserialize-               overall_ascent <- deserialize-               overall_descent <- deserialize-               overall_width <- deserialize-               overall_left <- deserialize-               overall_right <- deserialize-               let _ = isCard32 length-               return-                 (MkQueryTextExtentsReply draw_direction font_ascent font_descent-                    overall_ascent-                    overall_descent-                    overall_width-                    overall_left-                    overall_right)- -data STR = MkSTR{name_len_STR :: Word8, name_STR :: [CChar]}-         deriving (Show, Typeable)- -instance Serialize STR where-        serialize x-          = do serialize (name_len_STR x)-               serializeList (name_STR x)-        size x = size (name_len_STR x) + sum (map size (name_STR x))- -instance Deserialize STR where-        deserialize-          = do name_len <- deserialize-               name <- deserializeList (fromIntegral name_len)-               return (MkSTR name_len name)- -data ListFonts = MkListFonts{max_names_ListFonts :: Word16,-                             pattern_len_ListFonts :: Word16, pattern_ListFonts :: [CChar]}-               deriving (Show, Typeable)- -instance Serialize ListFonts where-        serialize x-          = do putWord8 49-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (max_names_ListFonts x)-               serialize (pattern_len_ListFonts x)-               serializeList (pattern_ListFonts x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (max_names_ListFonts x) +-              size (pattern_len_ListFonts x)-              + sum (map size (pattern_ListFonts x))- -data ListFontsReply = MkListFontsReply{names_len_ListFontsReply ::-                                       Word16,-                                       names_ListFontsReply :: [STR]}-                    deriving (Show, Typeable)- -instance Deserialize ListFontsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               names_len <- deserialize-               skip 22-               names <- deserializeList (fromIntegral names_len)-               let _ = isCard32 length-               return (MkListFontsReply names_len names)- -data ListFontsWithInfo = MkListFontsWithInfo{max_names_ListFontsWithInfo-                                             :: Word16,-                                             pattern_len_ListFontsWithInfo :: Word16,-                                             pattern_ListFontsWithInfo :: [CChar]}-                       deriving (Show, Typeable)- -instance Serialize ListFontsWithInfo where-        serialize x-          = do putWord8 50-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (max_names_ListFontsWithInfo x)-               serialize (pattern_len_ListFontsWithInfo x)-               serializeList (pattern_ListFontsWithInfo x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (max_names_ListFontsWithInfo x) +-              size (pattern_len_ListFontsWithInfo x)-              + sum (map size (pattern_ListFontsWithInfo x))- -data ListFontsWithInfoReply = MkListFontsWithInfoReply{name_len_ListFontsWithInfoReply-                                                       :: Word8,-                                                       min_bounds_ListFontsWithInfoReply ::-                                                       CHARINFO,-                                                       max_bounds_ListFontsWithInfoReply ::-                                                       CHARINFO,-                                                       min_char_or_byte2_ListFontsWithInfoReply ::-                                                       Word16,-                                                       max_char_or_byte2_ListFontsWithInfoReply ::-                                                       Word16,-                                                       default_char_ListFontsWithInfoReply ::-                                                       Word16,-                                                       properties_len_ListFontsWithInfoReply ::-                                                       Word16,-                                                       draw_direction_ListFontsWithInfoReply ::-                                                       FontDraw,-                                                       min_byte1_ListFontsWithInfoReply :: Word8,-                                                       max_byte1_ListFontsWithInfoReply :: Word8,-                                                       all_chars_exist_ListFontsWithInfoReply ::-                                                       Bool,-                                                       font_ascent_ListFontsWithInfoReply :: Int16,-                                                       font_descent_ListFontsWithInfoReply :: Int16,-                                                       replies_hint_ListFontsWithInfoReply ::-                                                       Word32,-                                                       properties_ListFontsWithInfoReply ::-                                                       [FONTPROP],-                                                       name_ListFontsWithInfoReply :: [CChar]}-                            deriving (Show, Typeable)- -instance Deserialize ListFontsWithInfoReply where-        deserialize-          = do skip 1-               name_len <- deserialize-               skip 2-               length <- deserialize-               min_bounds <- deserialize-               skip 4-               max_bounds <- deserialize-               skip 4-               min_char_or_byte2 <- deserialize-               max_char_or_byte2 <- deserialize-               default_char <- deserialize-               properties_len <- deserialize-               draw_direction <- liftM fromValue (deserialize :: Get Word8)-               min_byte1 <- deserialize-               max_byte1 <- deserialize-               all_chars_exist <- deserialize-               font_ascent <- deserialize-               font_descent <- deserialize-               replies_hint <- deserialize-               properties <- deserializeList (fromIntegral properties_len)-               name <- deserializeList (fromIntegral name_len)-               let _ = isCard32 length-               return-                 (MkListFontsWithInfoReply name_len min_bounds max_bounds-                    min_char_or_byte2-                    max_char_or_byte2-                    default_char-                    properties_len-                    draw_direction-                    min_byte1-                    max_byte1-                    all_chars_exist-                    font_ascent-                    font_descent-                    replies_hint-                    properties-                    name)- -data SetFontPath = MkSetFontPath{font_qty_SetFontPath :: Word16,-                                 path_SetFontPath :: [CChar]}-                 deriving (Show, Typeable)- -instance Serialize SetFontPath where-        serialize x-          = do putWord8 51-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (font_qty_SetFontPath x)-               serializeList (path_SetFontPath x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (font_qty_SetFontPath x) +-              sum (map size (path_SetFontPath x))- -data GetFontPath = MkGetFontPath{}-                 deriving (Show, Typeable)- -instance Serialize GetFontPath where-        serialize x-          = do putWord8 52-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data GetFontPathReply = MkGetFontPathReply{path_len_GetFontPathReply-                                           :: Word16,-                                           path_GetFontPathReply :: [STR]}-                      deriving (Show, Typeable)- -instance Deserialize GetFontPathReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               path_len <- deserialize-               skip 22-               path <- deserializeList (fromIntegral path_len)-               let _ = isCard32 length-               return (MkGetFontPathReply path_len path)- -data CreatePixmap = MkCreatePixmap{depth_CreatePixmap :: Word8,-                                   pid_CreatePixmap :: PIXMAP, drawable_CreatePixmap :: DRAWABLE,-                                   width_CreatePixmap :: Word16, height_CreatePixmap :: Word16}-                  deriving (Show, Typeable)- -instance Serialize CreatePixmap where-        serialize x-          = do putWord8 53-               serialize (depth_CreatePixmap x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (pid_CreatePixmap x)-               serialize (drawable_CreatePixmap x)-               serialize (width_CreatePixmap x)-               serialize (height_CreatePixmap x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (depth_CreatePixmap x) + size (pid_CreatePixmap x) +-              size (drawable_CreatePixmap x)-              + size (width_CreatePixmap x)-              + size (height_CreatePixmap x)- -data FreePixmap = MkFreePixmap{pixmap_FreePixmap :: PIXMAP}-                deriving (Show, Typeable)- -instance Serialize FreePixmap where-        serialize x-          = do putWord8 54-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (pixmap_FreePixmap x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (pixmap_FreePixmap x)- -data GC = GCFunction-        | GCPlaneMask-        | GCForeground-        | GCBackground-        | GCLineWidth-        | GCLineStyle-        | GCCapStyle-        | GCJoinStyle-        | GCFillStyle-        | GCFillRule-        | GCTile-        | GCStipple-        | GCTileStippleOriginX-        | GCTileStippleOriginY-        | GCFont-        | GCSubwindowMode-        | GCGraphicsExposures-        | GCClipOriginX-        | GCClipOriginY-        | GCClipMask-        | GCDashOffset-        | GCDashList-        | GCArcMode-        deriving Show- -instance BitEnum GC where-        toBit GCFunction{} = 0-        toBit GCPlaneMask{} = 1-        toBit GCForeground{} = 2-        toBit GCBackground{} = 3-        toBit GCLineWidth{} = 4-        toBit GCLineStyle{} = 5-        toBit GCCapStyle{} = 6-        toBit GCJoinStyle{} = 7-        toBit GCFillStyle{} = 8-        toBit GCFillRule{} = 9-        toBit GCTile{} = 10-        toBit GCStipple{} = 11-        toBit GCTileStippleOriginX{} = 12-        toBit GCTileStippleOriginY{} = 13-        toBit GCFont{} = 14-        toBit GCSubwindowMode{} = 15-        toBit GCGraphicsExposures{} = 16-        toBit GCClipOriginX{} = 17-        toBit GCClipOriginY{} = 18-        toBit GCClipMask{} = 19-        toBit GCDashOffset{} = 20-        toBit GCDashList{} = 21-        toBit GCArcMode{} = 22-        fromBit 0 = GCFunction-        fromBit 1 = GCPlaneMask-        fromBit 2 = GCForeground-        fromBit 3 = GCBackground-        fromBit 4 = GCLineWidth-        fromBit 5 = GCLineStyle-        fromBit 6 = GCCapStyle-        fromBit 7 = GCJoinStyle-        fromBit 8 = GCFillStyle-        fromBit 9 = GCFillRule-        fromBit 10 = GCTile-        fromBit 11 = GCStipple-        fromBit 12 = GCTileStippleOriginX-        fromBit 13 = GCTileStippleOriginY-        fromBit 14 = GCFont-        fromBit 15 = GCSubwindowMode-        fromBit 16 = GCGraphicsExposures-        fromBit 17 = GCClipOriginX-        fromBit 18 = GCClipOriginY-        fromBit 19 = GCClipMask-        fromBit 20 = GCDashOffset-        fromBit 21 = GCDashList-        fromBit 22 = GCArcMode- -data GX = GXclear-        | GXand-        | GXandReverse-        | GXcopy-        | GXandInverted-        | GXnoop-        | GXxor-        | GXor-        | GXnor-        | GXequiv-        | GXinvert-        | GXorReverse-        | GXcopyInverted-        | GXorInverted-        | GXnand-        | GXset-        deriving Show- -instance SimpleEnum GX where-        toValue GXclear{} = 0-        toValue GXand{} = 1-        toValue GXandReverse{} = 2-        toValue GXcopy{} = 3-        toValue GXandInverted{} = 4-        toValue GXnoop{} = 5-        toValue GXxor{} = 6-        toValue GXor{} = 7-        toValue GXnor{} = 8-        toValue GXequiv{} = 9-        toValue GXinvert{} = 10-        toValue GXorReverse{} = 11-        toValue GXcopyInverted{} = 12-        toValue GXorInverted{} = 13-        toValue GXnand{} = 14-        toValue GXset{} = 15-        fromValue 0 = GXclear-        fromValue 1 = GXand-        fromValue 2 = GXandReverse-        fromValue 3 = GXcopy-        fromValue 4 = GXandInverted-        fromValue 5 = GXnoop-        fromValue 6 = GXxor-        fromValue 7 = GXor-        fromValue 8 = GXnor-        fromValue 9 = GXequiv-        fromValue 10 = GXinvert-        fromValue 11 = GXorReverse-        fromValue 12 = GXcopyInverted-        fromValue 13 = GXorInverted-        fromValue 14 = GXnand-        fromValue 15 = GXset- -data LineStyle = LineStyleSolid-               | LineStyleOnOffDash-               | LineStyleDoubleDash-               deriving Show- -instance SimpleEnum LineStyle where-        toValue LineStyleSolid{} = 0-        toValue LineStyleOnOffDash{} = 1-        toValue LineStyleDoubleDash{} = 2-        fromValue 0 = LineStyleSolid-        fromValue 1 = LineStyleOnOffDash-        fromValue 2 = LineStyleDoubleDash- -data CapStyle = CapStyleNotLast-              | CapStyleButt-              | CapStyleRound-              | CapStyleProjecting-              deriving Show- -instance SimpleEnum CapStyle where-        toValue CapStyleNotLast{} = 0-        toValue CapStyleButt{} = 1-        toValue CapStyleRound{} = 2-        toValue CapStyleProjecting{} = 3-        fromValue 0 = CapStyleNotLast-        fromValue 1 = CapStyleButt-        fromValue 2 = CapStyleRound-        fromValue 3 = CapStyleProjecting- -data JoinStyle = JoinStyleMitre-               | JoinStyleRound-               | JoinStyleBevel-               deriving Show- -instance SimpleEnum JoinStyle where-        toValue JoinStyleMitre{} = 0-        toValue JoinStyleRound{} = 1-        toValue JoinStyleBevel{} = 2-        fromValue 0 = JoinStyleMitre-        fromValue 1 = JoinStyleRound-        fromValue 2 = JoinStyleBevel- -data FillStyle = FillStyleSolid-               | FillStyleTiled-               | FillStyleStippled-               | FillStyleOpaqueStippled-               deriving Show- -instance SimpleEnum FillStyle where-        toValue FillStyleSolid{} = 0-        toValue FillStyleTiled{} = 1-        toValue FillStyleStippled{} = 2-        toValue FillStyleOpaqueStippled{} = 3-        fromValue 0 = FillStyleSolid-        fromValue 1 = FillStyleTiled-        fromValue 2 = FillStyleStippled-        fromValue 3 = FillStyleOpaqueStippled- -data FillRule = FillRuleEvenOdd-              | FillRuleWinding-              deriving Show- -instance SimpleEnum FillRule where-        toValue FillRuleEvenOdd{} = 0-        toValue FillRuleWinding{} = 1-        fromValue 0 = FillRuleEvenOdd-        fromValue 1 = FillRuleWinding- -data SubwindowMode = SubwindowModeClipByChildren-                   | SubwindowModeIncludeInferiors-                   deriving Show- -instance SimpleEnum SubwindowMode where-        toValue SubwindowModeClipByChildren{} = 0-        toValue SubwindowModeIncludeInferiors{} = 1-        fromValue 0 = SubwindowModeClipByChildren-        fromValue 1 = SubwindowModeIncludeInferiors- -data ArcMode = ArcModeChord-             | ArcModePieSlice-             deriving Show- -instance SimpleEnum ArcMode where-        toValue ArcModeChord{} = 0-        toValue ArcModePieSlice{} = 1-        fromValue 0 = ArcModeChord-        fromValue 1 = ArcModePieSlice- -data CreateGC = MkCreateGC{cid_CreateGC :: GCONTEXT,-                           drawable_CreateGC :: DRAWABLE, value_CreateGC :: ValueParam Word32}-              deriving (Show, Typeable)- -instance Serialize CreateGC where-        serialize x-          = do putWord8 55-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cid_CreateGC x)-               serialize (drawable_CreateGC x)-               serialize (value_CreateGC x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cid_CreateGC x) + size (drawable_CreateGC x) +-              size (value_CreateGC x)- -data ChangeGC = MkChangeGC{gc_ChangeGC :: GCONTEXT,-                           value_ChangeGC :: ValueParam Word32}-              deriving (Show, Typeable)- -instance Serialize ChangeGC where-        serialize x-          = do putWord8 56-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (gc_ChangeGC x)-               serialize (value_ChangeGC x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (gc_ChangeGC x) + size (value_ChangeGC x)- -data CopyGC = MkCopyGC{src_gc_CopyGC :: GCONTEXT,-                       dst_gc_CopyGC :: GCONTEXT, value_mask_CopyGC :: [GC]}-            deriving (Show, Typeable)- -instance Serialize CopyGC where-        serialize x-          = do putWord8 57-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (src_gc_CopyGC x)-               serialize (dst_gc_CopyGC x)-               serialize (toMask (value_mask_CopyGC x) :: Word32)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (src_gc_CopyGC x) + size (dst_gc_CopyGC x) +-              size (undefined :: Word32)- -data SetDashes = MkSetDashes{gc_SetDashes :: GCONTEXT,-                             dash_offset_SetDashes :: Word16, dashes_len_SetDashes :: Word16,-                             dashes_SetDashes :: [Word8]}-               deriving (Show, Typeable)- -instance Serialize SetDashes where-        serialize x-          = do putWord8 58-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (gc_SetDashes x)-               serialize (dash_offset_SetDashes x)-               serialize (dashes_len_SetDashes x)-               serializeList (dashes_SetDashes x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (gc_SetDashes x) + size (dash_offset_SetDashes x) +-              size (dashes_len_SetDashes x)-              + sum (map size (dashes_SetDashes x))- -data ClipOrdering = ClipOrderingUnsorted-                  | ClipOrderingYSorted-                  | ClipOrderingYXSorted-                  | ClipOrderingYXBanded-                  deriving Show- -instance SimpleEnum ClipOrdering where-        toValue ClipOrderingUnsorted{} = 0-        toValue ClipOrderingYSorted{} = 1-        toValue ClipOrderingYXSorted{} = 2-        toValue ClipOrderingYXBanded{} = 3-        fromValue 0 = ClipOrderingUnsorted-        fromValue 1 = ClipOrderingYSorted-        fromValue 2 = ClipOrderingYXSorted-        fromValue 3 = ClipOrderingYXBanded- -data SetClipRectangles = MkSetClipRectangles{ordering_SetClipRectangles-                                             :: ClipOrdering,-                                             gc_SetClipRectangles :: GCONTEXT,-                                             clip_x_origin_SetClipRectangles :: Int16,-                                             clip_y_origin_SetClipRectangles :: Int16,-                                             rectangles_SetClipRectangles :: [RECTANGLE]}-                       deriving (Show, Typeable)- -instance Serialize SetClipRectangles where-        serialize x-          = do putWord8 59-               serialize (toValue (ordering_SetClipRectangles x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (gc_SetClipRectangles x)-               serialize (clip_x_origin_SetClipRectangles x)-               serialize (clip_y_origin_SetClipRectangles x)-               serializeList (rectangles_SetClipRectangles x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (gc_SetClipRectangles x) +-              size (clip_x_origin_SetClipRectangles x)-              + size (clip_y_origin_SetClipRectangles x)-              + sum (map size (rectangles_SetClipRectangles x))- -data FreeGC = MkFreeGC{gc_FreeGC :: GCONTEXT}-            deriving (Show, Typeable)- -instance Serialize FreeGC where-        serialize x-          = do putWord8 60-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (gc_FreeGC x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (gc_FreeGC x)- -data ClearArea = MkClearArea{exposures_ClearArea :: Bool,-                             window_ClearArea :: WINDOW, x_ClearArea :: Int16,-                             y_ClearArea :: Int16, width_ClearArea :: Word16,-                             height_ClearArea :: Word16}-               deriving (Show, Typeable)- -instance Serialize ClearArea where-        serialize x-          = do putWord8 61-               serialize (exposures_ClearArea x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ClearArea x)-               serialize (x_ClearArea x)-               serialize (y_ClearArea x)-               serialize (width_ClearArea x)-               serialize (height_ClearArea x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (exposures_ClearArea x) + size (window_ClearArea x) +-              size (x_ClearArea x)-              + size (y_ClearArea x)-              + size (width_ClearArea x)-              + size (height_ClearArea x)- -data CopyArea = MkCopyArea{src_drawable_CopyArea :: DRAWABLE,-                           dst_drawable_CopyArea :: DRAWABLE, gc_CopyArea :: GCONTEXT,-                           src_x_CopyArea :: Int16, src_y_CopyArea :: Int16,-                           dst_x_CopyArea :: Int16, dst_y_CopyArea :: Int16,-                           width_CopyArea :: Word16, height_CopyArea :: Word16}-              deriving (Show, Typeable)- -instance Serialize CopyArea where-        serialize x-          = do putWord8 62-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (src_drawable_CopyArea x)-               serialize (dst_drawable_CopyArea x)-               serialize (gc_CopyArea x)-               serialize (src_x_CopyArea x)-               serialize (src_y_CopyArea x)-               serialize (dst_x_CopyArea x)-               serialize (dst_y_CopyArea x)-               serialize (width_CopyArea x)-               serialize (height_CopyArea x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (src_drawable_CopyArea x) +-              size (dst_drawable_CopyArea x)-              + size (gc_CopyArea x)-              + size (src_x_CopyArea x)-              + size (src_y_CopyArea x)-              + size (dst_x_CopyArea x)-              + size (dst_y_CopyArea x)-              + size (width_CopyArea x)-              + size (height_CopyArea x)- -data CopyPlane = MkCopyPlane{src_drawable_CopyPlane :: DRAWABLE,-                             dst_drawable_CopyPlane :: DRAWABLE, gc_CopyPlane :: GCONTEXT,-                             src_x_CopyPlane :: Int16, src_y_CopyPlane :: Int16,-                             dst_x_CopyPlane :: Int16, dst_y_CopyPlane :: Int16,-                             width_CopyPlane :: Word16, height_CopyPlane :: Word16,-                             bit_plane_CopyPlane :: Word32}-               deriving (Show, Typeable)- -instance Serialize CopyPlane where-        serialize x-          = do putWord8 63-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (src_drawable_CopyPlane x)-               serialize (dst_drawable_CopyPlane x)-               serialize (gc_CopyPlane x)-               serialize (src_x_CopyPlane x)-               serialize (src_y_CopyPlane x)-               serialize (dst_x_CopyPlane x)-               serialize (dst_y_CopyPlane x)-               serialize (width_CopyPlane x)-               serialize (height_CopyPlane x)-               serialize (bit_plane_CopyPlane x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (src_drawable_CopyPlane x) +-              size (dst_drawable_CopyPlane x)-              + size (gc_CopyPlane x)-              + size (src_x_CopyPlane x)-              + size (src_y_CopyPlane x)-              + size (dst_x_CopyPlane x)-              + size (dst_y_CopyPlane x)-              + size (width_CopyPlane x)-              + size (height_CopyPlane x)-              + size (bit_plane_CopyPlane x)- -data CoordMode = CoordModeOrigin-               | CoordModePrevious-               deriving Show- -instance SimpleEnum CoordMode where-        toValue CoordModeOrigin{} = 0-        toValue CoordModePrevious{} = 1-        fromValue 0 = CoordModeOrigin-        fromValue 1 = CoordModePrevious- -data PolyPoint = MkPolyPoint{coordinate_mode_PolyPoint ::-                             CoordMode,-                             drawable_PolyPoint :: DRAWABLE, gc_PolyPoint :: GCONTEXT,-                             points_PolyPoint :: [POINT]}-               deriving (Show, Typeable)- -instance Serialize PolyPoint where-        serialize x-          = do putWord8 64-               serialize (toValue (coordinate_mode_PolyPoint x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyPoint x)-               serialize (gc_PolyPoint x)-               serializeList (points_PolyPoint x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (drawable_PolyPoint x) +-              size (gc_PolyPoint x)-              + sum (map size (points_PolyPoint x))- -data PolyLine = MkPolyLine{coordinate_mode_PolyLine :: CoordMode,-                           drawable_PolyLine :: DRAWABLE, gc_PolyLine :: GCONTEXT,-                           points_PolyLine :: [POINT]}-              deriving (Show, Typeable)- -instance Serialize PolyLine where-        serialize x-          = do putWord8 65-               serialize (toValue (coordinate_mode_PolyLine x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyLine x)-               serialize (gc_PolyLine x)-               serializeList (points_PolyLine x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (drawable_PolyLine x) +-              size (gc_PolyLine x)-              + sum (map size (points_PolyLine x))- -data SEGMENT = MkSEGMENT{x1_SEGMENT :: Int16, y1_SEGMENT :: Int16,-                         x2_SEGMENT :: Int16, y2_SEGMENT :: Int16}-             deriving (Show, Typeable)- -instance Serialize SEGMENT where-        serialize x-          = do serialize (x1_SEGMENT x)-               serialize (y1_SEGMENT x)-               serialize (x2_SEGMENT x)-               serialize (y2_SEGMENT x)-        size x-          = size (x1_SEGMENT x) + size (y1_SEGMENT x) + size (x2_SEGMENT x) +-              size (y2_SEGMENT x)- -instance Deserialize SEGMENT where-        deserialize-          = do x1 <- deserialize-               y1 <- deserialize-               x2 <- deserialize-               y2 <- deserialize-               return (MkSEGMENT x1 y1 x2 y2)- -data PolySegment = MkPolySegment{drawable_PolySegment :: DRAWABLE,-                                 gc_PolySegment :: GCONTEXT, segments_PolySegment :: [SEGMENT]}-                 deriving (Show, Typeable)- -instance Serialize PolySegment where-        serialize x-          = do putWord8 66-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolySegment x)-               serialize (gc_PolySegment x)-               serializeList (segments_PolySegment x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolySegment x) + size (gc_PolySegment x) +-              sum (map size (segments_PolySegment x))- -data PolyRectangle = MkPolyRectangle{drawable_PolyRectangle ::-                                     DRAWABLE,-                                     gc_PolyRectangle :: GCONTEXT,-                                     rectangles_PolyRectangle :: [RECTANGLE]}-                   deriving (Show, Typeable)- -instance Serialize PolyRectangle where-        serialize x-          = do putWord8 67-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyRectangle x)-               serialize (gc_PolyRectangle x)-               serializeList (rectangles_PolyRectangle x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolyRectangle x) +-              size (gc_PolyRectangle x)-              + sum (map size (rectangles_PolyRectangle x))- -data PolyArc = MkPolyArc{drawable_PolyArc :: DRAWABLE,-                         gc_PolyArc :: GCONTEXT, arcs_PolyArc :: [ARC]}-             deriving (Show, Typeable)- -instance Serialize PolyArc where-        serialize x-          = do putWord8 68-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyArc x)-               serialize (gc_PolyArc x)-               serializeList (arcs_PolyArc x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolyArc x) + size (gc_PolyArc x) +-              sum (map size (arcs_PolyArc x))- -data PolyShape = PolyShapeComplex-               | PolyShapeNonconvex-               | PolyShapeConvex-               deriving Show- -instance SimpleEnum PolyShape where-        toValue PolyShapeComplex{} = 0-        toValue PolyShapeNonconvex{} = 1-        toValue PolyShapeConvex{} = 2-        fromValue 0 = PolyShapeComplex-        fromValue 1 = PolyShapeNonconvex-        fromValue 2 = PolyShapeConvex- -data FillPoly = MkFillPoly{drawable_FillPoly :: DRAWABLE,-                           gc_FillPoly :: GCONTEXT, shape_FillPoly :: PolyShape,-                           coordinate_mode_FillPoly :: CoordMode, points_FillPoly :: [POINT]}-              deriving (Show, Typeable)- -instance Serialize FillPoly where-        serialize x-          = do putWord8 69-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_FillPoly x)-               serialize (gc_FillPoly x)-               serialize (toValue (shape_FillPoly x) :: Word8)-               serialize (toValue (coordinate_mode_FillPoly x) :: Word8)-               putSkip 2-               serializeList (points_FillPoly x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_FillPoly x) + size (gc_FillPoly x) +-              size (undefined :: Word8)-              + size (undefined :: Word8)-              + 2-              + sum (map size (points_FillPoly x))- -data PolyFillRectangle = MkPolyFillRectangle{drawable_PolyFillRectangle-                                             :: DRAWABLE,-                                             gc_PolyFillRectangle :: GCONTEXT,-                                             rectangles_PolyFillRectangle :: [RECTANGLE]}-                       deriving (Show, Typeable)- -instance Serialize PolyFillRectangle where-        serialize x-          = do putWord8 70-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyFillRectangle x)-               serialize (gc_PolyFillRectangle x)-               serializeList (rectangles_PolyFillRectangle x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolyFillRectangle x) +-              size (gc_PolyFillRectangle x)-              + sum (map size (rectangles_PolyFillRectangle x))- -data PolyFillArc = MkPolyFillArc{drawable_PolyFillArc :: DRAWABLE,-                                 gc_PolyFillArc :: GCONTEXT, arcs_PolyFillArc :: [ARC]}-                 deriving (Show, Typeable)- -instance Serialize PolyFillArc where-        serialize x-          = do putWord8 71-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyFillArc x)-               serialize (gc_PolyFillArc x)-               serializeList (arcs_PolyFillArc x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolyFillArc x) + size (gc_PolyFillArc x) +-              sum (map size (arcs_PolyFillArc x))- -data ImageFormat = ImageFormatXYBitmap-                 | ImageFormatXYPixmap-                 | ImageFormatZPixmap-                 deriving Show- -instance SimpleEnum ImageFormat where-        toValue ImageFormatXYBitmap{} = 0-        toValue ImageFormatXYPixmap{} = 1-        toValue ImageFormatZPixmap{} = 2-        fromValue 0 = ImageFormatXYBitmap-        fromValue 1 = ImageFormatXYPixmap-        fromValue 2 = ImageFormatZPixmap- -data PutImage = MkPutImage{format_PutImage :: ImageFormat,-                           drawable_PutImage :: DRAWABLE, gc_PutImage :: GCONTEXT,-                           width_PutImage :: Word16, height_PutImage :: Word16,-                           dst_x_PutImage :: Int16, dst_y_PutImage :: Int16,-                           left_pad_PutImage :: Word8, depth_PutImage :: Word8,-                           data_PutImage :: [Word8]}-              deriving (Show, Typeable)- -instance Serialize PutImage where-        serialize x-          = do putWord8 72-               serialize (toValue (format_PutImage x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PutImage x)-               serialize (gc_PutImage x)-               serialize (width_PutImage x)-               serialize (height_PutImage x)-               serialize (dst_x_PutImage x)-               serialize (dst_y_PutImage x)-               serialize (left_pad_PutImage x)-               serialize (depth_PutImage x)-               putSkip 2-               serializeList (data_PutImage x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (drawable_PutImage x) +-              size (gc_PutImage x)-              + size (width_PutImage x)-              + size (height_PutImage x)-              + size (dst_x_PutImage x)-              + size (dst_y_PutImage x)-              + size (left_pad_PutImage x)-              + size (depth_PutImage x)-              + 2-              + sum (map size (data_PutImage x))- -data GetImage = MkGetImage{format_GetImage :: ImageFormat,-                           drawable_GetImage :: DRAWABLE, x_GetImage :: Int16,-                           y_GetImage :: Int16, width_GetImage :: Word16,-                           height_GetImage :: Word16, plane_mask_GetImage :: Word32}-              deriving (Show, Typeable)- -instance Serialize GetImage where-        serialize x-          = do putWord8 73-               serialize (toValue (format_GetImage x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_GetImage x)-               serialize (x_GetImage x)-               serialize (y_GetImage x)-               serialize (width_GetImage x)-               serialize (height_GetImage x)-               serialize (plane_mask_GetImage x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (drawable_GetImage x) +-              size (x_GetImage x)-              + size (y_GetImage x)-              + size (width_GetImage x)-              + size (height_GetImage x)-              + size (plane_mask_GetImage x)- -data GetImageReply = MkGetImageReply{depth_GetImageReply :: Word8,-                                     visual_GetImageReply :: VISUALID,-                                     data_GetImageReply :: [Word8]}-                   deriving (Show, Typeable)- -instance Deserialize GetImageReply where-        deserialize-          = do skip 1-               depth <- deserialize-               skip 2-               length <- deserialize-               visual <- deserialize-               skip 20-               data_ <- deserializeList (fromIntegral (fromIntegral (length * 4)))-               let _ = isCard32 length-               return (MkGetImageReply depth visual data_)- -data PolyText8 = MkPolyText8{drawable_PolyText8 :: DRAWABLE,-                             gc_PolyText8 :: GCONTEXT, x_PolyText8 :: Int16,-                             y_PolyText8 :: Int16, items_PolyText8 :: [Word8]}-               deriving (Show, Typeable)- -instance Serialize PolyText8 where-        serialize x-          = do putWord8 74-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyText8 x)-               serialize (gc_PolyText8 x)-               serialize (x_PolyText8 x)-               serialize (y_PolyText8 x)-               serializeList (items_PolyText8 x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolyText8 x) + size (gc_PolyText8 x) +-              size (x_PolyText8 x)-              + size (y_PolyText8 x)-              + sum (map size (items_PolyText8 x))- -data PolyText16 = MkPolyText16{drawable_PolyText16 :: DRAWABLE,-                               gc_PolyText16 :: GCONTEXT, x_PolyText16 :: Int16,-                               y_PolyText16 :: Int16, items_PolyText16 :: [Word8]}-                deriving (Show, Typeable)- -instance Serialize PolyText16 where-        serialize x-          = do putWord8 75-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_PolyText16 x)-               serialize (gc_PolyText16 x)-               serialize (x_PolyText16 x)-               serialize (y_PolyText16 x)-               serializeList (items_PolyText16 x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (drawable_PolyText16 x) + size (gc_PolyText16 x) +-              size (x_PolyText16 x)-              + size (y_PolyText16 x)-              + sum (map size (items_PolyText16 x))- -data ImageText8 = MkImageText8{string_len_ImageText8 :: Word8,-                               drawable_ImageText8 :: DRAWABLE, gc_ImageText8 :: GCONTEXT,-                               x_ImageText8 :: Int16, y_ImageText8 :: Int16,-                               string_ImageText8 :: [CChar]}-                deriving (Show, Typeable)- -instance Serialize ImageText8 where-        serialize x-          = do putWord8 76-               serialize (string_len_ImageText8 x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_ImageText8 x)-               serialize (gc_ImageText8 x)-               serialize (x_ImageText8 x)-               serialize (y_ImageText8 x)-               serializeList (string_ImageText8 x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (string_len_ImageText8 x) + size (drawable_ImageText8 x)-              + size (gc_ImageText8 x)-              + size (x_ImageText8 x)-              + size (y_ImageText8 x)-              + sum (map size (string_ImageText8 x))- -data ImageText16 = MkImageText16{string_len_ImageText16 :: Word8,-                                 drawable_ImageText16 :: DRAWABLE, gc_ImageText16 :: GCONTEXT,-                                 x_ImageText16 :: Int16, y_ImageText16 :: Int16,-                                 string_ImageText16 :: [CHAR2B]}-                 deriving (Show, Typeable)- -instance Serialize ImageText16 where-        serialize x-          = do putWord8 77-               serialize (string_len_ImageText16 x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_ImageText16 x)-               serialize (gc_ImageText16 x)-               serialize (x_ImageText16 x)-               serialize (y_ImageText16 x)-               serializeList (string_ImageText16 x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (string_len_ImageText16 x) +-              size (drawable_ImageText16 x)-              + size (gc_ImageText16 x)-              + size (x_ImageText16 x)-              + size (y_ImageText16 x)-              + sum (map size (string_ImageText16 x))- -data ColormapAlloc = ColormapAllocNone-                   | ColormapAllocAll-                   deriving Show- -instance SimpleEnum ColormapAlloc where-        toValue ColormapAllocNone{} = 0-        toValue ColormapAllocAll{} = 1-        fromValue 0 = ColormapAllocNone-        fromValue 1 = ColormapAllocAll- -data CreateColormap = MkCreateColormap{alloc_CreateColormap ::-                                       ColormapAlloc,-                                       mid_CreateColormap :: COLORMAP,-                                       window_CreateColormap :: WINDOW,-                                       visual_CreateColormap :: VISUALID}-                    deriving (Show, Typeable)- -instance Serialize CreateColormap where-        serialize x-          = do putWord8 78-               serialize (toValue (alloc_CreateColormap x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (mid_CreateColormap x)-               serialize (window_CreateColormap x)-               serialize (visual_CreateColormap x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (mid_CreateColormap x) +-              size (window_CreateColormap x)-              + size (visual_CreateColormap x)- -data FreeColormap = MkFreeColormap{cmap_FreeColormap :: COLORMAP}-                  deriving (Show, Typeable)- -instance Serialize FreeColormap where-        serialize x-          = do putWord8 79-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_FreeColormap x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (cmap_FreeColormap x)- -data CopyColormapAndFree = MkCopyColormapAndFree{mid_CopyColormapAndFree-                                                 :: COLORMAP,-                                                 src_cmap_CopyColormapAndFree :: COLORMAP}-                         deriving (Show, Typeable)- -instance Serialize CopyColormapAndFree where-        serialize x-          = do putWord8 80-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (mid_CopyColormapAndFree x)-               serialize (src_cmap_CopyColormapAndFree x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (mid_CopyColormapAndFree x) +-              size (src_cmap_CopyColormapAndFree x)- -data InstallColormap = MkInstallColormap{cmap_InstallColormap ::-                                         COLORMAP}-                     deriving (Show, Typeable)- -instance Serialize InstallColormap where-        serialize x-          = do putWord8 81-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_InstallColormap x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (cmap_InstallColormap x)- -data UninstallColormap = MkUninstallColormap{cmap_UninstallColormap-                                             :: COLORMAP}-                       deriving (Show, Typeable)- -instance Serialize UninstallColormap where-        serialize x-          = do putWord8 82-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_UninstallColormap x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (cmap_UninstallColormap x)- -data ListInstalledColormaps = MkListInstalledColormaps{window_ListInstalledColormaps-                                                       :: WINDOW}-                            deriving (Show, Typeable)- -instance Serialize ListInstalledColormaps where-        serialize x-          = do putWord8 83-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (window_ListInstalledColormaps x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (window_ListInstalledColormaps x)- -data ListInstalledColormapsReply = MkListInstalledColormapsReply{cmaps_len_ListInstalledColormapsReply-                                                                 :: Word16,-                                                                 cmaps_ListInstalledColormapsReply-                                                                 :: [COLORMAP]}-                                 deriving (Show, Typeable)- -instance Deserialize ListInstalledColormapsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               cmaps_len <- deserialize-               skip 22-               cmaps <- deserializeList (fromIntegral cmaps_len)-               let _ = isCard32 length-               return (MkListInstalledColormapsReply cmaps_len cmaps)- -data AllocColor = MkAllocColor{cmap_AllocColor :: COLORMAP,-                               red_AllocColor :: Word16, green_AllocColor :: Word16,-                               blue_AllocColor :: Word16}-                deriving (Show, Typeable)- -instance Serialize AllocColor where-        serialize x-          = do putWord8 84-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_AllocColor x)-               serialize (red_AllocColor x)-               serialize (green_AllocColor x)-               serialize (blue_AllocColor x)-               putSkip 2-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cmap_AllocColor x) + size (red_AllocColor x) +-              size (green_AllocColor x)-              + size (blue_AllocColor x)-              + 2- -data AllocColorReply = MkAllocColorReply{red_AllocColorReply ::-                                         Word16,-                                         green_AllocColorReply :: Word16,-                                         blue_AllocColorReply :: Word16,-                                         pixel_AllocColorReply :: Word32}-                     deriving (Show, Typeable)- -instance Deserialize AllocColorReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               red <- deserialize-               green <- deserialize-               blue <- deserialize-               skip 2-               pixel <- deserialize-               let _ = isCard32 length-               return (MkAllocColorReply red green blue pixel)- -data AllocNamedColor = MkAllocNamedColor{cmap_AllocNamedColor ::-                                         COLORMAP,-                                         name_len_AllocNamedColor :: Word16,-                                         name_AllocNamedColor :: [CChar]}-                     deriving (Show, Typeable)- -instance Serialize AllocNamedColor where-        serialize x-          = do putWord8 85-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_AllocNamedColor x)-               serialize (name_len_AllocNamedColor x)-               putSkip 2-               serializeList (name_AllocNamedColor x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cmap_AllocNamedColor x) +-              size (name_len_AllocNamedColor x)-              + 2-              + sum (map size (name_AllocNamedColor x))- -data AllocNamedColorReply = MkAllocNamedColorReply{pixel_AllocNamedColorReply-                                                   :: Word32,-                                                   exact_red_AllocNamedColorReply :: Word16,-                                                   exact_green_AllocNamedColorReply :: Word16,-                                                   exact_blue_AllocNamedColorReply :: Word16,-                                                   visual_red_AllocNamedColorReply :: Word16,-                                                   visual_green_AllocNamedColorReply :: Word16,-                                                   visual_blue_AllocNamedColorReply :: Word16}-                          deriving (Show, Typeable)- -instance Deserialize AllocNamedColorReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               pixel <- deserialize-               exact_red <- deserialize-               exact_green <- deserialize-               exact_blue <- deserialize-               visual_red <- deserialize-               visual_green <- deserialize-               visual_blue <- deserialize-               let _ = isCard32 length-               return-                 (MkAllocNamedColorReply pixel exact_red exact_green exact_blue-                    visual_red-                    visual_green-                    visual_blue)- -data AllocColorCells = MkAllocColorCells{contiguous_AllocColorCells-                                         :: Bool,-                                         cmap_AllocColorCells :: COLORMAP,-                                         colors_AllocColorCells :: Word16,-                                         planes_AllocColorCells :: Word16}-                     deriving (Show, Typeable)- -instance Serialize AllocColorCells where-        serialize x-          = do putWord8 86-               serialize (contiguous_AllocColorCells x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_AllocColorCells x)-               serialize (colors_AllocColorCells x)-               serialize (planes_AllocColorCells x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (contiguous_AllocColorCells x) +-              size (cmap_AllocColorCells x)-              + size (colors_AllocColorCells x)-              + size (planes_AllocColorCells x)- -data AllocColorCellsReply = MkAllocColorCellsReply{pixels_len_AllocColorCellsReply-                                                   :: Word16,-                                                   masks_len_AllocColorCellsReply :: Word16,-                                                   pixels_AllocColorCellsReply :: [Word32],-                                                   masks_AllocColorCellsReply :: [Word32]}-                          deriving (Show, Typeable)- -instance Deserialize AllocColorCellsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               pixels_len <- deserialize-               masks_len <- deserialize-               skip 20-               pixels <- deserializeList (fromIntegral pixels_len)-               masks <- deserializeList (fromIntegral masks_len)-               let _ = isCard32 length-               return (MkAllocColorCellsReply pixels_len masks_len pixels masks)- -data AllocColorPlanes = MkAllocColorPlanes{contiguous_AllocColorPlanes-                                           :: Bool,-                                           cmap_AllocColorPlanes :: COLORMAP,-                                           colors_AllocColorPlanes :: Word16,-                                           reds_AllocColorPlanes :: Word16,-                                           greens_AllocColorPlanes :: Word16,-                                           blues_AllocColorPlanes :: Word16}-                      deriving (Show, Typeable)- -instance Serialize AllocColorPlanes where-        serialize x-          = do putWord8 87-               serialize (contiguous_AllocColorPlanes x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_AllocColorPlanes x)-               serialize (colors_AllocColorPlanes x)-               serialize (reds_AllocColorPlanes x)-               serialize (greens_AllocColorPlanes x)-               serialize (blues_AllocColorPlanes x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (contiguous_AllocColorPlanes x) +-              size (cmap_AllocColorPlanes x)-              + size (colors_AllocColorPlanes x)-              + size (reds_AllocColorPlanes x)-              + size (greens_AllocColorPlanes x)-              + size (blues_AllocColorPlanes x)- -data AllocColorPlanesReply = MkAllocColorPlanesReply{pixels_len_AllocColorPlanesReply-                                                     :: Word16,-                                                     red_mask_AllocColorPlanesReply :: Word32,-                                                     green_mask_AllocColorPlanesReply :: Word32,-                                                     blue_mask_AllocColorPlanesReply :: Word32,-                                                     pixels_AllocColorPlanesReply :: [Word32]}-                           deriving (Show, Typeable)- -instance Deserialize AllocColorPlanesReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               pixels_len <- deserialize-               skip 2-               red_mask <- deserialize-               green_mask <- deserialize-               blue_mask <- deserialize-               skip 8-               pixels <- deserializeList (fromIntegral pixels_len)-               let _ = isCard32 length-               return-                 (MkAllocColorPlanesReply pixels_len red_mask green_mask blue_mask-                    pixels)- -data FreeColors = MkFreeColors{cmap_FreeColors :: COLORMAP,-                               plane_mask_FreeColors :: Word32, pixels_FreeColors :: [Word32]}-                deriving (Show, Typeable)- -instance Serialize FreeColors where-        serialize x-          = do putWord8 88-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_FreeColors x)-               serialize (plane_mask_FreeColors x)-               serializeList (pixels_FreeColors x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cmap_FreeColors x) + size (plane_mask_FreeColors x)-              + sum (map size (pixels_FreeColors x))- -data ColorFlag = ColorFlagRed-               | ColorFlagGreen-               | ColorFlagBlue-               deriving Show- -instance BitEnum ColorFlag where-        toBit ColorFlagRed{} = 0-        toBit ColorFlagGreen{} = 1-        toBit ColorFlagBlue{} = 2-        fromBit 0 = ColorFlagRed-        fromBit 1 = ColorFlagGreen-        fromBit 2 = ColorFlagBlue- -data COLORITEM = MkCOLORITEM{pixel_COLORITEM :: Word32,-                             red_COLORITEM :: Word16, green_COLORITEM :: Word16,-                             blue_COLORITEM :: Word16, flags_COLORITEM :: [ColorFlag]}-               deriving (Show, Typeable)- -instance Serialize COLORITEM where-        serialize x-          = do serialize (pixel_COLORITEM x)-               serialize (red_COLORITEM x)-               serialize (green_COLORITEM x)-               serialize (blue_COLORITEM x)-               serialize (toMask (flags_COLORITEM x) :: Word8)-               putSkip 1-        size x-          = size (pixel_COLORITEM x) + size (red_COLORITEM x) +-              size (green_COLORITEM x)-              + size (blue_COLORITEM x)-              + size (undefined :: Word8)-              + 1- -instance Deserialize COLORITEM where-        deserialize-          = do pixel <- deserialize-               red <- deserialize-               green <- deserialize-               blue <- deserialize-               flags <- liftM fromMask (deserialize :: Get Word8)-               skip 1-               return (MkCOLORITEM pixel red green blue flags)- -data StoreColors = MkStoreColors{cmap_StoreColors :: COLORMAP,-                                 items_StoreColors :: [COLORITEM]}-                 deriving (Show, Typeable)- -instance Serialize StoreColors where-        serialize x-          = do putWord8 89-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_StoreColors x)-               serializeList (items_StoreColors x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cmap_StoreColors x) +-              sum (map size (items_StoreColors x))- -data StoreNamedColor = MkStoreNamedColor{flags_StoreNamedColor ::-                                         [ColorFlag],-                                         cmap_StoreNamedColor :: COLORMAP,-                                         pixel_StoreNamedColor :: Word32,-                                         name_len_StoreNamedColor :: Word16,-                                         name_StoreNamedColor :: [CChar]}-                     deriving (Show, Typeable)- -instance Serialize StoreNamedColor where-        serialize x-          = do putWord8 90-               serialize (toMask (flags_StoreNamedColor x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_StoreNamedColor x)-               serialize (pixel_StoreNamedColor x)-               serialize (name_len_StoreNamedColor x)-               putSkip 2-               serializeList (name_StoreNamedColor x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (cmap_StoreNamedColor x) +-              size (pixel_StoreNamedColor x)-              + size (name_len_StoreNamedColor x)-              + 2-              + sum (map size (name_StoreNamedColor x))- -data RGB = MkRGB{red_RGB :: Word16, green_RGB :: Word16,-                 blue_RGB :: Word16}-         deriving (Show, Typeable)- -instance Serialize RGB where-        serialize x-          = do serialize (red_RGB x)-               serialize (green_RGB x)-               serialize (blue_RGB x)-               putSkip 2-        size x-          = size (red_RGB x) + size (green_RGB x) + size (blue_RGB x) + 2- -instance Deserialize RGB where-        deserialize-          = do red <- deserialize-               green <- deserialize-               blue <- deserialize-               skip 2-               return (MkRGB red green blue)- -data QueryColors = MkQueryColors{cmap_QueryColors :: COLORMAP,-                                 pixels_QueryColors :: [Word32]}-                 deriving (Show, Typeable)- -instance Serialize QueryColors where-        serialize x-          = do putWord8 91-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_QueryColors x)-               serializeList (pixels_QueryColors x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cmap_QueryColors x) +-              sum (map size (pixels_QueryColors x))- -data QueryColorsReply = MkQueryColorsReply{colors_len_QueryColorsReply-                                           :: Word16,-                                           colors_QueryColorsReply :: [RGB]}-                      deriving (Show, Typeable)- -instance Deserialize QueryColorsReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               colors_len <- deserialize-               skip 22-               colors <- deserializeList (fromIntegral colors_len)-               let _ = isCard32 length-               return (MkQueryColorsReply colors_len colors)- -data LookupColor = MkLookupColor{cmap_LookupColor :: COLORMAP,-                                 name_len_LookupColor :: Word16, name_LookupColor :: [CChar]}-                 deriving (Show, Typeable)- -instance Serialize LookupColor where-        serialize x-          = do putWord8 92-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cmap_LookupColor x)-               serialize (name_len_LookupColor x)-               putSkip 2-               serializeList (name_LookupColor x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cmap_LookupColor x) + size (name_len_LookupColor x)-              + 2-              + sum (map size (name_LookupColor x))- -data LookupColorReply = MkLookupColorReply{exact_red_LookupColorReply-                                           :: Word16,-                                           exact_green_LookupColorReply :: Word16,-                                           exact_blue_LookupColorReply :: Word16,-                                           visual_red_LookupColorReply :: Word16,-                                           visual_green_LookupColorReply :: Word16,-                                           visual_blue_LookupColorReply :: Word16}-                      deriving (Show, Typeable)- -instance Deserialize LookupColorReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               exact_red <- deserialize-               exact_green <- deserialize-               exact_blue <- deserialize-               visual_red <- deserialize-               visual_green <- deserialize-               visual_blue <- deserialize-               let _ = isCard32 length-               return-                 (MkLookupColorReply exact_red exact_green exact_blue visual_red-                    visual_green-                    visual_blue)- -data CreateCursor = MkCreateCursor{cid_CreateCursor :: CURSOR,-                                   source_CreateCursor :: PIXMAP, mask_CreateCursor :: PIXMAP,-                                   fore_red_CreateCursor :: Word16,-                                   fore_green_CreateCursor :: Word16,-                                   fore_blue_CreateCursor :: Word16,-                                   back_red_CreateCursor :: Word16,-                                   back_green_CreateCursor :: Word16,-                                   back_blue_CreateCursor :: Word16, x_CreateCursor :: Word16,-                                   y_CreateCursor :: Word16}-                  deriving (Show, Typeable)- -instance Serialize CreateCursor where-        serialize x-          = do putWord8 93-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cid_CreateCursor x)-               serialize (source_CreateCursor x)-               serialize (mask_CreateCursor x)-               serialize (fore_red_CreateCursor x)-               serialize (fore_green_CreateCursor x)-               serialize (fore_blue_CreateCursor x)-               serialize (back_red_CreateCursor x)-               serialize (back_green_CreateCursor x)-               serialize (back_blue_CreateCursor x)-               serialize (x_CreateCursor x)-               serialize (y_CreateCursor x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cid_CreateCursor x) + size (source_CreateCursor x)-              + size (mask_CreateCursor x)-              + size (fore_red_CreateCursor x)-              + size (fore_green_CreateCursor x)-              + size (fore_blue_CreateCursor x)-              + size (back_red_CreateCursor x)-              + size (back_green_CreateCursor x)-              + size (back_blue_CreateCursor x)-              + size (x_CreateCursor x)-              + size (y_CreateCursor x)- -data CreateGlyphCursor = MkCreateGlyphCursor{cid_CreateGlyphCursor-                                             :: CURSOR,-                                             source_font_CreateGlyphCursor :: FONT,-                                             mask_font_CreateGlyphCursor :: FONT,-                                             source_char_CreateGlyphCursor :: Word16,-                                             mask_char_CreateGlyphCursor :: Word16,-                                             fore_red_CreateGlyphCursor :: Word16,-                                             fore_green_CreateGlyphCursor :: Word16,-                                             fore_blue_CreateGlyphCursor :: Word16,-                                             back_red_CreateGlyphCursor :: Word16,-                                             back_green_CreateGlyphCursor :: Word16,-                                             back_blue_CreateGlyphCursor :: Word16}-                       deriving (Show, Typeable)- -instance Serialize CreateGlyphCursor where-        serialize x-          = do putWord8 94-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cid_CreateGlyphCursor x)-               serialize (source_font_CreateGlyphCursor x)-               serialize (mask_font_CreateGlyphCursor x)-               serialize (source_char_CreateGlyphCursor x)-               serialize (mask_char_CreateGlyphCursor x)-               serialize (fore_red_CreateGlyphCursor x)-               serialize (fore_green_CreateGlyphCursor x)-               serialize (fore_blue_CreateGlyphCursor x)-               serialize (back_red_CreateGlyphCursor x)-               serialize (back_green_CreateGlyphCursor x)-               serialize (back_blue_CreateGlyphCursor x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cid_CreateGlyphCursor x) +-              size (source_font_CreateGlyphCursor x)-              + size (mask_font_CreateGlyphCursor x)-              + size (source_char_CreateGlyphCursor x)-              + size (mask_char_CreateGlyphCursor x)-              + size (fore_red_CreateGlyphCursor x)-              + size (fore_green_CreateGlyphCursor x)-              + size (fore_blue_CreateGlyphCursor x)-              + size (back_red_CreateGlyphCursor x)-              + size (back_green_CreateGlyphCursor x)-              + size (back_blue_CreateGlyphCursor x)- -data FreeCursor = MkFreeCursor{cursor_FreeCursor :: CURSOR}-                deriving (Show, Typeable)- -instance Serialize FreeCursor where-        serialize x-          = do putWord8 95-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cursor_FreeCursor x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (cursor_FreeCursor x)- -data RecolorCursor = MkRecolorCursor{cursor_RecolorCursor ::-                                     CURSOR,-                                     fore_red_RecolorCursor :: Word16,-                                     fore_green_RecolorCursor :: Word16,-                                     fore_blue_RecolorCursor :: Word16,-                                     back_red_RecolorCursor :: Word16,-                                     back_green_RecolorCursor :: Word16,-                                     back_blue_RecolorCursor :: Word16}-                   deriving (Show, Typeable)- -instance Serialize RecolorCursor where-        serialize x-          = do putWord8 96-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (cursor_RecolorCursor x)-               serialize (fore_red_RecolorCursor x)-               serialize (fore_green_RecolorCursor x)-               serialize (fore_blue_RecolorCursor x)-               serialize (back_red_RecolorCursor x)-               serialize (back_green_RecolorCursor x)-               serialize (back_blue_RecolorCursor x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (cursor_RecolorCursor x) +-              size (fore_red_RecolorCursor x)-              + size (fore_green_RecolorCursor x)-              + size (fore_blue_RecolorCursor x)-              + size (back_red_RecolorCursor x)-              + size (back_green_RecolorCursor x)-              + size (back_blue_RecolorCursor x)- -data QueryShapeOf = QueryShapeOfLargestCursor-                  | QueryShapeOfFastestTile-                  | QueryShapeOfFastestStipple-                  deriving Show- -instance SimpleEnum QueryShapeOf where-        toValue QueryShapeOfLargestCursor{} = 0-        toValue QueryShapeOfFastestTile{} = 1-        toValue QueryShapeOfFastestStipple{} = 2-        fromValue 0 = QueryShapeOfLargestCursor-        fromValue 1 = QueryShapeOfFastestTile-        fromValue 2 = QueryShapeOfFastestStipple- -data QueryBestSize = MkQueryBestSize{class_QueryBestSize ::-                                     QueryShapeOf,-                                     drawable_QueryBestSize :: DRAWABLE,-                                     width_QueryBestSize :: Word16, height_QueryBestSize :: Word16}-                   deriving (Show, Typeable)- -instance Serialize QueryBestSize where-        serialize x-          = do putWord8 97-               serialize (toValue (class_QueryBestSize x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (drawable_QueryBestSize x)-               serialize (width_QueryBestSize x)-               serialize (height_QueryBestSize x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (drawable_QueryBestSize x) +-              size (width_QueryBestSize x)-              + size (height_QueryBestSize x)- -data QueryBestSizeReply = MkQueryBestSizeReply{width_QueryBestSizeReply-                                               :: Word16,-                                               height_QueryBestSizeReply :: Word16}-                        deriving (Show, Typeable)- -instance Deserialize QueryBestSizeReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               width <- deserialize-               height <- deserialize-               let _ = isCard32 length-               return (MkQueryBestSizeReply width height)- -data QueryExtension = MkQueryExtension{name_len_QueryExtension ::-                                       Word16,-                                       name_QueryExtension :: [CChar]}-                    deriving (Show, Typeable)- -instance Serialize QueryExtension where-        serialize x-          = do putWord8 98-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (name_len_QueryExtension x)-               putSkip 2-               serializeList (name_QueryExtension x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (name_len_QueryExtension x) + 2 +-              sum (map size (name_QueryExtension x))- -data QueryExtensionReply = MkQueryExtensionReply{present_QueryExtensionReply-                                                 :: Bool,-                                                 major_opcode_QueryExtensionReply :: Word8,-                                                 first_event_QueryExtensionReply :: Word8,-                                                 first_error_QueryExtensionReply :: Word8}-                         deriving (Show, Typeable)- -instance Deserialize QueryExtensionReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               present <- deserialize-               major_opcode <- deserialize-               first_event <- deserialize-               first_error <- deserialize-               let _ = isCard32 length-               return-                 (MkQueryExtensionReply present major_opcode first_event-                    first_error)- -data ListExtensions = MkListExtensions{}-                    deriving (Show, Typeable)- -instance Serialize ListExtensions where-        serialize x-          = do putWord8 99-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data ListExtensionsReply = MkListExtensionsReply{names_len_ListExtensionsReply-                                                 :: Word8,-                                                 names_ListExtensionsReply :: [STR]}-                         deriving (Show, Typeable)- -instance Deserialize ListExtensionsReply where-        deserialize-          = do skip 1-               names_len <- deserialize-               skip 2-               length <- deserialize-               skip 24-               names <- deserializeList (fromIntegral names_len)-               let _ = isCard32 length-               return (MkListExtensionsReply names_len names)- -data ChangeKeyboardMapping = MkChangeKeyboardMapping{keycode_count_ChangeKeyboardMapping-                                                     :: Word8,-                                                     first_keycode_ChangeKeyboardMapping :: KEYCODE,-                                                     keysyms_per_keycode_ChangeKeyboardMapping ::-                                                     Word8,-                                                     keysyms_ChangeKeyboardMapping :: [KEYSYM]}-                           deriving (Show, Typeable)- -instance Serialize ChangeKeyboardMapping where-        serialize x-          = do putWord8 100-               serialize (keycode_count_ChangeKeyboardMapping x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (first_keycode_ChangeKeyboardMapping x)-               serialize (keysyms_per_keycode_ChangeKeyboardMapping x)-               serializeList (keysyms_ChangeKeyboardMapping x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (keycode_count_ChangeKeyboardMapping x) +-              size (first_keycode_ChangeKeyboardMapping x)-              + size (keysyms_per_keycode_ChangeKeyboardMapping x)-              + sum (map size (keysyms_ChangeKeyboardMapping x))- -data GetKeyboardMapping = MkGetKeyboardMapping{first_keycode_GetKeyboardMapping-                                               :: KEYCODE,-                                               count_GetKeyboardMapping :: Word8}-                        deriving (Show, Typeable)- -instance Serialize GetKeyboardMapping where-        serialize x-          = do putWord8 101-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (first_keycode_GetKeyboardMapping x)-               serialize (count_GetKeyboardMapping x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (first_keycode_GetKeyboardMapping x) +-              size (count_GetKeyboardMapping x)- -data GetKeyboardMappingReply = MkGetKeyboardMappingReply{keysyms_per_keycode_GetKeyboardMappingReply-                                                         :: Word8,-                                                         keysyms_GetKeyboardMappingReply ::-                                                         [KEYSYM]}-                             deriving (Show, Typeable)- -instance Deserialize GetKeyboardMappingReply where-        deserialize-          = do skip 1-               keysyms_per_keycode <- deserialize-               skip 2-               length <- deserialize-               skip 24-               keysyms <- deserializeList (fromIntegral length)-               let _ = isCard32 length-               return (MkGetKeyboardMappingReply keysyms_per_keycode keysyms)- -data KB = KBKeyClickPercent-        | KBBellPercent-        | KBBellPitch-        | KBBellDuration-        | KBLed-        | KBLedMode-        | KBKey-        | KBAutoRepeatMode-        deriving Show- -instance BitEnum KB where-        toBit KBKeyClickPercent{} = 0-        toBit KBBellPercent{} = 1-        toBit KBBellPitch{} = 2-        toBit KBBellDuration{} = 3-        toBit KBLed{} = 4-        toBit KBLedMode{} = 5-        toBit KBKey{} = 6-        toBit KBAutoRepeatMode{} = 7-        fromBit 0 = KBKeyClickPercent-        fromBit 1 = KBBellPercent-        fromBit 2 = KBBellPitch-        fromBit 3 = KBBellDuration-        fromBit 4 = KBLed-        fromBit 5 = KBLedMode-        fromBit 6 = KBKey-        fromBit 7 = KBAutoRepeatMode- -data LedMode = LedModeOff-             | LedModeOn-             deriving Show- -instance SimpleEnum LedMode where-        toValue LedModeOff{} = 0-        toValue LedModeOn{} = 1-        fromValue 0 = LedModeOff-        fromValue 1 = LedModeOn- -data AutoRepeatMode = AutoRepeatModeOff-                    | AutoRepeatModeOn-                    | AutoRepeatModeDefault-                    deriving Show- -instance SimpleEnum AutoRepeatMode where-        toValue AutoRepeatModeOff{} = 0-        toValue AutoRepeatModeOn{} = 1-        toValue AutoRepeatModeDefault{} = 2-        fromValue 0 = AutoRepeatModeOff-        fromValue 1 = AutoRepeatModeOn-        fromValue 2 = AutoRepeatModeDefault- -data ChangeKeyboardControl = MkChangeKeyboardControl{value_ChangeKeyboardControl-                                                     :: ValueParam Word32}-                           deriving (Show, Typeable)- -instance Serialize ChangeKeyboardControl where-        serialize x-          = do putWord8 102-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (value_ChangeKeyboardControl x)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (value_ChangeKeyboardControl x)- -data GetKeyboardControl = MkGetKeyboardControl{}-                        deriving (Show, Typeable)- -instance Serialize GetKeyboardControl where-        serialize x-          = do putWord8 103-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data GetKeyboardControlReply = MkGetKeyboardControlReply{global_auto_repeat_GetKeyboardControlReply-                                                         :: AutoRepeatMode,-                                                         led_mask_GetKeyboardControlReply :: Word32,-                                                         key_click_percent_GetKeyboardControlReply-                                                         :: Word8,-                                                         bell_percent_GetKeyboardControlReply ::-                                                         Word8,-                                                         bell_pitch_GetKeyboardControlReply ::-                                                         Word16,-                                                         bell_duration_GetKeyboardControlReply ::-                                                         Word16,-                                                         auto_repeats_GetKeyboardControlReply ::-                                                         [Word8]}-                             deriving (Show, Typeable)- -instance Deserialize GetKeyboardControlReply where-        deserialize-          = do skip 1-               global_auto_repeat <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               led_mask <- deserialize-               key_click_percent <- deserialize-               bell_percent <- deserialize-               bell_pitch <- deserialize-               bell_duration <- deserialize-               skip 2-               auto_repeats <- deserializeList (fromIntegral 32)-               let _ = isCard32 length-               return-                 (MkGetKeyboardControlReply global_auto_repeat led_mask-                    key_click_percent-                    bell_percent-                    bell_pitch-                    bell_duration-                    auto_repeats)- -data Bell = MkBell{percent_Bell :: Int8}-          deriving (Show, Typeable)- -instance Serialize Bell where-        serialize x-          = do putWord8 104-               serialize (percent_Bell x)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 3 + size (percent_Bell x)- -data ChangePointerControl = MkChangePointerControl{acceleration_numerator_ChangePointerControl-                                                   :: Int16,-                                                   acceleration_denominator_ChangePointerControl ::-                                                   Int16,-                                                   threshold_ChangePointerControl :: Int16,-                                                   do_acceleration_ChangePointerControl :: Bool,-                                                   do_threshold_ChangePointerControl :: Bool}-                          deriving (Show, Typeable)- -instance Serialize ChangePointerControl where-        serialize x-          = do putWord8 105-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (acceleration_numerator_ChangePointerControl x)-               serialize (acceleration_denominator_ChangePointerControl x)-               serialize (threshold_ChangePointerControl x)-               serialize (do_acceleration_ChangePointerControl x)-               serialize (do_threshold_ChangePointerControl x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (acceleration_numerator_ChangePointerControl x) +-              size (acceleration_denominator_ChangePointerControl x)-              + size (threshold_ChangePointerControl x)-              + size (do_acceleration_ChangePointerControl x)-              + size (do_threshold_ChangePointerControl x)- -data GetPointerControl = MkGetPointerControl{}-                       deriving (Show, Typeable)- -instance Serialize GetPointerControl where-        serialize x-          = do putWord8 106-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data GetPointerControlReply = MkGetPointerControlReply{acceleration_numerator_GetPointerControlReply-                                                       :: Word16,-                                                       acceleration_denominator_GetPointerControlReply-                                                       :: Word16,-                                                       threshold_GetPointerControlReply :: Word16}-                            deriving (Show, Typeable)- -instance Deserialize GetPointerControlReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               acceleration_numerator <- deserialize-               acceleration_denominator <- deserialize-               threshold <- deserialize-               skip 18-               let _ = isCard32 length-               return-                 (MkGetPointerControlReply acceleration_numerator-                    acceleration_denominator-                    threshold)- -data Blanking = BlankingNotPreferred-              | BlankingPreferred-              | BlankingDefault-              deriving Show- -instance SimpleEnum Blanking where-        toValue BlankingNotPreferred{} = 0-        toValue BlankingPreferred{} = 1-        toValue BlankingDefault{} = 2-        fromValue 0 = BlankingNotPreferred-        fromValue 1 = BlankingPreferred-        fromValue 2 = BlankingDefault- -data Exposures = ExposuresNotAllowed-               | ExposuresAllowed-               | ExposuresDefault-               deriving Show- -instance SimpleEnum Exposures where-        toValue ExposuresNotAllowed{} = 0-        toValue ExposuresAllowed{} = 1-        toValue ExposuresDefault{} = 2-        fromValue 0 = ExposuresNotAllowed-        fromValue 1 = ExposuresAllowed-        fromValue 2 = ExposuresDefault- -data SetScreenSaver = MkSetScreenSaver{timeout_SetScreenSaver ::-                                       Int16,-                                       interval_SetScreenSaver :: Int16,-                                       prefer_blanking_SetScreenSaver :: Blanking,-                                       allow_exposures_SetScreenSaver :: Exposures}-                    deriving (Show, Typeable)- -instance Serialize SetScreenSaver where-        serialize x-          = do putWord8 107-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (timeout_SetScreenSaver x)-               serialize (interval_SetScreenSaver x)-               serialize (toValue (prefer_blanking_SetScreenSaver x) :: Word8)-               serialize (toValue (allow_exposures_SetScreenSaver x) :: Word8)-               putSkip (requiredPadding (size x))-        size x-          = 3 + 1 + size (timeout_SetScreenSaver x) +-              size (interval_SetScreenSaver x)-              + size (undefined :: Word8)-              + size (undefined :: Word8)- -data GetScreenSaver = MkGetScreenSaver{}-                    deriving (Show, Typeable)- -instance Serialize GetScreenSaver where-        serialize x-          = do putWord8 108-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data GetScreenSaverReply = MkGetScreenSaverReply{timeout_GetScreenSaverReply-                                                 :: Word16,-                                                 interval_GetScreenSaverReply :: Word16,-                                                 prefer_blanking_GetScreenSaverReply :: Blanking,-                                                 allow_exposures_GetScreenSaverReply :: Exposures}-                         deriving (Show, Typeable)- -instance Deserialize GetScreenSaverReply where-        deserialize-          = do skip 1-               skip 1-               skip 2-               length <- deserialize-               timeout <- deserialize-               interval <- deserialize-               prefer_blanking <- liftM fromValue (deserialize :: Get Word8)-               allow_exposures <- liftM fromValue (deserialize :: Get Word8)-               skip 18-               let _ = isCard32 length-               return-                 (MkGetScreenSaverReply timeout interval prefer_blanking-                    allow_exposures)- -data HostMode = HostModeInsert-              | HostModeDelete-              deriving Show- -instance SimpleEnum HostMode where-        toValue HostModeInsert{} = 0-        toValue HostModeDelete{} = 1-        fromValue 0 = HostModeInsert-        fromValue 1 = HostModeDelete- -data Family = FamilyInternet-            | FamilyDECnet-            | FamilyChaos-            | FamilyServerInterpreted-            | FamilyInternet6-            deriving Show- -instance SimpleEnum Family where-        toValue FamilyInternet{} = 0-        toValue FamilyDECnet{} = 1-        toValue FamilyChaos{} = 2-        toValue FamilyServerInterpreted{} = 5-        toValue FamilyInternet6{} = 6-        fromValue 0 = FamilyInternet-        fromValue 1 = FamilyDECnet-        fromValue 2 = FamilyChaos-        fromValue 5 = FamilyServerInterpreted-        fromValue 6 = FamilyInternet6- -data ChangeHosts = MkChangeHosts{mode_ChangeHosts :: HostMode,-                                 family_ChangeHosts :: Family, address_len_ChangeHosts :: Word16,-                                 address_ChangeHosts :: [CChar]}-                 deriving (Show, Typeable)- -instance Serialize ChangeHosts where-        serialize x-          = do putWord8 109-               serialize (toValue (mode_ChangeHosts x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (toValue (family_ChangeHosts x) :: Word8)-               putSkip 1-               serialize (address_len_ChangeHosts x)-               serializeList (address_ChangeHosts x)-               putSkip (requiredPadding (size x))-        size x-          = 3 + size (undefined :: Word8) + size (undefined :: Word8) + 1 +-              size (address_len_ChangeHosts x)-              + sum (map size (address_ChangeHosts x))- -data HOST = MkHOST{family_HOST :: Family,-                   address_len_HOST :: Word16, address_HOST :: [Word8]}-          deriving (Show, Typeable)- -instance Serialize HOST where-        serialize x-          = do serialize (toValue (family_HOST x) :: Word8)-               putSkip 1-               serialize (address_len_HOST x)-               serializeList (address_HOST x)-        size x-          = size (undefined :: Word8) + 1 + size (address_len_HOST x) +-              sum (map size (address_HOST x))- -instance Deserialize HOST where-        deserialize-          = do family <- liftM fromValue (deserialize :: Get Word8)-               skip 1-               address_len <- deserialize-               address <- deserializeList (fromIntegral address_len)-               return (MkHOST family address_len address)- -data ListHosts = MkListHosts{}-               deriving (Show, Typeable)- -instance Serialize ListHosts where-        serialize x-          = do putWord8 110-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 4- -data ListHostsReply = MkListHostsReply{mode_ListHostsReply ::-                                       AccessControl,-                                       hosts_len_ListHostsReply :: Word16,-                                       hosts_ListHostsReply :: [HOST]}-                    deriving (Show, Typeable)- -instance Deserialize ListHostsReply where-        deserialize-          = do skip 1-               mode <- liftM fromValue (deserialize :: Get Word8)-               skip 2-               length <- deserialize-               hosts_len <- deserialize-               skip 22-               hosts <- deserializeList (fromIntegral hosts_len)-               let _ = isCard32 length-               return (MkListHostsReply mode hosts_len hosts)- -data AccessControl = AccessControlDisable-                   | AccessControlEnable-                   deriving Show- -instance SimpleEnum AccessControl where-        toValue AccessControlDisable{} = 0-        toValue AccessControlEnable{} = 1-        fromValue 0 = AccessControlDisable-        fromValue 1 = AccessControlEnable- -data SetAccessControl = MkSetAccessControl{mode_SetAccessControl ::-                                           AccessControl}-                      deriving (Show, Typeable)- -instance Serialize SetAccessControl where-        serialize x-          = do putWord8 111-               serialize (toValue (mode_SetAccessControl x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 3 + size (undefined :: Word8)- -data CloseDown = CloseDownDestroyAll-               | CloseDownRetainPermanent-               | CloseDownRetainTemporary-               deriving Show- -instance SimpleEnum CloseDown where-        toValue CloseDownDestroyAll{} = 0-        toValue CloseDownRetainPermanent{} = 1-        toValue CloseDownRetainTemporary{} = 2-        fromValue 0 = CloseDownDestroyAll-        fromValue 1 = CloseDownRetainPermanent-        fromValue 2 = CloseDownRetainTemporary- -data SetCloseDownMode = MkSetCloseDownMode{mode_SetCloseDownMode ::-                                           CloseDown}-                      deriving (Show, Typeable)- -instance Serialize SetCloseDownMode where-        serialize x-          = do putWord8 112-               serialize (toValue (mode_SetCloseDownMode x) :: Word8)-               serialize (convertBytesToRequestSize (size x) :: Int16)-               putSkip (requiredPadding (size x))-        size x = 3 + size (undefined :: Word8)- -data Kill = KillAllTemporary-          deriving Show- -instance SimpleEnum Kill where-        toValue KillAllTemporary{} = 0-        fromValue 0 = KillAllTemporary- -data KillClient = MkKillClient{resource_KillClient :: Kill}-                deriving (Show, Typeable)- -instance Serialize KillClient where-        serialize x-          = do putWord8 113-               putSkip 1-               serialize (convertBytesToRequestSize (size x) :: Int16)-               serialize (toValue (resource_KillClient x) :: Word32)-               putSkip (requiredPadding (size x))-        size x = 3 + 1 + size (undefined :: Word32)+        VISUALTYPE(..), DEPTH(..), EventMask(..), BackingStore(..),+        SCREEN(..), SetupRequest(..), SetupFailed(..),+        SetupAuthenticate(..), ImageOrder(..), Setup(..), ModMask(..),+        KeyButMask(..), Window(..), KeyPressEvent(..), KeyReleaseEvent(..),+        ButtonMask(..), ButtonPressEvent(..), ButtonReleaseEvent(..),+        Motion(..), MotionNotifyEvent(..), NotifyDetail(..),+        NotifyMode(..), EnterNotifyEvent(..), LeaveNotifyEvent(..),+        FocusInEvent(..), FocusOutEvent(..), KeymapNotifyEvent(..),+        ExposeEvent(..), GraphicsExposureEvent(..), NoExposureEvent(..),+        Visibility(..), VisibilityNotifyEvent(..), CreateNotifyEvent(..),+        DestroyNotifyEvent(..), UnmapNotifyEvent(..), MapNotifyEvent(..),+        MapRequestEvent(..), ReparentNotifyEvent(..),+        ConfigureNotifyEvent(..), ConfigureRequestEvent(..),+        GravityNotifyEvent(..), ResizeRequestEvent(..), Place(..),+        CirculateNotifyEvent(..), CirculateRequestEvent(..), Property(..),+        PropertyNotifyEvent(..), SelectionClearEvent(..), Time(..),+        Atom(..), SelectionRequestEvent(..), SelectionNotifyEvent(..),+        ColormapState(..), Colormap(..), ColormapNotifyEvent(..),+        ClientMessageEvent(..), ClientMessageData(..), Mapping(..), MappingNotifyEvent(..),+        RequestError(..), ValueError(..), WindowError(..), PixmapError(..),+        AtomError(..), CursorError(..), FontError(..), MatchError(..),+        DrawableError(..), AccessError(..), AllocError(..),+        ColormapError(..), GContextError(..), IDChoiceError(..),+        NameError(..), LengthError(..), ImplementationError(..),+        WindowClass(..), CW(..), BackPixmap(..), Gravity(..),+        CreateWindow(..), ChangeWindowAttributes(..), MapState(..),+        GetWindowAttributes(..), GetWindowAttributesReply(..),+        DestroyWindow(..), DestroySubwindows(..), SetMode(..),+        ChangeSaveSet(..), ReparentWindow(..), MapWindow(..),+        MapSubwindows(..), UnmapWindow(..), UnmapSubwindows(..),+        ConfigWindow(..), StackMode(..), ConfigureWindow(..),+        Circulate(..), CirculateWindow(..), GetGeometry(..),+        GetGeometryReply(..), QueryTree(..), QueryTreeReply(..),+        InternAtom(..), InternAtomReply(..), GetAtomName(..),+        GetAtomNameReply(..), PropMode(..), ChangeProperty(..),+        DeleteProperty(..), GetPropertyType(..), GetProperty(..),+        GetPropertyReply(..), ListProperties(..), ListPropertiesReply(..),+        SetSelectionOwner(..), GetSelectionOwner(..),+        GetSelectionOwnerReply(..), ConvertSelection(..),+        SendEventDest(..), SendEvent(..), GrabMode(..), GrabStatus(..),+        Cursor(..), GrabPointer(..), GrabPointerReply(..),+        UngrabPointer(..), ButtonIndex(..), GrabButton(..),+        UngrabButton(..), ChangeActivePointerGrab(..), GrabKeyboard(..),+        GrabKeyboardReply(..), UngrabKeyboard(..), Grab(..), GrabKey(..),+        UngrabKey(..), Allow(..), AllowEvents(..), QueryPointer(..),+        QueryPointerReply(..), TIMECOORD(..), GetMotionEvents(..),+        GetMotionEventsReply(..), TranslateCoordinates(..),+        TranslateCoordinatesReply(..), WarpPointer(..), InputFocus(..),+        SetInputFocus(..), GetInputFocus(..), GetInputFocusReply(..),+        QueryKeymap(..), QueryKeymapReply(..), OpenFont(..), CloseFont(..),+        FontDraw(..), FONTPROP(..), CHARINFO(..), QueryFont(..),+        QueryFontReply(..), odd_length_QueryTextExtents,+        QueryTextExtents(..), QueryTextExtentsReply(..), STR(..),+        ListFonts(..), ListFontsReply(..), ListFontsWithInfo(..),+        ListFontsWithInfoReply(..), SetFontPath(..), GetFontPath(..),+        GetFontPathReply(..), CreatePixmap(..), FreePixmap(..), GC(..),+        GX(..), LineStyle(..), CapStyle(..), JoinStyle(..), FillStyle(..),+        FillRule(..), SubwindowMode(..), ArcMode(..), CreateGC(..),+        ChangeGC(..), CopyGC(..), SetDashes(..), ClipOrdering(..),+        SetClipRectangles(..), FreeGC(..), ClearArea(..), CopyArea(..),+        CopyPlane(..), CoordMode(..), PolyPoint(..), PolyLine(..),+        SEGMENT(..), PolySegment(..), PolyRectangle(..), PolyArc(..),+        PolyShape(..), FillPoly(..), PolyFillRectangle(..),+        PolyFillArc(..), ImageFormat(..), PutImage(..), GetImage(..),+        GetImageReply(..), PolyText8(..), PolyText16(..), ImageText8(..),+        ImageText16(..), ColormapAlloc(..), CreateColormap(..),+        FreeColormap(..), CopyColormapAndFree(..), InstallColormap(..),+        UninstallColormap(..), ListInstalledColormaps(..),+        ListInstalledColormapsReply(..), AllocColor(..),+        AllocColorReply(..), AllocNamedColor(..), AllocNamedColorReply(..),+        AllocColorCells(..), AllocColorCellsReply(..),+        AllocColorPlanes(..), AllocColorPlanesReply(..), FreeColors(..),+        ColorFlag(..), COLORITEM(..), StoreColors(..), StoreNamedColor(..),+        RGB(..), QueryColors(..), QueryColorsReply(..), LookupColor(..),+        LookupColorReply(..), Pixmap(..), CreateCursor(..), Font(..),+        CreateGlyphCursor(..), FreeCursor(..), RecolorCursor(..),+        QueryShapeOf(..), QueryBestSize(..), QueryBestSizeReply(..),+        QueryExtension(..), QueryExtensionReply(..), ListExtensions(..),+        ListExtensionsReply(..), ChangeKeyboardMapping(..),+        GetKeyboardMapping(..), GetKeyboardMappingReply(..), KB(..),+        LedMode(..), AutoRepeatMode(..), ChangeKeyboardControl(..),+        GetKeyboardControl(..), GetKeyboardControlReply(..), Bell(..),+        ChangePointerControl(..), GetPointerControl(..),+        GetPointerControlReply(..), Blanking(..), Exposures(..),+        SetScreenSaver(..), GetScreenSaver(..), GetScreenSaverReply(..),+        HostMode(..), Family(..), ChangeHosts(..), HOST(..), ListHosts(..),+        ListHostsReply(..), AccessControl(..), SetAccessControl(..),+        CloseDown(..), SetCloseDownMode(..), Kill(..), KillClient(..),+        RotateProperties(..), ScreenSaver(..), ForceScreenSaver(..),+        MappingStatus(..), SetPointerMapping(..),+        SetPointerMappingReply(..), GetPointerMapping(..),+        GetPointerMappingReply(..), MapIndex(..), SetModifierMapping(..),+        SetModifierMappingReply(..), GetModifierMapping(..),+        GetModifierMappingReply(..))+       where+import Data.Word+import Data.Int+import Foreign.C.Types+import Data.Bits+import Data.Binary.Put+import Data.Binary.Get+import Data.Typeable+import Control.Monad+import Control.Exception+import Data.List+import Graphics.XHB.Shared hiding (Event, Error)+import qualified Graphics.XHB.Shared+ +deserializeError :: Word8 -> Maybe (Get SomeError)+deserializeError 1+  = return (liftM toError (deserialize :: Get RequestError))+deserializeError 2+  = return (liftM toError (deserialize :: Get ValueError))+deserializeError 3+  = return (liftM toError (deserialize :: Get WindowError))+deserializeError 4+  = return (liftM toError (deserialize :: Get PixmapError))+deserializeError 5+  = return (liftM toError (deserialize :: Get AtomError))+deserializeError 6+  = return (liftM toError (deserialize :: Get CursorError))+deserializeError 7+  = return (liftM toError (deserialize :: Get FontError))+deserializeError 8+  = return (liftM toError (deserialize :: Get MatchError))+deserializeError 9+  = return (liftM toError (deserialize :: Get DrawableError))+deserializeError 10+  = return (liftM toError (deserialize :: Get AccessError))+deserializeError 11+  = return (liftM toError (deserialize :: Get AllocError))+deserializeError 12+  = return (liftM toError (deserialize :: Get ColormapError))+deserializeError 13+  = return (liftM toError (deserialize :: Get GContextError))+deserializeError 14+  = return (liftM toError (deserialize :: Get IDChoiceError))+deserializeError 15+  = return (liftM toError (deserialize :: Get NameError))+deserializeError 16+  = return (liftM toError (deserialize :: Get LengthError))+deserializeError 17+  = return (liftM toError (deserialize :: Get ImplementationError))+deserializeError _ = Nothing+ +deserializeEvent :: Word8 -> Maybe (Get SomeEvent)+deserializeEvent 2+  = return (liftM toEvent (deserialize :: Get KeyPressEvent))+deserializeEvent 3+  = return (liftM toEvent (deserialize :: Get KeyReleaseEvent))+deserializeEvent 4+  = return (liftM toEvent (deserialize :: Get ButtonPressEvent))+deserializeEvent 5+  = return (liftM toEvent (deserialize :: Get ButtonReleaseEvent))+deserializeEvent 6+  = return (liftM toEvent (deserialize :: Get MotionNotifyEvent))+deserializeEvent 7+  = return (liftM toEvent (deserialize :: Get EnterNotifyEvent))+deserializeEvent 8+  = return (liftM toEvent (deserialize :: Get LeaveNotifyEvent))+deserializeEvent 9+  = return (liftM toEvent (deserialize :: Get FocusInEvent))+deserializeEvent 10+  = return (liftM toEvent (deserialize :: Get FocusOutEvent))+deserializeEvent 11+  = return (liftM toEvent (deserialize :: Get KeymapNotifyEvent))+deserializeEvent 12+  = return (liftM toEvent (deserialize :: Get ExposeEvent))+deserializeEvent 13+  = return (liftM toEvent (deserialize :: Get GraphicsExposureEvent))+deserializeEvent 14+  = return (liftM toEvent (deserialize :: Get NoExposureEvent))+deserializeEvent 15+  = return (liftM toEvent (deserialize :: Get VisibilityNotifyEvent))+deserializeEvent 16+  = return (liftM toEvent (deserialize :: Get CreateNotifyEvent))+deserializeEvent 17+  = return (liftM toEvent (deserialize :: Get DestroyNotifyEvent))+deserializeEvent 18+  = return (liftM toEvent (deserialize :: Get UnmapNotifyEvent))+deserializeEvent 19+  = return (liftM toEvent (deserialize :: Get MapNotifyEvent))+deserializeEvent 20+  = return (liftM toEvent (deserialize :: Get MapRequestEvent))+deserializeEvent 21+  = return (liftM toEvent (deserialize :: Get ReparentNotifyEvent))+deserializeEvent 22+  = return (liftM toEvent (deserialize :: Get ConfigureNotifyEvent))+deserializeEvent 23+  = return (liftM toEvent (deserialize :: Get ConfigureRequestEvent))+deserializeEvent 24+  = return (liftM toEvent (deserialize :: Get GravityNotifyEvent))+deserializeEvent 25+  = return (liftM toEvent (deserialize :: Get ResizeRequestEvent))+deserializeEvent 26+  = return (liftM toEvent (deserialize :: Get CirculateNotifyEvent))+deserializeEvent 27+  = return (liftM toEvent (deserialize :: Get CirculateRequestEvent))+deserializeEvent 28+  = return (liftM toEvent (deserialize :: Get PropertyNotifyEvent))+deserializeEvent 29+  = return (liftM toEvent (deserialize :: Get SelectionClearEvent))+deserializeEvent 30+  = return (liftM toEvent (deserialize :: Get SelectionRequestEvent))+deserializeEvent 31+  = return (liftM toEvent (deserialize :: Get SelectionNotifyEvent))+deserializeEvent 32+  = return (liftM toEvent (deserialize :: Get ColormapNotifyEvent))+deserializeEvent 33+  = return (liftM toEvent (deserialize :: Get ClientMessageEvent))+deserializeEvent 34+  = return (liftM toEvent (deserialize :: Get MappingNotifyEvent))+deserializeEvent _ = Nothing+ +data CHAR2B = MkCHAR2B{byte1_CHAR2B :: Word8,+                       byte2_CHAR2B :: Word8}+            deriving (Show, Typeable)+ +instance Serialize CHAR2B where+        serialize x+          = do serialize (byte1_CHAR2B x)+               serialize (byte2_CHAR2B x)+        size x = size (byte1_CHAR2B x) + size (byte2_CHAR2B x)+ +instance Deserialize CHAR2B where+        deserialize+          = do byte1 <- deserialize+               byte2 <- deserialize+               return (MkCHAR2B byte1 byte2)+ +newtype WINDOW = MkWINDOW Xid+                 deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype PIXMAP = MkPIXMAP Xid+                 deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype CURSOR = MkCURSOR Xid+                 deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype FONT = MkFONT Xid+               deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype GCONTEXT = MkGCONTEXT Xid+                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype COLORMAP = MkCOLORMAP Xid+                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype ATOM = MkATOM Xid+               deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype DRAWABLE = MkDRAWABLE Xid+                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +newtype FONTABLE = MkFONTABLE Xid+                   deriving (Eq, Ord, Show, Serialize, Deserialize, XidLike)+ +type VISUALID = Word32+ +type TIMESTAMP = Word32+ +type KEYSYM = Word32+ +type KEYCODE = Word8+ +type BUTTON = Word8+ +data POINT = MkPOINT{x_POINT :: Int16, y_POINT :: Int16}+           deriving (Show, Typeable)+ +instance Serialize POINT where+        serialize x+          = do serialize (x_POINT x)+               serialize (y_POINT x)+        size x = size (x_POINT x) + size (y_POINT x)+ +instance Deserialize POINT where+        deserialize+          = do x <- deserialize+               y <- deserialize+               return (MkPOINT x y)+ +data RECTANGLE = MkRECTANGLE{x_RECTANGLE :: Int16,+                             y_RECTANGLE :: Int16, width_RECTANGLE :: Word16,+                             height_RECTANGLE :: Word16}+               deriving (Show, Typeable)+ +instance Serialize RECTANGLE where+        serialize x+          = do serialize (x_RECTANGLE x)+               serialize (y_RECTANGLE x)+               serialize (width_RECTANGLE x)+               serialize (height_RECTANGLE x)+        size x+          = size (x_RECTANGLE x) + size (y_RECTANGLE x) ++              size (width_RECTANGLE x)+              + size (height_RECTANGLE x)+ +instance Deserialize RECTANGLE where+        deserialize+          = do x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               return (MkRECTANGLE x y width height)+ +data ARC = MkARC{x_ARC :: Int16, y_ARC :: Int16,+                 width_ARC :: Word16, height_ARC :: Word16, angle1_ARC :: Int16,+                 angle2_ARC :: Int16}+         deriving (Show, Typeable)+ +instance Serialize ARC where+        serialize x+          = do serialize (x_ARC x)+               serialize (y_ARC x)+               serialize (width_ARC x)+               serialize (height_ARC x)+               serialize (angle1_ARC x)+               serialize (angle2_ARC x)+        size x+          = size (x_ARC x) + size (y_ARC x) + size (width_ARC x) ++              size (height_ARC x)+              + size (angle1_ARC x)+              + size (angle2_ARC x)+ +instance Deserialize ARC where+        deserialize+          = do x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               angle1 <- deserialize+               angle2 <- deserialize+               return (MkARC x y width height angle1 angle2)+ +data FORMAT = MkFORMAT{depth_FORMAT :: Word8,+                       bits_per_pixel_FORMAT :: Word8, scanline_pad_FORMAT :: Word8}+            deriving (Show, Typeable)+ +instance Serialize FORMAT where+        serialize x+          = do serialize (depth_FORMAT x)+               serialize (bits_per_pixel_FORMAT x)+               serialize (scanline_pad_FORMAT x)+               putSkip 5+        size x+          = size (depth_FORMAT x) + size (bits_per_pixel_FORMAT x) ++              size (scanline_pad_FORMAT x)+              + 5+ +instance Deserialize FORMAT where+        deserialize+          = do depth <- deserialize+               bits_per_pixel <- deserialize+               scanline_pad <- deserialize+               skip 5+               return (MkFORMAT depth bits_per_pixel scanline_pad)+ +data VisualClass = VisualClassStaticGray+                 | VisualClassGrayScale+                 | VisualClassStaticColor+                 | VisualClassPseudoColor+                 | VisualClassTrueColor+                 | VisualClassDirectColor+                 deriving Show+ +instance SimpleEnum VisualClass where+        toValue VisualClassStaticGray{} = 0+        toValue VisualClassGrayScale{} = 1+        toValue VisualClassStaticColor{} = 2+        toValue VisualClassPseudoColor{} = 3+        toValue VisualClassTrueColor{} = 4+        toValue VisualClassDirectColor{} = 5+        fromValue 0 = VisualClassStaticGray+        fromValue 1 = VisualClassGrayScale+        fromValue 2 = VisualClassStaticColor+        fromValue 3 = VisualClassPseudoColor+        fromValue 4 = VisualClassTrueColor+        fromValue 5 = VisualClassDirectColor+ +data VISUALTYPE = MkVISUALTYPE{visual_id_VISUALTYPE :: VISUALID,+                               class_VISUALTYPE :: VisualClass,+                               bits_per_rgb_value_VISUALTYPE :: Word8,+                               colormap_entries_VISUALTYPE :: Word16,+                               red_mask_VISUALTYPE :: Word32, green_mask_VISUALTYPE :: Word32,+                               blue_mask_VISUALTYPE :: Word32}+                deriving (Show, Typeable)+ +instance Serialize VISUALTYPE where+        serialize x+          = do serialize (visual_id_VISUALTYPE x)+               serialize (toValue (class_VISUALTYPE x) :: Word8)+               serialize (bits_per_rgb_value_VISUALTYPE x)+               serialize (colormap_entries_VISUALTYPE x)+               serialize (red_mask_VISUALTYPE x)+               serialize (green_mask_VISUALTYPE x)+               serialize (blue_mask_VISUALTYPE x)+               putSkip 4+        size x+          = size (visual_id_VISUALTYPE x) + size (undefined :: Word8) ++              size (bits_per_rgb_value_VISUALTYPE x)+              + size (colormap_entries_VISUALTYPE x)+              + size (red_mask_VISUALTYPE x)+              + size (green_mask_VISUALTYPE x)+              + size (blue_mask_VISUALTYPE x)+              + 4+ +instance Deserialize VISUALTYPE where+        deserialize+          = do visual_id <- deserialize+               class_ <- liftM fromValue (deserialize :: Get Word8)+               bits_per_rgb_value <- deserialize+               colormap_entries <- deserialize+               red_mask <- deserialize+               green_mask <- deserialize+               blue_mask <- deserialize+               skip 4+               return+                 (MkVISUALTYPE visual_id class_ bits_per_rgb_value colormap_entries+                    red_mask+                    green_mask+                    blue_mask)+ +data DEPTH = MkDEPTH{depth_DEPTH :: Word8,+                     visuals_len_DEPTH :: Word16, visuals_DEPTH :: [VISUALTYPE]}+           deriving (Show, Typeable)+ +instance Serialize DEPTH where+        serialize x+          = do serialize (depth_DEPTH x)+               putSkip 1+               serialize (visuals_len_DEPTH x)+               putSkip 4+               serializeList (visuals_DEPTH x)+        size x+          = size (depth_DEPTH x) + 1 + size (visuals_len_DEPTH x) + 4 ++              sum (map size (visuals_DEPTH x))+ +instance Deserialize DEPTH where+        deserialize+          = do depth <- deserialize+               skip 1+               visuals_len <- deserialize+               skip 4+               visuals <- deserializeList (fromIntegral visuals_len)+               return (MkDEPTH depth visuals_len visuals)+ +data EventMask = EventMaskKeyPress+               | EventMaskKeyRelease+               | EventMaskButtonPress+               | EventMaskButtonRelease+               | EventMaskEnterWindow+               | EventMaskLeaveWindow+               | EventMaskPointerMotion+               | EventMaskPointerMotionHint+               | EventMaskButton1Motion+               | EventMaskButton2Motion+               | EventMaskButton3Motion+               | EventMaskButton4Motion+               | EventMaskButton5Motion+               | EventMaskButtonMotion+               | EventMaskKeymapState+               | EventMaskExposure+               | EventMaskVisibilityChange+               | EventMaskStructureNotify+               | EventMaskResizeRedirect+               | EventMaskSubstructureNotify+               | EventMaskSubstructureRedirect+               | EventMaskFocusChange+               | EventMaskPropertyChange+               | EventMaskColorMapChange+               | EventMaskOwnerGrabButton+               deriving Show+ +instance BitEnum EventMask where+        toBit EventMaskKeyPress{} = 0+        toBit EventMaskKeyRelease{} = 1+        toBit EventMaskButtonPress{} = 2+        toBit EventMaskButtonRelease{} = 3+        toBit EventMaskEnterWindow{} = 4+        toBit EventMaskLeaveWindow{} = 5+        toBit EventMaskPointerMotion{} = 6+        toBit EventMaskPointerMotionHint{} = 7+        toBit EventMaskButton1Motion{} = 8+        toBit EventMaskButton2Motion{} = 9+        toBit EventMaskButton3Motion{} = 10+        toBit EventMaskButton4Motion{} = 11+        toBit EventMaskButton5Motion{} = 12+        toBit EventMaskButtonMotion{} = 13+        toBit EventMaskKeymapState{} = 14+        toBit EventMaskExposure{} = 15+        toBit EventMaskVisibilityChange{} = 16+        toBit EventMaskStructureNotify{} = 17+        toBit EventMaskResizeRedirect{} = 18+        toBit EventMaskSubstructureNotify{} = 19+        toBit EventMaskSubstructureRedirect{} = 20+        toBit EventMaskFocusChange{} = 21+        toBit EventMaskPropertyChange{} = 22+        toBit EventMaskColorMapChange{} = 23+        toBit EventMaskOwnerGrabButton{} = 24+        fromBit 0 = EventMaskKeyPress+        fromBit 1 = EventMaskKeyRelease+        fromBit 2 = EventMaskButtonPress+        fromBit 3 = EventMaskButtonRelease+        fromBit 4 = EventMaskEnterWindow+        fromBit 5 = EventMaskLeaveWindow+        fromBit 6 = EventMaskPointerMotion+        fromBit 7 = EventMaskPointerMotionHint+        fromBit 8 = EventMaskButton1Motion+        fromBit 9 = EventMaskButton2Motion+        fromBit 10 = EventMaskButton3Motion+        fromBit 11 = EventMaskButton4Motion+        fromBit 12 = EventMaskButton5Motion+        fromBit 13 = EventMaskButtonMotion+        fromBit 14 = EventMaskKeymapState+        fromBit 15 = EventMaskExposure+        fromBit 16 = EventMaskVisibilityChange+        fromBit 17 = EventMaskStructureNotify+        fromBit 18 = EventMaskResizeRedirect+        fromBit 19 = EventMaskSubstructureNotify+        fromBit 20 = EventMaskSubstructureRedirect+        fromBit 21 = EventMaskFocusChange+        fromBit 22 = EventMaskPropertyChange+        fromBit 23 = EventMaskColorMapChange+        fromBit 24 = EventMaskOwnerGrabButton+ +data BackingStore = BackingStoreNotUseful+                  | BackingStoreWhenMapped+                  | BackingStoreAlways+                  deriving Show+ +instance SimpleEnum BackingStore where+        toValue BackingStoreNotUseful{} = 0+        toValue BackingStoreWhenMapped{} = 1+        toValue BackingStoreAlways{} = 2+        fromValue 0 = BackingStoreNotUseful+        fromValue 1 = BackingStoreWhenMapped+        fromValue 2 = BackingStoreAlways+ +data SCREEN = MkSCREEN{root_SCREEN :: WINDOW,+                       default_colormap_SCREEN :: COLORMAP, white_pixel_SCREEN :: Word32,+                       black_pixel_SCREEN :: Word32,+                       current_input_masks_SCREEN :: [EventMask],+                       width_in_pixels_SCREEN :: Word16,+                       height_in_pixels_SCREEN :: Word16,+                       width_in_millimeters_SCREEN :: Word16,+                       height_in_millimeters_SCREEN :: Word16,+                       min_installed_maps_SCREEN :: Word16,+                       max_installed_maps_SCREEN :: Word16,+                       root_visual_SCREEN :: VISUALID,+                       backing_stores_SCREEN :: BackingStore, save_unders_SCREEN :: Bool,+                       root_depth_SCREEN :: Word8, allowed_depths_len_SCREEN :: Word8,+                       allowed_depths_SCREEN :: [DEPTH]}+            deriving (Show, Typeable)+ +instance Serialize SCREEN where+        serialize x+          = do serialize (root_SCREEN x)+               serialize (default_colormap_SCREEN x)+               serialize (white_pixel_SCREEN x)+               serialize (black_pixel_SCREEN x)+               serialize (toMask (current_input_masks_SCREEN x) :: Word32)+               serialize (width_in_pixels_SCREEN x)+               serialize (height_in_pixels_SCREEN x)+               serialize (width_in_millimeters_SCREEN x)+               serialize (height_in_millimeters_SCREEN x)+               serialize (min_installed_maps_SCREEN x)+               serialize (max_installed_maps_SCREEN x)+               serialize (root_visual_SCREEN x)+               serialize (toValue (backing_stores_SCREEN x) :: Word8)+               serialize (save_unders_SCREEN x)+               serialize (root_depth_SCREEN x)+               serialize (allowed_depths_len_SCREEN x)+               serializeList (allowed_depths_SCREEN x)+        size x+          = size (root_SCREEN x) + size (default_colormap_SCREEN x) ++              size (white_pixel_SCREEN x)+              + size (black_pixel_SCREEN x)+              + size (undefined :: Word32)+              + size (width_in_pixels_SCREEN x)+              + size (height_in_pixels_SCREEN x)+              + size (width_in_millimeters_SCREEN x)+              + size (height_in_millimeters_SCREEN x)+              + size (min_installed_maps_SCREEN x)+              + size (max_installed_maps_SCREEN x)+              + size (root_visual_SCREEN x)+              + size (undefined :: Word8)+              + size (save_unders_SCREEN x)+              + size (root_depth_SCREEN x)+              + size (allowed_depths_len_SCREEN x)+              + sum (map size (allowed_depths_SCREEN x))+ +instance Deserialize SCREEN where+        deserialize+          = do root <- deserialize+               default_colormap <- deserialize+               white_pixel <- deserialize+               black_pixel <- deserialize+               current_input_masks <- liftM fromMask (deserialize :: Get Word32)+               width_in_pixels <- deserialize+               height_in_pixels <- deserialize+               width_in_millimeters <- deserialize+               height_in_millimeters <- deserialize+               min_installed_maps <- deserialize+               max_installed_maps <- deserialize+               root_visual <- deserialize+               backing_stores <- liftM fromValue (deserialize :: Get Word8)+               save_unders <- deserialize+               root_depth <- deserialize+               allowed_depths_len <- deserialize+               allowed_depths <- deserializeList (fromIntegral allowed_depths_len)+               return+                 (MkSCREEN root default_colormap white_pixel black_pixel+                    current_input_masks+                    width_in_pixels+                    height_in_pixels+                    width_in_millimeters+                    height_in_millimeters+                    min_installed_maps+                    max_installed_maps+                    root_visual+                    backing_stores+                    save_unders+                    root_depth+                    allowed_depths_len+                    allowed_depths)+ +data SetupRequest = MkSetupRequest{byte_order_SetupRequest ::+                                   Word8,+                                   protocol_major_version_SetupRequest :: Word16,+                                   protocol_minor_version_SetupRequest :: Word16,+                                   authorization_protocol_name_len_SetupRequest :: Word16,+                                   authorization_protocol_data_len_SetupRequest :: Word16,+                                   authorization_protocol_name_SetupRequest :: [CChar],+                                   authorization_protocol_data_SetupRequest :: [CChar]}+                  deriving (Show, Typeable)+ +instance Serialize SetupRequest where+        serialize x+          = do serialize (byte_order_SetupRequest x)+               putSkip 1+               serialize (protocol_major_version_SetupRequest x)+               serialize (protocol_minor_version_SetupRequest x)+               serialize (authorization_protocol_name_len_SetupRequest x)+               serialize (authorization_protocol_data_len_SetupRequest x)+               putSkip 2+               serializeList (authorization_protocol_name_SetupRequest x)+               serializeList (authorization_protocol_data_SetupRequest x)+        size x+          = size (byte_order_SetupRequest x) + 1 ++              size (protocol_major_version_SetupRequest x)+              + size (protocol_minor_version_SetupRequest x)+              + size (authorization_protocol_name_len_SetupRequest x)+              + size (authorization_protocol_data_len_SetupRequest x)+              + 2+              + sum (map size (authorization_protocol_name_SetupRequest x))+              + sum (map size (authorization_protocol_data_SetupRequest x))+ +instance Deserialize SetupRequest where+        deserialize+          = do byte_order <- deserialize+               skip 1+               protocol_major_version <- deserialize+               protocol_minor_version <- deserialize+               authorization_protocol_name_len <- deserialize+               authorization_protocol_data_len <- deserialize+               skip 2+               authorization_protocol_name <- deserializeList+                                                (fromIntegral authorization_protocol_name_len)+               authorization_protocol_data <- deserializeList+                                                (fromIntegral authorization_protocol_data_len)+               return+                 (MkSetupRequest byte_order protocol_major_version+                    protocol_minor_version+                    authorization_protocol_name_len+                    authorization_protocol_data_len+                    authorization_protocol_name+                    authorization_protocol_data)+ +data SetupFailed = MkSetupFailed{status_SetupFailed :: Word8,+                                 reason_len_SetupFailed :: Word8,+                                 protocol_major_version_SetupFailed :: Word16,+                                 protocol_minor_version_SetupFailed :: Word16,+                                 length_SetupFailed :: Word16, reason_SetupFailed :: [CChar]}+                 deriving (Show, Typeable)+ +instance Serialize SetupFailed where+        serialize x+          = do serialize (status_SetupFailed x)+               serialize (reason_len_SetupFailed x)+               serialize (protocol_major_version_SetupFailed x)+               serialize (protocol_minor_version_SetupFailed x)+               serialize (length_SetupFailed x)+               serializeList (reason_SetupFailed x)+        size x+          = size (status_SetupFailed x) + size (reason_len_SetupFailed x) ++              size (protocol_major_version_SetupFailed x)+              + size (protocol_minor_version_SetupFailed x)+              + size (length_SetupFailed x)+              + sum (map size (reason_SetupFailed x))+ +instance Deserialize SetupFailed where+        deserialize+          = do status <- deserialize+               reason_len <- deserialize+               protocol_major_version <- deserialize+               protocol_minor_version <- deserialize+               length <- deserialize+               reason <- deserializeList (fromIntegral reason_len)+               return+                 (MkSetupFailed status reason_len protocol_major_version+                    protocol_minor_version+                    length+                    reason)+ +data SetupAuthenticate = MkSetupAuthenticate{status_SetupAuthenticate+                                             :: Word8,+                                             length_SetupAuthenticate :: Word16,+                                             reason_SetupAuthenticate :: [CChar]}+                       deriving (Show, Typeable)+ +instance Serialize SetupAuthenticate where+        serialize x+          = do serialize (status_SetupAuthenticate x)+               putSkip 5+               serialize (length_SetupAuthenticate x)+               serializeList (reason_SetupAuthenticate x)+        size x+          = size (status_SetupAuthenticate x) + 5 ++              size (length_SetupAuthenticate x)+              + sum (map size (reason_SetupAuthenticate x))+ +instance Deserialize SetupAuthenticate where+        deserialize+          = do status <- deserialize+               skip 5+               length <- deserialize+               reason <- deserializeList+                           (fromIntegral (fromIntegral (length * 4)))+               return (MkSetupAuthenticate status length reason)+ +data ImageOrder = ImageOrderLSBFirst+                | ImageOrderMSBFirst+                deriving Show+ +instance SimpleEnum ImageOrder where+        toValue ImageOrderLSBFirst{} = 0+        toValue ImageOrderMSBFirst{} = 1+        fromValue 0 = ImageOrderLSBFirst+        fromValue 1 = ImageOrderMSBFirst+ +data Setup = MkSetup{status_Setup :: Word8,+                     protocol_major_version_Setup :: Word16,+                     protocol_minor_version_Setup :: Word16, length_Setup :: Word16,+                     release_number_Setup :: Word32, resource_id_base_Setup :: Word32,+                     resource_id_mask_Setup :: Word32,+                     motion_buffer_size_Setup :: Word32, vendor_len_Setup :: Word16,+                     maximum_request_length_Setup :: Word16, roots_len_Setup :: Word8,+                     pixmap_formats_len_Setup :: Word8,+                     image_byte_order_Setup :: ImageOrder,+                     bitmap_format_bit_order_Setup :: ImageOrder,+                     bitmap_format_scanline_unit_Setup :: Word8,+                     bitmap_format_scanline_pad_Setup :: Word8,+                     min_keycode_Setup :: KEYCODE, max_keycode_Setup :: KEYCODE,+                     vendor_Setup :: [CChar], pixmap_formats_Setup :: [FORMAT],+                     roots_Setup :: [SCREEN]}+           deriving (Show, Typeable)+ +instance Serialize Setup where+        serialize x+          = do serialize (status_Setup x)+               putSkip 1+               serialize (protocol_major_version_Setup x)+               serialize (protocol_minor_version_Setup x)+               serialize (length_Setup x)+               serialize (release_number_Setup x)+               serialize (resource_id_base_Setup x)+               serialize (resource_id_mask_Setup x)+               serialize (motion_buffer_size_Setup x)+               serialize (vendor_len_Setup x)+               serialize (maximum_request_length_Setup x)+               serialize (roots_len_Setup x)+               serialize (pixmap_formats_len_Setup x)+               serialize (toValue (image_byte_order_Setup x) :: Word8)+               serialize (toValue (bitmap_format_bit_order_Setup x) :: Word8)+               serialize (bitmap_format_scanline_unit_Setup x)+               serialize (bitmap_format_scanline_pad_Setup x)+               serialize (min_keycode_Setup x)+               serialize (max_keycode_Setup x)+               putSkip 4+               serializeList (vendor_Setup x)+               serializeList (pixmap_formats_Setup x)+               serializeList (roots_Setup x)+        size x+          = size (status_Setup x) + 1 + size (protocol_major_version_Setup x)+              + size (protocol_minor_version_Setup x)+              + size (length_Setup x)+              + size (release_number_Setup x)+              + size (resource_id_base_Setup x)+              + size (resource_id_mask_Setup x)+              + size (motion_buffer_size_Setup x)+              + size (vendor_len_Setup x)+              + size (maximum_request_length_Setup x)+              + size (roots_len_Setup x)+              + size (pixmap_formats_len_Setup x)+              + size (undefined :: Word8)+              + size (undefined :: Word8)+              + size (bitmap_format_scanline_unit_Setup x)+              + size (bitmap_format_scanline_pad_Setup x)+              + size (min_keycode_Setup x)+              + size (max_keycode_Setup x)+              + 4+              + sum (map size (vendor_Setup x))+              + sum (map size (pixmap_formats_Setup x))+              + sum (map size (roots_Setup x))+ +instance Deserialize Setup where+        deserialize+          = do status <- deserialize+               skip 1+               protocol_major_version <- deserialize+               protocol_minor_version <- deserialize+               length <- deserialize+               release_number <- deserialize+               resource_id_base <- deserialize+               resource_id_mask <- deserialize+               motion_buffer_size <- deserialize+               vendor_len <- deserialize+               maximum_request_length <- deserialize+               roots_len <- deserialize+               pixmap_formats_len <- deserialize+               image_byte_order <- liftM fromValue (deserialize :: Get Word8)+               bitmap_format_bit_order <- liftM fromValue+                                            (deserialize :: Get Word8)+               bitmap_format_scanline_unit <- deserialize+               bitmap_format_scanline_pad <- deserialize+               min_keycode <- deserialize+               max_keycode <- deserialize+               skip 4+               vendor <- deserializeList (fromIntegral vendor_len)+               pixmap_formats <- deserializeList (fromIntegral pixmap_formats_len)+               roots <- deserializeList (fromIntegral roots_len)+               return+                 (MkSetup status protocol_major_version protocol_minor_version+                    length+                    release_number+                    resource_id_base+                    resource_id_mask+                    motion_buffer_size+                    vendor_len+                    maximum_request_length+                    roots_len+                    pixmap_formats_len+                    image_byte_order+                    bitmap_format_bit_order+                    bitmap_format_scanline_unit+                    bitmap_format_scanline_pad+                    min_keycode+                    max_keycode+                    vendor+                    pixmap_formats+                    roots)+ +data ModMask = ModMaskShift+             | ModMaskLock+             | ModMaskControl+             | ModMask1+             | ModMask2+             | ModMask3+             | ModMask4+             | ModMask5+             | ModMaskAny+             deriving Show+ +instance BitEnum ModMask where+        toBit ModMaskShift{} = 0+        toBit ModMaskLock{} = 1+        toBit ModMaskControl{} = 2+        toBit ModMask1{} = 3+        toBit ModMask2{} = 4+        toBit ModMask3{} = 5+        toBit ModMask4{} = 6+        toBit ModMask5{} = 7+        toBit ModMaskAny{} = 15+        fromBit 0 = ModMaskShift+        fromBit 1 = ModMaskLock+        fromBit 2 = ModMaskControl+        fromBit 3 = ModMask1+        fromBit 4 = ModMask2+        fromBit 5 = ModMask3+        fromBit 6 = ModMask4+        fromBit 7 = ModMask5+        fromBit 15 = ModMaskAny+ +data KeyButMask = KeyButMaskShift+                | KeyButMaskLock+                | KeyButMaskControl+                | KeyButMaskMod1+                | KeyButMaskMod2+                | KeyButMaskMod3+                | KeyButMaskMod4+                | KeyButMaskMod5+                | KeyButMaskButton1+                | KeyButMaskButton2+                | KeyButMaskButton3+                | KeyButMaskButton4+                | KeyButMaskButton5+                deriving Show+ +instance BitEnum KeyButMask where+        toBit KeyButMaskShift{} = 0+        toBit KeyButMaskLock{} = 1+        toBit KeyButMaskControl{} = 2+        toBit KeyButMaskMod1{} = 3+        toBit KeyButMaskMod2{} = 4+        toBit KeyButMaskMod3{} = 5+        toBit KeyButMaskMod4{} = 6+        toBit KeyButMaskMod5{} = 7+        toBit KeyButMaskButton1{} = 8+        toBit KeyButMaskButton2{} = 9+        toBit KeyButMaskButton3{} = 10+        toBit KeyButMaskButton4{} = 11+        toBit KeyButMaskButton5{} = 12+        fromBit 0 = KeyButMaskShift+        fromBit 1 = KeyButMaskLock+        fromBit 2 = KeyButMaskControl+        fromBit 3 = KeyButMaskMod1+        fromBit 4 = KeyButMaskMod2+        fromBit 5 = KeyButMaskMod3+        fromBit 6 = KeyButMaskMod4+        fromBit 7 = KeyButMaskMod5+        fromBit 8 = KeyButMaskButton1+        fromBit 9 = KeyButMaskButton2+        fromBit 10 = KeyButMaskButton3+        fromBit 11 = KeyButMaskButton4+        fromBit 12 = KeyButMaskButton5+ +data Window = WindowNone+            deriving Show+ +instance SimpleEnum Window where+        toValue WindowNone{} = 0+        fromValue 0 = WindowNone+ +data KeyPressEvent = MkKeyPressEvent{detail_KeyPressEvent ::+                                     KEYCODE,+                                     time_KeyPressEvent :: TIMESTAMP, root_KeyPressEvent :: WINDOW,+                                     event_KeyPressEvent :: WINDOW, child_KeyPressEvent :: WINDOW,+                                     root_x_KeyPressEvent :: Int16, root_y_KeyPressEvent :: Int16,+                                     event_x_KeyPressEvent :: Int16, event_y_KeyPressEvent :: Int16,+                                     state_KeyPressEvent :: [KeyButMask],+                                     same_screen_KeyPressEvent :: Bool}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event KeyPressEvent+ +instance Deserialize KeyPressEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               same_screen <- deserialize+               skip 1+               return+                 (MkKeyPressEvent detail time root event child root_x root_y event_x+                    event_y+                    state+                    same_screen)+ +data KeyReleaseEvent = MkKeyReleaseEvent{detail_KeyReleaseEvent ::+                                         KEYCODE,+                                         time_KeyReleaseEvent :: TIMESTAMP,+                                         root_KeyReleaseEvent :: WINDOW,+                                         event_KeyReleaseEvent :: WINDOW,+                                         child_KeyReleaseEvent :: WINDOW,+                                         root_x_KeyReleaseEvent :: Int16,+                                         root_y_KeyReleaseEvent :: Int16,+                                         event_x_KeyReleaseEvent :: Int16,+                                         event_y_KeyReleaseEvent :: Int16,+                                         state_KeyReleaseEvent :: [KeyButMask],+                                         same_screen_KeyReleaseEvent :: Bool}+                     deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event KeyReleaseEvent+ +instance Deserialize KeyReleaseEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               same_screen <- deserialize+               skip 1+               return+                 (MkKeyReleaseEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen)+ +data ButtonMask = ButtonMask1+                | ButtonMask2+                | ButtonMask3+                | ButtonMask4+                | ButtonMask5+                | ButtonMaskAny+                deriving Show+ +instance BitEnum ButtonMask where+        toBit ButtonMask1{} = 8+        toBit ButtonMask2{} = 9+        toBit ButtonMask3{} = 10+        toBit ButtonMask4{} = 11+        toBit ButtonMask5{} = 12+        toBit ButtonMaskAny{} = 15+        fromBit 8 = ButtonMask1+        fromBit 9 = ButtonMask2+        fromBit 10 = ButtonMask3+        fromBit 11 = ButtonMask4+        fromBit 12 = ButtonMask5+        fromBit 15 = ButtonMaskAny+ +data ButtonPressEvent = MkButtonPressEvent{detail_ButtonPressEvent+                                           :: BUTTON,+                                           time_ButtonPressEvent :: TIMESTAMP,+                                           root_ButtonPressEvent :: WINDOW,+                                           event_ButtonPressEvent :: WINDOW,+                                           child_ButtonPressEvent :: WINDOW,+                                           root_x_ButtonPressEvent :: Int16,+                                           root_y_ButtonPressEvent :: Int16,+                                           event_x_ButtonPressEvent :: Int16,+                                           event_y_ButtonPressEvent :: Int16,+                                           state_ButtonPressEvent :: [KeyButMask],+                                           same_screen_ButtonPressEvent :: Bool}+                      deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ButtonPressEvent+ +instance Deserialize ButtonPressEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               same_screen <- deserialize+               skip 1+               return+                 (MkButtonPressEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen)+ +data ButtonReleaseEvent = MkButtonReleaseEvent{detail_ButtonReleaseEvent+                                               :: BUTTON,+                                               time_ButtonReleaseEvent :: TIMESTAMP,+                                               root_ButtonReleaseEvent :: WINDOW,+                                               event_ButtonReleaseEvent :: WINDOW,+                                               child_ButtonReleaseEvent :: WINDOW,+                                               root_x_ButtonReleaseEvent :: Int16,+                                               root_y_ButtonReleaseEvent :: Int16,+                                               event_x_ButtonReleaseEvent :: Int16,+                                               event_y_ButtonReleaseEvent :: Int16,+                                               state_ButtonReleaseEvent :: [KeyButMask],+                                               same_screen_ButtonReleaseEvent :: Bool}+                        deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ButtonReleaseEvent+ +instance Deserialize ButtonReleaseEvent where+        deserialize+          = do skip 1+               detail <- deserialize+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               same_screen <- deserialize+               skip 1+               return+                 (MkButtonReleaseEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen)+ +data Motion = MotionNormal+            | MotionHint+            deriving Show+ +instance SimpleEnum Motion where+        toValue MotionNormal{} = 0+        toValue MotionHint{} = 1+        fromValue 0 = MotionNormal+        fromValue 1 = MotionHint+ +data MotionNotifyEvent = MkMotionNotifyEvent{detail_MotionNotifyEvent+                                             :: Motion,+                                             time_MotionNotifyEvent :: TIMESTAMP,+                                             root_MotionNotifyEvent :: WINDOW,+                                             event_MotionNotifyEvent :: WINDOW,+                                             child_MotionNotifyEvent :: WINDOW,+                                             root_x_MotionNotifyEvent :: Int16,+                                             root_y_MotionNotifyEvent :: Int16,+                                             event_x_MotionNotifyEvent :: Int16,+                                             event_y_MotionNotifyEvent :: Int16,+                                             state_MotionNotifyEvent :: [KeyButMask],+                                             same_screen_MotionNotifyEvent :: Bool}+                       deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event MotionNotifyEvent+ +instance Deserialize MotionNotifyEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               same_screen <- deserialize+               skip 1+               return+                 (MkMotionNotifyEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    same_screen)+ +data NotifyDetail = NotifyDetailAncestor+                  | NotifyDetailVirtual+                  | NotifyDetailInferior+                  | NotifyDetailNonlinear+                  | NotifyDetailNonlinearVirtual+                  | NotifyDetailPointer+                  | NotifyDetailPointerRoot+                  | NotifyDetailNone+                  deriving Show+ +instance SimpleEnum NotifyDetail where+        toValue NotifyDetailAncestor{} = 0+        toValue NotifyDetailVirtual{} = 1+        toValue NotifyDetailInferior{} = 2+        toValue NotifyDetailNonlinear{} = 3+        toValue NotifyDetailNonlinearVirtual{} = 4+        toValue NotifyDetailPointer{} = 5+        toValue NotifyDetailPointerRoot{} = 6+        toValue NotifyDetailNone{} = 7+        fromValue 0 = NotifyDetailAncestor+        fromValue 1 = NotifyDetailVirtual+        fromValue 2 = NotifyDetailInferior+        fromValue 3 = NotifyDetailNonlinear+        fromValue 4 = NotifyDetailNonlinearVirtual+        fromValue 5 = NotifyDetailPointer+        fromValue 6 = NotifyDetailPointerRoot+        fromValue 7 = NotifyDetailNone+ +data NotifyMode = NotifyModeNormal+                | NotifyModeGrab+                | NotifyModeUngrab+                | NotifyModeWhileGrabbed+                deriving Show+ +instance SimpleEnum NotifyMode where+        toValue NotifyModeNormal{} = 0+        toValue NotifyModeGrab{} = 1+        toValue NotifyModeUngrab{} = 2+        toValue NotifyModeWhileGrabbed{} = 3+        fromValue 0 = NotifyModeNormal+        fromValue 1 = NotifyModeGrab+        fromValue 2 = NotifyModeUngrab+        fromValue 3 = NotifyModeWhileGrabbed+ +data EnterNotifyEvent = MkEnterNotifyEvent{detail_EnterNotifyEvent+                                           :: NotifyDetail,+                                           time_EnterNotifyEvent :: TIMESTAMP,+                                           root_EnterNotifyEvent :: WINDOW,+                                           event_EnterNotifyEvent :: WINDOW,+                                           child_EnterNotifyEvent :: WINDOW,+                                           root_x_EnterNotifyEvent :: Int16,+                                           root_y_EnterNotifyEvent :: Int16,+                                           event_x_EnterNotifyEvent :: Int16,+                                           event_y_EnterNotifyEvent :: Int16,+                                           state_EnterNotifyEvent :: [KeyButMask],+                                           mode_EnterNotifyEvent :: NotifyMode,+                                           same_screen_focus_EnterNotifyEvent :: Word8}+                      deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event EnterNotifyEvent+ +instance Deserialize EnterNotifyEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               mode <- liftM fromValue (deserialize :: Get Word8)+               same_screen_focus <- deserialize+               return+                 (MkEnterNotifyEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    mode+                    same_screen_focus)+ +data LeaveNotifyEvent = MkLeaveNotifyEvent{detail_LeaveNotifyEvent+                                           :: NotifyDetail,+                                           time_LeaveNotifyEvent :: TIMESTAMP,+                                           root_LeaveNotifyEvent :: WINDOW,+                                           event_LeaveNotifyEvent :: WINDOW,+                                           child_LeaveNotifyEvent :: WINDOW,+                                           root_x_LeaveNotifyEvent :: Int16,+                                           root_y_LeaveNotifyEvent :: Int16,+                                           event_x_LeaveNotifyEvent :: Int16,+                                           event_y_LeaveNotifyEvent :: Int16,+                                           state_LeaveNotifyEvent :: [KeyButMask],+                                           mode_LeaveNotifyEvent :: NotifyMode,+                                           same_screen_focus_LeaveNotifyEvent :: Word8}+                      deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event LeaveNotifyEvent+ +instance Deserialize LeaveNotifyEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               time <- deserialize+               root <- deserialize+               event <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               event_x <- deserialize+               event_y <- deserialize+               state <- liftM fromMask (deserialize :: Get Word16)+               mode <- liftM fromValue (deserialize :: Get Word8)+               same_screen_focus <- deserialize+               return+                 (MkLeaveNotifyEvent detail time root event child root_x root_y+                    event_x+                    event_y+                    state+                    mode+                    same_screen_focus)+ +data FocusInEvent = MkFocusInEvent{detail_FocusInEvent ::+                                   NotifyDetail,+                                   event_FocusInEvent :: WINDOW, mode_FocusInEvent :: NotifyMode}+                  deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event FocusInEvent+ +instance Deserialize FocusInEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               event <- deserialize+               mode <- liftM fromValue (deserialize :: Get Word8)+               skip 3+               return (MkFocusInEvent detail event mode)+ +data FocusOutEvent = MkFocusOutEvent{detail_FocusOutEvent ::+                                     NotifyDetail,+                                     event_FocusOutEvent :: WINDOW,+                                     mode_FocusOutEvent :: NotifyMode}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event FocusOutEvent+ +instance Deserialize FocusOutEvent where+        deserialize+          = do skip 1+               detail <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               event <- deserialize+               mode <- liftM fromValue (deserialize :: Get Word8)+               skip 3+               return (MkFocusOutEvent detail event mode)+ +data KeymapNotifyEvent = MkKeymapNotifyEvent{keys_KeymapNotifyEvent+                                             :: [Word8]}+                       deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event KeymapNotifyEvent+ +instance Deserialize KeymapNotifyEvent where+        deserialize+          = do skip 1+               keys <- deserializeList (fromIntegral 31)+               return (MkKeymapNotifyEvent keys)+ +data ExposeEvent = MkExposeEvent{window_ExposeEvent :: WINDOW,+                                 x_ExposeEvent :: Word16, y_ExposeEvent :: Word16,+                                 width_ExposeEvent :: Word16, height_ExposeEvent :: Word16,+                                 count_ExposeEvent :: Word16}+                 deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ExposeEvent+ +instance Deserialize ExposeEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               window <- deserialize+               x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               count <- deserialize+               skip 2+               return (MkExposeEvent window x y width height count)+ +data GraphicsExposureEvent = MkGraphicsExposureEvent{drawable_GraphicsExposureEvent+                                                     :: DRAWABLE,+                                                     x_GraphicsExposureEvent :: Word16,+                                                     y_GraphicsExposureEvent :: Word16,+                                                     width_GraphicsExposureEvent :: Word16,+                                                     height_GraphicsExposureEvent :: Word16,+                                                     minor_opcode_GraphicsExposureEvent :: Word16,+                                                     count_GraphicsExposureEvent :: Word16,+                                                     major_opcode_GraphicsExposureEvent :: Word8}+                           deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event GraphicsExposureEvent+ +instance Deserialize GraphicsExposureEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               drawable <- deserialize+               x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               minor_opcode <- deserialize+               count <- deserialize+               major_opcode <- deserialize+               skip 3+               return+                 (MkGraphicsExposureEvent drawable x y width height minor_opcode+                    count+                    major_opcode)+ +data NoExposureEvent = MkNoExposureEvent{drawable_NoExposureEvent+                                         :: DRAWABLE,+                                         minor_opcode_NoExposureEvent :: Word16,+                                         major_opcode_NoExposureEvent :: Word8}+                     deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event NoExposureEvent+ +instance Deserialize NoExposureEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               drawable <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkNoExposureEvent drawable minor_opcode major_opcode)+ +data Visibility = VisibilityUnobscured+                | VisibilityPartiallyObscured+                | VisibilityFullyObscured+                deriving Show+ +instance SimpleEnum Visibility where+        toValue VisibilityUnobscured{} = 0+        toValue VisibilityPartiallyObscured{} = 1+        toValue VisibilityFullyObscured{} = 2+        fromValue 0 = VisibilityUnobscured+        fromValue 1 = VisibilityPartiallyObscured+        fromValue 2 = VisibilityFullyObscured+ +data VisibilityNotifyEvent = MkVisibilityNotifyEvent{window_VisibilityNotifyEvent+                                                     :: WINDOW,+                                                     state_VisibilityNotifyEvent :: Visibility}+                           deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event VisibilityNotifyEvent+ +instance Deserialize VisibilityNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               window <- deserialize+               state <- liftM fromValue (deserialize :: Get Word8)+               skip 3+               return (MkVisibilityNotifyEvent window state)+ +data CreateNotifyEvent = MkCreateNotifyEvent{parent_CreateNotifyEvent+                                             :: WINDOW,+                                             window_CreateNotifyEvent :: WINDOW,+                                             x_CreateNotifyEvent :: Int16,+                                             y_CreateNotifyEvent :: Int16,+                                             width_CreateNotifyEvent :: Word16,+                                             height_CreateNotifyEvent :: Word16,+                                             border_width_CreateNotifyEvent :: Word16,+                                             override_redirect_CreateNotifyEvent :: Bool}+                       deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event CreateNotifyEvent+ +instance Deserialize CreateNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               parent <- deserialize+               window <- deserialize+               x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               border_width <- deserialize+               override_redirect <- deserialize+               skip 1+               return+                 (MkCreateNotifyEvent parent window x y width height border_width+                    override_redirect)+ +data DestroyNotifyEvent = MkDestroyNotifyEvent{event_DestroyNotifyEvent+                                               :: WINDOW,+                                               window_DestroyNotifyEvent :: WINDOW}+                        deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event DestroyNotifyEvent+ +instance Deserialize DestroyNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               return (MkDestroyNotifyEvent event window)+ +data UnmapNotifyEvent = MkUnmapNotifyEvent{event_UnmapNotifyEvent+                                           :: WINDOW,+                                           window_UnmapNotifyEvent :: WINDOW,+                                           from_configure_UnmapNotifyEvent :: Bool}+                      deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event UnmapNotifyEvent+ +instance Deserialize UnmapNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               from_configure <- deserialize+               skip 3+               return (MkUnmapNotifyEvent event window from_configure)+ +data MapNotifyEvent = MkMapNotifyEvent{event_MapNotifyEvent ::+                                       WINDOW,+                                       window_MapNotifyEvent :: WINDOW,+                                       override_redirect_MapNotifyEvent :: Bool}+                    deriving (Show, Typeable)++ +data ClientMessageData = ClientData8  [Word8]  -- ^length 20+                       | ClientData16 [Word16] -- ^length 10+                       | ClientData32 [Word32] -- ^length 5+                   deriving (Show, Typeable)++ +data ClientMessageDataType = CDType8+                           | CDType16+                           | CDType32+ +clientMessageDataType :: ClientMessageData -> ClientMessageDataType+clientMessageDataType ClientData8{}  = CDType8+clientMessageDataType ClientData16{} = CDType16+clientMessageDataType ClientData32{} = CDType32+ +instance Serialize ClientMessageData where+    serialize (ClientData8 xs) = assert (length xs == 20) $+                                    serializeList xs+    serialize (ClientData16 xs) = assert (length xs == 10) $+                                     serializeList xs+    serialize (ClientData32 xs) = assert (length xs == 5) $+                                     serializeList xs+    size cd = assert+         (case cd of+            ClientData8  xs -> length xs == 20+            ClientData16 xs -> length xs == 10+            ClientData32 xs -> length xs == 5)+         20++deserializeClientData :: ClientMessageDataType -> Get ClientMessageData+deserializeClientData CDType8+    = ClientData8 `liftM` deserializeList 20+deserializeClientData CDType16+    = ClientData16 `liftM` deserializeList 10+deserializeClientData CDType32+    = ClientData32 `liftM` deserializeList 5+ +clientDataFormatToType :: Word8 -> ClientMessageDataType+clientDataFormatToType 8 = CDType8+clientDataFormatToType 16 = CDType16+clientDataFormatToType 32 = CDType32+clientDataFormatToType _ = CDType8 -- should we throw an error here?++ +instance Graphics.XHB.Shared.Event MapNotifyEvent+ +instance Deserialize MapNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               override_redirect <- deserialize+               skip 3+               return (MkMapNotifyEvent event window override_redirect)+ +data MapRequestEvent = MkMapRequestEvent{parent_MapRequestEvent ::+                                         WINDOW,+                                         window_MapRequestEvent :: WINDOW}+                     deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event MapRequestEvent+ +instance Deserialize MapRequestEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               parent <- deserialize+               window <- deserialize+               return (MkMapRequestEvent parent window)+ +data ReparentNotifyEvent = MkReparentNotifyEvent{event_ReparentNotifyEvent+                                                 :: WINDOW,+                                                 window_ReparentNotifyEvent :: WINDOW,+                                                 parent_ReparentNotifyEvent :: WINDOW,+                                                 x_ReparentNotifyEvent :: Int16,+                                                 y_ReparentNotifyEvent :: Int16,+                                                 override_redirect_ReparentNotifyEvent :: Bool}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ReparentNotifyEvent+ +instance Deserialize ReparentNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               parent <- deserialize+               x <- deserialize+               y <- deserialize+               override_redirect <- deserialize+               skip 3+               return+                 (MkReparentNotifyEvent event window parent x y override_redirect)+ +data ConfigureNotifyEvent = MkConfigureNotifyEvent{event_ConfigureNotifyEvent+                                                   :: WINDOW,+                                                   window_ConfigureNotifyEvent :: WINDOW,+                                                   above_sibling_ConfigureNotifyEvent :: WINDOW,+                                                   x_ConfigureNotifyEvent :: Int16,+                                                   y_ConfigureNotifyEvent :: Int16,+                                                   width_ConfigureNotifyEvent :: Word16,+                                                   height_ConfigureNotifyEvent :: Word16,+                                                   border_width_ConfigureNotifyEvent :: Word16,+                                                   override_redirect_ConfigureNotifyEvent :: Bool}+                          deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ConfigureNotifyEvent+ +instance Deserialize ConfigureNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               above_sibling <- deserialize+               x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               border_width <- deserialize+               override_redirect <- deserialize+               skip 1+               return+                 (MkConfigureNotifyEvent event window above_sibling x y width height+                    border_width+                    override_redirect)+ +data ConfigureRequestEvent = MkConfigureRequestEvent{stack_mode_ConfigureRequestEvent+                                                     :: StackMode,+                                                     parent_ConfigureRequestEvent :: WINDOW,+                                                     window_ConfigureRequestEvent :: WINDOW,+                                                     sibling_ConfigureRequestEvent :: WINDOW,+                                                     x_ConfigureRequestEvent :: Int16,+                                                     y_ConfigureRequestEvent :: Int16,+                                                     width_ConfigureRequestEvent :: Word16,+                                                     height_ConfigureRequestEvent :: Word16,+                                                     border_width_ConfigureRequestEvent :: Word16,+                                                     value_mask_ConfigureRequestEvent ::+                                                     [ConfigWindow]}+                           deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ConfigureRequestEvent+ +instance Deserialize ConfigureRequestEvent where+        deserialize+          = do skip 1+               stack_mode <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               parent <- deserialize+               window <- deserialize+               sibling <- deserialize+               x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               border_width <- deserialize+               value_mask <- liftM fromMask (deserialize :: Get Word16)+               return+                 (MkConfigureRequestEvent stack_mode parent window sibling x y width+                    height+                    border_width+                    value_mask)+ +data GravityNotifyEvent = MkGravityNotifyEvent{event_GravityNotifyEvent+                                               :: WINDOW,+                                               window_GravityNotifyEvent :: WINDOW,+                                               x_GravityNotifyEvent :: Int16,+                                               y_GravityNotifyEvent :: Int16}+                        deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event GravityNotifyEvent+ +instance Deserialize GravityNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               x <- deserialize+               y <- deserialize+               return (MkGravityNotifyEvent event window x y)+ +data ResizeRequestEvent = MkResizeRequestEvent{window_ResizeRequestEvent+                                               :: WINDOW,+                                               width_ResizeRequestEvent :: Word16,+                                               height_ResizeRequestEvent :: Word16}+                        deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ResizeRequestEvent+ +instance Deserialize ResizeRequestEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               window <- deserialize+               width <- deserialize+               height <- deserialize+               return (MkResizeRequestEvent window width height)+ +data Place = PlaceOnTop+           | PlaceOnBottom+           deriving Show+ +instance SimpleEnum Place where+        toValue PlaceOnTop{} = 0+        toValue PlaceOnBottom{} = 1+        fromValue 0 = PlaceOnTop+        fromValue 1 = PlaceOnBottom+ +data CirculateNotifyEvent = MkCirculateNotifyEvent{event_CirculateNotifyEvent+                                                   :: WINDOW,+                                                   window_CirculateNotifyEvent :: WINDOW,+                                                   place_CirculateNotifyEvent :: Place}+                          deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event CirculateNotifyEvent+ +instance Deserialize CirculateNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               skip 4+               place <- liftM fromValue (deserialize :: Get Word8)+               skip 3+               return (MkCirculateNotifyEvent event window place)+ +data CirculateRequestEvent = MkCirculateRequestEvent{event_CirculateRequestEvent+                                                     :: WINDOW,+                                                     window_CirculateRequestEvent :: WINDOW,+                                                     place_CirculateRequestEvent :: Place}+                           deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event CirculateRequestEvent+ +instance Deserialize CirculateRequestEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               event <- deserialize+               window <- deserialize+               skip 4+               place <- liftM fromValue (deserialize :: Get Word8)+               skip 3+               return (MkCirculateRequestEvent event window place)+ +data Property = PropertyNewValue+              | PropertyDelete+              deriving Show+ +instance SimpleEnum Property where+        toValue PropertyNewValue{} = 0+        toValue PropertyDelete{} = 1+        fromValue 0 = PropertyNewValue+        fromValue 1 = PropertyDelete+ +data PropertyNotifyEvent = MkPropertyNotifyEvent{window_PropertyNotifyEvent+                                                 :: WINDOW,+                                                 atom_PropertyNotifyEvent :: ATOM,+                                                 time_PropertyNotifyEvent :: TIMESTAMP,+                                                 state_PropertyNotifyEvent :: Property}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event PropertyNotifyEvent+ +instance Deserialize PropertyNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               window <- deserialize+               atom <- deserialize+               time <- deserialize+               state <- liftM fromValue (deserialize :: Get Word8)+               skip 3+               return (MkPropertyNotifyEvent window atom time state)+ +data SelectionClearEvent = MkSelectionClearEvent{time_SelectionClearEvent+                                                 :: TIMESTAMP,+                                                 owner_SelectionClearEvent :: WINDOW,+                                                 selection_SelectionClearEvent :: ATOM}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event SelectionClearEvent+ +instance Deserialize SelectionClearEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               time <- deserialize+               owner <- deserialize+               selection <- deserialize+               return (MkSelectionClearEvent time owner selection)+ +data Time = TimeCurrentTime+          deriving Show+ +instance SimpleEnum Time where+        toValue TimeCurrentTime{} = 0+        fromValue 0 = TimeCurrentTime+ +data Atom = AtomNone+          deriving Show+ +instance SimpleEnum Atom where+        toValue AtomNone{} = 0+        fromValue 0 = AtomNone+ +data SelectionRequestEvent = MkSelectionRequestEvent{time_SelectionRequestEvent+                                                     :: TIMESTAMP,+                                                     owner_SelectionRequestEvent :: WINDOW,+                                                     requestor_SelectionRequestEvent :: WINDOW,+                                                     selection_SelectionRequestEvent :: ATOM,+                                                     target_SelectionRequestEvent :: ATOM,+                                                     property_SelectionRequestEvent :: ATOM}+                           deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event SelectionRequestEvent+ +instance Deserialize SelectionRequestEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               time <- deserialize+               owner <- deserialize+               requestor <- deserialize+               selection <- deserialize+               target <- deserialize+               property <- deserialize+               return+                 (MkSelectionRequestEvent time owner requestor selection target+                    property)+ +data SelectionNotifyEvent = MkSelectionNotifyEvent{time_SelectionNotifyEvent+                                                   :: TIMESTAMP,+                                                   requestor_SelectionNotifyEvent :: WINDOW,+                                                   selection_SelectionNotifyEvent :: ATOM,+                                                   target_SelectionNotifyEvent :: ATOM,+                                                   property_SelectionNotifyEvent :: ATOM}+                          deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event SelectionNotifyEvent+ +instance Deserialize SelectionNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               time <- deserialize+               requestor <- deserialize+               selection <- deserialize+               target <- deserialize+               property <- deserialize+               return+                 (MkSelectionNotifyEvent time requestor selection target property)+ +data ColormapState = ColormapStateUninstalled+                   | ColormapStateInstalled+                   deriving Show+ +instance SimpleEnum ColormapState where+        toValue ColormapStateUninstalled{} = 0+        toValue ColormapStateInstalled{} = 1+        fromValue 0 = ColormapStateUninstalled+        fromValue 1 = ColormapStateInstalled+ +data Colormap = ColormapNone+              deriving Show+ +instance SimpleEnum Colormap where+        toValue ColormapNone{} = 0+        fromValue 0 = ColormapNone+ +data ColormapNotifyEvent = MkColormapNotifyEvent{window_ColormapNotifyEvent+                                                 :: WINDOW,+                                                 colormap_ColormapNotifyEvent :: COLORMAP,+                                                 new_ColormapNotifyEvent :: Bool,+                                                 state_ColormapNotifyEvent :: ColormapState}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ColormapNotifyEvent+ +instance Deserialize ColormapNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               window <- deserialize+               colormap <- deserialize+               new <- deserialize+               state <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               return (MkColormapNotifyEvent window colormap new state)+ +data ClientMessageEvent = MkClientMessageEvent{format_ClientMessageEvent+                                               :: Word8,+                                               window_ClientMessageEvent :: WINDOW,+                                               type_ClientMessageEvent :: ATOM,+                                               data_ClientMessageEvent :: ClientMessageData}+                        deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event ClientMessageEvent+ +instance Deserialize ClientMessageEvent where+        deserialize+          = do skip 1+               format <- deserialize+               skip 2+               window <- deserialize+               type_ <- deserialize+               data_ <- deserializeClientData (clientDataFormatToType format)+               return (MkClientMessageEvent format window type_ data_)+ +data Mapping = MappingModifier+             | MappingKeyboard+             | MappingPointer+             deriving Show+ +instance SimpleEnum Mapping where+        toValue MappingModifier{} = 0+        toValue MappingKeyboard{} = 1+        toValue MappingPointer{} = 2+        fromValue 0 = MappingModifier+        fromValue 1 = MappingKeyboard+        fromValue 2 = MappingPointer+ +data MappingNotifyEvent = MkMappingNotifyEvent{request_MappingNotifyEvent+                                               :: Mapping,+                                               first_keycode_MappingNotifyEvent :: KEYCODE,+                                               count_MappingNotifyEvent :: Word8}+                        deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Event MappingNotifyEvent+ +instance Deserialize MappingNotifyEvent where+        deserialize+          = do skip 1+               skip 1+               skip 2+               request <- liftM fromValue (deserialize :: Get Word8)+               first_keycode <- deserialize+               count <- deserialize+               skip 1+               return (MkMappingNotifyEvent request first_keycode count)+ +data RequestError = MkRequestError{bad_value_RequestError ::+                                   Word32,+                                   minor_opcode_RequestError :: Word16,+                                   major_opcode_RequestError :: Word8}+                  deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error RequestError+ +instance Deserialize RequestError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkRequestError bad_value minor_opcode major_opcode)+ +data ValueError = MkValueError{bad_value_ValueError :: Word32,+                               minor_opcode_ValueError :: Word16,+                               major_opcode_ValueError :: Word8}+                deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error ValueError+ +instance Deserialize ValueError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkValueError bad_value minor_opcode major_opcode)+ +data WindowError = MkWindowError{bad_value_WindowError :: Word32,+                                 minor_opcode_WindowError :: Word16,+                                 major_opcode_WindowError :: Word8}+                 deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error WindowError+ +instance Deserialize WindowError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkWindowError bad_value minor_opcode major_opcode)+ +data PixmapError = MkPixmapError{bad_value_PixmapError :: Word32,+                                 minor_opcode_PixmapError :: Word16,+                                 major_opcode_PixmapError :: Word8}+                 deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error PixmapError+ +instance Deserialize PixmapError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkPixmapError bad_value minor_opcode major_opcode)+ +data AtomError = MkAtomError{bad_value_AtomError :: Word32,+                             minor_opcode_AtomError :: Word16, major_opcode_AtomError :: Word8}+               deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error AtomError+ +instance Deserialize AtomError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkAtomError bad_value minor_opcode major_opcode)+ +data CursorError = MkCursorError{bad_value_CursorError :: Word32,+                                 minor_opcode_CursorError :: Word16,+                                 major_opcode_CursorError :: Word8}+                 deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error CursorError+ +instance Deserialize CursorError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkCursorError bad_value minor_opcode major_opcode)+ +data FontError = MkFontError{bad_value_FontError :: Word32,+                             minor_opcode_FontError :: Word16, major_opcode_FontError :: Word8}+               deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error FontError+ +instance Deserialize FontError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkFontError bad_value minor_opcode major_opcode)+ +data MatchError = MkMatchError{bad_value_MatchError :: Word32,+                               minor_opcode_MatchError :: Word16,+                               major_opcode_MatchError :: Word8}+                deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error MatchError+ +instance Deserialize MatchError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkMatchError bad_value minor_opcode major_opcode)+ +data DrawableError = MkDrawableError{bad_value_DrawableError ::+                                     Word32,+                                     minor_opcode_DrawableError :: Word16,+                                     major_opcode_DrawableError :: Word8}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error DrawableError+ +instance Deserialize DrawableError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkDrawableError bad_value minor_opcode major_opcode)+ +data AccessError = MkAccessError{bad_value_AccessError :: Word32,+                                 minor_opcode_AccessError :: Word16,+                                 major_opcode_AccessError :: Word8}+                 deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error AccessError+ +instance Deserialize AccessError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkAccessError bad_value minor_opcode major_opcode)+ +data AllocError = MkAllocError{bad_value_AllocError :: Word32,+                               minor_opcode_AllocError :: Word16,+                               major_opcode_AllocError :: Word8}+                deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error AllocError+ +instance Deserialize AllocError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkAllocError bad_value minor_opcode major_opcode)+ +data ColormapError = MkColormapError{bad_value_ColormapError ::+                                     Word32,+                                     minor_opcode_ColormapError :: Word16,+                                     major_opcode_ColormapError :: Word8}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error ColormapError+ +instance Deserialize ColormapError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkColormapError bad_value minor_opcode major_opcode)+ +data GContextError = MkGContextError{bad_value_GContextError ::+                                     Word32,+                                     minor_opcode_GContextError :: Word16,+                                     major_opcode_GContextError :: Word8}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error GContextError+ +instance Deserialize GContextError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkGContextError bad_value minor_opcode major_opcode)+ +data IDChoiceError = MkIDChoiceError{bad_value_IDChoiceError ::+                                     Word32,+                                     minor_opcode_IDChoiceError :: Word16,+                                     major_opcode_IDChoiceError :: Word8}+                   deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error IDChoiceError+ +instance Deserialize IDChoiceError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkIDChoiceError bad_value minor_opcode major_opcode)+ +data NameError = MkNameError{bad_value_NameError :: Word32,+                             minor_opcode_NameError :: Word16, major_opcode_NameError :: Word8}+               deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error NameError+ +instance Deserialize NameError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkNameError bad_value minor_opcode major_opcode)+ +data LengthError = MkLengthError{bad_value_LengthError :: Word32,+                                 minor_opcode_LengthError :: Word16,+                                 major_opcode_LengthError :: Word8}+                 deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error LengthError+ +instance Deserialize LengthError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkLengthError bad_value minor_opcode major_opcode)+ +data ImplementationError = MkImplementationError{bad_value_ImplementationError+                                                 :: Word32,+                                                 minor_opcode_ImplementationError :: Word16,+                                                 major_opcode_ImplementationError :: Word8}+                         deriving (Show, Typeable)+ +instance Graphics.XHB.Shared.Error ImplementationError+ +instance Deserialize ImplementationError where+        deserialize+          = do skip 4+               bad_value <- deserialize+               minor_opcode <- deserialize+               major_opcode <- deserialize+               skip 1+               return (MkImplementationError bad_value minor_opcode major_opcode)+ +data WindowClass = WindowClassCopyFromParent+                 | WindowClassInputOutput+                 | WindowClassInputOnly+                 deriving Show+ +instance SimpleEnum WindowClass where+        toValue WindowClassCopyFromParent{} = 0+        toValue WindowClassInputOutput{} = 1+        toValue WindowClassInputOnly{} = 2+        fromValue 0 = WindowClassCopyFromParent+        fromValue 1 = WindowClassInputOutput+        fromValue 2 = WindowClassInputOnly+ +data CW = CWBackPixmap+        | CWBackPixel+        | CWBorderPixmap+        | CWBorderPixel+        | CWBitGravity+        | CWWinGravity+        | CWBackingStore+        | CWBackingPlanes+        | CWBackingPixel+        | CWOverrideRedirect+        | CWSaveUnder+        | CWEventMask+        | CWDontPropagate+        | CWColormap+        | CWCursor+        deriving Show+ +instance BitEnum CW where+        toBit CWBackPixmap{} = 0+        toBit CWBackPixel{} = 1+        toBit CWBorderPixmap{} = 2+        toBit CWBorderPixel{} = 3+        toBit CWBitGravity{} = 4+        toBit CWWinGravity{} = 5+        toBit CWBackingStore{} = 6+        toBit CWBackingPlanes{} = 7+        toBit CWBackingPixel{} = 8+        toBit CWOverrideRedirect{} = 9+        toBit CWSaveUnder{} = 10+        toBit CWEventMask{} = 11+        toBit CWDontPropagate{} = 12+        toBit CWColormap{} = 13+        toBit CWCursor{} = 14+        fromBit 0 = CWBackPixmap+        fromBit 1 = CWBackPixel+        fromBit 2 = CWBorderPixmap+        fromBit 3 = CWBorderPixel+        fromBit 4 = CWBitGravity+        fromBit 5 = CWWinGravity+        fromBit 6 = CWBackingStore+        fromBit 7 = CWBackingPlanes+        fromBit 8 = CWBackingPixel+        fromBit 9 = CWOverrideRedirect+        fromBit 10 = CWSaveUnder+        fromBit 11 = CWEventMask+        fromBit 12 = CWDontPropagate+        fromBit 13 = CWColormap+        fromBit 14 = CWCursor+ +data BackPixmap = BackPixmapNone+                | BackPixmapParentRelative+                deriving Show+ +instance SimpleEnum BackPixmap where+        toValue BackPixmapNone{} = 0+        toValue BackPixmapParentRelative{} = 1+        fromValue 0 = BackPixmapNone+        fromValue 1 = BackPixmapParentRelative+ +data Gravity = GravityBitForget+             | GravityWinUnmap+             | GravityNorthWest+             | GravityNorth+             | GravityNorthEast+             | GravityWest+             | GravityCenter+             | GravityEast+             | GravitySouthWest+             | GravitySouth+             | GravitySouthEast+             | GravityStatic+             deriving Show+ +instance SimpleEnum Gravity where+        toValue GravityBitForget{} = 0+        toValue GravityWinUnmap{} = 0+        toValue GravityNorthWest{} = 1+        toValue GravityNorth{} = 2+        toValue GravityNorthEast{} = 3+        toValue GravityWest{} = 4+        toValue GravityCenter{} = 5+        toValue GravityEast{} = 6+        toValue GravitySouthWest{} = 7+        toValue GravitySouth{} = 8+        toValue GravitySouthEast{} = 9+        toValue GravityStatic{} = 10+        fromValue 0 = GravityBitForget+        fromValue 0 = GravityWinUnmap+        fromValue 1 = GravityNorthWest+        fromValue 2 = GravityNorth+        fromValue 3 = GravityNorthEast+        fromValue 4 = GravityWest+        fromValue 5 = GravityCenter+        fromValue 6 = GravityEast+        fromValue 7 = GravitySouthWest+        fromValue 8 = GravitySouth+        fromValue 9 = GravitySouthEast+        fromValue 10 = GravityStatic+ +data CreateWindow = MkCreateWindow{depth_CreateWindow :: Word8,+                                   wid_CreateWindow :: WINDOW, parent_CreateWindow :: WINDOW,+                                   x_CreateWindow :: Int16, y_CreateWindow :: Int16,+                                   width_CreateWindow :: Word16, height_CreateWindow :: Word16,+                                   border_width_CreateWindow :: Word16,+                                   class_CreateWindow :: WindowClass,+                                   visual_CreateWindow :: VISUALID,+                                   value_CreateWindow :: ValueParam Word32}+                  deriving (Show, Typeable)+ +instance Serialize CreateWindow where+        serialize x+          = do putWord8 1+               serialize (depth_CreateWindow x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (wid_CreateWindow x)+               serialize (parent_CreateWindow x)+               serialize (x_CreateWindow x)+               serialize (y_CreateWindow x)+               serialize (width_CreateWindow x)+               serialize (height_CreateWindow x)+               serialize (border_width_CreateWindow x)+               serialize (toValue (class_CreateWindow x) :: Word16)+               serialize (visual_CreateWindow x)+               serialize (value_CreateWindow x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (depth_CreateWindow x) + size (wid_CreateWindow x) ++              size (parent_CreateWindow x)+              + size (x_CreateWindow x)+              + size (y_CreateWindow x)+              + size (width_CreateWindow x)+              + size (height_CreateWindow x)+              + size (border_width_CreateWindow x)+              + size (undefined :: Word16)+              + size (visual_CreateWindow x)+              + size (value_CreateWindow x)+ +data ChangeWindowAttributes = MkChangeWindowAttributes{window_ChangeWindowAttributes+                                                       :: WINDOW,+                                                       value_ChangeWindowAttributes ::+                                                       ValueParam Word32}+                            deriving (Show, Typeable)+ +instance Serialize ChangeWindowAttributes where+        serialize x+          = do putWord8 2+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ChangeWindowAttributes x)+               serialize (value_ChangeWindowAttributes x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (window_ChangeWindowAttributes x) ++              size (value_ChangeWindowAttributes x)+ +data MapState = MapStateUnmapped+              | MapStateUnviewable+              | MapStateViewable+              deriving Show+ +instance SimpleEnum MapState where+        toValue MapStateUnmapped{} = 0+        toValue MapStateUnviewable{} = 1+        toValue MapStateViewable{} = 2+        fromValue 0 = MapStateUnmapped+        fromValue 1 = MapStateUnviewable+        fromValue 2 = MapStateViewable+ +data GetWindowAttributes = MkGetWindowAttributes{window_GetWindowAttributes+                                                 :: WINDOW}+                         deriving (Show, Typeable)+ +instance Serialize GetWindowAttributes where+        serialize x+          = do putWord8 3+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_GetWindowAttributes x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_GetWindowAttributes x)+ +data GetWindowAttributesReply = MkGetWindowAttributesReply{backing_store_GetWindowAttributesReply+                                                           :: BackingStore,+                                                           visual_GetWindowAttributesReply ::+                                                           VISUALID,+                                                           class_GetWindowAttributesReply ::+                                                           WindowClass,+                                                           bit_gravity_GetWindowAttributesReply ::+                                                           Gravity,+                                                           win_gravity_GetWindowAttributesReply ::+                                                           Gravity,+                                                           backing_planes_GetWindowAttributesReply+                                                           :: Word32,+                                                           backing_pixel_GetWindowAttributesReply ::+                                                           Word32,+                                                           save_under_GetWindowAttributesReply ::+                                                           Bool,+                                                           map_is_installed_GetWindowAttributesReply+                                                           :: Bool,+                                                           map_state_GetWindowAttributesReply ::+                                                           MapState,+                                                           override_redirect_GetWindowAttributesReply+                                                           :: Bool,+                                                           colormap_GetWindowAttributesReply ::+                                                           COLORMAP,+                                                           all_event_masks_GetWindowAttributesReply+                                                           :: [EventMask],+                                                           your_event_mask_GetWindowAttributesReply+                                                           :: [EventMask],+                                                           do_not_propagate_mask_GetWindowAttributesReply+                                                           :: [EventMask]}+                              deriving (Show, Typeable)+ +instance Deserialize GetWindowAttributesReply where+        deserialize+          = do skip 1+               backing_store <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               visual <- deserialize+               class_ <- liftM fromValue (deserialize :: Get Word16)+               bit_gravity <- liftM fromValue (deserialize :: Get Word8)+               win_gravity <- liftM fromValue (deserialize :: Get Word8)+               backing_planes <- deserialize+               backing_pixel <- deserialize+               save_under <- deserialize+               map_is_installed <- deserialize+               map_state <- liftM fromValue (deserialize :: Get Word8)+               override_redirect <- deserialize+               colormap <- deserialize+               all_event_masks <- liftM fromMask (deserialize :: Get Word32)+               your_event_mask <- liftM fromMask (deserialize :: Get Word32)+               do_not_propagate_mask <- liftM fromMask (deserialize :: Get Word16)+               skip 2+               let _ = isCard32 length+               return+                 (MkGetWindowAttributesReply backing_store visual class_ bit_gravity+                    win_gravity+                    backing_planes+                    backing_pixel+                    save_under+                    map_is_installed+                    map_state+                    override_redirect+                    colormap+                    all_event_masks+                    your_event_mask+                    do_not_propagate_mask)+ +data DestroyWindow = MkDestroyWindow{window_DestroyWindow ::+                                     WINDOW}+                   deriving (Show, Typeable)+ +instance Serialize DestroyWindow where+        serialize x+          = do putWord8 4+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_DestroyWindow x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_DestroyWindow x)+ +data DestroySubwindows = MkDestroySubwindows{window_DestroySubwindows+                                             :: WINDOW}+                       deriving (Show, Typeable)+ +instance Serialize DestroySubwindows where+        serialize x+          = do putWord8 5+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_DestroySubwindows x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_DestroySubwindows x)+ +data SetMode = SetModeInsert+             | SetModeDelete+             deriving Show+ +instance SimpleEnum SetMode where+        toValue SetModeInsert{} = 0+        toValue SetModeDelete{} = 1+        fromValue 0 = SetModeInsert+        fromValue 1 = SetModeDelete+ +data ChangeSaveSet = MkChangeSaveSet{mode_ChangeSaveSet :: SetMode,+                                     window_ChangeSaveSet :: WINDOW}+                   deriving (Show, Typeable)+ +instance Serialize ChangeSaveSet where+        serialize x+          = do putWord8 6+               serialize (toValue (mode_ChangeSaveSet x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ChangeSaveSet x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (window_ChangeSaveSet x)+ +data ReparentWindow = MkReparentWindow{window_ReparentWindow ::+                                       WINDOW,+                                       parent_ReparentWindow :: WINDOW, x_ReparentWindow :: Int16,+                                       y_ReparentWindow :: Int16}+                    deriving (Show, Typeable)+ +instance Serialize ReparentWindow where+        serialize x+          = do putWord8 7+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ReparentWindow x)+               serialize (parent_ReparentWindow x)+               serialize (x_ReparentWindow x)+               serialize (y_ReparentWindow x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (window_ReparentWindow x) ++              size (parent_ReparentWindow x)+              + size (x_ReparentWindow x)+              + size (y_ReparentWindow x)+ +data MapWindow = MkMapWindow{window_MapWindow :: WINDOW}+               deriving (Show, Typeable)+ +instance Serialize MapWindow where+        serialize x+          = do putWord8 8+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_MapWindow x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_MapWindow x)+ +data MapSubwindows = MkMapSubwindows{window_MapSubwindows ::+                                     WINDOW}+                   deriving (Show, Typeable)+ +instance Serialize MapSubwindows where+        serialize x+          = do putWord8 9+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_MapSubwindows x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_MapSubwindows x)+ +data UnmapWindow = MkUnmapWindow{window_UnmapWindow :: WINDOW}+                 deriving (Show, Typeable)+ +instance Serialize UnmapWindow where+        serialize x+          = do putWord8 10+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_UnmapWindow x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_UnmapWindow x)+ +data UnmapSubwindows = MkUnmapSubwindows{window_UnmapSubwindows ::+                                         WINDOW}+                     deriving (Show, Typeable)+ +instance Serialize UnmapSubwindows where+        serialize x+          = do putWord8 11+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_UnmapSubwindows x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_UnmapSubwindows x)+ +data ConfigWindow = ConfigWindowX+                  | ConfigWindowY+                  | ConfigWindowWidth+                  | ConfigWindowHeight+                  | ConfigWindowBorderWidth+                  | ConfigWindowSibling+                  | ConfigWindowStackMode+                  deriving Show+ +instance BitEnum ConfigWindow where+        toBit ConfigWindowX{} = 0+        toBit ConfigWindowY{} = 1+        toBit ConfigWindowWidth{} = 2+        toBit ConfigWindowHeight{} = 3+        toBit ConfigWindowBorderWidth{} = 4+        toBit ConfigWindowSibling{} = 5+        toBit ConfigWindowStackMode{} = 6+        fromBit 0 = ConfigWindowX+        fromBit 1 = ConfigWindowY+        fromBit 2 = ConfigWindowWidth+        fromBit 3 = ConfigWindowHeight+        fromBit 4 = ConfigWindowBorderWidth+        fromBit 5 = ConfigWindowSibling+        fromBit 6 = ConfigWindowStackMode+ +data StackMode = StackModeAbove+               | StackModeBelow+               | StackModeTopIf+               | StackModeBottomIf+               | StackModeOpposite+               deriving Show+ +instance SimpleEnum StackMode where+        toValue StackModeAbove{} = 0+        toValue StackModeBelow{} = 1+        toValue StackModeTopIf{} = 2+        toValue StackModeBottomIf{} = 3+        toValue StackModeOpposite{} = 4+        fromValue 0 = StackModeAbove+        fromValue 1 = StackModeBelow+        fromValue 2 = StackModeTopIf+        fromValue 3 = StackModeBottomIf+        fromValue 4 = StackModeOpposite+ +data ConfigureWindow = MkConfigureWindow{window_ConfigureWindow ::+                                         WINDOW,+                                         value_ConfigureWindow :: ValueParam Word16}+                     deriving (Show, Typeable)+ +instance Serialize ConfigureWindow where+        serialize x+          = do putWord8 12+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ConfigureWindow x)+               serializeValueParam 2 (value_ConfigureWindow x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (window_ConfigureWindow x) ++              (size (value_ConfigureWindow x) + 2)+ +data Circulate = CirculateRaiseLowest+               | CirculateLowerHighest+               deriving Show+ +instance SimpleEnum Circulate where+        toValue CirculateRaiseLowest{} = 0+        toValue CirculateLowerHighest{} = 1+        fromValue 0 = CirculateRaiseLowest+        fromValue 1 = CirculateLowerHighest+ +data CirculateWindow = MkCirculateWindow{direction_CirculateWindow+                                         :: Circulate,+                                         window_CirculateWindow :: WINDOW}+                     deriving (Show, Typeable)+ +instance Serialize CirculateWindow where+        serialize x+          = do putWord8 13+               serialize (toValue (direction_CirculateWindow x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_CirculateWindow x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (window_CirculateWindow x)+ +data GetGeometry = MkGetGeometry{drawable_GetGeometry :: DRAWABLE}+                 deriving (Show, Typeable)+ +instance Serialize GetGeometry where+        serialize x+          = do putWord8 14+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_GetGeometry x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (drawable_GetGeometry x)+ +data GetGeometryReply = MkGetGeometryReply{depth_GetGeometryReply+                                           :: Word8,+                                           root_GetGeometryReply :: WINDOW,+                                           x_GetGeometryReply :: Int16, y_GetGeometryReply :: Int16,+                                           width_GetGeometryReply :: Word16,+                                           height_GetGeometryReply :: Word16,+                                           border_width_GetGeometryReply :: Word16}+                      deriving (Show, Typeable)+ +instance Deserialize GetGeometryReply where+        deserialize+          = do skip 1+               depth <- deserialize+               skip 2+               length <- deserialize+               root <- deserialize+               x <- deserialize+               y <- deserialize+               width <- deserialize+               height <- deserialize+               border_width <- deserialize+               skip 2+               let _ = isCard32 length+               return+                 (MkGetGeometryReply depth root x y width height border_width)+ +data QueryTree = MkQueryTree{window_QueryTree :: WINDOW}+               deriving (Show, Typeable)+ +instance Serialize QueryTree where+        serialize x+          = do putWord8 15+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_QueryTree x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_QueryTree x)+ +data QueryTreeReply = MkQueryTreeReply{root_QueryTreeReply ::+                                       WINDOW,+                                       parent_QueryTreeReply :: WINDOW,+                                       children_len_QueryTreeReply :: Word16,+                                       children_QueryTreeReply :: [WINDOW]}+                    deriving (Show, Typeable)+ +instance Deserialize QueryTreeReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               root <- deserialize+               parent <- deserialize+               children_len <- deserialize+               skip 14+               children <- deserializeList (fromIntegral children_len)+               let _ = isCard32 length+               return (MkQueryTreeReply root parent children_len children)+ +data InternAtom = MkInternAtom{only_if_exists_InternAtom :: Bool,+                               name_len_InternAtom :: Word16, name_InternAtom :: [CChar]}+                deriving (Show, Typeable)+ +instance Serialize InternAtom where+        serialize x+          = do putWord8 16+               serialize (only_if_exists_InternAtom x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (name_len_InternAtom x)+               putSkip 2+               serializeList (name_InternAtom x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (only_if_exists_InternAtom x) ++              size (name_len_InternAtom x)+              + 2+              + sum (map size (name_InternAtom x))+ +data InternAtomReply = MkInternAtomReply{atom_InternAtomReply ::+                                         ATOM}+                     deriving (Show, Typeable)+ +instance Deserialize InternAtomReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               atom <- deserialize+               let _ = isCard32 length+               return (MkInternAtomReply atom)+ +data GetAtomName = MkGetAtomName{atom_GetAtomName :: ATOM}+                 deriving (Show, Typeable)+ +instance Serialize GetAtomName where+        serialize x+          = do putWord8 17+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (atom_GetAtomName x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (atom_GetAtomName x)+ +data GetAtomNameReply = MkGetAtomNameReply{name_len_GetAtomNameReply+                                           :: Word16,+                                           name_GetAtomNameReply :: [CChar]}+                      deriving (Show, Typeable)+ +instance Deserialize GetAtomNameReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               name_len <- deserialize+               skip 22+               name <- deserializeList (fromIntegral name_len)+               let _ = isCard32 length+               return (MkGetAtomNameReply name_len name)+ +data PropMode = PropModeReplace+              | PropModePrepend+              | PropModeAppend+              deriving Show+ +instance SimpleEnum PropMode where+        toValue PropModeReplace{} = 0+        toValue PropModePrepend{} = 1+        toValue PropModeAppend{} = 2+        fromValue 0 = PropModeReplace+        fromValue 1 = PropModePrepend+        fromValue 2 = PropModeAppend+ +data ChangeProperty = MkChangeProperty{mode_ChangeProperty ::+                                       PropMode,+                                       window_ChangeProperty :: WINDOW,+                                       property_ChangeProperty :: ATOM, type_ChangeProperty :: ATOM,+                                       format_ChangeProperty :: Word8,+                                       data_len_ChangeProperty :: Word32,+                                       data_ChangeProperty :: [Word8]}+                    deriving (Show, Typeable)+ +instance Serialize ChangeProperty where+        serialize x+          = do putWord8 18+               serialize (toValue (mode_ChangeProperty x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ChangeProperty x)+               serialize (property_ChangeProperty x)+               serialize (type_ChangeProperty x)+               serialize (format_ChangeProperty x)+               putSkip 3+               serialize (data_len_ChangeProperty x)+               serializeList (data_ChangeProperty x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (window_ChangeProperty x) ++              size (property_ChangeProperty x)+              + size (type_ChangeProperty x)+              + size (format_ChangeProperty x)+              + 3+              + size (data_len_ChangeProperty x)+              + sum (map size (data_ChangeProperty x))+ +data DeleteProperty = MkDeleteProperty{window_DeleteProperty ::+                                       WINDOW,+                                       property_DeleteProperty :: ATOM}+                    deriving (Show, Typeable)+ +instance Serialize DeleteProperty where+        serialize x+          = do putWord8 19+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_DeleteProperty x)+               serialize (property_DeleteProperty x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (window_DeleteProperty x) ++              size (property_DeleteProperty x)+ +data GetPropertyType = GetPropertyTypeAny+                     deriving Show+ +instance SimpleEnum GetPropertyType where+        toValue GetPropertyTypeAny{} = 0+        fromValue 0 = GetPropertyTypeAny+ +data GetProperty = MkGetProperty{delete_GetProperty :: Bool,+                                 window_GetProperty :: WINDOW, property_GetProperty :: ATOM,+                                 type_GetProperty :: ATOM, long_offset_GetProperty :: Word32,+                                 long_length_GetProperty :: Word32}+                 deriving (Show, Typeable)+ +instance Serialize GetProperty where+        serialize x+          = do putWord8 20+               serialize (delete_GetProperty x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_GetProperty x)+               serialize (property_GetProperty x)+               serialize (type_GetProperty x)+               serialize (long_offset_GetProperty x)+               serialize (long_length_GetProperty x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (delete_GetProperty x) + size (window_GetProperty x) ++              size (property_GetProperty x)+              + size (type_GetProperty x)+              + size (long_offset_GetProperty x)+              + size (long_length_GetProperty x)+ +data GetPropertyReply = MkGetPropertyReply{format_GetPropertyReply+                                           :: Word8,+                                           type_GetPropertyReply :: ATOM,+                                           bytes_after_GetPropertyReply :: Word32,+                                           value_len_GetPropertyReply :: Word32,+                                           value_GetPropertyReply :: [Word8]}+                      deriving (Show, Typeable)+ +instance Deserialize GetPropertyReply where+        deserialize+          = do skip 1+               format <- deserialize+               skip 2+               length <- deserialize+               type_ <- deserialize+               bytes_after <- deserialize+               value_len <- deserialize+               skip 12+               value <- deserializeList+                          (fromIntegral+                             (fromIntegral (value_len * (fromIntegral (format `div` 8)))))+               let _ = isCard32 length+               return+                 (MkGetPropertyReply format type_ bytes_after value_len value)+ +data ListProperties = MkListProperties{window_ListProperties ::+                                       WINDOW}+                    deriving (Show, Typeable)+ +instance Serialize ListProperties where+        serialize x+          = do putWord8 21+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ListProperties x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_ListProperties x)+ +data ListPropertiesReply = MkListPropertiesReply{atoms_len_ListPropertiesReply+                                                 :: Word16,+                                                 atoms_ListPropertiesReply :: [ATOM]}+                         deriving (Show, Typeable)+ +instance Deserialize ListPropertiesReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               atoms_len <- deserialize+               skip 22+               atoms <- deserializeList (fromIntegral atoms_len)+               let _ = isCard32 length+               return (MkListPropertiesReply atoms_len atoms)+ +data SetSelectionOwner = MkSetSelectionOwner{owner_SetSelectionOwner+                                             :: WINDOW,+                                             selection_SetSelectionOwner :: ATOM,+                                             time_SetSelectionOwner :: TIMESTAMP}+                       deriving (Show, Typeable)+ +instance Serialize SetSelectionOwner where+        serialize x+          = do putWord8 22+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (owner_SetSelectionOwner x)+               serialize (selection_SetSelectionOwner x)+               serialize (time_SetSelectionOwner x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (owner_SetSelectionOwner x) ++              size (selection_SetSelectionOwner x)+              + size (time_SetSelectionOwner x)+ +data GetSelectionOwner = MkGetSelectionOwner{selection_GetSelectionOwner+                                             :: ATOM}+                       deriving (Show, Typeable)+ +instance Serialize GetSelectionOwner where+        serialize x+          = do putWord8 23+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (selection_GetSelectionOwner x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (selection_GetSelectionOwner x)+ +data GetSelectionOwnerReply = MkGetSelectionOwnerReply{owner_GetSelectionOwnerReply+                                                       :: WINDOW}+                            deriving (Show, Typeable)+ +instance Deserialize GetSelectionOwnerReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               owner <- deserialize+               let _ = isCard32 length+               return (MkGetSelectionOwnerReply owner)+ +data ConvertSelection = MkConvertSelection{requestor_ConvertSelection+                                           :: WINDOW,+                                           selection_ConvertSelection :: ATOM,+                                           target_ConvertSelection :: ATOM,+                                           property_ConvertSelection :: ATOM,+                                           time_ConvertSelection :: TIMESTAMP}+                      deriving (Show, Typeable)+ +instance Serialize ConvertSelection where+        serialize x+          = do putWord8 24+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (requestor_ConvertSelection x)+               serialize (selection_ConvertSelection x)+               serialize (target_ConvertSelection x)+               serialize (property_ConvertSelection x)+               serialize (time_ConvertSelection x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (requestor_ConvertSelection x) ++              size (selection_ConvertSelection x)+              + size (target_ConvertSelection x)+              + size (property_ConvertSelection x)+              + size (time_ConvertSelection x)+ +data SendEventDest = SendEventDestPointerWindow+                   | SendEventDestItemFocus+                   deriving Show+ +instance SimpleEnum SendEventDest where+        toValue SendEventDestPointerWindow{} = 0+        toValue SendEventDestItemFocus{} = 1+        fromValue 0 = SendEventDestPointerWindow+        fromValue 1 = SendEventDestItemFocus+ +data SendEvent = MkSendEvent{propagate_SendEvent :: Bool,+                             destination_SendEvent :: WINDOW,+                             event_mask_SendEvent :: [EventMask], event_SendEvent :: [CChar]}+               deriving (Show, Typeable)+ +instance Serialize SendEvent where+        serialize x+          = do putWord8 25+               serialize (propagate_SendEvent x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (destination_SendEvent x)+               serialize (toMask (event_mask_SendEvent x) :: Word32)+               serializeList (event_SendEvent x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (propagate_SendEvent x) + size (destination_SendEvent x)+              + size (undefined :: Word32)+              + sum (map size (event_SendEvent x))+ +data GrabMode = GrabModeSync+              | GrabModeAsync+              deriving Show+ +instance SimpleEnum GrabMode where+        toValue GrabModeSync{} = 0+        toValue GrabModeAsync{} = 1+        fromValue 0 = GrabModeSync+        fromValue 1 = GrabModeAsync+ +data GrabStatus = GrabStatusSuccess+                | GrabStatusAlreadyGrabbed+                | GrabStatusInvalidTime+                | GrabStatusNotViewable+                | GrabStatusFrozen+                deriving Show+ +instance SimpleEnum GrabStatus where+        toValue GrabStatusSuccess{} = 0+        toValue GrabStatusAlreadyGrabbed{} = 1+        toValue GrabStatusInvalidTime{} = 2+        toValue GrabStatusNotViewable{} = 3+        toValue GrabStatusFrozen{} = 4+        fromValue 0 = GrabStatusSuccess+        fromValue 1 = GrabStatusAlreadyGrabbed+        fromValue 2 = GrabStatusInvalidTime+        fromValue 3 = GrabStatusNotViewable+        fromValue 4 = GrabStatusFrozen+ +data Cursor = CursorNone+            deriving Show+ +instance SimpleEnum Cursor where+        toValue CursorNone{} = 0+        fromValue 0 = CursorNone+ +data GrabPointer = MkGrabPointer{owner_events_GrabPointer :: Bool,+                                 grab_window_GrabPointer :: WINDOW,+                                 event_mask_GrabPointer :: [EventMask],+                                 pointer_mode_GrabPointer :: GrabMode,+                                 keyboard_mode_GrabPointer :: GrabMode,+                                 confine_to_GrabPointer :: WINDOW, cursor_GrabPointer :: CURSOR,+                                 time_GrabPointer :: TIMESTAMP}+                 deriving (Show, Typeable)+ +instance Serialize GrabPointer where+        serialize x+          = do putWord8 26+               serialize (owner_events_GrabPointer x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (grab_window_GrabPointer x)+               serialize (toMask (event_mask_GrabPointer x) :: Word16)+               serialize (toValue (pointer_mode_GrabPointer x) :: Word8)+               serialize (toValue (keyboard_mode_GrabPointer x) :: Word8)+               serialize (confine_to_GrabPointer x)+               serialize (cursor_GrabPointer x)+               serialize (time_GrabPointer x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (owner_events_GrabPointer x) ++              size (grab_window_GrabPointer x)+              + size (undefined :: Word16)+              + size (undefined :: Word8)+              + size (undefined :: Word8)+              + size (confine_to_GrabPointer x)+              + size (cursor_GrabPointer x)+              + size (time_GrabPointer x)+ +data GrabPointerReply = MkGrabPointerReply{status_GrabPointerReply+                                           :: GrabStatus}+                      deriving (Show, Typeable)+ +instance Deserialize GrabPointerReply where+        deserialize+          = do skip 1+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               let _ = isCard32 length+               return (MkGrabPointerReply status)+ +data UngrabPointer = MkUngrabPointer{time_UngrabPointer ::+                                     TIMESTAMP}+                   deriving (Show, Typeable)+ +instance Serialize UngrabPointer where+        serialize x+          = do putWord8 27+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (time_UngrabPointer x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (time_UngrabPointer x)+ +data ButtonIndex = ButtonIndexAny+                 | ButtonIndex1+                 | ButtonIndex2+                 | ButtonIndex3+                 | ButtonIndex4+                 | ButtonIndex5+                 deriving Show+ +instance SimpleEnum ButtonIndex where+        toValue ButtonIndexAny{} = 0+        toValue ButtonIndex1{} = 1+        toValue ButtonIndex2{} = 2+        toValue ButtonIndex3{} = 3+        toValue ButtonIndex4{} = 4+        toValue ButtonIndex5{} = 5+        fromValue 0 = ButtonIndexAny+        fromValue 1 = ButtonIndex1+        fromValue 2 = ButtonIndex2+        fromValue 3 = ButtonIndex3+        fromValue 4 = ButtonIndex4+        fromValue 5 = ButtonIndex5+ +data GrabButton = MkGrabButton{owner_events_GrabButton :: Bool,+                               grab_window_GrabButton :: WINDOW,+                               event_mask_GrabButton :: [EventMask],+                               pointer_mode_GrabButton :: GrabMode,+                               keyboard_mode_GrabButton :: GrabMode,+                               confine_to_GrabButton :: WINDOW, cursor_GrabButton :: CURSOR,+                               button_GrabButton :: ButtonIndex,+                               modifiers_GrabButton :: [ModMask]}+                deriving (Show, Typeable)+ +instance Serialize GrabButton where+        serialize x+          = do putWord8 28+               serialize (owner_events_GrabButton x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (grab_window_GrabButton x)+               serialize (toMask (event_mask_GrabButton x) :: Word16)+               serialize (toValue (pointer_mode_GrabButton x) :: Word8)+               serialize (toValue (keyboard_mode_GrabButton x) :: Word8)+               serialize (confine_to_GrabButton x)+               serialize (cursor_GrabButton x)+               serialize (toValue (button_GrabButton x) :: Word8)+               putSkip 1+               serialize (toMask (modifiers_GrabButton x) :: Word16)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (owner_events_GrabButton x) ++              size (grab_window_GrabButton x)+              + size (undefined :: Word16)+              + size (undefined :: Word8)+              + size (undefined :: Word8)+              + size (confine_to_GrabButton x)+              + size (cursor_GrabButton x)+              + size (undefined :: Word8)+              + 1+              + size (undefined :: Word16)+ +data UngrabButton = MkUngrabButton{button_UngrabButton ::+                                   ButtonIndex,+                                   grab_window_UngrabButton :: WINDOW,+                                   modifiers_UngrabButton :: [ModMask]}+                  deriving (Show, Typeable)+ +instance Serialize UngrabButton where+        serialize x+          = do putWord8 29+               serialize (toValue (button_UngrabButton x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (grab_window_UngrabButton x)+               serialize (toMask (modifiers_UngrabButton x) :: Word16)+               putSkip 2+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (grab_window_UngrabButton x)+              + size (undefined :: Word16)+              + 2+ +data ChangeActivePointerGrab = MkChangeActivePointerGrab{cursor_ChangeActivePointerGrab+                                                         :: CURSOR,+                                                         time_ChangeActivePointerGrab :: TIMESTAMP,+                                                         event_mask_ChangeActivePointerGrab ::+                                                         [EventMask]}+                             deriving (Show, Typeable)+ +instance Serialize ChangeActivePointerGrab where+        serialize x+          = do putWord8 30+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cursor_ChangeActivePointerGrab x)+               serialize (time_ChangeActivePointerGrab x)+               serialize (toMask (event_mask_ChangeActivePointerGrab x) :: Word16)+               putSkip 2+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cursor_ChangeActivePointerGrab x) ++              size (time_ChangeActivePointerGrab x)+              + size (undefined :: Word16)+              + 2+ +data GrabKeyboard = MkGrabKeyboard{owner_events_GrabKeyboard ::+                                   Bool,+                                   grab_window_GrabKeyboard :: WINDOW,+                                   time_GrabKeyboard :: TIMESTAMP,+                                   pointer_mode_GrabKeyboard :: GrabMode,+                                   keyboard_mode_GrabKeyboard :: GrabMode}+                  deriving (Show, Typeable)+ +instance Serialize GrabKeyboard where+        serialize x+          = do putWord8 31+               serialize (owner_events_GrabKeyboard x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (grab_window_GrabKeyboard x)+               serialize (time_GrabKeyboard x)+               serialize (toValue (pointer_mode_GrabKeyboard x) :: Word8)+               serialize (toValue (keyboard_mode_GrabKeyboard x) :: Word8)+               putSkip 2+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (owner_events_GrabKeyboard x) ++              size (grab_window_GrabKeyboard x)+              + size (time_GrabKeyboard x)+              + size (undefined :: Word8)+              + size (undefined :: Word8)+              + 2+ +data GrabKeyboardReply = MkGrabKeyboardReply{status_GrabKeyboardReply+                                             :: GrabStatus}+                       deriving (Show, Typeable)+ +instance Deserialize GrabKeyboardReply where+        deserialize+          = do skip 1+               status <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               let _ = isCard32 length+               return (MkGrabKeyboardReply status)+ +data UngrabKeyboard = MkUngrabKeyboard{time_UngrabKeyboard ::+                                       TIMESTAMP}+                    deriving (Show, Typeable)+ +instance Serialize UngrabKeyboard where+        serialize x+          = do putWord8 32+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (time_UngrabKeyboard x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (time_UngrabKeyboard x)+ +data Grab = GrabAny+          deriving Show+ +instance SimpleEnum Grab where+        toValue GrabAny{} = 0+        fromValue 0 = GrabAny+ +data GrabKey = MkGrabKey{owner_events_GrabKey :: Bool,+                         grab_window_GrabKey :: WINDOW, modifiers_GrabKey :: [ModMask],+                         key_GrabKey :: KEYCODE, pointer_mode_GrabKey :: GrabMode,+                         keyboard_mode_GrabKey :: GrabMode}+             deriving (Show, Typeable)+ +instance Serialize GrabKey where+        serialize x+          = do putWord8 33+               serialize (owner_events_GrabKey x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (grab_window_GrabKey x)+               serialize (toMask (modifiers_GrabKey x) :: Word16)+               serialize (key_GrabKey x)+               serialize (toValue (pointer_mode_GrabKey x) :: Word8)+               serialize (toValue (keyboard_mode_GrabKey x) :: Word8)+               putSkip 3+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (owner_events_GrabKey x) + size (grab_window_GrabKey x)+              + size (undefined :: Word16)+              + size (key_GrabKey x)+              + size (undefined :: Word8)+              + size (undefined :: Word8)+              + 3+ +data UngrabKey = MkUngrabKey{key_UngrabKey :: KEYCODE,+                             grab_window_UngrabKey :: WINDOW, modifiers_UngrabKey :: [ModMask]}+               deriving (Show, Typeable)+ +instance Serialize UngrabKey where+        serialize x+          = do putWord8 34+               serialize (key_UngrabKey x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (grab_window_UngrabKey x)+               serialize (toMask (modifiers_UngrabKey x) :: Word16)+               putSkip 2+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (key_UngrabKey x) + size (grab_window_UngrabKey x) ++              size (undefined :: Word16)+              + 2+ +data Allow = AllowAsyncPointer+           | AllowSyncPointer+           | AllowReplayPointer+           | AllowAsyncKeyboard+           | AllowSyncKeyboard+           | AllowReplayKeyboard+           | AllowAsyncBoth+           | AllowSyncBoth+           deriving Show+ +instance SimpleEnum Allow where+        toValue AllowAsyncPointer{} = 0+        toValue AllowSyncPointer{} = 1+        toValue AllowReplayPointer{} = 2+        toValue AllowAsyncKeyboard{} = 3+        toValue AllowSyncKeyboard{} = 4+        toValue AllowReplayKeyboard{} = 5+        toValue AllowAsyncBoth{} = 6+        toValue AllowSyncBoth{} = 7+        fromValue 0 = AllowAsyncPointer+        fromValue 1 = AllowSyncPointer+        fromValue 2 = AllowReplayPointer+        fromValue 3 = AllowAsyncKeyboard+        fromValue 4 = AllowSyncKeyboard+        fromValue 5 = AllowReplayKeyboard+        fromValue 6 = AllowAsyncBoth+        fromValue 7 = AllowSyncBoth+ +data AllowEvents = MkAllowEvents{mode_AllowEvents :: Allow,+                                 time_AllowEvents :: TIMESTAMP}+                 deriving (Show, Typeable)+ +instance Serialize AllowEvents where+        serialize x+          = do putWord8 35+               serialize (toValue (mode_AllowEvents x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (time_AllowEvents x)+               putSkip (requiredPadding (size x))+        size x = 3 + size (undefined :: Word8) + size (time_AllowEvents x)+ +data QueryPointer = MkQueryPointer{window_QueryPointer :: WINDOW}+                  deriving (Show, Typeable)+ +instance Serialize QueryPointer where+        serialize x+          = do putWord8 38+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_QueryPointer x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_QueryPointer x)+ +data QueryPointerReply = MkQueryPointerReply{same_screen_QueryPointerReply+                                             :: Bool,+                                             root_QueryPointerReply :: WINDOW,+                                             child_QueryPointerReply :: WINDOW,+                                             root_x_QueryPointerReply :: Int16,+                                             root_y_QueryPointerReply :: Int16,+                                             win_x_QueryPointerReply :: Int16,+                                             win_y_QueryPointerReply :: Int16,+                                             mask_QueryPointerReply :: [KeyButMask]}+                       deriving (Show, Typeable)+ +instance Deserialize QueryPointerReply where+        deserialize+          = do skip 1+               same_screen <- deserialize+               skip 2+               length <- deserialize+               root <- deserialize+               child <- deserialize+               root_x <- deserialize+               root_y <- deserialize+               win_x <- deserialize+               win_y <- deserialize+               mask <- liftM fromMask (deserialize :: Get Word16)+               skip 2+               let _ = isCard32 length+               return+                 (MkQueryPointerReply same_screen root child root_x root_y win_x+                    win_y+                    mask)+ +data TIMECOORD = MkTIMECOORD{time_TIMECOORD :: TIMESTAMP,+                             x_TIMECOORD :: Int16, y_TIMECOORD :: Int16}+               deriving (Show, Typeable)+ +instance Serialize TIMECOORD where+        serialize x+          = do serialize (time_TIMECOORD x)+               serialize (x_TIMECOORD x)+               serialize (y_TIMECOORD x)+        size x+          = size (time_TIMECOORD x) + size (x_TIMECOORD x) ++              size (y_TIMECOORD x)+ +instance Deserialize TIMECOORD where+        deserialize+          = do time <- deserialize+               x <- deserialize+               y <- deserialize+               return (MkTIMECOORD time x y)+ +data GetMotionEvents = MkGetMotionEvents{window_GetMotionEvents ::+                                         WINDOW,+                                         start_GetMotionEvents :: TIMESTAMP,+                                         stop_GetMotionEvents :: TIMESTAMP}+                     deriving (Show, Typeable)+ +instance Serialize GetMotionEvents where+        serialize x+          = do putWord8 39+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_GetMotionEvents x)+               serialize (start_GetMotionEvents x)+               serialize (stop_GetMotionEvents x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (window_GetMotionEvents x) ++              size (start_GetMotionEvents x)+              + size (stop_GetMotionEvents x)+ +data GetMotionEventsReply = MkGetMotionEventsReply{events_len_GetMotionEventsReply+                                                   :: Word32,+                                                   events_GetMotionEventsReply :: [TIMECOORD]}+                          deriving (Show, Typeable)+ +instance Deserialize GetMotionEventsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               events_len <- deserialize+               skip 20+               events <- deserializeList (fromIntegral events_len)+               let _ = isCard32 length+               return (MkGetMotionEventsReply events_len events)+ +data TranslateCoordinates = MkTranslateCoordinates{src_window_TranslateCoordinates+                                                   :: WINDOW,+                                                   dst_window_TranslateCoordinates :: WINDOW,+                                                   src_x_TranslateCoordinates :: Int16,+                                                   src_y_TranslateCoordinates :: Int16}+                          deriving (Show, Typeable)+ +instance Serialize TranslateCoordinates where+        serialize x+          = do putWord8 40+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (src_window_TranslateCoordinates x)+               serialize (dst_window_TranslateCoordinates x)+               serialize (src_x_TranslateCoordinates x)+               serialize (src_y_TranslateCoordinates x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (src_window_TranslateCoordinates x) ++              size (dst_window_TranslateCoordinates x)+              + size (src_x_TranslateCoordinates x)+              + size (src_y_TranslateCoordinates x)+ +data TranslateCoordinatesReply = MkTranslateCoordinatesReply{same_screen_TranslateCoordinatesReply+                                                             :: Bool,+                                                             child_TranslateCoordinatesReply ::+                                                             WINDOW,+                                                             dst_x_TranslateCoordinatesReply ::+                                                             Word16,+                                                             dst_y_TranslateCoordinatesReply ::+                                                             Word16}+                               deriving (Show, Typeable)+ +instance Deserialize TranslateCoordinatesReply where+        deserialize+          = do skip 1+               same_screen <- deserialize+               skip 2+               length <- deserialize+               child <- deserialize+               dst_x <- deserialize+               dst_y <- deserialize+               let _ = isCard32 length+               return (MkTranslateCoordinatesReply same_screen child dst_x dst_y)+ +data WarpPointer = MkWarpPointer{src_window_WarpPointer :: WINDOW,+                                 dst_window_WarpPointer :: WINDOW, src_x_WarpPointer :: Int16,+                                 src_y_WarpPointer :: Int16, src_width_WarpPointer :: Word16,+                                 src_height_WarpPointer :: Word16, dst_x_WarpPointer :: Int16,+                                 dst_y_WarpPointer :: Int16}+                 deriving (Show, Typeable)+ +instance Serialize WarpPointer where+        serialize x+          = do putWord8 41+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (src_window_WarpPointer x)+               serialize (dst_window_WarpPointer x)+               serialize (src_x_WarpPointer x)+               serialize (src_y_WarpPointer x)+               serialize (src_width_WarpPointer x)+               serialize (src_height_WarpPointer x)+               serialize (dst_x_WarpPointer x)+               serialize (dst_y_WarpPointer x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (src_window_WarpPointer x) ++              size (dst_window_WarpPointer x)+              + size (src_x_WarpPointer x)+              + size (src_y_WarpPointer x)+              + size (src_width_WarpPointer x)+              + size (src_height_WarpPointer x)+              + size (dst_x_WarpPointer x)+              + size (dst_y_WarpPointer x)+ +data InputFocus = InputFocusNone+                | InputFocusPointerRoot+                | InputFocusParent+                | InputFocusFollowKeyboard+                deriving Show+ +instance SimpleEnum InputFocus where+        toValue InputFocusNone{} = 0+        toValue InputFocusPointerRoot{} = 1+        toValue InputFocusParent{} = 2+        toValue InputFocusFollowKeyboard{} = 3+        fromValue 0 = InputFocusNone+        fromValue 1 = InputFocusPointerRoot+        fromValue 2 = InputFocusParent+        fromValue 3 = InputFocusFollowKeyboard+ +data SetInputFocus = MkSetInputFocus{revert_to_SetInputFocus ::+                                     InputFocus,+                                     focus_SetInputFocus :: WINDOW, time_SetInputFocus :: TIMESTAMP}+                   deriving (Show, Typeable)+ +instance Serialize SetInputFocus where+        serialize x+          = do putWord8 42+               serialize (toValue (revert_to_SetInputFocus x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (focus_SetInputFocus x)+               serialize (time_SetInputFocus x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (focus_SetInputFocus x) ++              size (time_SetInputFocus x)+ +data GetInputFocus = MkGetInputFocus{}+                   deriving (Show, Typeable)+ +instance Serialize GetInputFocus where+        serialize x+          = do putWord8 43+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data GetInputFocusReply = MkGetInputFocusReply{revert_to_GetInputFocusReply+                                               :: InputFocus,+                                               focus_GetInputFocusReply :: WINDOW}+                        deriving (Show, Typeable)+ +instance Deserialize GetInputFocusReply where+        deserialize+          = do skip 1+               revert_to <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               focus <- deserialize+               let _ = isCard32 length+               return (MkGetInputFocusReply revert_to focus)+ +data QueryKeymap = MkQueryKeymap{}+                 deriving (Show, Typeable)+ +instance Serialize QueryKeymap where+        serialize x+          = do putWord8 44+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data QueryKeymapReply = MkQueryKeymapReply{keys_QueryKeymapReply ::+                                           [Word8]}+                      deriving (Show, Typeable)+ +instance Deserialize QueryKeymapReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               keys <- deserializeList (fromIntegral 32)+               let _ = isCard32 length+               return (MkQueryKeymapReply keys)+ +data OpenFont = MkOpenFont{fid_OpenFont :: FONT,+                           name_len_OpenFont :: Word16, name_OpenFont :: [CChar]}+              deriving (Show, Typeable)+ +instance Serialize OpenFont where+        serialize x+          = do putWord8 45+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (fid_OpenFont x)+               serialize (name_len_OpenFont x)+               putSkip 2+               serializeList (name_OpenFont x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (fid_OpenFont x) + size (name_len_OpenFont x) + 2 ++              sum (map size (name_OpenFont x))+ +data CloseFont = MkCloseFont{font_CloseFont :: FONT}+               deriving (Show, Typeable)+ +instance Serialize CloseFont where+        serialize x+          = do putWord8 46+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (font_CloseFont x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (font_CloseFont x)+ +data FontDraw = FontDrawLeftToRight+              | FontDrawRightToLeft+              deriving Show+ +instance SimpleEnum FontDraw where+        toValue FontDrawLeftToRight{} = 0+        toValue FontDrawRightToLeft{} = 1+        fromValue 0 = FontDrawLeftToRight+        fromValue 1 = FontDrawRightToLeft+ +data FONTPROP = MkFONTPROP{name_FONTPROP :: ATOM,+                           value_FONTPROP :: Word32}+              deriving (Show, Typeable)+ +instance Serialize FONTPROP where+        serialize x+          = do serialize (name_FONTPROP x)+               serialize (value_FONTPROP x)+        size x = size (name_FONTPROP x) + size (value_FONTPROP x)+ +instance Deserialize FONTPROP where+        deserialize+          = do name <- deserialize+               value <- deserialize+               return (MkFONTPROP name value)+ +data CHARINFO = MkCHARINFO{left_side_bearing_CHARINFO :: Int16,+                           right_side_bearing_CHARINFO :: Int16,+                           character_width_CHARINFO :: Int16, ascent_CHARINFO :: Int16,+                           descent_CHARINFO :: Int16, attributes_CHARINFO :: Word16}+              deriving (Show, Typeable)+ +instance Serialize CHARINFO where+        serialize x+          = do serialize (left_side_bearing_CHARINFO x)+               serialize (right_side_bearing_CHARINFO x)+               serialize (character_width_CHARINFO x)+               serialize (ascent_CHARINFO x)+               serialize (descent_CHARINFO x)+               serialize (attributes_CHARINFO x)+        size x+          = size (left_side_bearing_CHARINFO x) ++              size (right_side_bearing_CHARINFO x)+              + size (character_width_CHARINFO x)+              + size (ascent_CHARINFO x)+              + size (descent_CHARINFO x)+              + size (attributes_CHARINFO x)+ +instance Deserialize CHARINFO where+        deserialize+          = do left_side_bearing <- deserialize+               right_side_bearing <- deserialize+               character_width <- deserialize+               ascent <- deserialize+               descent <- deserialize+               attributes <- deserialize+               return+                 (MkCHARINFO left_side_bearing right_side_bearing character_width+                    ascent+                    descent+                    attributes)+ +data QueryFont = MkQueryFont{font_QueryFont :: FONTABLE}+               deriving (Show, Typeable)+ +instance Serialize QueryFont where+        serialize x+          = do putWord8 47+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (font_QueryFont x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (font_QueryFont x)+ +data QueryFontReply = MkQueryFontReply{min_bounds_QueryFontReply ::+                                       CHARINFO,+                                       max_bounds_QueryFontReply :: CHARINFO,+                                       min_char_or_byte2_QueryFontReply :: Word16,+                                       max_char_or_byte2_QueryFontReply :: Word16,+                                       default_char_QueryFontReply :: Word16,+                                       properties_len_QueryFontReply :: Word16,+                                       draw_direction_QueryFontReply :: FontDraw,+                                       min_byte1_QueryFontReply :: Word8,+                                       max_byte1_QueryFontReply :: Word8,+                                       all_chars_exist_QueryFontReply :: Bool,+                                       font_ascent_QueryFontReply :: Int16,+                                       font_descent_QueryFontReply :: Int16,+                                       char_infos_len_QueryFontReply :: Word32,+                                       properties_QueryFontReply :: [FONTPROP],+                                       char_infos_QueryFontReply :: [CHARINFO]}+                    deriving (Show, Typeable)+ +instance Deserialize QueryFontReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               min_bounds <- deserialize+               skip 4+               max_bounds <- deserialize+               skip 4+               min_char_or_byte2 <- deserialize+               max_char_or_byte2 <- deserialize+               default_char <- deserialize+               properties_len <- deserialize+               draw_direction <- liftM fromValue (deserialize :: Get Word8)+               min_byte1 <- deserialize+               max_byte1 <- deserialize+               all_chars_exist <- deserialize+               font_ascent <- deserialize+               font_descent <- deserialize+               char_infos_len <- deserialize+               properties <- deserializeList (fromIntegral properties_len)+               char_infos <- deserializeList (fromIntegral char_infos_len)+               let _ = isCard32 length+               return+                 (MkQueryFontReply min_bounds max_bounds min_char_or_byte2+                    max_char_or_byte2+                    default_char+                    properties_len+                    draw_direction+                    min_byte1+                    max_byte1+                    all_chars_exist+                    font_ascent+                    font_descent+                    char_infos_len+                    properties+                    char_infos)+ +data QueryTextExtents = MkQueryTextExtents{font_QueryTextExtents ::+                                           FONTABLE,+                                           string_QueryTextExtents :: [CHAR2B]}+                      deriving (Show, Typeable)+ +odd_length_QueryTextExtents :: QueryTextExtents -> Bool+odd_length_QueryTextExtents x+  = wordToBool (string_len_QueryTextExtents x .&. 1)++string_len_QueryTextExtents :: QueryTextExtents -> Word8+string_len_QueryTextExtents x = genericLength $ string_QueryTextExtents x+ +instance Serialize QueryTextExtents where+        serialize x+          = do putWord8 48+               serialize (odd_length_QueryTextExtents x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (font_QueryTextExtents x)+               serializeList (string_QueryTextExtents x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (odd_length_QueryTextExtents x) ++              size (font_QueryTextExtents x)+              + sum (map size (string_QueryTextExtents x))+ +data QueryTextExtentsReply = MkQueryTextExtentsReply{draw_direction_QueryTextExtentsReply+                                                     :: FontDraw,+                                                     font_ascent_QueryTextExtentsReply :: Int16,+                                                     font_descent_QueryTextExtentsReply :: Int16,+                                                     overall_ascent_QueryTextExtentsReply :: Int16,+                                                     overall_descent_QueryTextExtentsReply :: Int16,+                                                     overall_width_QueryTextExtentsReply :: Int32,+                                                     overall_left_QueryTextExtentsReply :: Int32,+                                                     overall_right_QueryTextExtentsReply :: Int32}+                           deriving (Show, Typeable)+ +instance Deserialize QueryTextExtentsReply where+        deserialize+          = do skip 1+               draw_direction <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               font_ascent <- deserialize+               font_descent <- deserialize+               overall_ascent <- deserialize+               overall_descent <- deserialize+               overall_width <- deserialize+               overall_left <- deserialize+               overall_right <- deserialize+               let _ = isCard32 length+               return+                 (MkQueryTextExtentsReply draw_direction font_ascent font_descent+                    overall_ascent+                    overall_descent+                    overall_width+                    overall_left+                    overall_right)+ +data STR = MkSTR{name_len_STR :: Word8, name_STR :: [CChar]}+         deriving (Show, Typeable)+ +instance Serialize STR where+        serialize x+          = do serialize (name_len_STR x)+               serializeList (name_STR x)+        size x = size (name_len_STR x) + sum (map size (name_STR x))+ +instance Deserialize STR where+        deserialize+          = do name_len <- deserialize+               name <- deserializeList (fromIntegral name_len)+               return (MkSTR name_len name)+ +data ListFonts = MkListFonts{max_names_ListFonts :: Word16,+                             pattern_len_ListFonts :: Word16, pattern_ListFonts :: [CChar]}+               deriving (Show, Typeable)+ +instance Serialize ListFonts where+        serialize x+          = do putWord8 49+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (max_names_ListFonts x)+               serialize (pattern_len_ListFonts x)+               serializeList (pattern_ListFonts x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (max_names_ListFonts x) ++              size (pattern_len_ListFonts x)+              + sum (map size (pattern_ListFonts x))+ +data ListFontsReply = MkListFontsReply{names_len_ListFontsReply ::+                                       Word16,+                                       names_ListFontsReply :: [STR]}+                    deriving (Show, Typeable)+ +instance Deserialize ListFontsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               names_len <- deserialize+               skip 22+               names <- deserializeList (fromIntegral names_len)+               let _ = isCard32 length+               return (MkListFontsReply names_len names)+ +data ListFontsWithInfo = MkListFontsWithInfo{max_names_ListFontsWithInfo+                                             :: Word16,+                                             pattern_len_ListFontsWithInfo :: Word16,+                                             pattern_ListFontsWithInfo :: [CChar]}+                       deriving (Show, Typeable)+ +instance Serialize ListFontsWithInfo where+        serialize x+          = do putWord8 50+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (max_names_ListFontsWithInfo x)+               serialize (pattern_len_ListFontsWithInfo x)+               serializeList (pattern_ListFontsWithInfo x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (max_names_ListFontsWithInfo x) ++              size (pattern_len_ListFontsWithInfo x)+              + sum (map size (pattern_ListFontsWithInfo x))+ +data ListFontsWithInfoReply = MkListFontsWithInfoReply{name_len_ListFontsWithInfoReply+                                                       :: Word8,+                                                       min_bounds_ListFontsWithInfoReply ::+                                                       CHARINFO,+                                                       max_bounds_ListFontsWithInfoReply ::+                                                       CHARINFO,+                                                       min_char_or_byte2_ListFontsWithInfoReply ::+                                                       Word16,+                                                       max_char_or_byte2_ListFontsWithInfoReply ::+                                                       Word16,+                                                       default_char_ListFontsWithInfoReply ::+                                                       Word16,+                                                       properties_len_ListFontsWithInfoReply ::+                                                       Word16,+                                                       draw_direction_ListFontsWithInfoReply ::+                                                       FontDraw,+                                                       min_byte1_ListFontsWithInfoReply :: Word8,+                                                       max_byte1_ListFontsWithInfoReply :: Word8,+                                                       all_chars_exist_ListFontsWithInfoReply ::+                                                       Bool,+                                                       font_ascent_ListFontsWithInfoReply :: Int16,+                                                       font_descent_ListFontsWithInfoReply :: Int16,+                                                       replies_hint_ListFontsWithInfoReply ::+                                                       Word32,+                                                       properties_ListFontsWithInfoReply ::+                                                       [FONTPROP],+                                                       name_ListFontsWithInfoReply :: [CChar]}+                            deriving (Show, Typeable)+ +instance Deserialize ListFontsWithInfoReply where+        deserialize+          = do skip 1+               name_len <- deserialize+               skip 2+               length <- deserialize+               min_bounds <- deserialize+               skip 4+               max_bounds <- deserialize+               skip 4+               min_char_or_byte2 <- deserialize+               max_char_or_byte2 <- deserialize+               default_char <- deserialize+               properties_len <- deserialize+               draw_direction <- liftM fromValue (deserialize :: Get Word8)+               min_byte1 <- deserialize+               max_byte1 <- deserialize+               all_chars_exist <- deserialize+               font_ascent <- deserialize+               font_descent <- deserialize+               replies_hint <- deserialize+               properties <- deserializeList (fromIntegral properties_len)+               name <- deserializeList (fromIntegral name_len)+               let _ = isCard32 length+               return+                 (MkListFontsWithInfoReply name_len min_bounds max_bounds+                    min_char_or_byte2+                    max_char_or_byte2+                    default_char+                    properties_len+                    draw_direction+                    min_byte1+                    max_byte1+                    all_chars_exist+                    font_ascent+                    font_descent+                    replies_hint+                    properties+                    name)+ +data SetFontPath = MkSetFontPath{font_qty_SetFontPath :: Word16,+                                 path_SetFontPath :: [CChar]}+                 deriving (Show, Typeable)+ +instance Serialize SetFontPath where+        serialize x+          = do putWord8 51+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (font_qty_SetFontPath x)+               serializeList (path_SetFontPath x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (font_qty_SetFontPath x) ++              sum (map size (path_SetFontPath x))+ +data GetFontPath = MkGetFontPath{}+                 deriving (Show, Typeable)+ +instance Serialize GetFontPath where+        serialize x+          = do putWord8 52+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data GetFontPathReply = MkGetFontPathReply{path_len_GetFontPathReply+                                           :: Word16,+                                           path_GetFontPathReply :: [STR]}+                      deriving (Show, Typeable)+ +instance Deserialize GetFontPathReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               path_len <- deserialize+               skip 22+               path <- deserializeList (fromIntegral path_len)+               let _ = isCard32 length+               return (MkGetFontPathReply path_len path)+ +data CreatePixmap = MkCreatePixmap{depth_CreatePixmap :: Word8,+                                   pid_CreatePixmap :: PIXMAP, drawable_CreatePixmap :: DRAWABLE,+                                   width_CreatePixmap :: Word16, height_CreatePixmap :: Word16}+                  deriving (Show, Typeable)+ +instance Serialize CreatePixmap where+        serialize x+          = do putWord8 53+               serialize (depth_CreatePixmap x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (pid_CreatePixmap x)+               serialize (drawable_CreatePixmap x)+               serialize (width_CreatePixmap x)+               serialize (height_CreatePixmap x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (depth_CreatePixmap x) + size (pid_CreatePixmap x) ++              size (drawable_CreatePixmap x)+              + size (width_CreatePixmap x)+              + size (height_CreatePixmap x)+ +data FreePixmap = MkFreePixmap{pixmap_FreePixmap :: PIXMAP}+                deriving (Show, Typeable)+ +instance Serialize FreePixmap where+        serialize x+          = do putWord8 54+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (pixmap_FreePixmap x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (pixmap_FreePixmap x)+ +data GC = GCFunction+        | GCPlaneMask+        | GCForeground+        | GCBackground+        | GCLineWidth+        | GCLineStyle+        | GCCapStyle+        | GCJoinStyle+        | GCFillStyle+        | GCFillRule+        | GCTile+        | GCStipple+        | GCTileStippleOriginX+        | GCTileStippleOriginY+        | GCFont+        | GCSubwindowMode+        | GCGraphicsExposures+        | GCClipOriginX+        | GCClipOriginY+        | GCClipMask+        | GCDashOffset+        | GCDashList+        | GCArcMode+        deriving Show+ +instance BitEnum GC where+        toBit GCFunction{} = 0+        toBit GCPlaneMask{} = 1+        toBit GCForeground{} = 2+        toBit GCBackground{} = 3+        toBit GCLineWidth{} = 4+        toBit GCLineStyle{} = 5+        toBit GCCapStyle{} = 6+        toBit GCJoinStyle{} = 7+        toBit GCFillStyle{} = 8+        toBit GCFillRule{} = 9+        toBit GCTile{} = 10+        toBit GCStipple{} = 11+        toBit GCTileStippleOriginX{} = 12+        toBit GCTileStippleOriginY{} = 13+        toBit GCFont{} = 14+        toBit GCSubwindowMode{} = 15+        toBit GCGraphicsExposures{} = 16+        toBit GCClipOriginX{} = 17+        toBit GCClipOriginY{} = 18+        toBit GCClipMask{} = 19+        toBit GCDashOffset{} = 20+        toBit GCDashList{} = 21+        toBit GCArcMode{} = 22+        fromBit 0 = GCFunction+        fromBit 1 = GCPlaneMask+        fromBit 2 = GCForeground+        fromBit 3 = GCBackground+        fromBit 4 = GCLineWidth+        fromBit 5 = GCLineStyle+        fromBit 6 = GCCapStyle+        fromBit 7 = GCJoinStyle+        fromBit 8 = GCFillStyle+        fromBit 9 = GCFillRule+        fromBit 10 = GCTile+        fromBit 11 = GCStipple+        fromBit 12 = GCTileStippleOriginX+        fromBit 13 = GCTileStippleOriginY+        fromBit 14 = GCFont+        fromBit 15 = GCSubwindowMode+        fromBit 16 = GCGraphicsExposures+        fromBit 17 = GCClipOriginX+        fromBit 18 = GCClipOriginY+        fromBit 19 = GCClipMask+        fromBit 20 = GCDashOffset+        fromBit 21 = GCDashList+        fromBit 22 = GCArcMode+ +data GX = GXclear+        | GXand+        | GXandReverse+        | GXcopy+        | GXandInverted+        | GXnoop+        | GXxor+        | GXor+        | GXnor+        | GXequiv+        | GXinvert+        | GXorReverse+        | GXcopyInverted+        | GXorInverted+        | GXnand+        | GXset+        deriving Show+ +instance SimpleEnum GX where+        toValue GXclear{} = 0+        toValue GXand{} = 1+        toValue GXandReverse{} = 2+        toValue GXcopy{} = 3+        toValue GXandInverted{} = 4+        toValue GXnoop{} = 5+        toValue GXxor{} = 6+        toValue GXor{} = 7+        toValue GXnor{} = 8+        toValue GXequiv{} = 9+        toValue GXinvert{} = 10+        toValue GXorReverse{} = 11+        toValue GXcopyInverted{} = 12+        toValue GXorInverted{} = 13+        toValue GXnand{} = 14+        toValue GXset{} = 15+        fromValue 0 = GXclear+        fromValue 1 = GXand+        fromValue 2 = GXandReverse+        fromValue 3 = GXcopy+        fromValue 4 = GXandInverted+        fromValue 5 = GXnoop+        fromValue 6 = GXxor+        fromValue 7 = GXor+        fromValue 8 = GXnor+        fromValue 9 = GXequiv+        fromValue 10 = GXinvert+        fromValue 11 = GXorReverse+        fromValue 12 = GXcopyInverted+        fromValue 13 = GXorInverted+        fromValue 14 = GXnand+        fromValue 15 = GXset+ +data LineStyle = LineStyleSolid+               | LineStyleOnOffDash+               | LineStyleDoubleDash+               deriving Show+ +instance SimpleEnum LineStyle where+        toValue LineStyleSolid{} = 0+        toValue LineStyleOnOffDash{} = 1+        toValue LineStyleDoubleDash{} = 2+        fromValue 0 = LineStyleSolid+        fromValue 1 = LineStyleOnOffDash+        fromValue 2 = LineStyleDoubleDash+ +data CapStyle = CapStyleNotLast+              | CapStyleButt+              | CapStyleRound+              | CapStyleProjecting+              deriving Show+ +instance SimpleEnum CapStyle where+        toValue CapStyleNotLast{} = 0+        toValue CapStyleButt{} = 1+        toValue CapStyleRound{} = 2+        toValue CapStyleProjecting{} = 3+        fromValue 0 = CapStyleNotLast+        fromValue 1 = CapStyleButt+        fromValue 2 = CapStyleRound+        fromValue 3 = CapStyleProjecting+ +data JoinStyle = JoinStyleMiter+               | JoinStyleRound+               | JoinStyleBevel+               deriving Show+ +instance SimpleEnum JoinStyle where+        toValue JoinStyleMiter{} = 0+        toValue JoinStyleRound{} = 1+        toValue JoinStyleBevel{} = 2+        fromValue 0 = JoinStyleMiter+        fromValue 1 = JoinStyleRound+        fromValue 2 = JoinStyleBevel+ +data FillStyle = FillStyleSolid+               | FillStyleTiled+               | FillStyleStippled+               | FillStyleOpaqueStippled+               deriving Show+ +instance SimpleEnum FillStyle where+        toValue FillStyleSolid{} = 0+        toValue FillStyleTiled{} = 1+        toValue FillStyleStippled{} = 2+        toValue FillStyleOpaqueStippled{} = 3+        fromValue 0 = FillStyleSolid+        fromValue 1 = FillStyleTiled+        fromValue 2 = FillStyleStippled+        fromValue 3 = FillStyleOpaqueStippled+ +data FillRule = FillRuleEvenOdd+              | FillRuleWinding+              deriving Show+ +instance SimpleEnum FillRule where+        toValue FillRuleEvenOdd{} = 0+        toValue FillRuleWinding{} = 1+        fromValue 0 = FillRuleEvenOdd+        fromValue 1 = FillRuleWinding+ +data SubwindowMode = SubwindowModeClipByChildren+                   | SubwindowModeIncludeInferiors+                   deriving Show+ +instance SimpleEnum SubwindowMode where+        toValue SubwindowModeClipByChildren{} = 0+        toValue SubwindowModeIncludeInferiors{} = 1+        fromValue 0 = SubwindowModeClipByChildren+        fromValue 1 = SubwindowModeIncludeInferiors+ +data ArcMode = ArcModeChord+             | ArcModePieSlice+             deriving Show+ +instance SimpleEnum ArcMode where+        toValue ArcModeChord{} = 0+        toValue ArcModePieSlice{} = 1+        fromValue 0 = ArcModeChord+        fromValue 1 = ArcModePieSlice+ +data CreateGC = MkCreateGC{cid_CreateGC :: GCONTEXT,+                           drawable_CreateGC :: DRAWABLE, value_CreateGC :: ValueParam Word32}+              deriving (Show, Typeable)+ +instance Serialize CreateGC where+        serialize x+          = do putWord8 55+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cid_CreateGC x)+               serialize (drawable_CreateGC x)+               serialize (value_CreateGC x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cid_CreateGC x) + size (drawable_CreateGC x) ++              size (value_CreateGC x)+ +data ChangeGC = MkChangeGC{gc_ChangeGC :: GCONTEXT,+                           value_ChangeGC :: ValueParam Word32}+              deriving (Show, Typeable)+ +instance Serialize ChangeGC where+        serialize x+          = do putWord8 56+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (gc_ChangeGC x)+               serialize (value_ChangeGC x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (gc_ChangeGC x) + size (value_ChangeGC x)+ +data CopyGC = MkCopyGC{src_gc_CopyGC :: GCONTEXT,+                       dst_gc_CopyGC :: GCONTEXT, value_mask_CopyGC :: [GC]}+            deriving (Show, Typeable)+ +instance Serialize CopyGC where+        serialize x+          = do putWord8 57+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (src_gc_CopyGC x)+               serialize (dst_gc_CopyGC x)+               serialize (toMask (value_mask_CopyGC x) :: Word32)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (src_gc_CopyGC x) + size (dst_gc_CopyGC x) ++              size (undefined :: Word32)+ +data SetDashes = MkSetDashes{gc_SetDashes :: GCONTEXT,+                             dash_offset_SetDashes :: Word16, dashes_len_SetDashes :: Word16,+                             dashes_SetDashes :: [Word8]}+               deriving (Show, Typeable)+ +instance Serialize SetDashes where+        serialize x+          = do putWord8 58+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (gc_SetDashes x)+               serialize (dash_offset_SetDashes x)+               serialize (dashes_len_SetDashes x)+               serializeList (dashes_SetDashes x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (gc_SetDashes x) + size (dash_offset_SetDashes x) ++              size (dashes_len_SetDashes x)+              + sum (map size (dashes_SetDashes x))+ +data ClipOrdering = ClipOrderingUnsorted+                  | ClipOrderingYSorted+                  | ClipOrderingYXSorted+                  | ClipOrderingYXBanded+                  deriving Show+ +instance SimpleEnum ClipOrdering where+        toValue ClipOrderingUnsorted{} = 0+        toValue ClipOrderingYSorted{} = 1+        toValue ClipOrderingYXSorted{} = 2+        toValue ClipOrderingYXBanded{} = 3+        fromValue 0 = ClipOrderingUnsorted+        fromValue 1 = ClipOrderingYSorted+        fromValue 2 = ClipOrderingYXSorted+        fromValue 3 = ClipOrderingYXBanded+ +data SetClipRectangles = MkSetClipRectangles{ordering_SetClipRectangles+                                             :: ClipOrdering,+                                             gc_SetClipRectangles :: GCONTEXT,+                                             clip_x_origin_SetClipRectangles :: Int16,+                                             clip_y_origin_SetClipRectangles :: Int16,+                                             rectangles_SetClipRectangles :: [RECTANGLE]}+                       deriving (Show, Typeable)+ +instance Serialize SetClipRectangles where+        serialize x+          = do putWord8 59+               serialize (toValue (ordering_SetClipRectangles x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (gc_SetClipRectangles x)+               serialize (clip_x_origin_SetClipRectangles x)+               serialize (clip_y_origin_SetClipRectangles x)+               serializeList (rectangles_SetClipRectangles x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (gc_SetClipRectangles x) ++              size (clip_x_origin_SetClipRectangles x)+              + size (clip_y_origin_SetClipRectangles x)+              + sum (map size (rectangles_SetClipRectangles x))+ +data FreeGC = MkFreeGC{gc_FreeGC :: GCONTEXT}+            deriving (Show, Typeable)+ +instance Serialize FreeGC where+        serialize x+          = do putWord8 60+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (gc_FreeGC x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (gc_FreeGC x)+ +data ClearArea = MkClearArea{exposures_ClearArea :: Bool,+                             window_ClearArea :: WINDOW, x_ClearArea :: Int16,+                             y_ClearArea :: Int16, width_ClearArea :: Word16,+                             height_ClearArea :: Word16}+               deriving (Show, Typeable)+ +instance Serialize ClearArea where+        serialize x+          = do putWord8 61+               serialize (exposures_ClearArea x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ClearArea x)+               serialize (x_ClearArea x)+               serialize (y_ClearArea x)+               serialize (width_ClearArea x)+               serialize (height_ClearArea x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (exposures_ClearArea x) + size (window_ClearArea x) ++              size (x_ClearArea x)+              + size (y_ClearArea x)+              + size (width_ClearArea x)+              + size (height_ClearArea x)+ +data CopyArea = MkCopyArea{src_drawable_CopyArea :: DRAWABLE,+                           dst_drawable_CopyArea :: DRAWABLE, gc_CopyArea :: GCONTEXT,+                           src_x_CopyArea :: Int16, src_y_CopyArea :: Int16,+                           dst_x_CopyArea :: Int16, dst_y_CopyArea :: Int16,+                           width_CopyArea :: Word16, height_CopyArea :: Word16}+              deriving (Show, Typeable)+ +instance Serialize CopyArea where+        serialize x+          = do putWord8 62+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (src_drawable_CopyArea x)+               serialize (dst_drawable_CopyArea x)+               serialize (gc_CopyArea x)+               serialize (src_x_CopyArea x)+               serialize (src_y_CopyArea x)+               serialize (dst_x_CopyArea x)+               serialize (dst_y_CopyArea x)+               serialize (width_CopyArea x)+               serialize (height_CopyArea x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (src_drawable_CopyArea x) ++              size (dst_drawable_CopyArea x)+              + size (gc_CopyArea x)+              + size (src_x_CopyArea x)+              + size (src_y_CopyArea x)+              + size (dst_x_CopyArea x)+              + size (dst_y_CopyArea x)+              + size (width_CopyArea x)+              + size (height_CopyArea x)+ +data CopyPlane = MkCopyPlane{src_drawable_CopyPlane :: DRAWABLE,+                             dst_drawable_CopyPlane :: DRAWABLE, gc_CopyPlane :: GCONTEXT,+                             src_x_CopyPlane :: Int16, src_y_CopyPlane :: Int16,+                             dst_x_CopyPlane :: Int16, dst_y_CopyPlane :: Int16,+                             width_CopyPlane :: Word16, height_CopyPlane :: Word16,+                             bit_plane_CopyPlane :: Word32}+               deriving (Show, Typeable)+ +instance Serialize CopyPlane where+        serialize x+          = do putWord8 63+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (src_drawable_CopyPlane x)+               serialize (dst_drawable_CopyPlane x)+               serialize (gc_CopyPlane x)+               serialize (src_x_CopyPlane x)+               serialize (src_y_CopyPlane x)+               serialize (dst_x_CopyPlane x)+               serialize (dst_y_CopyPlane x)+               serialize (width_CopyPlane x)+               serialize (height_CopyPlane x)+               serialize (bit_plane_CopyPlane x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (src_drawable_CopyPlane x) ++              size (dst_drawable_CopyPlane x)+              + size (gc_CopyPlane x)+              + size (src_x_CopyPlane x)+              + size (src_y_CopyPlane x)+              + size (dst_x_CopyPlane x)+              + size (dst_y_CopyPlane x)+              + size (width_CopyPlane x)+              + size (height_CopyPlane x)+              + size (bit_plane_CopyPlane x)+ +data CoordMode = CoordModeOrigin+               | CoordModePrevious+               deriving Show+ +instance SimpleEnum CoordMode where+        toValue CoordModeOrigin{} = 0+        toValue CoordModePrevious{} = 1+        fromValue 0 = CoordModeOrigin+        fromValue 1 = CoordModePrevious+ +data PolyPoint = MkPolyPoint{coordinate_mode_PolyPoint ::+                             CoordMode,+                             drawable_PolyPoint :: DRAWABLE, gc_PolyPoint :: GCONTEXT,+                             points_PolyPoint :: [POINT]}+               deriving (Show, Typeable)+ +instance Serialize PolyPoint where+        serialize x+          = do putWord8 64+               serialize (toValue (coordinate_mode_PolyPoint x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyPoint x)+               serialize (gc_PolyPoint x)+               serializeList (points_PolyPoint x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (drawable_PolyPoint x) ++              size (gc_PolyPoint x)+              + sum (map size (points_PolyPoint x))+ +data PolyLine = MkPolyLine{coordinate_mode_PolyLine :: CoordMode,+                           drawable_PolyLine :: DRAWABLE, gc_PolyLine :: GCONTEXT,+                           points_PolyLine :: [POINT]}+              deriving (Show, Typeable)+ +instance Serialize PolyLine where+        serialize x+          = do putWord8 65+               serialize (toValue (coordinate_mode_PolyLine x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyLine x)+               serialize (gc_PolyLine x)+               serializeList (points_PolyLine x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (drawable_PolyLine x) ++              size (gc_PolyLine x)+              + sum (map size (points_PolyLine x))+ +data SEGMENT = MkSEGMENT{x1_SEGMENT :: Int16, y1_SEGMENT :: Int16,+                         x2_SEGMENT :: Int16, y2_SEGMENT :: Int16}+             deriving (Show, Typeable)+ +instance Serialize SEGMENT where+        serialize x+          = do serialize (x1_SEGMENT x)+               serialize (y1_SEGMENT x)+               serialize (x2_SEGMENT x)+               serialize (y2_SEGMENT x)+        size x+          = size (x1_SEGMENT x) + size (y1_SEGMENT x) + size (x2_SEGMENT x) ++              size (y2_SEGMENT x)+ +instance Deserialize SEGMENT where+        deserialize+          = do x1 <- deserialize+               y1 <- deserialize+               x2 <- deserialize+               y2 <- deserialize+               return (MkSEGMENT x1 y1 x2 y2)+ +data PolySegment = MkPolySegment{drawable_PolySegment :: DRAWABLE,+                                 gc_PolySegment :: GCONTEXT, segments_PolySegment :: [SEGMENT]}+                 deriving (Show, Typeable)+ +instance Serialize PolySegment where+        serialize x+          = do putWord8 66+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolySegment x)+               serialize (gc_PolySegment x)+               serializeList (segments_PolySegment x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolySegment x) + size (gc_PolySegment x) ++              sum (map size (segments_PolySegment x))+ +data PolyRectangle = MkPolyRectangle{drawable_PolyRectangle ::+                                     DRAWABLE,+                                     gc_PolyRectangle :: GCONTEXT,+                                     rectangles_PolyRectangle :: [RECTANGLE]}+                   deriving (Show, Typeable)+ +instance Serialize PolyRectangle where+        serialize x+          = do putWord8 67+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyRectangle x)+               serialize (gc_PolyRectangle x)+               serializeList (rectangles_PolyRectangle x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolyRectangle x) ++              size (gc_PolyRectangle x)+              + sum (map size (rectangles_PolyRectangle x))+ +data PolyArc = MkPolyArc{drawable_PolyArc :: DRAWABLE,+                         gc_PolyArc :: GCONTEXT, arcs_PolyArc :: [ARC]}+             deriving (Show, Typeable)+ +instance Serialize PolyArc where+        serialize x+          = do putWord8 68+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyArc x)+               serialize (gc_PolyArc x)+               serializeList (arcs_PolyArc x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolyArc x) + size (gc_PolyArc x) ++              sum (map size (arcs_PolyArc x))+ +data PolyShape = PolyShapeComplex+               | PolyShapeNonconvex+               | PolyShapeConvex+               deriving Show+ +instance SimpleEnum PolyShape where+        toValue PolyShapeComplex{} = 0+        toValue PolyShapeNonconvex{} = 1+        toValue PolyShapeConvex{} = 2+        fromValue 0 = PolyShapeComplex+        fromValue 1 = PolyShapeNonconvex+        fromValue 2 = PolyShapeConvex+ +data FillPoly = MkFillPoly{drawable_FillPoly :: DRAWABLE,+                           gc_FillPoly :: GCONTEXT, shape_FillPoly :: PolyShape,+                           coordinate_mode_FillPoly :: CoordMode, points_FillPoly :: [POINT]}+              deriving (Show, Typeable)+ +instance Serialize FillPoly where+        serialize x+          = do putWord8 69+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_FillPoly x)+               serialize (gc_FillPoly x)+               serialize (toValue (shape_FillPoly x) :: Word8)+               serialize (toValue (coordinate_mode_FillPoly x) :: Word8)+               putSkip 2+               serializeList (points_FillPoly x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_FillPoly x) + size (gc_FillPoly x) ++              size (undefined :: Word8)+              + size (undefined :: Word8)+              + 2+              + sum (map size (points_FillPoly x))+ +data PolyFillRectangle = MkPolyFillRectangle{drawable_PolyFillRectangle+                                             :: DRAWABLE,+                                             gc_PolyFillRectangle :: GCONTEXT,+                                             rectangles_PolyFillRectangle :: [RECTANGLE]}+                       deriving (Show, Typeable)+ +instance Serialize PolyFillRectangle where+        serialize x+          = do putWord8 70+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyFillRectangle x)+               serialize (gc_PolyFillRectangle x)+               serializeList (rectangles_PolyFillRectangle x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolyFillRectangle x) ++              size (gc_PolyFillRectangle x)+              + sum (map size (rectangles_PolyFillRectangle x))+ +data PolyFillArc = MkPolyFillArc{drawable_PolyFillArc :: DRAWABLE,+                                 gc_PolyFillArc :: GCONTEXT, arcs_PolyFillArc :: [ARC]}+                 deriving (Show, Typeable)+ +instance Serialize PolyFillArc where+        serialize x+          = do putWord8 71+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyFillArc x)+               serialize (gc_PolyFillArc x)+               serializeList (arcs_PolyFillArc x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolyFillArc x) + size (gc_PolyFillArc x) ++              sum (map size (arcs_PolyFillArc x))+ +data ImageFormat = ImageFormatXYBitmap+                 | ImageFormatXYPixmap+                 | ImageFormatZPixmap+                 deriving Show+ +instance SimpleEnum ImageFormat where+        toValue ImageFormatXYBitmap{} = 0+        toValue ImageFormatXYPixmap{} = 1+        toValue ImageFormatZPixmap{} = 2+        fromValue 0 = ImageFormatXYBitmap+        fromValue 1 = ImageFormatXYPixmap+        fromValue 2 = ImageFormatZPixmap+ +data PutImage = MkPutImage{format_PutImage :: ImageFormat,+                           drawable_PutImage :: DRAWABLE, gc_PutImage :: GCONTEXT,+                           width_PutImage :: Word16, height_PutImage :: Word16,+                           dst_x_PutImage :: Int16, dst_y_PutImage :: Int16,+                           left_pad_PutImage :: Word8, depth_PutImage :: Word8,+                           data_PutImage :: [Word8]}+              deriving (Show, Typeable)+ +instance Serialize PutImage where+        serialize x+          = do putWord8 72+               serialize (toValue (format_PutImage x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PutImage x)+               serialize (gc_PutImage x)+               serialize (width_PutImage x)+               serialize (height_PutImage x)+               serialize (dst_x_PutImage x)+               serialize (dst_y_PutImage x)+               serialize (left_pad_PutImage x)+               serialize (depth_PutImage x)+               putSkip 2+               serializeList (data_PutImage x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (drawable_PutImage x) ++              size (gc_PutImage x)+              + size (width_PutImage x)+              + size (height_PutImage x)+              + size (dst_x_PutImage x)+              + size (dst_y_PutImage x)+              + size (left_pad_PutImage x)+              + size (depth_PutImage x)+              + 2+              + sum (map size (data_PutImage x))+ +data GetImage = MkGetImage{format_GetImage :: ImageFormat,+                           drawable_GetImage :: DRAWABLE, x_GetImage :: Int16,+                           y_GetImage :: Int16, width_GetImage :: Word16,+                           height_GetImage :: Word16, plane_mask_GetImage :: Word32}+              deriving (Show, Typeable)+ +instance Serialize GetImage where+        serialize x+          = do putWord8 73+               serialize (toValue (format_GetImage x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_GetImage x)+               serialize (x_GetImage x)+               serialize (y_GetImage x)+               serialize (width_GetImage x)+               serialize (height_GetImage x)+               serialize (plane_mask_GetImage x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (drawable_GetImage x) ++              size (x_GetImage x)+              + size (y_GetImage x)+              + size (width_GetImage x)+              + size (height_GetImage x)+              + size (plane_mask_GetImage x)+ +data GetImageReply = MkGetImageReply{depth_GetImageReply :: Word8,+                                     visual_GetImageReply :: VISUALID,+                                     data_GetImageReply :: [Word8]}+                   deriving (Show, Typeable)+ +instance Deserialize GetImageReply where+        deserialize+          = do skip 1+               depth <- deserialize+               skip 2+               length <- deserialize+               visual <- deserialize+               skip 20+               data_ <- deserializeList (fromIntegral (fromIntegral (length * 4)))+               let _ = isCard32 length+               return (MkGetImageReply depth visual data_)+ +data PolyText8 = MkPolyText8{drawable_PolyText8 :: DRAWABLE,+                             gc_PolyText8 :: GCONTEXT, x_PolyText8 :: Int16,+                             y_PolyText8 :: Int16, items_PolyText8 :: [Word8]}+               deriving (Show, Typeable)+ +instance Serialize PolyText8 where+        serialize x+          = do putWord8 74+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyText8 x)+               serialize (gc_PolyText8 x)+               serialize (x_PolyText8 x)+               serialize (y_PolyText8 x)+               serializeList (items_PolyText8 x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolyText8 x) + size (gc_PolyText8 x) ++              size (x_PolyText8 x)+              + size (y_PolyText8 x)+              + sum (map size (items_PolyText8 x))+ +data PolyText16 = MkPolyText16{drawable_PolyText16 :: DRAWABLE,+                               gc_PolyText16 :: GCONTEXT, x_PolyText16 :: Int16,+                               y_PolyText16 :: Int16, items_PolyText16 :: [Word8]}+                deriving (Show, Typeable)+ +instance Serialize PolyText16 where+        serialize x+          = do putWord8 75+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_PolyText16 x)+               serialize (gc_PolyText16 x)+               serialize (x_PolyText16 x)+               serialize (y_PolyText16 x)+               serializeList (items_PolyText16 x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (drawable_PolyText16 x) + size (gc_PolyText16 x) ++              size (x_PolyText16 x)+              + size (y_PolyText16 x)+              + sum (map size (items_PolyText16 x))+ +data ImageText8 = MkImageText8{string_len_ImageText8 :: Word8,+                               drawable_ImageText8 :: DRAWABLE, gc_ImageText8 :: GCONTEXT,+                               x_ImageText8 :: Int16, y_ImageText8 :: Int16,+                               string_ImageText8 :: [CChar]}+                deriving (Show, Typeable)+ +instance Serialize ImageText8 where+        serialize x+          = do putWord8 76+               serialize (string_len_ImageText8 x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_ImageText8 x)+               serialize (gc_ImageText8 x)+               serialize (x_ImageText8 x)+               serialize (y_ImageText8 x)+               serializeList (string_ImageText8 x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (string_len_ImageText8 x) + size (drawable_ImageText8 x)+              + size (gc_ImageText8 x)+              + size (x_ImageText8 x)+              + size (y_ImageText8 x)+              + sum (map size (string_ImageText8 x))+ +data ImageText16 = MkImageText16{string_len_ImageText16 :: Word8,+                                 drawable_ImageText16 :: DRAWABLE, gc_ImageText16 :: GCONTEXT,+                                 x_ImageText16 :: Int16, y_ImageText16 :: Int16,+                                 string_ImageText16 :: [CHAR2B]}+                 deriving (Show, Typeable)+ +instance Serialize ImageText16 where+        serialize x+          = do putWord8 77+               serialize (string_len_ImageText16 x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_ImageText16 x)+               serialize (gc_ImageText16 x)+               serialize (x_ImageText16 x)+               serialize (y_ImageText16 x)+               serializeList (string_ImageText16 x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (string_len_ImageText16 x) ++              size (drawable_ImageText16 x)+              + size (gc_ImageText16 x)+              + size (x_ImageText16 x)+              + size (y_ImageText16 x)+              + sum (map size (string_ImageText16 x))+ +data ColormapAlloc = ColormapAllocNone+                   | ColormapAllocAll+                   deriving Show+ +instance SimpleEnum ColormapAlloc where+        toValue ColormapAllocNone{} = 0+        toValue ColormapAllocAll{} = 1+        fromValue 0 = ColormapAllocNone+        fromValue 1 = ColormapAllocAll+ +data CreateColormap = MkCreateColormap{alloc_CreateColormap ::+                                       ColormapAlloc,+                                       mid_CreateColormap :: COLORMAP,+                                       window_CreateColormap :: WINDOW,+                                       visual_CreateColormap :: VISUALID}+                    deriving (Show, Typeable)+ +instance Serialize CreateColormap where+        serialize x+          = do putWord8 78+               serialize (toValue (alloc_CreateColormap x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (mid_CreateColormap x)+               serialize (window_CreateColormap x)+               serialize (visual_CreateColormap x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (mid_CreateColormap x) ++              size (window_CreateColormap x)+              + size (visual_CreateColormap x)+ +data FreeColormap = MkFreeColormap{cmap_FreeColormap :: COLORMAP}+                  deriving (Show, Typeable)+ +instance Serialize FreeColormap where+        serialize x+          = do putWord8 79+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_FreeColormap x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (cmap_FreeColormap x)+ +data CopyColormapAndFree = MkCopyColormapAndFree{mid_CopyColormapAndFree+                                                 :: COLORMAP,+                                                 src_cmap_CopyColormapAndFree :: COLORMAP}+                         deriving (Show, Typeable)+ +instance Serialize CopyColormapAndFree where+        serialize x+          = do putWord8 80+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (mid_CopyColormapAndFree x)+               serialize (src_cmap_CopyColormapAndFree x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (mid_CopyColormapAndFree x) ++              size (src_cmap_CopyColormapAndFree x)+ +data InstallColormap = MkInstallColormap{cmap_InstallColormap ::+                                         COLORMAP}+                     deriving (Show, Typeable)+ +instance Serialize InstallColormap where+        serialize x+          = do putWord8 81+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_InstallColormap x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (cmap_InstallColormap x)+ +data UninstallColormap = MkUninstallColormap{cmap_UninstallColormap+                                             :: COLORMAP}+                       deriving (Show, Typeable)+ +instance Serialize UninstallColormap where+        serialize x+          = do putWord8 82+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_UninstallColormap x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (cmap_UninstallColormap x)+ +data ListInstalledColormaps = MkListInstalledColormaps{window_ListInstalledColormaps+                                                       :: WINDOW}+                            deriving (Show, Typeable)+ +instance Serialize ListInstalledColormaps where+        serialize x+          = do putWord8 83+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (window_ListInstalledColormaps x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (window_ListInstalledColormaps x)+ +data ListInstalledColormapsReply = MkListInstalledColormapsReply{cmaps_len_ListInstalledColormapsReply+                                                                 :: Word16,+                                                                 cmaps_ListInstalledColormapsReply+                                                                 :: [COLORMAP]}+                                 deriving (Show, Typeable)+ +instance Deserialize ListInstalledColormapsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               cmaps_len <- deserialize+               skip 22+               cmaps <- deserializeList (fromIntegral cmaps_len)+               let _ = isCard32 length+               return (MkListInstalledColormapsReply cmaps_len cmaps)+ +data AllocColor = MkAllocColor{cmap_AllocColor :: COLORMAP,+                               red_AllocColor :: Word16, green_AllocColor :: Word16,+                               blue_AllocColor :: Word16}+                deriving (Show, Typeable)+ +instance Serialize AllocColor where+        serialize x+          = do putWord8 84+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_AllocColor x)+               serialize (red_AllocColor x)+               serialize (green_AllocColor x)+               serialize (blue_AllocColor x)+               putSkip 2+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cmap_AllocColor x) + size (red_AllocColor x) ++              size (green_AllocColor x)+              + size (blue_AllocColor x)+              + 2+ +data AllocColorReply = MkAllocColorReply{red_AllocColorReply ::+                                         Word16,+                                         green_AllocColorReply :: Word16,+                                         blue_AllocColorReply :: Word16,+                                         pixel_AllocColorReply :: Word32}+                     deriving (Show, Typeable)+ +instance Deserialize AllocColorReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               red <- deserialize+               green <- deserialize+               blue <- deserialize+               skip 2+               pixel <- deserialize+               let _ = isCard32 length+               return (MkAllocColorReply red green blue pixel)+ +data AllocNamedColor = MkAllocNamedColor{cmap_AllocNamedColor ::+                                         COLORMAP,+                                         name_len_AllocNamedColor :: Word16,+                                         name_AllocNamedColor :: [CChar]}+                     deriving (Show, Typeable)+ +instance Serialize AllocNamedColor where+        serialize x+          = do putWord8 85+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_AllocNamedColor x)+               serialize (name_len_AllocNamedColor x)+               putSkip 2+               serializeList (name_AllocNamedColor x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cmap_AllocNamedColor x) ++              size (name_len_AllocNamedColor x)+              + 2+              + sum (map size (name_AllocNamedColor x))+ +data AllocNamedColorReply = MkAllocNamedColorReply{pixel_AllocNamedColorReply+                                                   :: Word32,+                                                   exact_red_AllocNamedColorReply :: Word16,+                                                   exact_green_AllocNamedColorReply :: Word16,+                                                   exact_blue_AllocNamedColorReply :: Word16,+                                                   visual_red_AllocNamedColorReply :: Word16,+                                                   visual_green_AllocNamedColorReply :: Word16,+                                                   visual_blue_AllocNamedColorReply :: Word16}+                          deriving (Show, Typeable)+ +instance Deserialize AllocNamedColorReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               pixel <- deserialize+               exact_red <- deserialize+               exact_green <- deserialize+               exact_blue <- deserialize+               visual_red <- deserialize+               visual_green <- deserialize+               visual_blue <- deserialize+               let _ = isCard32 length+               return+                 (MkAllocNamedColorReply pixel exact_red exact_green exact_blue+                    visual_red+                    visual_green+                    visual_blue)+ +data AllocColorCells = MkAllocColorCells{contiguous_AllocColorCells+                                         :: Bool,+                                         cmap_AllocColorCells :: COLORMAP,+                                         colors_AllocColorCells :: Word16,+                                         planes_AllocColorCells :: Word16}+                     deriving (Show, Typeable)+ +instance Serialize AllocColorCells where+        serialize x+          = do putWord8 86+               serialize (contiguous_AllocColorCells x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_AllocColorCells x)+               serialize (colors_AllocColorCells x)+               serialize (planes_AllocColorCells x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (contiguous_AllocColorCells x) ++              size (cmap_AllocColorCells x)+              + size (colors_AllocColorCells x)+              + size (planes_AllocColorCells x)+ +data AllocColorCellsReply = MkAllocColorCellsReply{pixels_len_AllocColorCellsReply+                                                   :: Word16,+                                                   masks_len_AllocColorCellsReply :: Word16,+                                                   pixels_AllocColorCellsReply :: [Word32],+                                                   masks_AllocColorCellsReply :: [Word32]}+                          deriving (Show, Typeable)+ +instance Deserialize AllocColorCellsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               pixels_len <- deserialize+               masks_len <- deserialize+               skip 20+               pixels <- deserializeList (fromIntegral pixels_len)+               masks <- deserializeList (fromIntegral masks_len)+               let _ = isCard32 length+               return (MkAllocColorCellsReply pixels_len masks_len pixels masks)+ +data AllocColorPlanes = MkAllocColorPlanes{contiguous_AllocColorPlanes+                                           :: Bool,+                                           cmap_AllocColorPlanes :: COLORMAP,+                                           colors_AllocColorPlanes :: Word16,+                                           reds_AllocColorPlanes :: Word16,+                                           greens_AllocColorPlanes :: Word16,+                                           blues_AllocColorPlanes :: Word16}+                      deriving (Show, Typeable)+ +instance Serialize AllocColorPlanes where+        serialize x+          = do putWord8 87+               serialize (contiguous_AllocColorPlanes x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_AllocColorPlanes x)+               serialize (colors_AllocColorPlanes x)+               serialize (reds_AllocColorPlanes x)+               serialize (greens_AllocColorPlanes x)+               serialize (blues_AllocColorPlanes x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (contiguous_AllocColorPlanes x) ++              size (cmap_AllocColorPlanes x)+              + size (colors_AllocColorPlanes x)+              + size (reds_AllocColorPlanes x)+              + size (greens_AllocColorPlanes x)+              + size (blues_AllocColorPlanes x)+ +data AllocColorPlanesReply = MkAllocColorPlanesReply{pixels_len_AllocColorPlanesReply+                                                     :: Word16,+                                                     red_mask_AllocColorPlanesReply :: Word32,+                                                     green_mask_AllocColorPlanesReply :: Word32,+                                                     blue_mask_AllocColorPlanesReply :: Word32,+                                                     pixels_AllocColorPlanesReply :: [Word32]}+                           deriving (Show, Typeable)+ +instance Deserialize AllocColorPlanesReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               pixels_len <- deserialize+               skip 2+               red_mask <- deserialize+               green_mask <- deserialize+               blue_mask <- deserialize+               skip 8+               pixels <- deserializeList (fromIntegral pixels_len)+               let _ = isCard32 length+               return+                 (MkAllocColorPlanesReply pixels_len red_mask green_mask blue_mask+                    pixels)+ +data FreeColors = MkFreeColors{cmap_FreeColors :: COLORMAP,+                               plane_mask_FreeColors :: Word32, pixels_FreeColors :: [Word32]}+                deriving (Show, Typeable)+ +instance Serialize FreeColors where+        serialize x+          = do putWord8 88+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_FreeColors x)+               serialize (plane_mask_FreeColors x)+               serializeList (pixels_FreeColors x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cmap_FreeColors x) + size (plane_mask_FreeColors x)+              + sum (map size (pixels_FreeColors x))+ +data ColorFlag = ColorFlagRed+               | ColorFlagGreen+               | ColorFlagBlue+               deriving Show+ +instance BitEnum ColorFlag where+        toBit ColorFlagRed{} = 0+        toBit ColorFlagGreen{} = 1+        toBit ColorFlagBlue{} = 2+        fromBit 0 = ColorFlagRed+        fromBit 1 = ColorFlagGreen+        fromBit 2 = ColorFlagBlue+ +data COLORITEM = MkCOLORITEM{pixel_COLORITEM :: Word32,+                             red_COLORITEM :: Word16, green_COLORITEM :: Word16,+                             blue_COLORITEM :: Word16, flags_COLORITEM :: [ColorFlag]}+               deriving (Show, Typeable)+ +instance Serialize COLORITEM where+        serialize x+          = do serialize (pixel_COLORITEM x)+               serialize (red_COLORITEM x)+               serialize (green_COLORITEM x)+               serialize (blue_COLORITEM x)+               serialize (toMask (flags_COLORITEM x) :: Word8)+               putSkip 1+        size x+          = size (pixel_COLORITEM x) + size (red_COLORITEM x) ++              size (green_COLORITEM x)+              + size (blue_COLORITEM x)+              + size (undefined :: Word8)+              + 1+ +instance Deserialize COLORITEM where+        deserialize+          = do pixel <- deserialize+               red <- deserialize+               green <- deserialize+               blue <- deserialize+               flags <- liftM fromMask (deserialize :: Get Word8)+               skip 1+               return (MkCOLORITEM pixel red green blue flags)+ +data StoreColors = MkStoreColors{cmap_StoreColors :: COLORMAP,+                                 items_StoreColors :: [COLORITEM]}+                 deriving (Show, Typeable)+ +instance Serialize StoreColors where+        serialize x+          = do putWord8 89+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_StoreColors x)+               serializeList (items_StoreColors x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cmap_StoreColors x) ++              sum (map size (items_StoreColors x))+ +data StoreNamedColor = MkStoreNamedColor{flags_StoreNamedColor ::+                                         [ColorFlag],+                                         cmap_StoreNamedColor :: COLORMAP,+                                         pixel_StoreNamedColor :: Word32,+                                         name_len_StoreNamedColor :: Word16,+                                         name_StoreNamedColor :: [CChar]}+                     deriving (Show, Typeable)+ +instance Serialize StoreNamedColor where+        serialize x+          = do putWord8 90+               serialize (toMask (flags_StoreNamedColor x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_StoreNamedColor x)+               serialize (pixel_StoreNamedColor x)+               serialize (name_len_StoreNamedColor x)+               putSkip 2+               serializeList (name_StoreNamedColor x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (cmap_StoreNamedColor x) ++              size (pixel_StoreNamedColor x)+              + size (name_len_StoreNamedColor x)+              + 2+              + sum (map size (name_StoreNamedColor x))+ +data RGB = MkRGB{red_RGB :: Word16, green_RGB :: Word16,+                 blue_RGB :: Word16}+         deriving (Show, Typeable)+ +instance Serialize RGB where+        serialize x+          = do serialize (red_RGB x)+               serialize (green_RGB x)+               serialize (blue_RGB x)+               putSkip 2+        size x+          = size (red_RGB x) + size (green_RGB x) + size (blue_RGB x) + 2+ +instance Deserialize RGB where+        deserialize+          = do red <- deserialize+               green <- deserialize+               blue <- deserialize+               skip 2+               return (MkRGB red green blue)+ +data QueryColors = MkQueryColors{cmap_QueryColors :: COLORMAP,+                                 pixels_QueryColors :: [Word32]}+                 deriving (Show, Typeable)+ +instance Serialize QueryColors where+        serialize x+          = do putWord8 91+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_QueryColors x)+               serializeList (pixels_QueryColors x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cmap_QueryColors x) ++              sum (map size (pixels_QueryColors x))+ +data QueryColorsReply = MkQueryColorsReply{colors_len_QueryColorsReply+                                           :: Word16,+                                           colors_QueryColorsReply :: [RGB]}+                      deriving (Show, Typeable)+ +instance Deserialize QueryColorsReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               colors_len <- deserialize+               skip 22+               colors <- deserializeList (fromIntegral colors_len)+               let _ = isCard32 length+               return (MkQueryColorsReply colors_len colors)+ +data LookupColor = MkLookupColor{cmap_LookupColor :: COLORMAP,+                                 name_len_LookupColor :: Word16, name_LookupColor :: [CChar]}+                 deriving (Show, Typeable)+ +instance Serialize LookupColor where+        serialize x+          = do putWord8 92+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cmap_LookupColor x)+               serialize (name_len_LookupColor x)+               putSkip 2+               serializeList (name_LookupColor x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cmap_LookupColor x) + size (name_len_LookupColor x)+              + 2+              + sum (map size (name_LookupColor x))+ +data LookupColorReply = MkLookupColorReply{exact_red_LookupColorReply+                                           :: Word16,+                                           exact_green_LookupColorReply :: Word16,+                                           exact_blue_LookupColorReply :: Word16,+                                           visual_red_LookupColorReply :: Word16,+                                           visual_green_LookupColorReply :: Word16,+                                           visual_blue_LookupColorReply :: Word16}+                      deriving (Show, Typeable)+ +instance Deserialize LookupColorReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               exact_red <- deserialize+               exact_green <- deserialize+               exact_blue <- deserialize+               visual_red <- deserialize+               visual_green <- deserialize+               visual_blue <- deserialize+               let _ = isCard32 length+               return+                 (MkLookupColorReply exact_red exact_green exact_blue visual_red+                    visual_green+                    visual_blue)+ +data Pixmap = PixmapNone+            deriving Show+ +instance SimpleEnum Pixmap where+        toValue PixmapNone{} = 0+        fromValue 0 = PixmapNone+ +data CreateCursor = MkCreateCursor{cid_CreateCursor :: CURSOR,+                                   source_CreateCursor :: PIXMAP, mask_CreateCursor :: PIXMAP,+                                   fore_red_CreateCursor :: Word16,+                                   fore_green_CreateCursor :: Word16,+                                   fore_blue_CreateCursor :: Word16,+                                   back_red_CreateCursor :: Word16,+                                   back_green_CreateCursor :: Word16,+                                   back_blue_CreateCursor :: Word16, x_CreateCursor :: Word16,+                                   y_CreateCursor :: Word16}+                  deriving (Show, Typeable)+ +instance Serialize CreateCursor where+        serialize x+          = do putWord8 93+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cid_CreateCursor x)+               serialize (source_CreateCursor x)+               serialize (mask_CreateCursor x)+               serialize (fore_red_CreateCursor x)+               serialize (fore_green_CreateCursor x)+               serialize (fore_blue_CreateCursor x)+               serialize (back_red_CreateCursor x)+               serialize (back_green_CreateCursor x)+               serialize (back_blue_CreateCursor x)+               serialize (x_CreateCursor x)+               serialize (y_CreateCursor x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cid_CreateCursor x) + size (source_CreateCursor x)+              + size (mask_CreateCursor x)+              + size (fore_red_CreateCursor x)+              + size (fore_green_CreateCursor x)+              + size (fore_blue_CreateCursor x)+              + size (back_red_CreateCursor x)+              + size (back_green_CreateCursor x)+              + size (back_blue_CreateCursor x)+              + size (x_CreateCursor x)+              + size (y_CreateCursor x)+ +data Font = FontNone+          deriving Show+ +instance SimpleEnum Font where+        toValue FontNone{} = 0+        fromValue 0 = FontNone+ +data CreateGlyphCursor = MkCreateGlyphCursor{cid_CreateGlyphCursor+                                             :: CURSOR,+                                             source_font_CreateGlyphCursor :: FONT,+                                             mask_font_CreateGlyphCursor :: FONT,+                                             source_char_CreateGlyphCursor :: Word16,+                                             mask_char_CreateGlyphCursor :: Word16,+                                             fore_red_CreateGlyphCursor :: Word16,+                                             fore_green_CreateGlyphCursor :: Word16,+                                             fore_blue_CreateGlyphCursor :: Word16,+                                             back_red_CreateGlyphCursor :: Word16,+                                             back_green_CreateGlyphCursor :: Word16,+                                             back_blue_CreateGlyphCursor :: Word16}+                       deriving (Show, Typeable)+ +instance Serialize CreateGlyphCursor where+        serialize x+          = do putWord8 94+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cid_CreateGlyphCursor x)+               serialize (source_font_CreateGlyphCursor x)+               serialize (mask_font_CreateGlyphCursor x)+               serialize (source_char_CreateGlyphCursor x)+               serialize (mask_char_CreateGlyphCursor x)+               serialize (fore_red_CreateGlyphCursor x)+               serialize (fore_green_CreateGlyphCursor x)+               serialize (fore_blue_CreateGlyphCursor x)+               serialize (back_red_CreateGlyphCursor x)+               serialize (back_green_CreateGlyphCursor x)+               serialize (back_blue_CreateGlyphCursor x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cid_CreateGlyphCursor x) ++              size (source_font_CreateGlyphCursor x)+              + size (mask_font_CreateGlyphCursor x)+              + size (source_char_CreateGlyphCursor x)+              + size (mask_char_CreateGlyphCursor x)+              + size (fore_red_CreateGlyphCursor x)+              + size (fore_green_CreateGlyphCursor x)+              + size (fore_blue_CreateGlyphCursor x)+              + size (back_red_CreateGlyphCursor x)+              + size (back_green_CreateGlyphCursor x)+              + size (back_blue_CreateGlyphCursor x)+ +data FreeCursor = MkFreeCursor{cursor_FreeCursor :: CURSOR}+                deriving (Show, Typeable)+ +instance Serialize FreeCursor where+        serialize x+          = do putWord8 95+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cursor_FreeCursor x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (cursor_FreeCursor x)+ +data RecolorCursor = MkRecolorCursor{cursor_RecolorCursor ::+                                     CURSOR,+                                     fore_red_RecolorCursor :: Word16,+                                     fore_green_RecolorCursor :: Word16,+                                     fore_blue_RecolorCursor :: Word16,+                                     back_red_RecolorCursor :: Word16,+                                     back_green_RecolorCursor :: Word16,+                                     back_blue_RecolorCursor :: Word16}+                   deriving (Show, Typeable)+ +instance Serialize RecolorCursor where+        serialize x+          = do putWord8 96+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (cursor_RecolorCursor x)+               serialize (fore_red_RecolorCursor x)+               serialize (fore_green_RecolorCursor x)+               serialize (fore_blue_RecolorCursor x)+               serialize (back_red_RecolorCursor x)+               serialize (back_green_RecolorCursor x)+               serialize (back_blue_RecolorCursor x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (cursor_RecolorCursor x) ++              size (fore_red_RecolorCursor x)+              + size (fore_green_RecolorCursor x)+              + size (fore_blue_RecolorCursor x)+              + size (back_red_RecolorCursor x)+              + size (back_green_RecolorCursor x)+              + size (back_blue_RecolorCursor x)+ +data QueryShapeOf = QueryShapeOfLargestCursor+                  | QueryShapeOfFastestTile+                  | QueryShapeOfFastestStipple+                  deriving Show+ +instance SimpleEnum QueryShapeOf where+        toValue QueryShapeOfLargestCursor{} = 0+        toValue QueryShapeOfFastestTile{} = 1+        toValue QueryShapeOfFastestStipple{} = 2+        fromValue 0 = QueryShapeOfLargestCursor+        fromValue 1 = QueryShapeOfFastestTile+        fromValue 2 = QueryShapeOfFastestStipple+ +data QueryBestSize = MkQueryBestSize{class_QueryBestSize ::+                                     QueryShapeOf,+                                     drawable_QueryBestSize :: DRAWABLE,+                                     width_QueryBestSize :: Word16, height_QueryBestSize :: Word16}+                   deriving (Show, Typeable)+ +instance Serialize QueryBestSize where+        serialize x+          = do putWord8 97+               serialize (toValue (class_QueryBestSize x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (drawable_QueryBestSize x)+               serialize (width_QueryBestSize x)+               serialize (height_QueryBestSize x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (drawable_QueryBestSize x) ++              size (width_QueryBestSize x)+              + size (height_QueryBestSize x)+ +data QueryBestSizeReply = MkQueryBestSizeReply{width_QueryBestSizeReply+                                               :: Word16,+                                               height_QueryBestSizeReply :: Word16}+                        deriving (Show, Typeable)+ +instance Deserialize QueryBestSizeReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               width <- deserialize+               height <- deserialize+               let _ = isCard32 length+               return (MkQueryBestSizeReply width height)+ +data QueryExtension = MkQueryExtension{name_len_QueryExtension ::+                                       Word16,+                                       name_QueryExtension :: [CChar]}+                    deriving (Show, Typeable)+ +instance Serialize QueryExtension where+        serialize x+          = do putWord8 98+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (name_len_QueryExtension x)+               putSkip 2+               serializeList (name_QueryExtension x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (name_len_QueryExtension x) + 2 ++              sum (map size (name_QueryExtension x))+ +data QueryExtensionReply = MkQueryExtensionReply{present_QueryExtensionReply+                                                 :: Bool,+                                                 major_opcode_QueryExtensionReply :: Word8,+                                                 first_event_QueryExtensionReply :: Word8,+                                                 first_error_QueryExtensionReply :: Word8}+                         deriving (Show, Typeable)+ +instance Deserialize QueryExtensionReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               present <- deserialize+               major_opcode <- deserialize+               first_event <- deserialize+               first_error <- deserialize+               let _ = isCard32 length+               return+                 (MkQueryExtensionReply present major_opcode first_event+                    first_error)+ +data ListExtensions = MkListExtensions{}+                    deriving (Show, Typeable)+ +instance Serialize ListExtensions where+        serialize x+          = do putWord8 99+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data ListExtensionsReply = MkListExtensionsReply{names_len_ListExtensionsReply+                                                 :: Word8,+                                                 names_ListExtensionsReply :: [STR]}+                         deriving (Show, Typeable)+ +instance Deserialize ListExtensionsReply where+        deserialize+          = do skip 1+               names_len <- deserialize+               skip 2+               length <- deserialize+               skip 24+               names <- deserializeList (fromIntegral names_len)+               let _ = isCard32 length+               return (MkListExtensionsReply names_len names)+ +data ChangeKeyboardMapping = MkChangeKeyboardMapping{keycode_count_ChangeKeyboardMapping+                                                     :: Word8,+                                                     first_keycode_ChangeKeyboardMapping :: KEYCODE,+                                                     keysyms_per_keycode_ChangeKeyboardMapping ::+                                                     Word8,+                                                     keysyms_ChangeKeyboardMapping :: [KEYSYM]}+                           deriving (Show, Typeable)+ +instance Serialize ChangeKeyboardMapping where+        serialize x+          = do putWord8 100+               serialize (keycode_count_ChangeKeyboardMapping x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (first_keycode_ChangeKeyboardMapping x)+               serialize (keysyms_per_keycode_ChangeKeyboardMapping x)+               serializeList (keysyms_ChangeKeyboardMapping x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (keycode_count_ChangeKeyboardMapping x) ++              size (first_keycode_ChangeKeyboardMapping x)+              + size (keysyms_per_keycode_ChangeKeyboardMapping x)+              + sum (map size (keysyms_ChangeKeyboardMapping x))+ +data GetKeyboardMapping = MkGetKeyboardMapping{first_keycode_GetKeyboardMapping+                                               :: KEYCODE,+                                               count_GetKeyboardMapping :: Word8}+                        deriving (Show, Typeable)+ +instance Serialize GetKeyboardMapping where+        serialize x+          = do putWord8 101+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (first_keycode_GetKeyboardMapping x)+               serialize (count_GetKeyboardMapping x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (first_keycode_GetKeyboardMapping x) ++              size (count_GetKeyboardMapping x)+ +data GetKeyboardMappingReply = MkGetKeyboardMappingReply{keysyms_per_keycode_GetKeyboardMappingReply+                                                         :: Word8,+                                                         keysyms_GetKeyboardMappingReply ::+                                                         [KEYSYM]}+                             deriving (Show, Typeable)+ +instance Deserialize GetKeyboardMappingReply where+        deserialize+          = do skip 1+               keysyms_per_keycode <- deserialize+               skip 2+               length <- deserialize+               skip 24+               keysyms <- deserializeList (fromIntegral length)+               let _ = isCard32 length+               return (MkGetKeyboardMappingReply keysyms_per_keycode keysyms)+ +data KB = KBKeyClickPercent+        | KBBellPercent+        | KBBellPitch+        | KBBellDuration+        | KBLed+        | KBLedMode+        | KBKey+        | KBAutoRepeatMode+        deriving Show+ +instance BitEnum KB where+        toBit KBKeyClickPercent{} = 0+        toBit KBBellPercent{} = 1+        toBit KBBellPitch{} = 2+        toBit KBBellDuration{} = 3+        toBit KBLed{} = 4+        toBit KBLedMode{} = 5+        toBit KBKey{} = 6+        toBit KBAutoRepeatMode{} = 7+        fromBit 0 = KBKeyClickPercent+        fromBit 1 = KBBellPercent+        fromBit 2 = KBBellPitch+        fromBit 3 = KBBellDuration+        fromBit 4 = KBLed+        fromBit 5 = KBLedMode+        fromBit 6 = KBKey+        fromBit 7 = KBAutoRepeatMode+ +data LedMode = LedModeOff+             | LedModeOn+             deriving Show+ +instance SimpleEnum LedMode where+        toValue LedModeOff{} = 0+        toValue LedModeOn{} = 1+        fromValue 0 = LedModeOff+        fromValue 1 = LedModeOn+ +data AutoRepeatMode = AutoRepeatModeOff+                    | AutoRepeatModeOn+                    | AutoRepeatModeDefault+                    deriving Show+ +instance SimpleEnum AutoRepeatMode where+        toValue AutoRepeatModeOff{} = 0+        toValue AutoRepeatModeOn{} = 1+        toValue AutoRepeatModeDefault{} = 2+        fromValue 0 = AutoRepeatModeOff+        fromValue 1 = AutoRepeatModeOn+        fromValue 2 = AutoRepeatModeDefault+ +data ChangeKeyboardControl = MkChangeKeyboardControl{value_ChangeKeyboardControl+                                                     :: ValueParam Word32}+                           deriving (Show, Typeable)+ +instance Serialize ChangeKeyboardControl where+        serialize x+          = do putWord8 102+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (value_ChangeKeyboardControl x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (value_ChangeKeyboardControl x)+ +data GetKeyboardControl = MkGetKeyboardControl{}+                        deriving (Show, Typeable)+ +instance Serialize GetKeyboardControl where+        serialize x+          = do putWord8 103+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data GetKeyboardControlReply = MkGetKeyboardControlReply{global_auto_repeat_GetKeyboardControlReply+                                                         :: AutoRepeatMode,+                                                         led_mask_GetKeyboardControlReply :: Word32,+                                                         key_click_percent_GetKeyboardControlReply+                                                         :: Word8,+                                                         bell_percent_GetKeyboardControlReply ::+                                                         Word8,+                                                         bell_pitch_GetKeyboardControlReply ::+                                                         Word16,+                                                         bell_duration_GetKeyboardControlReply ::+                                                         Word16,+                                                         auto_repeats_GetKeyboardControlReply ::+                                                         [Word8]}+                             deriving (Show, Typeable)+ +instance Deserialize GetKeyboardControlReply where+        deserialize+          = do skip 1+               global_auto_repeat <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               led_mask <- deserialize+               key_click_percent <- deserialize+               bell_percent <- deserialize+               bell_pitch <- deserialize+               bell_duration <- deserialize+               skip 2+               auto_repeats <- deserializeList (fromIntegral 32)+               let _ = isCard32 length+               return+                 (MkGetKeyboardControlReply global_auto_repeat led_mask+                    key_click_percent+                    bell_percent+                    bell_pitch+                    bell_duration+                    auto_repeats)+ +data Bell = MkBell{percent_Bell :: Int8}+          deriving (Show, Typeable)+ +instance Serialize Bell where+        serialize x+          = do putWord8 104+               serialize (percent_Bell x)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 3 + size (percent_Bell x)+ +data ChangePointerControl = MkChangePointerControl{acceleration_numerator_ChangePointerControl+                                                   :: Int16,+                                                   acceleration_denominator_ChangePointerControl ::+                                                   Int16,+                                                   threshold_ChangePointerControl :: Int16,+                                                   do_acceleration_ChangePointerControl :: Bool,+                                                   do_threshold_ChangePointerControl :: Bool}+                          deriving (Show, Typeable)+ +instance Serialize ChangePointerControl where+        serialize x+          = do putWord8 105+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (acceleration_numerator_ChangePointerControl x)+               serialize (acceleration_denominator_ChangePointerControl x)+               serialize (threshold_ChangePointerControl x)+               serialize (do_acceleration_ChangePointerControl x)+               serialize (do_threshold_ChangePointerControl x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (acceleration_numerator_ChangePointerControl x) ++              size (acceleration_denominator_ChangePointerControl x)+              + size (threshold_ChangePointerControl x)+              + size (do_acceleration_ChangePointerControl x)+              + size (do_threshold_ChangePointerControl x)+ +data GetPointerControl = MkGetPointerControl{}+                       deriving (Show, Typeable)+ +instance Serialize GetPointerControl where+        serialize x+          = do putWord8 106+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data GetPointerControlReply = MkGetPointerControlReply{acceleration_numerator_GetPointerControlReply+                                                       :: Word16,+                                                       acceleration_denominator_GetPointerControlReply+                                                       :: Word16,+                                                       threshold_GetPointerControlReply :: Word16}+                            deriving (Show, Typeable)+ +instance Deserialize GetPointerControlReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               acceleration_numerator <- deserialize+               acceleration_denominator <- deserialize+               threshold <- deserialize+               skip 18+               let _ = isCard32 length+               return+                 (MkGetPointerControlReply acceleration_numerator+                    acceleration_denominator+                    threshold)+ +data Blanking = BlankingNotPreferred+              | BlankingPreferred+              | BlankingDefault+              deriving Show+ +instance SimpleEnum Blanking where+        toValue BlankingNotPreferred{} = 0+        toValue BlankingPreferred{} = 1+        toValue BlankingDefault{} = 2+        fromValue 0 = BlankingNotPreferred+        fromValue 1 = BlankingPreferred+        fromValue 2 = BlankingDefault+ +data Exposures = ExposuresNotAllowed+               | ExposuresAllowed+               | ExposuresDefault+               deriving Show+ +instance SimpleEnum Exposures where+        toValue ExposuresNotAllowed{} = 0+        toValue ExposuresAllowed{} = 1+        toValue ExposuresDefault{} = 2+        fromValue 0 = ExposuresNotAllowed+        fromValue 1 = ExposuresAllowed+        fromValue 2 = ExposuresDefault+ +data SetScreenSaver = MkSetScreenSaver{timeout_SetScreenSaver ::+                                       Int16,+                                       interval_SetScreenSaver :: Int16,+                                       prefer_blanking_SetScreenSaver :: Blanking,+                                       allow_exposures_SetScreenSaver :: Exposures}+                    deriving (Show, Typeable)+ +instance Serialize SetScreenSaver where+        serialize x+          = do putWord8 107+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (timeout_SetScreenSaver x)+               serialize (interval_SetScreenSaver x)+               serialize (toValue (prefer_blanking_SetScreenSaver x) :: Word8)+               serialize (toValue (allow_exposures_SetScreenSaver x) :: Word8)+               putSkip (requiredPadding (size x))+        size x+          = 3 + 1 + size (timeout_SetScreenSaver x) ++              size (interval_SetScreenSaver x)+              + size (undefined :: Word8)+              + size (undefined :: Word8)+ +data GetScreenSaver = MkGetScreenSaver{}+                    deriving (Show, Typeable)+ +instance Serialize GetScreenSaver where+        serialize x+          = do putWord8 108+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data GetScreenSaverReply = MkGetScreenSaverReply{timeout_GetScreenSaverReply+                                                 :: Word16,+                                                 interval_GetScreenSaverReply :: Word16,+                                                 prefer_blanking_GetScreenSaverReply :: Blanking,+                                                 allow_exposures_GetScreenSaverReply :: Exposures}+                         deriving (Show, Typeable)+ +instance Deserialize GetScreenSaverReply where+        deserialize+          = do skip 1+               skip 1+               skip 2+               length <- deserialize+               timeout <- deserialize+               interval <- deserialize+               prefer_blanking <- liftM fromValue (deserialize :: Get Word8)+               allow_exposures <- liftM fromValue (deserialize :: Get Word8)+               skip 18+               let _ = isCard32 length+               return+                 (MkGetScreenSaverReply timeout interval prefer_blanking+                    allow_exposures)+ +data HostMode = HostModeInsert+              | HostModeDelete+              deriving Show+ +instance SimpleEnum HostMode where+        toValue HostModeInsert{} = 0+        toValue HostModeDelete{} = 1+        fromValue 0 = HostModeInsert+        fromValue 1 = HostModeDelete+ +data Family = FamilyInternet+            | FamilyDECnet+            | FamilyChaos+            | FamilyServerInterpreted+            | FamilyInternet6+            deriving Show+ +instance SimpleEnum Family where+        toValue FamilyInternet{} = 0+        toValue FamilyDECnet{} = 1+        toValue FamilyChaos{} = 2+        toValue FamilyServerInterpreted{} = 5+        toValue FamilyInternet6{} = 6+        fromValue 0 = FamilyInternet+        fromValue 1 = FamilyDECnet+        fromValue 2 = FamilyChaos+        fromValue 5 = FamilyServerInterpreted+        fromValue 6 = FamilyInternet6+ +data ChangeHosts = MkChangeHosts{mode_ChangeHosts :: HostMode,+                                 family_ChangeHosts :: Family, address_len_ChangeHosts :: Word16,+                                 address_ChangeHosts :: [CChar]}+                 deriving (Show, Typeable)+ +instance Serialize ChangeHosts where+        serialize x+          = do putWord8 109+               serialize (toValue (mode_ChangeHosts x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (toValue (family_ChangeHosts x) :: Word8)+               putSkip 1+               serialize (address_len_ChangeHosts x)+               serializeList (address_ChangeHosts x)+               putSkip (requiredPadding (size x))+        size x+          = 3 + size (undefined :: Word8) + size (undefined :: Word8) + 1 ++              size (address_len_ChangeHosts x)+              + sum (map size (address_ChangeHosts x))+ +data HOST = MkHOST{family_HOST :: Family,+                   address_len_HOST :: Word16, address_HOST :: [Word8]}+          deriving (Show, Typeable)+ +instance Serialize HOST where+        serialize x+          = do serialize (toValue (family_HOST x) :: Word8)+               putSkip 1+               serialize (address_len_HOST x)+               serializeList (address_HOST x)+        size x+          = size (undefined :: Word8) + 1 + size (address_len_HOST x) ++              sum (map size (address_HOST x))+ +instance Deserialize HOST where+        deserialize+          = do family <- liftM fromValue (deserialize :: Get Word8)+               skip 1+               address_len <- deserialize+               address <- deserializeList (fromIntegral address_len)+               return (MkHOST family address_len address)+ +data ListHosts = MkListHosts{}+               deriving (Show, Typeable)+ +instance Serialize ListHosts where+        serialize x+          = do putWord8 110+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 4+ +data ListHostsReply = MkListHostsReply{mode_ListHostsReply ::+                                       AccessControl,+                                       hosts_len_ListHostsReply :: Word16,+                                       hosts_ListHostsReply :: [HOST]}+                    deriving (Show, Typeable)+ +instance Deserialize ListHostsReply where+        deserialize+          = do skip 1+               mode <- liftM fromValue (deserialize :: Get Word8)+               skip 2+               length <- deserialize+               hosts_len <- deserialize+               skip 22+               hosts <- deserializeList (fromIntegral hosts_len)+               let _ = isCard32 length+               return (MkListHostsReply mode hosts_len hosts)+ +data AccessControl = AccessControlDisable+                   | AccessControlEnable+                   deriving Show+ +instance SimpleEnum AccessControl where+        toValue AccessControlDisable{} = 0+        toValue AccessControlEnable{} = 1+        fromValue 0 = AccessControlDisable+        fromValue 1 = AccessControlEnable+ +data SetAccessControl = MkSetAccessControl{mode_SetAccessControl ::+                                           AccessControl}+                      deriving (Show, Typeable)+ +instance Serialize SetAccessControl where+        serialize x+          = do putWord8 111+               serialize (toValue (mode_SetAccessControl x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 3 + size (undefined :: Word8)+ +data CloseDown = CloseDownDestroyAll+               | CloseDownRetainPermanent+               | CloseDownRetainTemporary+               deriving Show+ +instance SimpleEnum CloseDown where+        toValue CloseDownDestroyAll{} = 0+        toValue CloseDownRetainPermanent{} = 1+        toValue CloseDownRetainTemporary{} = 2+        fromValue 0 = CloseDownDestroyAll+        fromValue 1 = CloseDownRetainPermanent+        fromValue 2 = CloseDownRetainTemporary+ +data SetCloseDownMode = MkSetCloseDownMode{mode_SetCloseDownMode ::+                                           CloseDown}+                      deriving (Show, Typeable)+ +instance Serialize SetCloseDownMode where+        serialize x+          = do putWord8 112+               serialize (toValue (mode_SetCloseDownMode x) :: Word8)+               serialize (convertBytesToRequestSize (size x) :: Int16)+               putSkip (requiredPadding (size x))+        size x = 3 + size (undefined :: Word8)+ +data Kill = KillAllTemporary+          deriving Show+ +instance SimpleEnum Kill where+        toValue KillAllTemporary{} = 0+        fromValue 0 = KillAllTemporary+ +data KillClient = MkKillClient{resource_KillClient :: Word32}+                deriving (Show, Typeable)+ +instance Serialize KillClient where+        serialize x+          = do putWord8 113+               putSkip 1+               serialize (convertBytesToRequestSize (size x) :: Int16)+               serialize (resource_KillClient x)+               putSkip (requiredPadding (size x))+        size x = 3 + 1 + size (resource_KillClient x)   data RotateProperties = MkRotateProperties{window_RotateProperties                                            :: WINDOW,
patched/Graphics/XHB/Gen/Xv.hs view
@@ -64,7 +64,7 @@   grabPort ::            Graphics.XHB.Connection.Types.Connection ->-             PORT -> TIMESTAMP -> IO (Receipt Word8)+             PORT -> TIMESTAMP -> IO (Receipt GrabPortStatus) grabPort c port time   = do (receipt, rReceipt) <- newEmptyReceipt                                 (runGet (result_GrabPortReply `fmap` deserialize))
patched/Graphics/XHB/Gen/Xv/Types.hs view
@@ -1,9 +1,10 @@ module Graphics.XHB.Gen.Xv.Types        (deserializeError, deserializeEvent, PORT, ENCODING, Type(..),         ImageFormatInfoType(..), ImageFormatInfoFormat(..),-        AttributeFlag(..), Rational(..), Format(..), AdaptorInfo(..),+        AttributeFlag(..), VideoNotifyReason(..), ScanlineOrder(..),+        GrabPortStatus(..), Rational(..), Format(..), AdaptorInfo(..),         EncodingInfo(..), Image(..), AttributeInfo(..),-        ImageFormatInfo(..), VideoNotify(..), PortNotify(..),+        ImageFormatInfo(..), VideoNotifyEvent(..), PortNotifyEvent(..),         QueryExtension(..), QueryExtensionReply(..), QueryAdaptors(..),         QueryAdaptorsReply(..), QueryEncodings(..),         QueryEncodingsReply(..), GrabPort(..), GrabPortReply(..),@@ -43,9 +44,9 @@   deserializeEvent :: Word8 -> Maybe (Get SomeEvent) deserializeEvent 0-  = return (liftM toEvent (deserialize :: Get VideoNotify))+  = return (liftM toEvent (deserialize :: Get VideoNotifyEvent)) deserializeEvent 1-  = return (liftM toEvent (deserialize :: Get PortNotify))+  = return (liftM toEvent (deserialize :: Get PortNotifyEvent)) deserializeEvent _ = Nothing   newtype PORT = MkPORT Xid@@ -103,6 +104,57 @@         fromBit 0 = AttributeFlagGettable         fromBit 1 = AttributeFlagSettable  +data VideoNotifyReason = VideoNotifyReasonStarted+                       | VideoNotifyReasonStopped+                       | VideoNotifyReasonBusy+                       | VideoNotifyReasonPreempted+                       | VideoNotifyReasonHardError+                       deriving Show+ +instance SimpleEnum VideoNotifyReason where+        toValue VideoNotifyReasonStarted{} = 0+        toValue VideoNotifyReasonStopped{} = 1+        toValue VideoNotifyReasonBusy{} = 2+        toValue VideoNotifyReasonPreempted{} = 3+        toValue VideoNotifyReasonHardError{} = 4+        fromValue 0 = VideoNotifyReasonStarted+        fromValue 1 = VideoNotifyReasonStopped+        fromValue 2 = VideoNotifyReasonBusy+        fromValue 3 = VideoNotifyReasonPreempted+        fromValue 4 = VideoNotifyReasonHardError+ +data ScanlineOrder = ScanlineOrderTopToBottom+                   | ScanlineOrderBottomToTop+                   deriving Show+ +instance SimpleEnum ScanlineOrder where+        toValue ScanlineOrderTopToBottom{} = 0+        toValue ScanlineOrderBottomToTop{} = 1+        fromValue 0 = ScanlineOrderTopToBottom+        fromValue 1 = ScanlineOrderBottomToTop+ +data GrabPortStatus = GrabPortStatusSuccess+                    | GrabPortStatusBadExtension+                    | GrabPortStatusAlreadyGrabbed+                    | GrabPortStatusInvalidTime+                    | GrabPortStatusBadReply+                    | GrabPortStatusBadAlloc+                    deriving Show+ +instance SimpleEnum GrabPortStatus where+        toValue GrabPortStatusSuccess{} = 0+        toValue GrabPortStatusBadExtension{} = 1+        toValue GrabPortStatusAlreadyGrabbed{} = 2+        toValue GrabPortStatusInvalidTime{} = 3+        toValue GrabPortStatusBadReply{} = 4+        toValue GrabPortStatusBadAlloc{} = 5+        fromValue 0 = GrabPortStatusSuccess+        fromValue 1 = GrabPortStatusBadExtension+        fromValue 2 = GrabPortStatusAlreadyGrabbed+        fromValue 3 = GrabPortStatusInvalidTime+        fromValue 4 = GrabPortStatusBadReply+        fromValue 5 = GrabPortStatusBadAlloc+  data Rational = MkRational{numerator_Rational :: Int32,                            denominator_Rational :: Int32}               deriving (Show, Typeable)@@ -140,7 +192,7 @@   data AdaptorInfo = MkAdaptorInfo{base_id_AdaptorInfo :: PORT,                                  name_size_AdaptorInfo :: Word16, num_ports_AdaptorInfo :: Word16,-                                 num_formats_AdaptorInfo :: Word16, type_AdaptorInfo :: Word8,+                                 num_formats_AdaptorInfo :: Word16, type_AdaptorInfo :: [Type],                                  name_AdaptorInfo :: [CChar], formats_AdaptorInfo :: [Format]}                  deriving (Show, Typeable)  @@ -150,7 +202,7 @@                serialize (name_size_AdaptorInfo x)                serialize (num_ports_AdaptorInfo x)                serialize (num_formats_AdaptorInfo x)-               serialize (type_AdaptorInfo x)+               serialize (toMask (type_AdaptorInfo x) :: Word8)                putSkip 1                serializeList (name_AdaptorInfo x)                serializeList (formats_AdaptorInfo x)@@ -158,7 +210,7 @@           = size (base_id_AdaptorInfo x) + size (name_size_AdaptorInfo x) +               size (num_ports_AdaptorInfo x)               + size (num_formats_AdaptorInfo x)-              + size (type_AdaptorInfo x)+              + size (undefined :: Word8)               + 1               + sum (map size (name_AdaptorInfo x))               + sum (map size (formats_AdaptorInfo x))@@ -169,7 +221,7 @@                name_size <- deserialize                num_ports <- deserialize                num_formats <- deserialize-               type_ <- deserialize+               type_ <- liftM fromMask (deserialize :: Get Word8)                skip 1                name <- deserializeList (fromIntegral name_size)                formats <- deserializeList (fromIntegral num_formats)@@ -250,27 +302,28 @@                  (MkImage id width height data_size num_planes pitches offsets                     data_)  -data AttributeInfo = MkAttributeInfo{flags_AttributeInfo :: Word32,+data AttributeInfo = MkAttributeInfo{flags_AttributeInfo ::+                                     [AttributeFlag],                                      min_AttributeInfo :: Int32, max_AttributeInfo :: Int32,                                      size_AttributeInfo :: Word32, name_AttributeInfo :: [CChar]}                    deriving (Show, Typeable)   instance Serialize AttributeInfo where         serialize x-          = do serialize (flags_AttributeInfo x)+          = do serialize (toMask (flags_AttributeInfo x) :: Word32)                serialize (min_AttributeInfo x)                serialize (max_AttributeInfo x)                serialize (size_AttributeInfo x)                serializeList (name_AttributeInfo x)         size x-          = size (flags_AttributeInfo x) + size (min_AttributeInfo x) ++          = size (undefined :: Word32) + size (min_AttributeInfo x) +               size (max_AttributeInfo x)               + size (size_AttributeInfo x)               + sum (map size (name_AttributeInfo x))   instance Deserialize AttributeInfo where         deserialize-          = do flags <- deserialize+          = do flags <- liftM fromMask (deserialize :: Get Word32)                min <- deserialize                max <- deserialize                size <- deserialize@@ -279,8 +332,8 @@   data ImageFormatInfo = MkImageFormatInfo{id_ImageFormatInfo ::                                          Word32,-                                         type_ImageFormatInfo :: Word8,-                                         byte_order_ImageFormatInfo :: Word8,+                                         type_ImageFormatInfo :: ImageFormatInfoType,+                                         byte_order_ImageFormatInfo :: ImageOrder,                                          guid_ImageFormatInfo :: [Word8],                                          bpp_ImageFormatInfo :: Word8,                                          num_planes_ImageFormatInfo :: Word8,@@ -288,7 +341,7 @@                                          red_mask_ImageFormatInfo :: Word32,                                          green_mask_ImageFormatInfo :: Word32,                                          blue_mask_ImageFormatInfo :: Word32,-                                         format_ImageFormatInfo :: Word8,+                                         format_ImageFormatInfo :: ImageFormatInfoFormat,                                          y_sample_bits_ImageFormatInfo :: Word32,                                          u_sample_bits_ImageFormatInfo :: Word32,                                          v_sample_bits_ImageFormatInfo :: Word32,@@ -299,14 +352,14 @@                                          vvert_u_period_ImageFormatInfo :: Word32,                                          vvert_v_period_ImageFormatInfo :: Word32,                                          vcomp_order_ImageFormatInfo :: [Word8],-                                         vscanline_order_ImageFormatInfo :: Word8}+                                         vscanline_order_ImageFormatInfo :: ScanlineOrder}                      deriving (Show, Typeable)   instance Serialize ImageFormatInfo where         serialize x           = do serialize (id_ImageFormatInfo x)-               serialize (type_ImageFormatInfo x)-               serialize (byte_order_ImageFormatInfo x)+               serialize (toValue (type_ImageFormatInfo x) :: Word8)+               serialize (toValue (byte_order_ImageFormatInfo x) :: Word8)                putSkip 2                serializeList (guid_ImageFormatInfo x)                serialize (bpp_ImageFormatInfo x)@@ -317,7 +370,7 @@                serialize (red_mask_ImageFormatInfo x)                serialize (green_mask_ImageFormatInfo x)                serialize (blue_mask_ImageFormatInfo x)-               serialize (format_ImageFormatInfo x)+               serialize (toValue (format_ImageFormatInfo x) :: Word8)                putSkip 3                serialize (y_sample_bits_ImageFormatInfo x)                serialize (u_sample_bits_ImageFormatInfo x)@@ -329,11 +382,11 @@                serialize (vvert_u_period_ImageFormatInfo x)                serialize (vvert_v_period_ImageFormatInfo x)                serializeList (vcomp_order_ImageFormatInfo x)-               serialize (vscanline_order_ImageFormatInfo x)+               serialize (toValue (vscanline_order_ImageFormatInfo x) :: Word8)                putSkip 11         size x-          = size (id_ImageFormatInfo x) + size (type_ImageFormatInfo x) +-              size (byte_order_ImageFormatInfo x)+          = size (id_ImageFormatInfo x) + size (undefined :: Word8) ++              size (undefined :: Word8)               + 2               + sum (map size (guid_ImageFormatInfo x))               + size (bpp_ImageFormatInfo x)@@ -344,7 +397,7 @@               + size (red_mask_ImageFormatInfo x)               + size (green_mask_ImageFormatInfo x)               + size (blue_mask_ImageFormatInfo x)-              + size (format_ImageFormatInfo x)+              + size (undefined :: Word8)               + 3               + size (y_sample_bits_ImageFormatInfo x)               + size (u_sample_bits_ImageFormatInfo x)@@ -356,14 +409,14 @@               + size (vvert_u_period_ImageFormatInfo x)               + size (vvert_v_period_ImageFormatInfo x)               + sum (map size (vcomp_order_ImageFormatInfo x))-              + size (vscanline_order_ImageFormatInfo x)+              + size (undefined :: Word8)               + 11   instance Deserialize ImageFormatInfo where         deserialize           = do id <- deserialize-               type_ <- deserialize-               byte_order <- deserialize+               type_ <- liftM fromValue (deserialize :: Get Word8)+               byte_order <- liftM fromValue (deserialize :: Get Word8)                skip 2                guid <- deserializeList (fromIntegral 16)                bpp <- deserialize@@ -374,7 +427,7 @@                red_mask <- deserialize                green_mask <- deserialize                blue_mask <- deserialize-               format <- deserialize+               format <- liftM fromValue (deserialize :: Get Word8)                skip 3                y_sample_bits <- deserialize                u_sample_bits <- deserialize@@ -386,7 +439,7 @@                vvert_u_period <- deserialize                vvert_v_period <- deserialize                vcomp_order <- deserializeList (fromIntegral 32)-               vscanline_order <- deserialize+               vscanline_order <- liftM fromValue (deserialize :: Get Word8)                skip 11                return                  (MkImageFormatInfo id type_ byte_order guid bpp num_planes depth@@ -406,31 +459,35 @@                     vcomp_order                     vscanline_order)  -data VideoNotify = MkVideoNotify{reason_VideoNotify :: Word8,-                                 time_VideoNotify :: TIMESTAMP, drawable_VideoNotify :: DRAWABLE,-                                 port_VideoNotify :: PORT}-                 deriving (Show, Typeable)+data VideoNotifyEvent = MkVideoNotifyEvent{reason_VideoNotifyEvent+                                           :: VideoNotifyReason,+                                           time_VideoNotifyEvent :: TIMESTAMP,+                                           drawable_VideoNotifyEvent :: DRAWABLE,+                                           port_VideoNotifyEvent :: PORT}+                      deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event VideoNotify+instance Graphics.XHB.Shared.Event VideoNotifyEvent  -instance Deserialize VideoNotify where+instance Deserialize VideoNotifyEvent where         deserialize           = do skip 1-               reason <- deserialize+               reason <- liftM fromValue (deserialize :: Get Word8)                skip 2                time <- deserialize                drawable <- deserialize                port <- deserialize-               return (MkVideoNotify reason time drawable port)+               return (MkVideoNotifyEvent reason time drawable port)  -data PortNotify = MkPortNotify{time_PortNotify :: TIMESTAMP,-                               port_PortNotify :: PORT, attribute_PortNotify :: ATOM,-                               value_PortNotify :: Int32}-                deriving (Show, Typeable)+data PortNotifyEvent = MkPortNotifyEvent{time_PortNotifyEvent ::+                                         TIMESTAMP,+                                         port_PortNotifyEvent :: PORT,+                                         attribute_PortNotifyEvent :: ATOM,+                                         value_PortNotifyEvent :: Int32}+                     deriving (Show, Typeable)  -instance Graphics.XHB.Shared.Event PortNotify+instance Graphics.XHB.Shared.Event PortNotifyEvent  -instance Deserialize PortNotify where+instance Deserialize PortNotifyEvent where         deserialize           = do skip 1                skip 1@@ -439,7 +496,7 @@                port <- deserialize                attribute <- deserialize                value <- deserialize-               return (MkPortNotify time port attribute value)+               return (MkPortNotifyEvent time port attribute value)   data QueryExtension = MkQueryExtension{}                     deriving (Show, Typeable)@@ -545,13 +602,14 @@                serialize (time_GrabPort x)                putSkip (requiredPadding size__)  -data GrabPortReply = MkGrabPortReply{result_GrabPortReply :: Word8}+data GrabPortReply = MkGrabPortReply{result_GrabPortReply ::+                                     GrabPortStatus}                    deriving (Show, Typeable)   instance Deserialize GrabPortReply where         deserialize           = do skip 1-               result <- deserialize+               result <- liftM fromValue (deserialize :: Get Word8)                skip 2                length <- deserialize                let _ = isCard32 length
xhb.cabal view
@@ -1,5 +1,5 @@ Name:         xhb-Version:      0.2.2009.2.21+Version:      0.3.2009.6.28 Cabal-Version:  >= 1.2.3 Synopsis:     X Haskell Bindings Description:@@ -7,7 +7,7 @@   .   Similar to XCB - the X C Bindings.   .-  This library is based on version 1.4 of the xcb-proto+  This library is based on version 1.5 of the xcb-proto   package.  See http:\/\/xcb.freedesktop.org\/XmlXcb\/ and   http:\/\/xcb.freedesktop.org\/dist\/ . @@ -24,7 +24,7 @@  Library - Build-depends: base, stm, Xauth, binary, bytestring, containers,+ Build-depends: base >= 3 && < 5, stm, Xauth, binary, bytestring, containers,       parsec, network, byteorder   Extensions: ExistentialQuantification,@@ -59,8 +59,8 @@    Graphics.XHB.Gen.Xproto,    Graphics.XHB.Gen.SELinux,    Graphics.XHB.Gen.Test,-   Graphics.XHB.Gen.Xv,-   Graphics.XHB.Gen.XvMC+   Graphics.XHB.Gen.XvMC,+   Graphics.XHB.Gen.Xv   Other-modules:    Graphics.XHB.Shared,@@ -90,8 +90,8 @@    Graphics.XHB.Gen.Xproto.Types,    Graphics.XHB.Gen.SELinux.Types,    Graphics.XHB.Gen.Test.Types,-   Graphics.XHB.Gen.Xv.Types,    Graphics.XHB.Gen.XvMC.Types,+   Graphics.XHB.Gen.Xv.Types,    Graphics.XHB.Gen.Extension   hs-source-dirs: . patched