    {-# LINE 1 "Graphics/X11/Types.hsc" #-}
    {-# LANGUAGE DeriveDataTypeable #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.X11.Types
    -- Copyright   :  (c) Alastair Reid, 1999-2003
    -- License     :  BSD-style (see the file libraries/base/LICENSE)
    --
    -- Maintainer  :  libraries@haskell.org
    -- Stability   :  provisional
    -- Portability :  portable
    --
    -- A collection of type declarations for interfacing with X11.
    --
    -----------------------------------------------------------------------------

    module Graphics.X11.Types
            (

            XID,
            Mask,
            Atom,
            VisualID,
            Time,
            Window,
            Drawable,
            Font,
            Pixmap,
            Cursor,
            Colormap,
            GContext,
            KeyCode,
            SizeID,
            SubpixelOrder,
            Connection,
            RROutput,
            RRCrtc,
            RRMode,
            XRRModeFlags,

            -- * Enumeration types
            -- | These types were introduced to make function types clearer.
            -- Note that the types are synonyms for 'Int', so no extra
            -- typesafety was obtained.

            -- ** Key symbols
            KeySym,

            xK_VoidSymbol,
            xK_BackSpace,
            xK_Tab,
            xK_Linefeed,
            xK_Clear,
            xK_Return,
            xK_Pause,
            xK_Scroll_Lock,
            xK_Sys_Req,
            xK_Escape,
            xK_Delete,
            xK_Multi_key,

            -- SunOS does not define these.

    {-# LINE 63 "Graphics/X11/Types.hsc" #-}
            xK_Codeinput,

    {-# LINE 65 "Graphics/X11/Types.hsc" #-}

    {-# LINE 66 "Graphics/X11/Types.hsc" #-}
            xK_SingleCandidate,

    {-# LINE 68 "Graphics/X11/Types.hsc" #-}

    {-# LINE 69 "Graphics/X11/Types.hsc" #-}
            xK_MultipleCandidate,

    {-# LINE 71 "Graphics/X11/Types.hsc" #-}

    {-# LINE 72 "Graphics/X11/Types.hsc" #-}
            xK_PreviousCandidate,

    {-# LINE 74 "Graphics/X11/Types.hsc" #-}
            xK_Home,
            xK_Left,
            xK_Up,
            xK_Right,
            xK_Down,
            xK_Prior,
            xK_Page_Up,
            xK_Next,
            xK_Page_Down,
            xK_End,
            xK_Begin,
            xK_Select,
            xK_Print,
            xK_Execute,
            xK_Insert,
            xK_Undo,
            xK_Redo,
            xK_Menu,
            xK_Find,
            xK_Cancel,
            xK_Help,
            xK_Break,
            xK_Mode_switch,
            xK_script_switch,
            xK_Num_Lock,
            xK_KP_Space,
            xK_KP_Tab,
            xK_KP_Enter,
            xK_KP_F1,
            xK_KP_F2,
            xK_KP_F3,
            xK_KP_F4,
            xK_KP_Home,
            xK_KP_Left,
            xK_KP_Up,
            xK_KP_Right,
            xK_KP_Down,
            xK_KP_Prior,
            xK_KP_Page_Up,
            xK_KP_Next,
            xK_KP_Page_Down,
            xK_KP_End,
            xK_KP_Begin,
            xK_KP_Insert,
            xK_KP_Delete,
            xK_KP_Equal,
            xK_KP_Multiply,
            xK_KP_Add,
            xK_KP_Separator,
            xK_KP_Subtract,
            xK_KP_Decimal,
            xK_KP_Divide,
            xK_KP_0,
            xK_KP_1,
            xK_KP_2,
            xK_KP_3,
            xK_KP_4,
            xK_KP_5,
            xK_KP_6,
            xK_KP_7,
            xK_KP_8,
            xK_KP_9,
            xK_F1,
            xK_F2,
            xK_F3,
            xK_F4,
            xK_F5,
            xK_F6,
            xK_F7,
            xK_F8,
            xK_F9,
            xK_F10,
            xK_F11,
            xK_L1,
            xK_F12,
            xK_L2,
            xK_F13,
            xK_L3,
            xK_F14,
            xK_L4,
            xK_F15,
            xK_L5,
            xK_F16,
            xK_L6,
            xK_F17,
            xK_L7,
            xK_F18,
            xK_L8,
            xK_F19,
            xK_L9,
            xK_F20,
            xK_L10,
            xK_F21,
            xK_R1,
            xK_F22,
            xK_R2,
            xK_F23,
            xK_R3,
            xK_F24,
            xK_R4,
            xK_F25,
            xK_R5,
            xK_F26,
            xK_R6,
            xK_F27,
            xK_R7,
            xK_F28,
            xK_R8,
            xK_F29,
            xK_R9,
            xK_F30,
            xK_R10,
            xK_F31,
            xK_R11,
            xK_F32,
            xK_R12,
            xK_F33,
            xK_R13,
            xK_F34,
            xK_R14,
            xK_F35,
            xK_R15,
            xK_Shift_L,
            xK_Shift_R,
            xK_Control_L,
            xK_Control_R,
            xK_Caps_Lock,
            xK_Shift_Lock,
            xK_Meta_L,
            xK_Meta_R,
            xK_Alt_L,
            xK_Alt_R,
            xK_Super_L,
            xK_Super_R,
            xK_Hyper_L,
            xK_Hyper_R,
            xK_space,
            xK_exclam,
            xK_quotedbl,
            xK_numbersign,
            xK_dollar,
            xK_percent,
            xK_ampersand,
            xK_apostrophe,
            xK_quoteright,
            xK_parenleft,
            xK_parenright,
            xK_asterisk,
            xK_plus,
            xK_comma,
            xK_minus,
            xK_period,
            xK_slash,
            xK_0,
            xK_1,
            xK_2,
            xK_3,
            xK_4,
            xK_5,
            xK_6,
            xK_7,
            xK_8,
            xK_9,
            xK_colon,
            xK_semicolon,
            xK_less,
            xK_equal,
            xK_greater,
            xK_question,
            xK_at,
            xK_A,
            xK_B,
            xK_C,
            xK_D,
            xK_E,
            xK_F,
            xK_G,
            xK_H,
            xK_I,
            xK_J,
            xK_K,
            xK_L,
            xK_M,
            xK_N,
            xK_O,
            xK_P,
            xK_Q,
            xK_R,
            xK_S,
            xK_T,
            xK_U,
            xK_V,
            xK_W,
            xK_X,
            xK_Y,
            xK_Z,
            xK_bracketleft,
            xK_backslash,
            xK_bracketright,
            xK_asciicircum,
            xK_underscore,
            xK_grave,
            xK_quoteleft,
            xK_a,
            xK_b,
            xK_c,
            xK_d,
            xK_e,
            xK_f,
            xK_g,
            xK_h,
            xK_i,
            xK_j,
            xK_k,
            xK_l,
            xK_m,
            xK_n,
            xK_o,
            xK_p,
            xK_q,
            xK_r,
            xK_s,
            xK_t,
            xK_u,
            xK_v,
            xK_w,
            xK_x,
            xK_y,
            xK_z,
            xK_braceleft,
            xK_bar,
            xK_braceright,
            xK_asciitilde,
            xK_nobreakspace,
            xK_exclamdown,
            xK_cent,
            xK_sterling,
            xK_currency,
            xK_yen,
            xK_brokenbar,
            xK_section,
            xK_diaeresis,
            xK_copyright,
            xK_ordfeminine,
            xK_guillemotleft,
            xK_notsign,
            xK_hyphen,
            xK_registered,
            xK_macron,
            xK_degree,
            xK_plusminus,
            xK_twosuperior,
            xK_threesuperior,
            xK_acute,
            xK_mu,
            xK_paragraph,
            xK_periodcentered,
            xK_cedilla,
            xK_onesuperior,
            xK_masculine,
            xK_guillemotright,
            xK_onequarter,
            xK_onehalf,
            xK_threequarters,
            xK_questiondown,
            xK_Agrave,
            xK_Aacute,
            xK_Acircumflex,
            xK_Atilde,
            xK_Adiaeresis,
            xK_Aring,
            xK_AE,
            xK_Ccedilla,
            xK_Egrave,
            xK_Eacute,
            xK_Ecircumflex,
            xK_Ediaeresis,
            xK_Igrave,
            xK_Iacute,
            xK_Icircumflex,
            xK_Idiaeresis,
            xK_ETH,
            xK_Eth,
            xK_Ntilde,
            xK_Ograve,
            xK_Oacute,
            xK_Ocircumflex,
            xK_Otilde,
            xK_Odiaeresis,
            xK_multiply,
            xK_Ooblique,
            xK_Ugrave,
            xK_Uacute,
            xK_Ucircumflex,
            xK_Udiaeresis,
            xK_Yacute,
            xK_THORN,
            xK_Thorn,
            xK_ssharp,
            xK_agrave,
            xK_aacute,
            xK_acircumflex,
            xK_atilde,
            xK_adiaeresis,
            xK_aring,
            xK_ae,
            xK_ccedilla,
            xK_egrave,
            xK_eacute,
            xK_ecircumflex,
            xK_ediaeresis,
            xK_igrave,
            xK_iacute,
            xK_icircumflex,
            xK_idiaeresis,
            xK_eth,
            xK_ntilde,
            xK_ograve,
            xK_oacute,
            xK_ocircumflex,
            xK_otilde,
            xK_odiaeresis,
            xK_division,
            xK_oslash,
            xK_ugrave,
            xK_uacute,
            xK_ucircumflex,
            xK_udiaeresis,
            xK_yacute,
            xK_thorn,
            xK_ydiaeresis,

            -- ** Event masks
            EventMask,
            noEventMask,
            keyPressMask,
            keyReleaseMask,
            buttonPressMask,
            buttonReleaseMask,
            enterWindowMask,
            leaveWindowMask,
            pointerMotionMask,
            pointerMotionHintMask,
            button1MotionMask,
            button2MotionMask,
            button3MotionMask,
            button4MotionMask,
            button5MotionMask,
            buttonMotionMask,
            keymapStateMask,
            exposureMask,
            visibilityChangeMask,
            structureNotifyMask,
            resizeRedirectMask,
            substructureNotifyMask,
            substructureRedirectMask,
            focusChangeMask,
            propertyChangeMask,
            colormapChangeMask,
            ownerGrabButtonMask,
            rrScreenChangeNotifyMask,
            rrCrtcChangeNotifyMask,
            rrOutputChangeNotifyMask,
            rrOutputPropertyNotifyMask,
            screenSaverCycleMask,
            screenSaverNotifyMask,

            -- ** Event types
            EventType,
            keyPress,
            keyRelease,
            buttonPress,
            buttonRelease,
            motionNotify,
            enterNotify,
            leaveNotify,
            focusIn,
            focusOut,
            keymapNotify,
            expose,
            graphicsExpose,
            noExpose,
            visibilityNotify,
            createNotify,
            destroyNotify,
            unmapNotify,
            mapNotify,
            mapRequest,
            reparentNotify,
            configureNotify,
            configureRequest,
            gravityNotify,
            resizeRequest,
            circulateNotify,
            circulateRequest,
            propertyNotify,
            selectionClear,
            selectionRequest,
            selectionNotify,
            colormapNotify,
            clientMessage,
            mappingNotify,
            rrScreenChangeNotify,
            rrNotify,
            rrNotifyCrtcChange,
            rrNotifyOutputChange,
            rrNotifyOutputProperty,
            lASTEvent,
            screenSaverNotify,

            -- ** Modifiers
            Modifier,
            shiftMapIndex,
            lockMapIndex,
            controlMapIndex,
            mod1MapIndex,
            mod2MapIndex,
            mod3MapIndex,
            mod4MapIndex,
            mod5MapIndex,
            anyModifier,

            -- ** Key masks
            KeyMask,
            noModMask,
            shiftMask,
            lockMask,
            controlMask,
            mod1Mask,
            mod2Mask,
            mod3Mask,
            mod4Mask,
            mod5Mask,

            -- ** Button masks
            ButtonMask,
            button1Mask,
            button2Mask,
            button3Mask,
            button4Mask,
            button5Mask,

            -- ** Buttons
            Button,
            button1,
            button2,
            button3,
            button4,
            button5,

            -- ** Notify modes
            NotifyMode,
            notifyNormal,
            notifyGrab,
            notifyUngrab,
            notifyWhileGrabbed,
            notifyHint,

            -- ** Notify details
            NotifyDetail,
            notifyAncestor,
            notifyVirtual,
            notifyInferior,
            notifyNonlinear,
            notifyNonlinearVirtual,
            notifyPointer,
            notifyPointerRoot,
            notifyDetailNone,

            -- ** Visibility
            Visibility,
            visibilityUnobscured,
            visibilityPartiallyObscured,
            visibilityFullyObscured,

            -- ** Place of window
            Place,
            placeOnTop,
            placeOnBottom,

            -- ** Protocols
            Protocol,
            familyInternet,
            familyDECnet,
            familyChaos,

            -- ** Property notification
            PropertyNotification,
            propertyNewValue,
            propertyDelete,

            -- ** Colormap notification
            ColormapNotification,
            colormapUninstalled,
            colormapInstalled,

            -- ** Grab modes
            GrabMode,
            grabModeSync,
            grabModeAsync,

            -- ** Grab status
            GrabStatus,
            grabSuccess,
            alreadyGrabbed,
            grabInvalidTime,
            grabNotViewable,
            grabFrozen,

            -- ** Allow events
            AllowEvents,
            asyncPointer,
            syncPointer,
            replayPointer,
            asyncKeyboard,
            syncKeyboard,
            replayKeyboard,
            asyncBoth,
            syncBoth,

            -- ** Focus modes
            FocusMode,
            revertToNone,
            revertToPointerRoot,
            revertToParent,

            -- ** Error codes
            ErrorCode,
            success,
            badRequest,
            badValue,
            badWindow,
            badPixmap,
            badAtom,
            badCursor,
            badFont,
            badMatch,
            badDrawable,
            badAccess,
            badAlloc,
            badColor,
            badGC,
            badIDChoice,
            badName,
            badLength,
            badImplementation,
            firstExtensionError,
            lastExtensionError,

            -- ** Return status
            Status,
            throwIfZero,

            -- ** WindowClass
            WindowClass,
            copyFromParent,
            inputOutput,
            inputOnly,

            -- ** Attribute masks
            AttributeMask,
            cWBackPixmap,
            cWBackPixel,
            cWBorderPixmap,
            cWBorderPixel,
            cWBitGravity,
            cWWinGravity,
            cWBackingStore,
            cWBackingPlanes,
            cWBackingPixel,
            cWOverrideRedirect,
            cWSaveUnder,
            cWEventMask,
            cWDontPropagate,
            cWColormap,
            cWCursor,
            cWX,
            cWY,
            cWWidth,
            cWHeight,

            -- ** Close down modes
            CloseDownMode,
            destroyAll,
            retainPermanent,
            retainTemporary,

            -- ** QueryBestSize classes
            QueryBestSizeClass,
            cursorShape,
            tileShape,
            stippleShape,

            -- ** Graphics functions
            GXFunction,
            gXclear,
            gXand,
            gXandReverse,
            gXcopy,
            gXandInverted,
            gXnoop,
            gXxor,
            gXor,
            gXnor,
            gXequiv,
            gXinvert,
            gXorReverse,
            gXcopyInverted,
            gXorInverted,
            gXnand,
            gXset,

            -- ** Line styles
            LineStyle,
            lineSolid,
            lineOnOffDash,
            lineDoubleDash,

            -- ** Cap styles
            CapStyle,
            capNotLast,
            capButt,
            capRound,
            capProjecting,

            -- ** Join styles
            JoinStyle,
            joinMiter,
            joinRound,
            joinBevel,

            -- ** Fill styles
            FillStyle,
            fillSolid,
            fillTiled,
            fillStippled,
            fillOpaqueStippled,

            -- ** Fill rules
            FillRule,
            evenOddRule,
            windingRule,

            -- ** Subwindow modes
            SubWindowMode,
            clipByChildren,
            includeInferiors,

            -- ** Coordinate modes
            CoordinateMode,
            coordModeOrigin,
            coordModePrevious,

            -- ** Polygon shapes
            PolygonShape,
            complex,
            nonconvex,
            convex,

            -- ** Arc modes
            ArcMode,
            arcChord,
            arcPieSlice,

            -- ** GC masks
            GCMask,
            gCFunction,
            gCPlaneMask,
            gCForeground,
            gCBackground,
            gCLineWidth,
            gCLineStyle,
            gCCapStyle,
            gCJoinStyle,
            gCFillStyle,
            gCFillRule,
            gCTile,
            gCStipple,
            gCTileStipXOrigin,
            gCTileStipYOrigin,
            gCFont,
            gCSubwindowMode,
            gCGraphicsExposures,
            gCClipXOrigin,
            gCClipYOrigin,
            gCClipMask,
            gCDashOffset,
            gCDashList,
            gCArcMode,
            gCLastBit,

            -- ** Circulation direction
            CirculationDirection,
            raiseLowest,
            lowerHighest,

            -- ** Byte order
            ByteOrder,
            lSBFirst,
            mSBFirst,

            -- ** ColormapAlloc
            ColormapAlloc,
            allocNone,
            allocAll,

            -- ** Mapping requests
            MappingRequest,
            mappingModifier,
            mappingKeyboard,
            mappingPointer,

            -- ** ChangeSaveSetMode
            ChangeSaveSetMode,
            setModeInsert,
            setModeDelete,

            -- ** Bit gravity
            BitGravity,
            forgetGravity,
            northWestGravity,
            northGravity,
            northEastGravity,
            westGravity,
            centerGravity,
            eastGravity,
            southWestGravity,
            southGravity,
            southEastGravity,
            staticGravity,

            -- ** Window gravity
            WindowGravity,
            unmapGravity,

            -- ** Backing store
            BackingStore,
            notUseful,
            whenMapped,
            always,
            doRed,
            doGreen,
            doBlue,

            -- ** Font direction
            FontDirection,
            fontLeftToRight,
            fontRightToLeft,

            -- ** Image format
            ImageFormat,
            xyBitmap,
            xyPixmap,
            zPixmap,

            -- ** Reflection and Rotation
            Rotation,
            Reflection,
            xRR_Rotate_0,
            xRR_Rotate_90,
            xRR_Rotate_180,
            xRR_Rotate_270,
            xRR_Reflect_X,
            xRR_Reflect_Y,
            xRR_Connected,
            xRR_Disconnected,
            xRR_UnknownConnection
            ) where

    -- import Data.Int
    import Data.Word
    import Foreign.Marshal.Error
    import Foreign.C.Types

    -- ToDo: use newtype
    type XID      = Word64
    {-# LINE 852 "Graphics/X11/Types.hsc" #-}
    type Mask     = Word64
    {-# LINE 853 "Graphics/X11/Types.hsc" #-}
    type Atom     = Word64
    {-# LINE 854 "Graphics/X11/Types.hsc" #-}
    type VisualID = Word64
    {-# LINE 855 "Graphics/X11/Types.hsc" #-}
    type Time     = Word64
    {-# LINE 856 "Graphics/X11/Types.hsc" #-}

    -- end platform dependency

    type Window   = XID
    type Drawable = XID
    type Font     = XID
    type Pixmap   = XID
    type Cursor   = XID
    type Colormap = XID
    type GContext = XID

    type KeyCode  = Word8
    {-# LINE 868 "Graphics/X11/Types.hsc" #-}

    type KeySym   = XID

    xK_VoidSymbol         :: KeySym
    xK_VoidSymbol :: AttributeMask
    xK_VoidSymbol         =  AttributeMask
    16777215

    {-# LINE 874 "Graphics/X11/Types.hsc" #-}

    -- TTY Functions, cleverly chosen to map to ascii, for convenience of
    -- programming, but could have been arbitrary (at the cost of lookup
    -- tables in client code.

    xK_BackSpace          :: KeySym
    xK_BackSpace :: AttributeMask
    xK_BackSpace          =  AttributeMask
    65288
    xK_Tab                :: KeySym
    xK_Tab :: AttributeMask
    xK_Tab                =  AttributeMask
    65289
    xK_Linefeed           :: KeySym
    xK_Linefeed :: AttributeMask
    xK_Linefeed           =  AttributeMask
    65290
    xK_Clear              :: KeySym
    xK_Clear :: AttributeMask
    xK_Clear              =  AttributeMask
    65291
    xK_Return             :: KeySym
    xK_Return :: AttributeMask
    xK_Return             =  AttributeMask
    65293
    xK_Pause              :: KeySym
    xK_Pause :: AttributeMask
    xK_Pause              =  AttributeMask
    65299
    xK_Scroll_Lock        :: KeySym
    xK_Scroll_Lock :: AttributeMask
    xK_Scroll_Lock        =  AttributeMask
    65300
    xK_Sys_Req            :: KeySym
    xK_Sys_Req :: AttributeMask
    xK_Sys_Req            =  AttributeMask
    65301
    xK_Escape             :: KeySym
    xK_Escape :: AttributeMask
    xK_Escape             =  AttributeMask
    65307
    xK_Delete             :: KeySym
    xK_Delete :: AttributeMask
    xK_Delete             =  AttributeMask
    65535

    {-# LINE 891 "Graphics/X11/Types.hsc" #-}

    -- International & multi-key character composition
    xK_Multi_key          :: KeySym
    xK_Multi_key          =  65312

    {-# LINE 896 "Graphics/X11/Types.hsc" #-}

    -- Not defined for SunOS

    {-# LINE 899 "Graphics/X11/Types.hsc" #-}
    xK_Codeinput         :: KeySym
    xK_Codeinput         = 65335
    {-# LINE 901 "Graphics/X11/Types.hsc" #-}

    {-# LINE 902 "Graphics/X11/Types.hsc" #-}

    {-# LINE 903 "Graphics/X11/Types.hsc" #-}
    xK_SingleCandidate   :: KeySym
    xK_SingleCandidate :: AttributeMask
    xK_SingleCandidate   = AttributeMask
    65340
    {-# LINE 905 "Graphics/X11/Types.hsc" #-}

    {-# LINE 906 "Graphics/X11/Types.hsc" #-}

    {-# LINE 907 "Graphics/X11/Types.hsc" #-}
    xK_MultipleCandidate :: KeySym
    xK_MultipleCandidate :: AttributeMask
    xK_MultipleCandidate = AttributeMask
    65341
    {-# LINE 909 "Graphics/X11/Types.hsc" #-}

    {-# LINE 910 "Graphics/X11/Types.hsc" #-}

    {-# LINE 911 "Graphics/X11/Types.hsc" #-}
    xK_PreviousCandidate :: KeySym
    xK_PreviousCandidate :: AttributeMask
    xK_PreviousCandidate = AttributeMask
    65342
    {-# LINE 913 "Graphics/X11/Types.hsc" #-}

    {-# LINE 914 "Graphics/X11/Types.hsc" #-}

    -- Cursor control & motion
    xK_Home               :: KeySym
    xK_Home :: AttributeMask
    xK_Home               =  AttributeMask
    65360
    xK_Left               :: KeySym
    xK_Left :: AttributeMask
    xK_Left               =  AttributeMask
    65361
    xK_Up                 :: KeySym
    xK_Up :: AttributeMask
    xK_Up                 =  AttributeMask
    65362
    xK_Right              :: KeySym
    xK_Right :: AttributeMask
    xK_Right              =  AttributeMask
    65363
    xK_Down               :: KeySym
    xK_Down :: AttributeMask
    xK_Down               =  AttributeMask
    65364
    xK_Prior              :: KeySym
    xK_Prior :: AttributeMask
    xK_Prior              =  AttributeMask
    65365
    xK_Page_Up            :: KeySym
    xK_Page_Up :: AttributeMask
    xK_Page_Up            =  AttributeMask
    65365
    xK_Next               :: KeySym
    xK_Next :: AttributeMask
    xK_Next               =  AttributeMask
    65366
    xK_Page_Down          :: KeySym
    xK_Page_Down :: AttributeMask
    xK_Page_Down          =  AttributeMask
    65366
    xK_End                :: KeySym
    xK_End :: AttributeMask
    xK_End                =  AttributeMask
    65367
    xK_Begin              :: KeySym
    xK_Begin :: AttributeMask
    xK_Begin              =  AttributeMask
    65368
    xK_Select             :: KeySym
    xK_Select :: AttributeMask
    xK_Select             =  AttributeMask
    65376
    xK_Print              :: KeySym
    xK_Print :: AttributeMask
    xK_Print              =  AttributeMask
    65377
    xK_Execute            :: KeySym
    xK_Execute :: AttributeMask
    xK_Execute            =  AttributeMask
    65378
    xK_Insert             :: KeySym
    xK_Insert :: AttributeMask
    xK_Insert             =  AttributeMask
    65379
    xK_Undo               :: KeySym
    xK_Undo :: AttributeMask
    xK_Undo               =  AttributeMask
    65381
    xK_Redo               :: KeySym
    xK_Redo :: AttributeMask
    xK_Redo               =  AttributeMask
    65382
    xK_Menu               :: KeySym
    xK_Menu :: AttributeMask
    xK_Menu               =  AttributeMask
    65383
    xK_Find               :: KeySym
    xK_Find :: AttributeMask
    xK_Find               =  AttributeMask
    65384
    xK_Cancel             :: KeySym
    xK_Cancel :: AttributeMask
    xK_Cancel             =  AttributeMask
    65385
    xK_Help               :: KeySym
    xK_Help :: AttributeMask
    xK_Help               =  AttributeMask
    65386
    xK_Break              :: KeySym
    xK_Break :: AttributeMask
    xK_KP_F4 :: AttributeMask
    xK_Break              =  AttributeMask
    65387
    xK_Mode_switch        :: KeySym
    xK_Mode_switch :: AttributeMask
    xK_Mode_switch        =  AttributeMask
    65406
    xK_script_switch      :: KeySym
    xK_script_switch :: AttributeMask
    xK_script_switch      =  AttributeMask
    65406
    xK_Num_Lock           :: KeySym
    xK_Num_Lock :: AttributeMask
    xK_Num_Lock           =  AttributeMask
    65407

    {-# LINE 944 "Graphics/X11/Types.hsc" #-}

    -- Keypad Functions, keypad numbers cleverly chosen to map to ascii
    xK_KP_Space           :: KeySym
    xK_KP_Space           =  65408
    xK_KP_Tab             :: KeySym
    xK_KP_Tab             =  65417
    xK_KP_Enter           :: KeySym
    xK_KP_Enter           =  65421
    xK_KP_F1              :: KeySym
    xK_KP_F1              =  65425
    xK_KP_F2              :: KeySym
    xK_KP_F2              =  65426
    xK_KP_F3              :: KeySym
    xK_KP_F3              =  65427
    xK_KP_F4              :: KeySym
    xK_KP_F4              =  65428
    xK_KP_Home            :: KeySym
    xK_KP_Home            =  65429
    xK_KP_Left            :: KeySym
    xK_KP_Left            =  65430
    xK_KP_Up              :: KeySym
    xK_KP_Up              =  65431
    xK_KP_Right           :: KeySym
    xK_KP_Right           =  65432
    xK_KP_Down            :: KeySym
    xK_KP_Down :: AttributeMask
    xK_KP_Down            =  AttributeMask
    65433
    xK_KP_Prior           :: KeySym
    xK_KP_Prior :: AttributeMask
    xK_KP_Prior           =  AttributeMask
    65434
    xK_KP_Page_Up         :: KeySym
    xK_KP_Page_Up :: AttributeMask
    xK_KP_Page_Up         =  AttributeMask
    65434
    xK_KP_Next            :: KeySym
    xK_KP_Next :: AttributeMask
    xK_KP_Next            =  AttributeMask
    65435
    xK_KP_Page_Down       :: KeySym
    xK_KP_Page_Down :: AttributeMask
    xK_KP_Page_Down       =  AttributeMask
    65435
    xK_KP_End             :: KeySym
    xK_KP_End :: AttributeMask
    xK_KP_End             =  AttributeMask
    65436
    xK_KP_Begin           :: KeySym
    xK_KP_Begin :: AttributeMask
    xK_KP_Begin           =  AttributeMask
    65437
    xK_KP_Insert          :: KeySym
    xK_KP_Insert :: AttributeMask
    xK_KP_Insert          =  AttributeMask
    65438
    xK_KP_Delete          :: KeySym
    xK_KP_Delete :: AttributeMask
    xK_KP_Delete          =  AttributeMask
    65439
    xK_KP_Equal           :: KeySym
    xK_KP_Equal :: AttributeMask
    xK_KP_Equal           =  AttributeMask
    65469
    xK_KP_Multiply        :: KeySym
    xK_KP_Multiply :: AttributeMask
    xK_KP_Multiply        =  AttributeMask
    65450
    xK_KP_Add             :: KeySym
    xK_KP_Add :: AttributeMask
    xK_KP_Add             =  AttributeMask
    65451
    xK_KP_Separator       :: KeySym
    xK_KP_Separator :: AttributeMask
    xK_KP_Separator       =  AttributeMask
    65452
    xK_KP_Subtract        :: KeySym
    xK_KP_Subtract :: AttributeMask
    xK_KP_Subtract        =  AttributeMask
    65453
    xK_KP_Decimal         :: KeySym
    xK_KP_Decimal :: AttributeMask
    xK_KP_Decimal         =  AttributeMask
    65454
    xK_KP_Divide          :: KeySym
    xK_KP_Divide :: AttributeMask
    xK_KP_Divide          =  AttributeMask
    65455
    xK_KP_0               :: KeySym
    xK_KP_0 :: AttributeMask
    xK_KP_0               =  AttributeMask
    65456
    xK_KP_1               :: KeySym
    xK_KP_1 :: AttributeMask
    xK_KP_1               =  AttributeMask
    65457
    xK_KP_2               :: KeySym
    xK_KP_2 :: AttributeMask
    xK_KP_2               =  AttributeMask
    65458
    xK_KP_3               :: KeySym
    xK_KP_3 :: AttributeMask
    xK_KP_3               =  AttributeMask
    65459
    xK_KP_4               :: KeySym
    xK_KP_4 :: AttributeMask
    xK_KP_4               =  AttributeMask
    65460
    xK_KP_5               :: KeySym
    xK_KP_5 :: AttributeMask
    xK_KP_5               =  AttributeMask
    65461
    xK_KP_6               :: KeySym
    xK_KP_6 :: AttributeMask
    xK_KP_6               =  AttributeMask
    65462
    xK_KP_7               :: KeySym
    xK_KP_7 :: AttributeMask
    xK_KP_7               =  AttributeMask
    65463
    xK_KP_8               :: KeySym
    xK_KP_8 :: AttributeMask
    xK_KP_8               =  AttributeMask
    65464
    xK_KP_9               :: KeySym
    xK_KP_9 :: AttributeMask
    xK_KP_9               =  AttributeMask
    65465
    xK_F1                 :: KeySym
    xK_F1 :: AttributeMask
    xK_F1                 =  AttributeMask
    65470
    xK_F2                 :: KeySym
    xK_F2 :: AttributeMask
    xK_F2                 =  AttributeMask
    65471
    xK_F3                 :: KeySym
    xK_F3 :: AttributeMask
    xK_F3                 =  AttributeMask
    65472
    xK_F4                 :: KeySym
    xK_F4 :: AttributeMask
    xK_F4                 =  AttributeMask
    65473
    xK_F5                 :: KeySym
    xK_F5 :: AttributeMask
    xK_F5                 =  AttributeMask
    65474
    xK_F6                 :: KeySym
    xK_F6 :: AttributeMask
    xK_F6                 =  AttributeMask
    65475
    xK_F7                 :: KeySym
    xK_F7 :: AttributeMask
    xK_F7                 =  AttributeMask
    65476
    xK_F8                 :: KeySym
    xK_F8 :: AttributeMask
    xK_F8                 =  AttributeMask
    65477
    xK_F9                 :: KeySym
    xK_F9 :: AttributeMask
    xK_F9                 =  AttributeMask
    65478
    xK_F10                :: KeySym
    xK_F10 :: AttributeMask
    xK_F10                =  AttributeMask
    65479
    xK_F11                :: KeySym
    xK_F11 :: AttributeMask
    xK_F11                =  AttributeMask
    65480
    xK_L1                 :: KeySym
    xK_L1 :: AttributeMask
    xK_L1                 =  AttributeMask
    65480
    xK_F12                :: KeySym
    xK_F12 :: AttributeMask
    xK_F12                =  AttributeMask
    65481
    xK_L2                 :: KeySym
    xK_L2 :: AttributeMask
    xK_L2                 =  AttributeMask
    65481
    xK_F13                :: KeySym
    xK_F13 :: AttributeMask
    xK_F13                =  AttributeMask
    65482
    xK_L3                 :: KeySym
    xK_L3 :: AttributeMask
    xK_L3                 =  AttributeMask
    65482
    xK_F14                :: KeySym
    xK_F14 :: AttributeMask
    xK_F14                =  AttributeMask
    65483
    xK_L4                 :: KeySym
    xK_L4 :: AttributeMask
    xK_L4                 =  AttributeMask
    65483
    xK_F15                :: KeySym
    xK_F15 :: AttributeMask
    xK_F15                =  AttributeMask
    65484
    xK_L5                 :: KeySym
    xK_L5 :: AttributeMask
    xK_L5                 =  AttributeMask
    65484
    xK_F16                :: KeySym
    xK_F16 :: AttributeMask
    xK_F16                =  AttributeMask
    65485
    xK_L6                 :: KeySym
    xK_L6 :: AttributeMask
    xK_L6                 =  AttributeMask
    65485
    xK_F17                :: KeySym
    xK_F17 :: AttributeMask
    xK_F17                =  AttributeMask
    65486
    xK_L7                 :: KeySym
    xK_L7 :: AttributeMask
    xK_L7                 =  AttributeMask
    65486
    xK_F18                :: KeySym
    xK_F18 :: AttributeMask
    xK_F18                =  AttributeMask
    65487
    xK_L8                 :: KeySym
    xK_L8 :: AttributeMask
    xK_L8                 =  AttributeMask
    65487
    xK_F19                :: KeySym
    xK_F19 :: AttributeMask
    xK_F19                =  AttributeMask
    65488
    xK_L9                 :: KeySym
    xK_L9 :: AttributeMask
    xK_L9                 =  65488
    xK_F20                :: KeySym
    xK_F20 :: AttributeMask
    xK_F20                =  AttributeMask
    65489
    xK_L10                :: KeySym
    xK_L10 :: AttributeMask
    xK_L10                =  AttributeMask
    65489
    xK_F21                :: KeySym
    xK_F21 :: AttributeMask
    xK_F21                =  AttributeMask
    65490
    xK_R1                 :: KeySym
    xK_R1 :: AttributeMask
    xK_R1                 =  AttributeMask
    65490
    xK_F22                :: KeySym
    xK_F22 :: AttributeMask
    xK_F22                =  AttributeMask
    65491
    xK_R2                 :: KeySym
    xK_R2 :: AttributeMask
    xK_R2                 =  AttributeMask
    65491
    xK_F23                :: KeySym
    xK_F23 :: AttributeMask
    xK_F23                =  AttributeMask
    65492
    xK_R3                 :: KeySym
    xK_R3 :: AttributeMask
    xK_R3                 =  AttributeMask
    65492
    xK_F24                :: KeySym
    xK_F24 :: AttributeMask
    xK_F24                =  AttributeMask
    65493
    xK_R4                 :: KeySym
    xK_R4 :: AttributeMask
    xK_R4                 =  AttributeMask
    65493
    xK_F25                :: KeySym
    xK_F25 :: AttributeMask
    xK_F25                =  AttributeMask
    65494
    xK_R5                 :: KeySym
    xK_R5 :: AttributeMask
    xK_R5                 =  AttributeMask
    65494
    xK_F26                :: KeySym
    xK_F26 :: AttributeMask
    xK_F26                =  AttributeMask
    65495
    xK_R6                 :: KeySym
    xK_R6 :: AttributeMask
    xK_R6                 =  65495
    xK_F27                :: KeySym
    xK_F27 :: AttributeMask
    xK_F27                =  AttributeMask
    65496
    xK_R7                 :: KeySym
    xK_R7 :: AttributeMask
    xK_R7                 =  AttributeMask
    65496
    xK_F28                :: KeySym
    xK_F28 :: AttributeMask
    xK_F28                =  AttributeMask
    65497
    xK_R8                 :: KeySym
    xK_R8 :: AttributeMask
    xK_R8                 =  AttributeMask
    65497
    xK_F29                :: KeySym
    xK_F29 :: AttributeMask
    xK_F29                =  AttributeMask
    65498
    xK_R9                 :: KeySym
    xK_R9 :: AttributeMask
    xK_R9                 =  AttributeMask
    65498
    xK_F30                :: KeySym
    xK_F30 :: AttributeMask
    xK_F30                =  AttributeMask
    65499
    xK_R10                :: KeySym
    xK_R10 :: AttributeMask
    xK_R10                =  AttributeMask
    65499
    xK_F31                :: KeySym
    xK_F31 :: AttributeMask
    xK_F31                =  AttributeMask
    65500
    xK_R11                :: KeySym
    xK_R11 :: AttributeMask
    xK_R11                =  AttributeMask
    65500
    xK_F32                :: KeySym
    xK_F32 :: AttributeMask
    xK_F32                =  AttributeMask
    65501
    xK_R12                :: KeySym
    xK_R12 :: AttributeMask
    xK_R12                =  AttributeMask
    65501
    xK_F33                :: KeySym
    xK_F33 :: AttributeMask
    xK_F33                =  AttributeMask
    65502
    xK_R13                :: KeySym
    xK_R13 :: AttributeMask
    xK_R13                =  AttributeMask
    65502
    xK_F34                :: KeySym
    xK_F34 :: AttributeMask
    xK_F34                =  AttributeMask
    65503
    xK_R14                :: KeySym
    xK_R14 :: AttributeMask
    xK_R14                =  AttributeMask
    65503
    xK_F35                :: KeySym
    xK_F35 :: AttributeMask
    xK_F35                =  AttributeMask
    65504
    xK_R15                :: KeySym
    xK_R15 :: AttributeMask
    xK_R15                =  AttributeMask
    65504

    {-# LINE 1047 "Graphics/X11/Types.hsc" #-}

    xK_Shift_L            :: KeySym
    xK_Shift_L            =  65505
    xK_Shift_R            :: KeySym
    xK_Shift_R            =  65506
    xK_Control_L          :: KeySym
    xK_Control_L          =  65507
    xK_Control_R          :: KeySym
    xK_Control_R          =  65508
    xK_Caps_Lock          :: KeySym
    xK_Caps_Lock          =  65509
    xK_Shift_Lock         :: KeySym
    xK_Shift_Lock         =  65510
    xK_Meta_L             :: KeySym
    xK_Meta_L             =  65511
    xK_Meta_R             :: KeySym
    xK_Meta_R             =  65512
    xK_Alt_L              :: KeySym
    xK_Alt_L              =  65513
    xK_Alt_R              :: KeySym
    xK_Alt_R              =  65514
    xK_Super_L            :: KeySym
    xK_Super_L            =  65515
    xK_Super_R            :: KeySym
    xK_Super_R            =  65516
    xK_Hyper_L            :: KeySym
    xK_Hyper_L            =  65517
    xK_Hyper_R            :: KeySym
    xK_Hyper_R            =  65518

    {-# LINE 1065 "Graphics/X11/Types.hsc" #-}

    xK_space              :: KeySym
    xK_space              =  32
    xK_exclam             :: KeySym
    xK_exclam             =  33
    xK_quotedbl           :: KeySym
    xK_quotedbl           =  34
    xK_numbersign         :: KeySym
    xK_numbersign         =  35
    xK_dollar             :: KeySym
    xK_dollar             =  36
    xK_percent            :: KeySym
    xK_percent            =  37
    xK_ampersand          :: KeySym
    xK_ampersand          =  38
    xK_apostrophe         :: KeySym
    xK_apostrophe         =  39
    xK_quoteright         :: KeySym
    xK_quoteright         =  39
    xK_parenleft          :: KeySym
    xK_parenleft          =  40
    xK_parenright         :: KeySym
    xK_parenright         =  41
    xK_asterisk           :: KeySym
    xK_asterisk           =  42
    xK_plus               :: KeySym
    xK_plus               =  43
    xK_comma              :: KeySym
    xK_comma              =  44
    xK_minus              :: KeySym
    xK_minus              =  45
    xK_period             :: KeySym
    xK_period             =  46
    xK_slash              :: KeySym
    xK_slash              =  47
    xK_0                  :: KeySym
    xK_0                  =  48
    xK_1                  :: KeySym
    xK_1                  =  49
    xK_2                  :: KeySym
    xK_2                  =  50
    xK_3                  :: KeySym
    xK_3                  =  51
    xK_4                  :: KeySym
    xK_4                  =  52
    xK_5                  :: KeySym
    xK_5                  =  53
    xK_6                  :: KeySym
    xK_6                  =  54
    xK_7                  :: KeySym
    xK_7                  =  55
    xK_8                  :: KeySym
    xK_8                  =  56
    xK_9                  :: KeySym
    xK_9                  =  57
    xK_colon              :: KeySym
    xK_colon              =  58
    xK_semicolon          :: KeySym
    xK_semicolon          =  59
    xK_less               :: KeySym
    xK_less               =  60
    xK_equal              :: KeySym
    xK_equal              =  61
    xK_greater            :: KeySym
    xK_greater            =  62
    xK_question           :: KeySym
    xK_question           =  63
    xK_at                 :: KeySym
    xK_at                 =  64
    xK_A                  :: KeySym
    xK_A                  =  65
    xK_B                  :: KeySym
    xK_B                  =  66
    xK_C                  :: KeySym
    xK_C                  =  67
    xK_D                  :: KeySym
    xK_D                  =  68
    xK_E                  :: KeySym
    xK_E :: AttributeMask
    xK_E                  =  AttributeMask
    69
    xK_F                  :: KeySym
    xK_F :: AttributeMask
    xK_F                  =  AttributeMask
    70
    xK_G                  :: KeySym
    xK_G :: AttributeMask
    xK_G                  =  AttributeMask
    71
    xK_H                  :: KeySym
    xK_H :: AttributeMask
    xK_H                  =  AttributeMask
    72
    xK_I                  :: KeySym
    xK_I :: AttributeMask
    xK_I                  =  AttributeMask
    73
    xK_J                  :: KeySym
    xK_J :: AttributeMask
    xK_J                  =  AttributeMask
    74
    xK_K                  :: KeySym
    xK_K :: AttributeMask
    xK_K                  =  AttributeMask
    75
    xK_L                  :: KeySym
    xK_L :: AttributeMask
    xK_L                  =  AttributeMask
    76
    xK_M                  :: KeySym
    xK_M :: AttributeMask
    xK_M                  =  AttributeMask
    77
    xK_N                  :: KeySym
    xK_N :: AttributeMask
    xK_N                  =  AttributeMask
    78
    xK_O                  :: KeySym
    xK_O :: AttributeMask
    xK_O                  =  AttributeMask
    79
    xK_P                  :: KeySym
    xK_P :: AttributeMask
    xK_P                  =  AttributeMask
    80
    xK_Q                  :: KeySym
    xK_Q :: AttributeMask
    xK_Q                  =  AttributeMask
    81
    xK_R                  :: KeySym
    xK_R :: AttributeMask
    xK_R                  =  AttributeMask
    82
    xK_S                  :: KeySym
    xK_S :: AttributeMask
    xK_S                  =  AttributeMask
    83
    xK_T                  :: KeySym
    xK_T :: AttributeMask
    xK_T                  =  AttributeMask
    84
    xK_U                  :: KeySym
    xK_U :: AttributeMask
    xK_U                  =  AttributeMask
    85
    xK_V                  :: KeySym
    xK_V :: AttributeMask
    xK_V                  =  AttributeMask
    86
    xK_W                  :: KeySym
    xK_W :: AttributeMask
    xK_W                  =  AttributeMask
    87
    xK_X                  :: KeySym
    xK_X :: AttributeMask
    xK_X                  =  AttributeMask
    88
    xK_Y                  :: KeySym
    xK_Y :: AttributeMask
    xK_Y                  =  AttributeMask
    89
    xK_Z                  :: KeySym
    xK_Z :: AttributeMask
    xK_Z                  =  AttributeMask
    90
    xK_bracketleft        :: KeySym
    xK_bracketleft :: AttributeMask
    xK_ordfeminine :: AttributeMask
    xK_bracketleft        =  AttributeMask
    91
    xK_backslash          :: KeySym
    xK_backslash :: AttributeMask
    xK_backslash          =  AttributeMask
    92
    xK_bracketright       :: KeySym
    xK_bracketright :: AttributeMask
    xK_bracketright       =  AttributeMask
    93
    xK_asciicircum        :: KeySym
    xK_asciicircum :: AttributeMask
    xK_asciicircum        =  AttributeMask
    94
    xK_underscore         :: KeySym
    xK_underscore :: AttributeMask
    xK_registered :: AttributeMask
    xK_underscore         =  AttributeMask
    95
    xK_grave              :: KeySym
    xK_grave :: AttributeMask
    xK_grave              =  AttributeMask
    96
    xK_quoteleft          :: KeySym
    xK_quoteleft :: AttributeMask
    xK_quoteleft          =  AttributeMask
    96
    xK_a                  :: KeySym
    xK_a :: AttributeMask
    xK_a                  =  AttributeMask
    97
    xK_b                  :: KeySym
    xK_b :: AttributeMask
    xK_b                  =  AttributeMask
    98
    xK_c                  :: KeySym
    xK_c :: AttributeMask
    xK_c                  =  AttributeMask
    99
    xK_d                  :: KeySym
    xK_d :: AttributeMask
    xK_d                  =  AttributeMask
    100
    xK_e                  :: KeySym
    xK_e :: AttributeMask
    xK_e                  =  AttributeMask
    101
    xK_f                  :: KeySym
    xK_f :: AttributeMask
    xK_f                  =  AttributeMask
    102
    xK_g                  :: KeySym
    xK_g :: AttributeMask
    xK_g                  =  AttributeMask
    103
    xK_h                  :: KeySym
    xK_h :: AttributeMask
    xK_h                  =  AttributeMask
    104
    xK_i                  :: KeySym
    xK_i :: AttributeMask
    xK_i                  =  AttributeMask
    105
    xK_j                  :: KeySym
    xK_j :: AttributeMask
    xK_j                  =  AttributeMask
    106
    xK_k                  :: KeySym
    xK_k :: AttributeMask
    xK_k                  =  AttributeMask
    107
    xK_l                  :: KeySym
    xK_l :: AttributeMask
    xK_l                  =  AttributeMask
    108
    xK_m                  :: KeySym
    xK_m :: AttributeMask
    xK_m                  =  AttributeMask
    109
    xK_n                  :: KeySym
    xK_n :: AttributeMask
    xK_n                  =  AttributeMask
    110
    xK_o                  :: KeySym
    xK_o :: AttributeMask
    xK_o                  =  AttributeMask
    111
    xK_p                  :: KeySym
    xK_p :: AttributeMask
    xK_p                  =  AttributeMask
    112
    xK_q                  :: KeySym
    xK_q :: AttributeMask
    xK_q                  =  AttributeMask
    113
    xK_r                  :: KeySym
    xK_r :: AttributeMask
    xK_r                  =  AttributeMask
    114
    xK_s                  :: KeySym
    xK_s :: AttributeMask
    xK_s                  =  AttributeMask
    115
    xK_t                  :: KeySym
    xK_t :: AttributeMask
    xK_t                  =  AttributeMask
    116
    xK_u                  :: KeySym
    xK_u :: AttributeMask
    xK_u                  =  AttributeMask
    117
    xK_v                  :: KeySym
    xK_v :: AttributeMask
    xK_v                  =  AttributeMask
    118
    xK_w                  :: KeySym
    xK_w :: AttributeMask
    xK_w                  =  AttributeMask
    119
    xK_x                  :: KeySym
    xK_x :: AttributeMask
    xK_x                  =  AttributeMask
    120
    xK_y                  :: KeySym
    xK_y :: AttributeMask
    xK_y                  =  AttributeMask
    121
    xK_z                  :: KeySym
    xK_z :: AttributeMask
    xK_z                  =  AttributeMask
    122
    xK_braceleft          :: KeySym
    xK_braceleft :: AttributeMask
    xK_braceleft          =  AttributeMask
    123
    xK_bar                :: KeySym
    xK_bar :: AttributeMask
    xK_bar                =  AttributeMask
    124
    xK_braceright         :: KeySym
    xK_braceright :: AttributeMask
    xK_braceright         =  AttributeMask
    125
    xK_asciitilde         :: KeySym
    xK_asciitilde :: AttributeMask
    xK_asciitilde         =  AttributeMask
    126

    {-# LINE 1165 "Graphics/X11/Types.hsc" #-}

    xK_nobreakspace       :: KeySym
    xK_nobreakspace       =  160
    xK_exclamdown         :: KeySym
    xK_exclamdown         =  161
    xK_cent               :: KeySym
    xK_cent               =  162
    xK_sterling           :: KeySym
    xK_sterling           =  163
    xK_currency           :: KeySym
    xK_currency           =  164
    xK_yen                :: KeySym
    xK_yen                =  165
    xK_brokenbar          :: KeySym
    xK_brokenbar          =  166
    xK_section            :: KeySym
    xK_section            =  167
    xK_diaeresis          :: KeySym
    xK_diaeresis          =  168
    xK_copyright          :: KeySym
    xK_copyright          =  169
    xK_ordfeminine        :: KeySym
    xK_ordfeminine        =  170
    xK_guillemotleft      :: KeySym
    xK_guillemotleft      =  171
    xK_notsign            :: KeySym
    xK_notsign            =  172
    xK_hyphen             :: KeySym
    xK_hyphen             =  173
    xK_registered         :: KeySym
    xK_registered         =  174
    xK_macron             :: KeySym
    xK_macron             =  175
    xK_degree             :: KeySym
    xK_degree             =  176
    xK_plusminus          :: KeySym
    xK_plusminus          =  177
    xK_twosuperior        :: KeySym
    xK_twosuperior        =  178
    xK_threesuperior      :: KeySym
    xK_threesuperior      =  179
    xK_acute              :: KeySym
    xK_acute              =  180
    xK_mu                 :: KeySym
    xK_mu                 =  181
    xK_paragraph          :: KeySym
    xK_paragraph          =  182
    xK_periodcentered     :: KeySym
    xK_periodcentered     =  183
    xK_cedilla            :: KeySym
    xK_cedilla            =  184
    xK_onesuperior        :: KeySym
    xK_onesuperior        =  185
    xK_masculine          :: KeySym
    xK_masculine          =  186
    xK_guillemotright     :: KeySym
    xK_guillemotright     =  187
    xK_onequarter         :: KeySym
    xK_onequarter         =  188
    xK_onehalf            :: KeySym
    xK_onehalf            =  189
    xK_threequarters      :: KeySym
    xK_threequarters      =  190
    xK_questiondown       :: KeySym
    xK_questiondown       =  191
    xK_Agrave             :: KeySym
    xK_Agrave             =  192
    xK_Aacute             :: KeySym
    xK_Aacute             =  193
    xK_Acircumflex        :: KeySym
    xK_Acircumflex        =  194
    xK_Atilde             :: KeySym
    xK_Atilde             =  195
    xK_Adiaeresis         :: KeySym
    xK_Adiaeresis         =  196
    xK_Aring              :: KeySym
    xK_Aring              =  197
    xK_AE                 :: KeySym
    xK_AE                 =  198
    xK_Ccedilla           :: KeySym
    xK_Ccedilla           =  199
    xK_Egrave             :: KeySym
    xK_Egrave             =  200
    xK_Eacute             :: KeySym
    xK_Eacute             =  201
    xK_Ecircumflex        :: KeySym
    xK_Ecircumflex        =  202
    xK_Ediaeresis         :: KeySym
    xK_Ediaeresis         =  203
    xK_Igrave             :: KeySym
    xK_Igrave             =  204
    xK_Iacute             :: KeySym
    xK_Iacute             =  205
    xK_Icircumflex        :: KeySym
    xK_Icircumflex        =  206
    xK_Idiaeresis         :: KeySym
    xK_Idiaeresis         =  207
    xK_ETH                :: KeySym
    xK_ETH :: AttributeMask
    xK_ETH                =  AttributeMask
    208
    xK_Eth                :: KeySym
    xK_Eth :: AttributeMask
    xK_Eth                =  AttributeMask
    208
    xK_Ntilde             :: KeySym
    xK_Ntilde :: AttributeMask
    xK_Ntilde             =  AttributeMask
    209
    xK_Ograve             :: KeySym
    xK_Ograve :: AttributeMask
    xK_Ograve             =  AttributeMask
    210
    xK_Oacute             :: KeySym
    xK_Oacute :: AttributeMask
    xK_Oacute             =  AttributeMask
    211
    xK_Ocircumflex        :: KeySym
    xK_Ocircumflex :: AttributeMask
    keyReleaseMask :: AttributeMask
    xK_Ocircumflex        =  AttributeMask
    212
    xK_Otilde             :: KeySym
    xK_Otilde :: AttributeMask
    xK_Otilde             =  AttributeMask
    213
    xK_Odiaeresis         :: KeySym
    xK_Odiaeresis :: AttributeMask
    xK_Odiaeresis         =  AttributeMask
    214
    xK_multiply           :: KeySym
    xK_multiply :: AttributeMask
    xK_multiply           =  AttributeMask
    215
    xK_Ooblique           :: KeySym
    xK_Ooblique :: AttributeMask
    xK_Ooblique           =  AttributeMask
    216
    xK_Ugrave             :: KeySym
    xK_Ugrave :: AttributeMask
    xK_Ugrave             =  AttributeMask
    217
    xK_Uacute             :: KeySym
    xK_Uacute :: AttributeMask
    xK_Uacute             =  AttributeMask
    218
    xK_Ucircumflex        :: KeySym
    xK_Ucircumflex :: AttributeMask
    xK_Ucircumflex        =  AttributeMask
    219
    xK_Udiaeresis         :: KeySym
    xK_Udiaeresis :: AttributeMask
    xK_Udiaeresis         =  AttributeMask
    220
    xK_Yacute             :: KeySym
    xK_Yacute :: AttributeMask
    xK_Yacute             =  AttributeMask
    221
    xK_THORN              :: KeySym
    xK_THORN :: AttributeMask
    xK_THORN              =  AttributeMask
    222
    xK_Thorn              :: KeySym
    xK_Thorn :: AttributeMask
    xK_Thorn              =  AttributeMask
    222
    xK_ssharp             :: KeySym
    xK_ssharp :: AttributeMask
    xK_ssharp             =  AttributeMask
    223
    xK_agrave             :: KeySym
    xK_agrave :: AttributeMask
    xK_agrave             =  AttributeMask
    224
    xK_aacute             :: KeySym
    xK_aacute :: AttributeMask
    xK_aacute             =  AttributeMask
    225
    xK_acircumflex        :: KeySym
    xK_acircumflex :: AttributeMask
    xK_acircumflex        =  AttributeMask
    226
    xK_atilde             :: KeySym
    xK_atilde :: AttributeMask
    xK_atilde             =  AttributeMask
    227
    xK_adiaeresis         :: KeySym
    xK_adiaeresis :: AttributeMask
    xK_adiaeresis         =  AttributeMask
    228
    xK_aring              :: KeySym
    xK_aring :: AttributeMask
    xK_aring              =  AttributeMask
    229
    xK_ae                 :: KeySym
    xK_ae :: AttributeMask
    xK_ae                 =  AttributeMask
    230
    xK_ccedilla           :: KeySym
    xK_ccedilla :: AttributeMask
    xK_ccedilla           =  AttributeMask
    231
    xK_egrave             :: KeySym
    xK_egrave :: AttributeMask
    xK_egrave             =  AttributeMask
    232
    xK_eacute             :: KeySym
    xK_eacute :: AttributeMask
    xK_eacute             =  AttributeMask
    233
    xK_ecircumflex        :: KeySym
    xK_ecircumflex :: AttributeMask
    xK_ecircumflex        =  AttributeMask
    234
    xK_ediaeresis         :: KeySym
    xK_ediaeresis :: AttributeMask
    xK_ediaeresis         =  AttributeMask
    235
    xK_igrave             :: KeySym
    xK_igrave :: AttributeMask
    xK_igrave             =  AttributeMask
    236
    xK_iacute             :: KeySym
    xK_iacute :: AttributeMask
    xK_iacute             =  AttributeMask
    237
    xK_icircumflex        :: KeySym
    xK_icircumflex :: AttributeMask
    graphicsExpose :: Button
    xK_icircumflex        =  AttributeMask
    238
    xK_idiaeresis         :: KeySym
    xK_idiaeresis :: AttributeMask
    xK_idiaeresis         =  AttributeMask
    239
    xK_eth                :: KeySym
    xK_eth :: AttributeMask
    xK_eth                =  AttributeMask
    240
    xK_ntilde             :: KeySym
    xK_ntilde :: AttributeMask
    xK_ntilde             =  AttributeMask
    241
    xK_ograve             :: KeySym
    xK_ograve :: AttributeMask
    xK_ograve             =  AttributeMask
    242
    xK_oacute             :: KeySym
    xK_oacute :: AttributeMask
    xK_oacute             =  AttributeMask
    243
    xK_ocircumflex        :: KeySym
    xK_ocircumflex :: AttributeMask
    xK_ocircumflex        =  AttributeMask
    244
    xK_otilde             :: KeySym
    xK_otilde :: AttributeMask
    xK_otilde             =  AttributeMask
    245
    xK_odiaeresis         :: KeySym
    xK_odiaeresis :: AttributeMask
    xK_odiaeresis         =  AttributeMask
    246
    xK_division           :: KeySym
    xK_division :: AttributeMask
    xK_division           =  AttributeMask
    247
    xK_oslash             :: KeySym
    xK_oslash :: AttributeMask
    xK_oslash             =  AttributeMask
    248
    xK_ugrave             :: KeySym
    xK_ugrave :: AttributeMask
    xK_ugrave             =  AttributeMask
    249
    xK_uacute             :: KeySym
    xK_uacute :: AttributeMask
    xK_uacute             =  AttributeMask
    250
    xK_ucircumflex        :: KeySym
    xK_ucircumflex :: AttributeMask
    xK_ucircumflex        =  AttributeMask
    251
    xK_udiaeresis         :: KeySym
    xK_udiaeresis :: AttributeMask
    xK_udiaeresis         =  AttributeMask
    252
    xK_yacute             :: KeySym
    xK_yacute :: AttributeMask
    xK_yacute             =  AttributeMask
    253
    xK_thorn              :: KeySym
    xK_thorn :: AttributeMask
    xK_thorn              =  AttributeMask
    254
    xK_ydiaeresis         :: KeySym
    xK_ydiaeresis :: AttributeMask
    xK_ydiaeresis         =  AttributeMask
    255

    {-# LINE 1266 "Graphics/X11/Types.hsc" #-}

    type EventMask                  = Mask
    noEventMask                   :: EventMask
    noEventMask                   =  0
    keyPressMask                  :: EventMask
    keyPressMask                  =  1
    keyReleaseMask                :: EventMask
    keyReleaseMask                =  2
    buttonPressMask               :: EventMask
    buttonPressMask               =  4
    buttonReleaseMask             :: EventMask
    buttonReleaseMask             =  8
    enterWindowMask               :: EventMask
    enterWindowMask               =  16
    leaveWindowMask               :: EventMask
    leaveWindowMask               =  32
    pointerMotionMask             :: EventMask
    pointerMotionMask             =  64
    pointerMotionHintMask         :: EventMask
    pointerMotionHintMask         =  128
    button1MotionMask             :: EventMask
    button1MotionMask             =  256
    button2MotionMask             :: EventMask
    button2MotionMask             =  512
    button3MotionMask             :: EventMask
    button3MotionMask             =  1024
    button4MotionMask             :: EventMask
    button4MotionMask             =  2048
    button5MotionMask             :: EventMask
    button5MotionMask             =  4096
    buttonMotionMask              :: EventMask
    buttonMotionMask              =  8192
    keymapStateMask               :: EventMask
    keymapStateMask               =  16384
    exposureMask                  :: EventMask
    exposureMask                  =  32768
    visibilityChangeMask          :: EventMask
    visibilityChangeMask          =  65536
    structureNotifyMask           :: EventMask
    structureNotifyMask           =  131072
    resizeRedirectMask            :: EventMask
    resizeRedirectMask            =  262144
    substructureNotifyMask        :: EventMask
    substructureNotifyMask        =  524288
    substructureRedirectMask      :: EventMask
    substructureRedirectMask      =  1048576
    focusChangeMask               :: EventMask
    focusChangeMask               =  2097152
    propertyChangeMask            :: EventMask
    propertyChangeMask            =  4194304
    colormapChangeMask            :: EventMask
    colormapChangeMask            =  8388608
    ownerGrabButtonMask           :: EventMask
    ownerGrabButtonMask           =  16777216
    rrScreenChangeNotifyMask      :: EventMask
    rrScreenChangeNotifyMask      =  1
    rrCrtcChangeNotifyMask        :: EventMask
    rrCrtcChangeNotifyMask        =  2
    rrOutputChangeNotifyMask      :: EventMask
    rrOutputChangeNotifyMask      =  4
    rrOutputPropertyNotifyMask    :: EventMask
    rrOutputPropertyNotifyMask    =  8
    screenSaverCycleMask          :: EventMask
    screenSaverCycleMask          =  2
    screenSaverNotifyMask         :: EventMask
    screenSaverNotifyMask         =  1

    {-# LINE 1302 "Graphics/X11/Types.hsc" #-}

    type EventType          = Word32
    keyPress              :: EventType
    keyPress              =  2
    keyRelease            :: EventType
    keyRelease            =  3
    buttonPress           :: EventType
    buttonPress           =  4
    buttonRelease         :: EventType
    buttonRelease         =  5
    motionNotify          :: EventType
    motionNotify          =  6
    enterNotify           :: EventType
    enterNotify           =  7
    leaveNotify           :: EventType
    leaveNotify           =  8
    focusIn               :: EventType
    focusIn               =  9
    focusOut              :: EventType
    focusOut              =  10
    keymapNotify          :: EventType
    keymapNotify          =  11
    expose                :: EventType
    expose                =  12
    graphicsExpose        :: EventType
    graphicsExpose        =  13
    noExpose              :: EventType
    noExpose              =  14
    visibilityNotify      :: EventType
    visibilityNotify      =  15
    createNotify          :: EventType
    createNotify          =  16
    destroyNotify         :: EventType
    destroyNotify         =  17
    unmapNotify           :: EventType
    unmapNotify           =  18
    mapNotify             :: EventType
    mapNotify             =  19
    mapRequest            :: EventType
    mapRequest            =  20
    reparentNotify        :: EventType
    reparentNotify        =  21
    configureNotify       :: EventType
    configureNotify       =  22
    configureRequest      :: EventType
    configureRequest      =  23
    gravityNotify         :: EventType
    gravityNotify         =  24
    resizeRequest         :: EventType
    resizeRequest         =  25
    circulateNotify       :: EventType
    circulateNotify       =  26
    circulateRequest      :: EventType
    circulateRequest      =  27
    propertyNotify        :: EventType
    propertyNotify        =  28
    selectionClear        :: EventType
    selectionClear        =  29
    selectionRequest      :: EventType
    selectionRequest      =  30
    selectionNotify       :: EventType
    selectionNotify       =  31
    colormapNotify        :: EventType
    colormapNotify :: Button
    colormapNotify        =  Button
    32
    clientMessage         :: EventType
    clientMessage :: Button
    clientMessage         =  Button
    33
    mappingNotify         :: EventType
    mappingNotify :: Button
    mappingNotify         =  Button
    34
    rrScreenChangeNotify  :: EventType
    rrScreenChangeNotify :: Button
    rrScreenChangeNotify  =  Button
    0
    mod2Mask :: ButtonMask
    rrNotify              :: EventType
    rrNotify :: Button
    rrNotify              =  Button
    1
    rrNotifyCrtcChange    :: EventType
    rrNotifyCrtcChange :: Button
    rrNotifyCrtcChange    =  Button
    0
    rrNotifyOutputChange  :: EventType
    rrNotifyOutputChange :: Button
    rrNotifyOutputChange  =  Button
    1
    rrNotifyOutputProperty :: EventType
    rrNotifyOutputProperty :: Button
    rrNotifyOutputProperty =  Button
    2
    lASTEvent             :: EventType
    lASTEvent :: Button
    lASTEvent             =  Button
    36
    screenSaverNotify     :: EventType
    screenSaverNotify :: Button
    screenSaverNotify     =  Button
    0

    {-# LINE 1346 "Graphics/X11/Types.hsc" #-}

    type Modifier           = CUInt
    shiftMapIndex         :: Modifier
    shiftMapIndex         =  0
    lockMapIndex          :: Modifier
    lockMapIndex          =  1
    controlMapIndex       :: Modifier
    controlMapIndex       =  2
    mod1MapIndex          :: Modifier
    mod1MapIndex          =  3
    mod2MapIndex          :: Modifier
    mod2MapIndex          =  4
    mod3MapIndex          :: Modifier
    mod3MapIndex          =  5
    mod4MapIndex          :: Modifier
    mod4MapIndex          =  6
    mod5MapIndex          :: Modifier
    mod5MapIndex          =  7
    anyModifier           :: Modifier
    anyModifier           =  32768

    {-# LINE 1359 "Graphics/X11/Types.hsc" #-}

    type KeyMask            = Modifier
    noModMask             :: KeyMask
    noModMask             =  0
    shiftMask             :: KeyMask
    shiftMask             =  1
    lockMask              :: KeyMask
    lockMask              =  2
    controlMask           :: KeyMask
    controlMask           =  4
    mod1Mask              :: KeyMask
    mod1Mask              =  8
    mod2Mask              :: KeyMask
    mod2Mask              =  16
    mod3Mask              :: KeyMask
    mod3Mask              =  32
    mod4Mask              :: KeyMask
    mod4Mask              =  64
    mod5Mask              :: KeyMask
    mod5Mask              =  128

    {-# LINE 1372 "Graphics/X11/Types.hsc" #-}

    type ButtonMask         = Modifier
    button1Mask           :: ButtonMask
    button1Mask           =  256
    button2Mask           :: ButtonMask
    button2Mask           =  512
    button3Mask           :: ButtonMask
    button3Mask           =  1024
    button4Mask           :: ButtonMask
    button4Mask           =  2048
    button5Mask           :: ButtonMask
    button5Mask           =  4096

    {-# LINE 1381 "Graphics/X11/Types.hsc" #-}

    type Button             = Word32
    button1               :: Button
    button1               =  1
    button2               :: Button
    button2 :: Button
    button2               =  Button
    2
    button3               :: Button
    button3 :: Button
    button3               =  Button
    3
    button4               :: Button
    button4 :: Button
    button4               =  Button
    4
    button5               :: Button
    button5 :: Button
    button5               =  Button
    5

    {-# LINE 1390 "Graphics/X11/Types.hsc" #-}

    type NotifyMode         = CInt
    -- NotifyNormal and NotifyHint are used as detail in XMotionEvents
    notifyNormal          :: NotifyMode
    notifyNormal          =  0
    notifyGrab            :: NotifyMode
    notifyGrab :: ImageFormat
    notifyGrab            =  ImageFormat
    1
    notifyUngrab          :: NotifyMode
    notifyUngrab :: ImageFormat
    notifyUngrab          =  ImageFormat
    2
    notifyWhileGrabbed    :: NotifyMode
    notifyWhileGrabbed :: ImageFormat
    notifyWhileGrabbed    =  ImageFormat
    3
    notifyHint            :: NotifyMode
    notifyHint :: ImageFormat
    notifyHint            =  ImageFormat
    1

    {-# LINE 1400 "Graphics/X11/Types.hsc" #-}

    type NotifyDetail       = CInt
    notifyAncestor        :: NotifyDetail
    notifyAncestor        =  0
    notifyVirtual         :: NotifyDetail
    notifyVirtual :: ImageFormat
    notifyVirtual         =  ImageFormat
    1
    notifyInferior        :: NotifyDetail
    notifyInferior :: ImageFormat
    notifyInferior        =  ImageFormat
    2
    notifyNonlinear       :: NotifyDetail
    notifyNonlinear :: ImageFormat
    notifyNonlinear       =  ImageFormat
    3
    notifyNonlinearVirtual  :: NotifyDetail
    notifyNonlinearVirtual :: ImageFormat
    notifyNonlinearVirtual  =  ImageFormat
    4
    notifyPointer         :: NotifyDetail
    notifyPointer :: ImageFormat
    notifyPointer         =  ImageFormat
    5
    notifyPointerRoot     :: NotifyDetail
    notifyPointerRoot :: ImageFormat
    notifyPointerRoot     =  ImageFormat
    6
    notifyDetailNone      :: NotifyDetail
    notifyDetailNone :: ImageFormat
    notifyDetailNone      =  ImageFormat
    7

    {-# LINE 1412 "Graphics/X11/Types.hsc" #-}

    type Visibility = CInt
    visibilityUnobscured          :: Visibility
    visibilityUnobscured          =  0
    visibilityPartiallyObscured   :: Visibility
    visibilityPartiallyObscured   =  1
    visibilityFullyObscured       :: Visibility
    visibilityFullyObscured       =  2

    {-# LINE 1419 "Graphics/X11/Types.hsc" #-}

    -- | Place of window relative to siblings
    -- (used in Circulation requests or events)
    type Place = CInt
    placeOnTop            :: Place
    placeOnTop :: ImageFormat
    placeOnTop            =  ImageFormat
    0
    placeOnBottom         :: Place
    placeOnBottom :: ImageFormat
    placeOnBottom         =  ImageFormat
    1

    {-# LINE 1427 "Graphics/X11/Types.hsc" #-}

    type Protocol           = CInt
    familyInternet        :: Protocol
    familyInternet :: ImageFormat
    familyInternet        =  ImageFormat
    0
    familyDECnet          :: Protocol
    familyDECnet :: ImageFormat
    familyDECnet          =  ImageFormat
    1
    familyChaos           :: Protocol
    familyChaos :: ImageFormat
    familyChaos           =  ImageFormat
    2

    {-# LINE 1434 "Graphics/X11/Types.hsc" #-}

    type PropertyNotification = CInt
    propertyNewValue      :: PropertyNotification
    propertyNewValue :: ImageFormat
    propertyNewValue      =  ImageFormat
    0
    propertyDelete        :: PropertyNotification
    propertyDelete :: ImageFormat
    propertyDelete        =  ImageFormat
    1

    {-# LINE 1440 "Graphics/X11/Types.hsc" #-}

    type ColormapNotification = CInt
    colormapUninstalled   :: ColormapNotification
    colormapUninstalled :: ImageFormat
    colormapUninstalled   =  ImageFormat
    0
    colormapInstalled     :: ColormapNotification
    colormapInstalled :: ImageFormat
    colormapInstalled     =  ImageFormat
    1

    {-# LINE 1446 "Graphics/X11/Types.hsc" #-}

    -- Grab{Pointer,Button,Keyboard,Key} Modes
    type GrabMode           = CInt
    grabModeSync          :: GrabMode
    grabModeSync :: ImageFormat
    grabModeSync          =  ImageFormat
    0
    grabModeAsync         :: GrabMode
    grabModeAsync :: ImageFormat
    grabModeAsync         =  ImageFormat
    1

    {-# LINE 1453 "Graphics/X11/Types.hsc" #-}

    -- Grab{Pointer,Keyboard} reply status

    type GrabStatus         = CInt
    grabSuccess           :: GrabStatus
    grabSuccess :: ImageFormat
    grabSuccess           =  ImageFormat
    0
    alreadyGrabbed        :: GrabStatus
    alreadyGrabbed :: ImageFormat
    alreadyGrabbed        =  ImageFormat
    1
    grabInvalidTime       :: GrabStatus
    grabInvalidTime :: ImageFormat
    grabInvalidTime       =  ImageFormat
    2
    grabNotViewable       :: GrabStatus
    grabNotViewable :: ImageFormat
    grabNotViewable       =  ImageFormat
    3
    grabFrozen            :: GrabStatus
    grabFrozen :: ImageFormat
    grabFrozen            =  ImageFormat
    4

    {-# LINE 1464 "Graphics/X11/Types.hsc" #-}

    -- AllowEvents modes
    type AllowEvents        = CInt
    asyncPointer          :: AllowEvents
    asyncPointer          =  0
    syncPointer           :: AllowEvents
    syncPointer :: ImageFormat
    syncPointer           =  ImageFormat
    1
    replayPointer         :: AllowEvents
    replayPointer :: ImageFormat
    replayPointer         =  ImageFormat
    2
    asyncKeyboard         :: AllowEvents
    asyncKeyboard :: ImageFormat
    asyncKeyboard         =  ImageFormat
    3
    syncKeyboard          :: AllowEvents
    syncKeyboard :: ImageFormat
    syncKeyboard          =  ImageFormat
    4
    replayKeyboard        :: AllowEvents
    replayKeyboard :: ImageFormat
    replayKeyboard        =  ImageFormat
    5
    asyncBoth             :: AllowEvents
    asyncBoth :: ImageFormat
    asyncBoth             =  ImageFormat
    6
    syncBoth              :: AllowEvents
    syncBoth :: ImageFormat
    syncBoth              =  ImageFormat
    7

    {-# LINE 1477 "Graphics/X11/Types.hsc" #-}

    -- {Set,Get}InputFocus Modes
    type FocusMode          = CInt
    revertToNone          :: FocusMode
    revertToNone          =  0
    revertToPointerRoot   :: FocusMode
    revertToPointerRoot   =  1
    revertToParent        :: FocusMode
    revertToParent :: ImageFormat
    revertToParent        =  ImageFormat
    2

    {-# LINE 1485 "Graphics/X11/Types.hsc" #-}

    -- Error codes
    type ErrorCode          = CInt
    success               :: ErrorCode
    success :: ImageFormat
    success               =  ImageFormat
    0
    badRequest            :: ErrorCode
    badRequest :: ImageFormat
    badRequest            =  ImageFormat
    1
    badValue              :: ErrorCode
    badValue :: ImageFormat
    badValue              =  ImageFormat
    2
    badWindow             :: ErrorCode
    badWindow :: ImageFormat
    badWindow             =  ImageFormat
    3
    badPixmap             :: ErrorCode
    badPixmap :: ImageFormat
    badPixmap             =  ImageFormat
    4
    badAtom               :: ErrorCode
    badAtom :: ImageFormat
    badAtom               =  ImageFormat
    5
    badCursor             :: ErrorCode
    badCursor :: ImageFormat
    badCursor             =  ImageFormat
    6
    badFont               :: ErrorCode
    badFont :: ImageFormat
    badFont               =  ImageFormat
    7
    badMatch              :: ErrorCode
    badMatch :: ImageFormat
    badMatch              =  ImageFormat
    8
    badDrawable           :: ErrorCode
    badDrawable :: ImageFormat
    badDrawable           =  ImageFormat
    9
    badAccess             :: ErrorCode
    badAccess :: ImageFormat
    badAccess             =  ImageFormat
    10
    badAlloc              :: ErrorCode
    badAlloc :: ImageFormat
    badAlloc              =  ImageFormat
    11
    badColor              :: ErrorCode
    badColor :: ImageFormat
    badColor              =  ImageFormat
    12
    badGC                 :: ErrorCode
    badGC :: ImageFormat
    badGC                 =  ImageFormat
    13
    throwIfZero :: String -> IO ImageFormat -> IO ()
    badIDChoice           :: ErrorCode
    badIDChoice :: ImageFormat
    badIDChoice           =  ImageFormat
    14
    badName               :: ErrorCode
    badName :: ImageFormat
    badName               =  ImageFormat
    15
    badLength             :: ErrorCode
    badLength :: ImageFormat
    badLength             =  ImageFormat
    16
    badImplementation     :: ErrorCode
    badImplementation :: ImageFormat
    badImplementation     =  ImageFormat
    17
    firstExtensionError   :: ErrorCode
    firstExtensionError :: ImageFormat
    firstExtensionError   =  ImageFormat
    128
    lastExtensionError    :: ErrorCode
    lastExtensionError :: ImageFormat
    lastExtensionError    =  ImageFormat
    255

    {-# LINE 1510 "Graphics/X11/Types.hsc" #-}

    type Status             = CInt

    -- |Xlib functions with return values of type @Status@ return zero on
    -- failure and nonzero on success.
    throwIfZero :: String -> IO Status -> IO ()
    throwIfZero fn_name = throwIf_ (== 0) (const ("Error in function " ++ fn_name))

    type WindowClass        = CInt
    copyFromParent        :: WindowClass
    copyFromParent        =  0
    inputOutput           :: WindowClass
    inputOutput           =  1
    inputOnly             :: WindowClass
    inputOnly             =  2

    {-# LINE 1524 "Graphics/X11/Types.hsc" #-}

    -- Window attributes mask
    type AttributeMask      = Mask
    cWBackPixmap          :: AttributeMask
    cWBackPixmap          =  1
    cWBackPixel           :: AttributeMask
    cWBackPixel :: AttributeMask
    cWBackPixel           =  AttributeMask
    2
    cWBorderPixmap        :: AttributeMask
    cWBorderPixmap :: AttributeMask
    cWBorderPixmap        =  AttributeMask
    4
    cWBorderPixel         :: AttributeMask
    cWBorderPixel :: AttributeMask
    cWBorderPixel         =  AttributeMask
    8
    cWBitGravity          :: AttributeMask
    cWBitGravity :: AttributeMask
    cWBitGravity          =  AttributeMask
    16
    cWWinGravity          :: AttributeMask
    cWWinGravity :: AttributeMask
    cWWinGravity          =  AttributeMask
    32
    cWBackingStore        :: AttributeMask
    cWBackingStore :: AttributeMask
    cWBackingStore        =  AttributeMask
    64
    cWBackingPlanes       :: AttributeMask
    cWBackingPlanes :: AttributeMask
    cWBackingPlanes       =  AttributeMask
    128
    cWBackingPixel        :: AttributeMask
    cWBackingPixel :: AttributeMask
    cWBackingPixel        =  AttributeMask
    256
    cWOverrideRedirect    :: AttributeMask
    cWOverrideRedirect :: AttributeMask
    cWOverrideRedirect    =  AttributeMask
    512
    cWSaveUnder           :: AttributeMask
    cWSaveUnder :: AttributeMask
    cWSaveUnder           =  AttributeMask
    1024
    cWEventMask           :: AttributeMask
    cWEventMask :: AttributeMask
    cWEventMask           =  AttributeMask
    2048
    cWDontPropagate       :: AttributeMask
    cWDontPropagate :: AttributeMask
    cWDontPropagate       =  AttributeMask
    4096
    cWColormap            :: AttributeMask
    cWColormap :: AttributeMask
    cWColormap            =  AttributeMask
    8192
    cWCursor              :: AttributeMask
    cWCursor :: AttributeMask
    cWCursor              =  AttributeMask
    16384
    cWX                   :: AttributeMask
    cWX :: AttributeMask
    cWX                   =  AttributeMask
    1
    cWY                   :: AttributeMask
    cWY :: AttributeMask
    cWY                   =  AttributeMask
    2
    cWWidth               :: AttributeMask
    cWWidth :: AttributeMask
    cWWidth               =  AttributeMask
    4
    cWHeight              :: AttributeMask
    cWHeight :: AttributeMask
    cWHeight              =  AttributeMask
    8

    {-# LINE 1548 "Graphics/X11/Types.hsc" #-}

    -- Used in ChangeCloseDownMode
    type CloseDownMode      = CInt
    destroyAll            :: CloseDownMode
    destroyAll            =  0
    retainPermanent       :: CloseDownMode
    retainPermanent       =  1
    retainTemporary       :: CloseDownMode
    retainTemporary       =  2

    {-# LINE 1556 "Graphics/X11/Types.hsc" #-}

    ----------------------------------------------------------------
    -- CURSOR STUFF
    ----------------------------------------------------------------

    type QueryBestSizeClass = CInt
    cursorShape           :: QueryBestSizeClass
    cursorShape           =  0
    tileShape             :: QueryBestSizeClass
    tileShape             =  1
    stippleShape          :: QueryBestSizeClass
    stippleShape :: ImageFormat
    stippleShape          =  ImageFormat
    2

    {-# LINE 1567 "Graphics/X11/Types.hsc" #-}

    ----------------------------------------------------------------
    -- GRAPHICS DEFINITIONS
    ----------------------------------------------------------------

    -- graphics functions, as in GC.alu

    type   GXFunction       = CInt
    gXclear               :: GXFunction
    gXclear :: ImageFormat
    gXclear               =  ImageFormat
    0
    gXand                 :: GXFunction
    gXand :: ImageFormat
    gXand                 =  ImageFormat
    1
    gXandReverse          :: GXFunction
    gXandReverse :: ImageFormat
    gXandReverse          =  ImageFormat
    2
    gXcopy                :: GXFunction
    gXcopy :: ImageFormat
    gXcopy                =  ImageFormat
    3
    gXandInverted         :: GXFunction
    gXandInverted :: ImageFormat
    gXandInverted         =  ImageFormat
    4
    gXnoop                :: GXFunction
    gXnoop :: ImageFormat
    gXnoop                =  ImageFormat
    5
    gXxor                 :: GXFunction
    gXxor :: ImageFormat
    gXxor                 =  ImageFormat
    6
    gXor                  :: GXFunction
    gXor :: ImageFormat
    gXor                  =  ImageFormat
    7
    gXnor                 :: GXFunction
    gXnor :: ImageFormat
    gXnor                 =  ImageFormat
    8
    gXequiv               :: GXFunction
    gXequiv :: ImageFormat
    gXequiv               =  ImageFormat
    9
    gXinvert              :: GXFunction
    gXinvert :: ImageFormat
    gXinvert              =  ImageFormat
    10
    gXorReverse           :: GXFunction
    gXorReverse :: ImageFormat
    gXorReverse           =  ImageFormat
    11
    gXcopyInverted        :: GXFunction
    gXcopyInverted :: ImageFormat
    lineDoubleDash :: ImageFormat
    gXcopyInverted        =  ImageFormat
    12
    gXorInverted          :: GXFunction
    gXorInverted :: ImageFormat
    gXorInverted          =  ImageFormat
    13
    gXnand                :: GXFunction
    gXnand :: ImageFormat
    gXnand                =  ImageFormat
    14
    gXset                 :: GXFunction
    gXset :: ImageFormat
    gXset                 =  ImageFormat
    15

    {-# LINE 1593 "Graphics/X11/Types.hsc" #-}

    type   LineStyle        = CInt
    lineSolid             :: LineStyle
    lineSolid             =  0
    lineOnOffDash         :: LineStyle
    lineOnOffDash         =  1
    lineDoubleDash        :: LineStyle
    lineDoubleDash        =  2

    {-# LINE 1600 "Graphics/X11/Types.hsc" #-}

    type   CapStyle         = CInt
    capNotLast            :: CapStyle
    capNotLast            =  0
    capButt               :: CapStyle
    capButt               =  1
    capRound              :: CapStyle
    capRound              =  2
    capProjecting         :: CapStyle
    capProjecting :: ImageFormat
    capProjecting         =  ImageFormat
    3

    {-# LINE 1608 "Graphics/X11/Types.hsc" #-}

    type   JoinStyle        = CInt
    joinMiter             :: JoinStyle
    joinMiter             =  0
    joinRound             :: JoinStyle
    joinRound :: ImageFormat
    joinRound             =  ImageFormat
    1
    joinBevel             :: JoinStyle
    joinBevel :: ImageFormat
    joinBevel             =  ImageFormat
    2

    {-# LINE 1615 "Graphics/X11/Types.hsc" #-}

    type   FillStyle        = CInt
    fillSolid             :: FillStyle
    fillSolid :: ImageFormat
    fillSolid             =  ImageFormat
    0
    fillTiled             :: FillStyle
    fillTiled :: ImageFormat
    fillTiled             =  ImageFormat
    1
    fillStippled          :: FillStyle
    fillStippled :: ImageFormat
    fillStippled          =  ImageFormat
    2
    fillOpaqueStippled    :: FillStyle
    fillOpaqueStippled :: ImageFormat
    fillOpaqueStippled    =  ImageFormat
    3

    {-# LINE 1623 "Graphics/X11/Types.hsc" #-}

    type   FillRule         = CInt
    evenOddRule           :: FillRule
    evenOddRule           =  0
    windingRule           :: FillRule
    windingRule :: ImageFormat
    windingRule           =  ImageFormat
    1

    {-# LINE 1629 "Graphics/X11/Types.hsc" #-}

    type   SubWindowMode    = CInt
    clipByChildren        :: SubWindowMode
    clipByChildren :: ImageFormat
    clipByChildren        =  ImageFormat
    0
    includeInferiors      :: SubWindowMode
    includeInferiors :: ImageFormat
    includeInferiors      =  ImageFormat
    1

    {-# LINE 1635 "Graphics/X11/Types.hsc" #-}

    -- -- SetClipRectangles ordering
    -- type   Ordering        = CInt
    -- {enum Ordering,
    -- , unsorted           = Unsorted
    -- , ySorted            = YSorted
    -- , yXSorted           = YXSorted
    -- , yXBanded           = YXBanded
    -- }

    -- CoordinateMode for drawing routines
    type   CoordinateMode   = CInt
    coordModeOrigin       :: CoordinateMode
    coordModeOrigin :: ImageFormat
    coordModeOrigin       =  ImageFormat
    0
    coordModePrevious     :: CoordinateMode
    coordModePrevious :: ImageFormat
    coordModePrevious     =  ImageFormat
    1

    {-# LINE 1651 "Graphics/X11/Types.hsc" #-}

    type   PolygonShape     = CInt
    complex               :: PolygonShape
    complex :: ImageFormat
    complex               =  ImageFormat
    0
    nonconvex             :: PolygonShape
    nonconvex :: ImageFormat
    nonconvex             =  ImageFormat
    1
    convex                :: PolygonShape
    convex :: ImageFormat
    convex                =  ImageFormat
    2

    {-# LINE 1658 "Graphics/X11/Types.hsc" #-}

    -- Arc modes for PolyFillArc
    type   ArcMode          = CInt
    arcChord              :: ArcMode
    arcChord :: ImageFormat
    arcChord              =  ImageFormat
    0
    arcPieSlice           :: ArcMode
    arcPieSlice :: ImageFormat
    arcPieSlice           =  ImageFormat
    1

    {-# LINE 1665 "Graphics/X11/Types.hsc" #-}

    -- GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
    -- GC.stateChanges

    type   GCMask           = CInt
    gCFunction            :: GCMask
    gCFunction :: ImageFormat
    gCFunction            =  ImageFormat
    1
    gCPlaneMask           :: GCMask
    gCPlaneMask :: ImageFormat
    gCPlaneMask           =  ImageFormat
    2
    gCForeground          :: GCMask
    gCForeground :: ImageFormat
    gCForeground          =  ImageFormat
    4
    gCBackground          :: GCMask
    gCBackground :: ImageFormat
    gCBackground          =  ImageFormat
    8
    gCLineWidth           :: GCMask
    gCLineWidth :: ImageFormat
    gCLineWidth           =  ImageFormat
    16
    gCLineStyle           :: GCMask
    gCLineStyle :: ImageFormat
    gCLineStyle           =  ImageFormat
    32
    gCCapStyle            :: GCMask
    gCCapStyle :: ImageFormat
    gCCapStyle            =  ImageFormat
    64
    gCJoinStyle           :: GCMask
    gCJoinStyle :: ImageFormat
    gCJoinStyle           =  ImageFormat
    128
    gCFillStyle           :: GCMask
    gCFillStyle :: ImageFormat
    gCFillStyle           =  ImageFormat
    256
    gCFillRule            :: GCMask
    gCFillRule :: ImageFormat
    gCFillRule            =  ImageFormat
    512
    gCTile                :: GCMask
    gCTile :: ImageFormat
    gCTile                =  ImageFormat
    1024
    gCStipple             :: GCMask
    gCStipple :: ImageFormat
    gCStipple             =  ImageFormat
    2048
    gCTileStipXOrigin     :: GCMask
    gCTileStipXOrigin :: ImageFormat
    gCTileStipXOrigin     =  ImageFormat
    4096
    gCTileStipYOrigin     :: GCMask
    gCTileStipYOrigin :: ImageFormat
    gCTileStipYOrigin     =  ImageFormat
    8192
    gCFont                :: GCMask
    gCFont :: ImageFormat
    gCFont                =  ImageFormat
    16384
    gCSubwindowMode       :: GCMask
    gCSubwindowMode :: ImageFormat
    gCSubwindowMode       =  32768
    gCGraphicsExposures   :: GCMask
    gCGraphicsExposures :: ImageFormat
    gCGraphicsExposures   =  ImageFormat
    65536
    gCClipXOrigin         :: GCMask
    gCClipXOrigin :: ImageFormat
    gCClipXOrigin         =  ImageFormat
    131072
    gCClipYOrigin         :: GCMask
    gCClipYOrigin :: ImageFormat
    gCClipYOrigin         =  ImageFormat
    262144
    gCClipMask            :: GCMask
    gCClipMask :: ImageFormat
    gCClipMask            =  ImageFormat
    524288
    gCDashOffset          :: GCMask
    gCDashOffset :: ImageFormat
    gCDashOffset          =  ImageFormat
    1048576
    gCDashList            :: GCMask
    gCDashList :: ImageFormat
    gCDashList            =  ImageFormat
    2097152
    gCArcMode             :: GCMask
    gCArcMode :: ImageFormat
    gCArcMode             =  ImageFormat
    4194304
    gCLastBit             :: GCMask
    gCLastBit :: ImageFormat
    gCLastBit             =  ImageFormat
    22

    {-# LINE 1696 "Graphics/X11/Types.hsc" #-}

    type   CirculationDirection = CInt
    raiseLowest           :: CirculationDirection
    raiseLowest           =  0
    lowerHighest          :: CirculationDirection
    lowerHighest          =  1

    {-# LINE 1702 "Graphics/X11/Types.hsc" #-}

    -- used in imageByteOrder and bitmapBitOrder
    type   ByteOrder        = CInt
    lSBFirst              :: ByteOrder
    lSBFirst              =  0
    mSBFirst              :: ByteOrder
    mSBFirst              =  1

    {-# LINE 1709 "Graphics/X11/Types.hsc" #-}

    type   ColormapAlloc    = CInt
    allocNone             :: ColormapAlloc
    allocNone             =  0
    allocAll              :: ColormapAlloc
    allocAll              =  1

    {-# LINE 1715 "Graphics/X11/Types.hsc" #-}

    type   MappingRequest   = CInt
    mappingModifier       :: MappingRequest
    mappingModifier       =  0
    mappingKeyboard       :: MappingRequest
    mappingKeyboard :: ImageFormat
    mappingKeyboard       =  ImageFormat
    1
    mappingPointer        :: MappingRequest
    mappingPointer :: ImageFormat
    mappingPointer        =  ImageFormat
    2

    {-# LINE 1722 "Graphics/X11/Types.hsc" #-}

    type   ChangeSaveSetMode = CInt
    setModeInsert         :: ChangeSaveSetMode
    setModeInsert :: ImageFormat
    setModeInsert         =  ImageFormat
    0
    setModeDelete         :: ChangeSaveSetMode
    setModeDelete :: ImageFormat
    setModeDelete         =  ImageFormat
    1

    {-# LINE 1728 "Graphics/X11/Types.hsc" #-}

    type   BitGravity       = CInt
    forgetGravity         :: BitGravity
    forgetGravity :: ImageFormat
    forgetGravity         =  ImageFormat
    0
    northWestGravity      :: BitGravity
    northWestGravity :: ImageFormat
    northWestGravity      =  ImageFormat
    1
    northGravity          :: BitGravity
    northGravity :: ImageFormat
    northGravity          =  ImageFormat
    2
    northEastGravity      :: BitGravity
    northEastGravity :: ImageFormat
    northEastGravity      =  ImageFormat
    3
    westGravity           :: BitGravity
    westGravity :: ImageFormat
    westGravity           =  ImageFormat
    4
    centerGravity         :: BitGravity
    centerGravity :: ImageFormat
    centerGravity         =  ImageFormat
    5
    eastGravity           :: BitGravity
    eastGravity :: ImageFormat
    eastGravity           =  ImageFormat
    6
    southWestGravity      :: BitGravity
    southWestGravity :: ImageFormat
    southWestGravity      =  ImageFormat
    7
    southGravity          :: BitGravity
    southGravity :: ImageFormat
    unmapGravity :: ImageFormat
    southGravity          =  ImageFormat
    8
    southEastGravity      :: BitGravity
    southEastGravity :: ImageFormat
    southEastGravity      =  ImageFormat
    9
    staticGravity         :: BitGravity
    staticGravity :: ImageFormat
    staticGravity         =  ImageFormat
    10

    {-# LINE 1743 "Graphics/X11/Types.hsc" #-}

    -- All the BitGravity's plus ...
    type   WindowGravity   = CInt
    unmapGravity          :: WindowGravity
    unmapGravity          =  0

    {-# LINE 1749 "Graphics/X11/Types.hsc" #-}

    -- Used in CreateWindow for backing-store hint
    type   BackingStore     = CInt
    notUseful             :: BackingStore
    notUseful             =  0
    whenMapped            :: BackingStore
    whenMapped :: ImageFormat
    whenMapped            =  ImageFormat
    1
    always                :: BackingStore
    always :: ImageFormat
    always                =  ImageFormat
    2

    {-# LINE 1757 "Graphics/X11/Types.hsc" #-}

    doRed                 :: Word8
    doRed                 =  1
    doGreen               :: Word8
    doGreen :: Word8
    doGreen               =  Word8
    2
    doBlue                :: Word8
    doBlue :: Word8
    doBlue                =  Word8
    4

    {-# LINE 1763 "Graphics/X11/Types.hsc" #-}

    type   FontDirection    = CInt
    fontLeftToRight       :: FontDirection
    fontLeftToRight :: ImageFormat
    fontLeftToRight       =  ImageFormat
    0
    fontRightToLeft       :: FontDirection
    fontRightToLeft :: ImageFormat
    fontRightToLeft       =  ImageFormat
    1

    {-# LINE 1769 "Graphics/X11/Types.hsc" #-}

    type   ImageFormat    = CInt
    xyBitmap      :: ImageFormat
    xyBitmap :: ImageFormat
    xyBitmap      =  ImageFormat
    0
    xyPixmap      :: ImageFormat
    xyPixmap :: ImageFormat
    xyPixmap      =  ImageFormat
    1
    zPixmap       :: ImageFormat
    zPixmap :: ImageFormat
    zPixmap       =  ImageFormat
    2

    {-# LINE 1776 "Graphics/X11/Types.hsc" #-}

    -- Xrandr types
    type Rotation      = Word16
    {-# LINE 1779 "Graphics/X11/Types.hsc" #-}
    type Reflection    = Word16
    {-# LINE 1780 "Graphics/X11/Types.hsc" #-}
    type SizeID        = Word16
    {-# LINE 1781 "Graphics/X11/Types.hsc" #-}
    type SubpixelOrder = Word16
    {-# LINE 1782 "Graphics/X11/Types.hsc" #-}
    type Connection    = Word16
    {-# LINE 1783 "Graphics/X11/Types.hsc" #-}
    type RROutput      = Word64
    {-# LINE 1784 "Graphics/X11/Types.hsc" #-}
    type RRCrtc        = Word64
    {-# LINE 1785 "Graphics/X11/Types.hsc" #-}
    type RRMode        = Word64
    {-# LINE 1786 "Graphics/X11/Types.hsc" #-}
    type XRRModeFlags  = Word64
    {-# LINE 1787 "Graphics/X11/Types.hsc" #-}

    xRR_Rotate_0    :: Rotation
    xRR_Rotate_0 :: Connection
    xRR_Rotate_0    =  Connection
    1
    xRR_Rotate_90   :: Rotation
    xRR_Rotate_90 :: Connection
    xRR_Rotate_90   =  Connection
    2
    xRR_Rotate_180  :: Rotation
    xRR_Rotate_180 :: Connection
    xRR_Rotate_180  =  Connection
    4
    xRR_Rotate_270  :: Rotation
    xRR_Rotate_270 :: Connection
    xRR_Rotate_270  =  Connection
    8

    {-# LINE 1794 "Graphics/X11/Types.hsc" #-}

    xRR_Reflect_X  :: Reflection
    xRR_Reflect_X  =  16
    xRR_Reflect_Y  :: Reflection
    xRR_Reflect_Y :: Connection
    xRR_Reflect_Y  =  Connection
    32

    {-# LINE 1799 "Graphics/X11/Types.hsc" #-}

    xRR_Connected          :: Connection
    xRR_Connected :: Connection
    xRR_Connected          =  Connection
    0
    xRR_Disconnected       :: Connection
    xRR_Disconnected :: Connection
    xRR_Disconnected       =  Connection
    1
    xRR_UnknownConnection  :: Connection
    xRR_UnknownConnection :: Connection
    xRR_UnknownConnection  =  Connection
    2

    {-# LINE 1805 "Graphics/X11/Types.hsc" #-}