    {-# LINE 2 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Enumerations
    --
    -- Author : Manuel M. T. Chakravarty, Axel Simon
    --
    -- Created: 13 January 1999
    --
    -- Copyright (C) 1999-2005 Manuel M. T. Chakravarty, Axel Simon
    --
    -- This library is free software; you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public
    -- License as published by the Free Software Foundation; either
    -- version 2.1 of the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    -- General enumeration types.
    --
    module Graphics.UI.Gtk.Gdk.Enums (
      CrossingMode(..),
      DragProtocol(..),
      DragAction(..),
      EventMask(..),
      Modifier(..),

      ModifierIntent(..),

      NotifyType(..),
      ScrollDirection(..),
      VisibilityState(..),
      WindowState(..),
      WindowEdge(..),
      WindowTypeHint(..),
      Gravity(..),
      GrabStatus(..),

      OwnerChange(..),
    {-# LINE 59 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
      ) where

    import System.Glib.Flags (Flags)

    {-# LINE 72 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
    -- | How focus is crossing the widget.
    --
    data CrossingMode = CrossingNormal
                      | CrossingGrab
                      | CrossingUngrab
                      | CrossingGtkGrab
                      | CrossingGtkUngrab
                      | CrossingStateChanged
                      | CrossingTouchBegin
                      | CrossingTouchEnd
                      | CrossingDeviceSwitch
                      deriving (Int -> CrossingMode
    CrossingMode -> Int
    CrossingMode -> [CrossingMode]
    CrossingMode -> CrossingMode
    CrossingMode -> CrossingMode -> [CrossingMode]
    CrossingMode -> CrossingMode -> CrossingMode -> [CrossingMode]
    (CrossingMode -> CrossingMode)
    -> (CrossingMode -> CrossingMode)
    -> (Int -> CrossingMode)
    -> (CrossingMode -> Int)
    -> (CrossingMode -> [CrossingMode])
    -> (CrossingMode -> CrossingMode -> [CrossingMode])
    -> (CrossingMode -> CrossingMode -> [CrossingMode])
    -> (CrossingMode -> CrossingMode -> CrossingMode -> [CrossingMode])
    -> Enum CrossingMode
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: CrossingMode -> CrossingMode
    succ :: CrossingMode -> CrossingMode
    $cpred :: CrossingMode -> CrossingMode
    pred :: CrossingMode -> CrossingMode
    $ctoEnum :: Int -> CrossingMode
    toEnum :: Int -> CrossingMode
    $cfromEnum :: CrossingMode -> Int
    fromEnum :: CrossingMode -> Int
    $cenumFrom :: CrossingMode -> [CrossingMode]
    enumFrom :: CrossingMode -> [CrossingMode]
    $cenumFromThen :: CrossingMode -> CrossingMode -> [CrossingMode]
    enumFromThen :: CrossingMode -> CrossingMode -> [CrossingMode]
    $cenumFromTo :: CrossingMode -> CrossingMode -> [CrossingMode]
    enumFromTo :: CrossingMode -> CrossingMode -> [CrossingMode]
    $cenumFromThenTo :: CrossingMode -> CrossingMode -> CrossingMode -> [CrossingMode]
    enumFromThenTo :: CrossingMode -> CrossingMode -> CrossingMode -> [CrossingMode]
    Enum,CrossingMode -> CrossingMode -> Bool
    (CrossingMode -> CrossingMode -> Bool)
    -> (CrossingMode -> CrossingMode -> Bool) -> Eq CrossingMode
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: CrossingMode -> CrossingMode -> Bool
    == :: CrossingMode -> CrossingMode -> Bool
    $c/= :: CrossingMode -> CrossingMode -> Bool
    /= :: CrossingMode -> CrossingMode -> Bool
    Eq,Int -> CrossingMode -> ShowS
    [CrossingMode] -> ShowS
    CrossingMode -> String
    (Int -> CrossingMode -> ShowS)
    -> (CrossingMode -> String)
    -> ([CrossingMode] -> ShowS)
    -> Show CrossingMode
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> CrossingMode -> ShowS
    showsPrec :: Int -> CrossingMode -> ShowS
    $cshow :: CrossingMode -> String
    show :: CrossingMode -> String
    $cshowList :: [CrossingMode] -> ShowS
    showList :: [CrossingMode] -> ShowS
    Show)

    {-# LINE 75 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | Used in 'Graphics.UI.Gtk.Gdk.Drag.DragContext' to indicate the protocol according to which DND is done.
    --
    data DragProtocol = DragProtoNone
                      | DragProtoMotif
                      | DragProtoXdnd
                      | DragProtoRootwin
                      | DragProtoWin32Dropfiles
                      | DragProtoOle2
                      | DragProtoLocal
                      | DragProtoWayland
                      deriving (DragProtocol -> DragProtocol -> Bool
    (DragProtocol -> DragProtocol -> Bool)
    -> (DragProtocol -> DragProtocol -> Bool) -> Eq DragProtocol
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: DragProtocol -> DragProtocol -> Bool
    == :: DragProtocol -> DragProtocol -> Bool
    $c/= :: DragProtocol -> DragProtocol -> Bool
    /= :: DragProtocol -> DragProtocol -> Bool
    Eq,DragProtocol
    DragProtocol -> DragProtocol -> Bounded DragProtocol
    forall a. a -> a -> Bounded a
    $cminBound :: DragProtocol
    minBound :: DragProtocol
    $cmaxBound :: DragProtocol
    maxBound :: DragProtocol
    Bounded,Int -> DragProtocol -> ShowS
    [DragProtocol] -> ShowS
    DragProtocol -> String
    (Int -> DragProtocol -> ShowS)
    -> (DragProtocol -> String)
    -> ([DragProtocol] -> ShowS)
    -> Show DragProtocol
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> DragProtocol -> ShowS
    showsPrec :: Int -> DragProtocol -> ShowS
    $cshow :: DragProtocol -> String
    show :: DragProtocol -> String
    $cshowList :: [DragProtocol] -> ShowS
    showList :: [DragProtocol] -> ShowS
    Show)
    instance Enum DragProtocol where
      fromEnum :: DragProtocol -> Int
    fromEnum DragProtocol
    DragProtoNone = Int
    0
      fromEnum DragProtocol
    DragProtoMotif = Int
    1
      fromEnum DragProtocol
    DragProtoXdnd = Int
    2
      fromEnum DragProtocol
    DragProtoRootwin = Int
    3
      fromEnum DragProtocol
    DragProtoWin32Dropfiles = Int
    4
      fromEnum DragProtocol
    DragProtoOle2 = Int
    5
      fromEnum DragProtocol
    DragProtoLocal = Int
    6
      fromEnum DragProtocol
    DragProtoWayland = Int
    7

      toEnum :: Int -> DragProtocol
    toEnum Int
    0 = DragProtocol
    DragProtoNone
      toEnum 1 = DragProtoMotif
      toEnum 2 = DragProtoXdnd
      toEnum 3 = DragProtoRootwin
      toEnum 4 = DragProtoWin32Dropfiles
      toEnum 5 = DragProtoOle2
      toEnum 6 = DragProtoLocal
      toEnum 7 = DragProtoWayland
      toEnum Int
    unmatched = String -> DragProtocol
    forall a. HasCallStack => String -> a
    error (String
    "DragProtocol.toEnum: Cannot match " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Int -> String
    forall a. Show a => a -> String
    show Int
    unmatched)

      succ DragProtoNone = DragProtoMotif
      succ DragProtoMotif = DragProtoXdnd
      succ DragProtoXdnd = DragProtoRootwin
      succ DragProtoRootwin = DragProtoWin32Dropfiles
      succ DragProtoWin32Dropfiles = DragProtoOle2
      succ DragProtoOle2 = DragProtoLocal
      succ DragProtoLocal = DragProtoWayland
      succ _ Int
    = undefined

      pred DragProtoMotif = DragProtoNone
      pred DragProtoXdnd = DragProtoMotif
      pred DragProtoRootwin = DragProtoXdnd
      pred DragProtoWin32Dropfiles = DragProtoRootwin
      pred DragProtoOle2 = DragProtoWin32Dropfiles
      pred DragProtoLocal = DragProtoOle2
      pred DragProtoWayland = DragProtoLocal
      pred _ = undefined

      enumFromTo :: DragProtocol -> DragProtocol -> [DragProtocol]
    enumFromTo DragProtocol
    x DragProtocol
    y | DragProtocol -> Int
    forall a. Enum a => a -> Int
    fromEnum DragProtocol
    x Int -> Int -> Bool
    forall a. Eq a => a -> a -> Bool
    == DragProtocol -> Int
    forall a. Enum a => a -> Int
    fromEnum DragProtocol
    y = [ DragProtocol
    y ]
                     | Bool
    otherwise = DragProtocol
    x DragProtocol -> [DragProtocol] -> [DragProtocol]
    forall a. a -> [a] -> [a]
    : DragProtocol -> DragProtocol -> [DragProtocol]
    forall a. Enum a => a -> a -> [a]
    enumFromTo (DragProtocol -> DragProtocol
    forall a. Enum a => a -> a
    succ DragProtocol
    x) DragProtocol
    y
      enumFrom :: DragProtocol -> [DragProtocol]
    enumFrom DragProtocol
    x = DragProtocol -> DragProtocol -> [DragProtocol]
    forall a. Enum a => a -> a -> [a]
    enumFromTo DragProtocol
    x DragProtocol
    DragProtoWayland
      enumFromThen :: DragProtocol -> DragProtocol -> [DragProtocol]
    enumFromThen DragProtocol
    _ DragProtocol
    _ =     String -> [DragProtocol]
    forall a. HasCallStack => String -> a
    error String
    "Enum DragProtocol: enumFromThen not implemented"
      enumFromThenTo :: DragProtocol -> DragProtocol -> DragProtocol -> [DragProtocol]
    enumFromThenTo DragProtocol
    _ DragProtocol
    _ DragProtocol
    _ =     String -> [DragProtocol]
    forall a. HasCallStack => String -> a
    error String
    "Enum DragProtocol: enumFromThenTo not implemented"

    {-# LINE 79 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | Used in 'Graphics.UI.Gtk.Genearl.Drag.DragContext' to indicate what the
    -- destination should do with the dropped data.
    --
    -- * 'ActionDefault': Initialisation value, should not be used.
    --
    -- * 'ActionCopy': Copy the data.
    --
    -- * 'ActionMove': Move the data, i.e. first copy it, then delete it from the source.
    --
    -- * 'ActionLink': Add a link to the data. Note that this is only useful if source and
    -- destination agree on what it means.
    --
    -- * 'ActionPrivate': Special action which tells the source that the destination will do
    -- something that the source doesn't understand.
    --
    -- * 'ActionAsk': Ask the user what to do with the data.
    --
    data DragAction = ActionDefault
                    | ActionCopy
                    | ActionMove
                    | ActionLink
                    | ActionPrivate
                    | ActionAsk
                    deriving (Eq,Bounded,Show)
    instance Enum DragAction where
      fromEnum ActionDefault = 1
      fromEnum ActionCopy = 2
      fromEnum ActionMove = 4
      fromEnum ActionLink = 8
      fromEnum ActionPrivate = 16
      fromEnum ActionAsk = 32

      toEnum 1 = ActionDefault
      toEnum 2 = ActionCopy
      toEnum 4 = ActionMove
      toEnum 8 = ActionLink
      toEnum 16 = ActionPrivate
      toEnum 32 = ActionAsk
      toEnum unmatched = error ("DragAction.toEnum: Cannot match " ++ show unmatched)

      succ ActionDefault = ActionCopy
      succ ActionCopy = ActionMove
      succ ActionMove = ActionLink
      succ ActionLink = ActionPrivate
      succ ActionPrivate = ActionAsk
      succ _ = undefined

      pred ActionCopy = ActionDefault
      pred ActionMove = ActionCopy
      pred ActionLink = ActionMove
      pred ActionPrivate = ActionLink
      pred ActionAsk = ActionPrivate
      pred _ = undefined

      enumFromTo :: DragAction -> DragAction -> [DragAction]
    enumFromTo DragAction
    x DragAction
    y | DragAction -> Int
    forall a. Enum a => a -> Int
    fromEnum DragAction
    x Int -> Int -> Bool
    forall a. Eq a => a -> a -> Bool
    == DragAction -> Int
    forall a. Enum a => a -> Int
    fromEnum DragAction
    y = [ DragAction
    y ]
                     | Bool
    otherwise = DragAction
    x DragAction -> [DragAction] -> [DragAction]
    forall a. a -> [a] -> [a]
    : DragAction -> DragAction -> [DragAction]
    forall a. Enum a => a -> a -> [a]
    enumFromTo (DragAction -> DragAction
    forall a. Enum a => a -> a
    succ DragAction
    x) DragAction
    y
      enumFrom :: DragAction -> [DragAction]
    enumFrom DragAction
    x = DragAction -> DragAction -> [DragAction]
    forall a. Enum a => a -> a -> [a]
    enumFromTo DragAction
    x DragAction
    ActionAsk
      enumFromThen _ _ =     error "Enum DragAction: enumFromThen not implemented"
      enumFromThenTo _ _ _ =     error "Enum DragAction: enumFromThenTo not implemented"

    {-# LINE 99 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    instance Flags DragAction
    {-# LINE 109 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
    -- | Specify which events a widget will emit signals on.
    --
    data EventMask = ExposureMask
                   | PointerMotionMask
                   | PointerMotionHintMask
                   | ButtonMotionMask
                   | Button1MotionMask
                   | Button2MotionMask
                   | Button3MotionMask
                   | ButtonPressMask
                   | ButtonReleaseMask
                   | KeyPressMask
                   | KeyReleaseMask
                   | EnterNotifyMask
                   | LeaveNotifyMask
                   | FocusChangeMask
                   | StructureMask
                   | PropertyChangeMask
                   | VisibilityNotifyMask
                   | ProximityInMask
                   | ProximityOutMask
                   | SubstructureMask
                   | ScrollMask
                   | TouchMask
                   | SmoothScrollMask
                   | TouchpadGestureMask
                   | TabletPadMask
                   | AllEventsMask
                   deriving (Eq,Bounded,Show)
    instance Enum EventMask where
      fromEnum ExposureMask = 2
      fromEnum PointerMotionMask = 4
      fromEnum PointerMotionHintMask = 8
      fromEnum ButtonMotionMask = 16
      fromEnum Button1MotionMask = 32
      fromEnum Button2MotionMask = 64
      fromEnum Button3MotionMask = 128
      fromEnum ButtonPressMask = 256
      fromEnum ButtonReleaseMask = 512
      fromEnum KeyPressMask = 1024
      fromEnum KeyReleaseMask = 2048
      fromEnum EnterNotifyMask = 4096
      fromEnum LeaveNotifyMask = 8192
      fromEnum FocusChangeMask = 16384
      fromEnum StructureMask = 32768
      fromEnum PropertyChangeMask = 65536
      fromEnum VisibilityNotifyMask = 131072
      fromEnum ProximityInMask = 262144
      fromEnum ProximityOutMask = 524288
      fromEnum SubstructureMask = 1048576
      fromEnum ScrollMask = 2097152
      fromEnum TouchMask = 4194304
      fromEnum SmoothScrollMask = 8388608
      fromEnum TouchpadGestureMask = 16777216
      fromEnum TabletPadMask = 33554432
      fromEnum AllEventsMask = 67108862

      toEnum 2 = ExposureMask
      toEnum 4 = PointerMotionMask
      toEnum 8 = PointerMotionHintMask
      toEnum 16 = ButtonMotionMask
      toEnum 32 = Button1MotionMask
      toEnum 64 = Button2MotionMask
      toEnum 128 = Button3MotionMask
      toEnum 256 = ButtonPressMask
      toEnum 512 = ButtonReleaseMask
      toEnum 1024 = KeyPressMask
      toEnum 2048 = KeyReleaseMask
      toEnum 4096 = EnterNotifyMask
      toEnum 8192 = LeaveNotifyMask
      toEnum 16384 = FocusChangeMask
      toEnum 32768 = StructureMask
      toEnum 65536 = PropertyChangeMask
      toEnum 131072 = VisibilityNotifyMask
      toEnum 262144 = ProximityInMask
      toEnum 524288 = ProximityOutMask
      toEnum 1048576 = SubstructureMask
      toEnum 2097152 = ScrollMask
      toEnum 4194304 = TouchMask
      toEnum 8388608 = SmoothScrollMask
      toEnum 16777216 = TouchpadGestureMask
      toEnum 33554432 = TabletPadMask
      toEnum 67108862 = AllEventsMask
      toEnum unmatched = error ("EventMask.toEnum: Cannot match " ++ show unmatched)

      succ ExposureMask = PointerMotionMask
      succ PointerMotionMask = PointerMotionHintMask
      succ PointerMotionHintMask = ButtonMotionMask
      succ ButtonMotionMask = Button1MotionMask
      succ Button1MotionMask = Button2MotionMask
      succ Button2MotionMask = Button3MotionMask
      succ Button3MotionMask = ButtonPressMask
      succ ButtonPressMask = ButtonReleaseMask
      succ ButtonReleaseMask = KeyPressMask
      succ KeyPressMask = KeyReleaseMask
      succ KeyReleaseMask = EnterNotifyMask
      succ EnterNotifyMask = LeaveNotifyMask
      succ LeaveNotifyMask = FocusChangeMask
      succ FocusChangeMask = StructureMask
      succ StructureMask = PropertyChangeMask
      succ PropertyChangeMask = VisibilityNotifyMask
      succ VisibilityNotifyMask = ProximityInMask
      succ ProximityInMask = ProximityOutMask
      succ ProximityOutMask = SubstructureMask
      succ SubstructureMask = ScrollMask
      succ ScrollMask = TouchMask
      succ TouchMask = SmoothScrollMask
      succ SmoothScrollMask = TouchpadGestureMask
      succ TouchpadGestureMask = TabletPadMask
      succ TabletPadMask = AllEventsMask
      succ _ = undefined

      pred PointerMotionMask = ExposureMask
      pred PointerMotionHintMask = PointerMotionMask
      pred ButtonMotionMask = PointerMotionHintMask
      pred Button1MotionMask = ButtonMotionMask
      pred Button2MotionMask = Button1MotionMask
      pred Button3MotionMask = Button2MotionMask
      pred ButtonPressMask = Button3MotionMask
      pred ButtonReleaseMask = ButtonPressMask
      pred KeyPressMask = ButtonReleaseMask
      pred KeyReleaseMask = KeyPressMask
      pred EnterNotifyMask = KeyReleaseMask
      pred LeaveNotifyMask = EnterNotifyMask
      pred FocusChangeMask = LeaveNotifyMask
      pred StructureMask = FocusChangeMask
      pred PropertyChangeMask = StructureMask
      pred VisibilityNotifyMask = PropertyChangeMask
      pred ProximityInMask = VisibilityNotifyMask
      pred ProximityOutMask = ProximityInMask
      pred SubstructureMask = ProximityOutMask
      pred ScrollMask = SubstructureMask
      pred TouchMask = ScrollMask
      pred SmoothScrollMask = TouchMask
      pred TouchpadGestureMask = SmoothScrollMask
      pred TabletPadMask = TouchpadGestureMask
      pred AllEventsMask = TabletPadMask
      pred _ = undefined

      enumFromTo x y | fromEnum x == fromEnum y = [ y ]
                     | otherwise = x : enumFromTo (succ x) y
      enumFrom x = enumFromTo x AllEventsMask
      enumFromThen _ _ =     error "Enum EventMask: enumFromThen not implemented"
      enumFromThenTo _ _ _ =     error "Enum EventMask: enumFromThenTo not implemented"

    {-# LINE 112 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    instance Flags EventMask

    -- | Keyboard modifiers that are depressed when the user presses
    -- a key or a mouse button.
    --
    -- * This data type is used to build lists of modifiers that were active
    -- during an event.
    --
    -- * The "Apple" key on Macintoshs is mapped to 'Alt2' and the 'Meta'
    -- key (if available).
    --
    -- * Since Gtk 2.10, there are also 'Super', 'Hyper' and 'Meta' modifiers
    -- which are simply generated from 'Alt' .. 'Compose' modifier keys,
    -- depending on the mapping used by the windowing system. Due to one
    -- key being mapped to e.g. 'Alt2' and 'Meta', you shouldn't pattern
    -- match directly against a certain key but check whether a key is
    -- in the list using the 'elem' function, say.
    --

    data Modifier = Shift
                  | Lock
                  | Control
                  | Alt
                  | Alt2
                  | Alt3
                  | Alt4
                  | Alt5
                  | Button1
                  | Button2
                  | Button3
                  | Button4
                  | Button5
                  | MODIFIER_RESERVED_13_MASK
                  | MODIFIER_RESERVED_14_MASK
                  | MODIFIER_RESERVED_15_MASK
                  | MODIFIER_RESERVED_16_MASK
                  | MODIFIER_RESERVED_17_MASK
                  | MODIFIER_RESERVED_18_MASK
                  | MODIFIER_RESERVED_19_MASK
                  | MODIFIER_RESERVED_20_MASK
                  | MODIFIER_RESERVED_21_MASK
                  | MODIFIER_RESERVED_22_MASK
                  | MODIFIER_RESERVED_23_MASK
                  | MODIFIER_RESERVED_24_MASK
                  | MODIFIER_RESERVED_25_MASK
                  | Super
                  | Hyper
                  | Meta
                  | MODIFIER_RESERVED_29_MASK
                  | Release
                  | ModifierMask
                  deriving (Bounded,Show,Eq)
    instance Enum Modifier where
      fromEnum Shift = 1
      fromEnum Lock = 2
      fromEnum Control = 4
      fromEnum Alt = 8
      fromEnum Alt2 = 16
      fromEnum Alt3 = 32
      fromEnum Alt4 = 64
      fromEnum Alt5 = 128
      fromEnum Button1 = 256
      fromEnum Button2 = 512
      fromEnum Button3 = 1024
      fromEnum Button4 = 2048
      fromEnum Button5 = 4096
      fromEnum MODIFIER_RESERVED_13_MASK = 8192
      fromEnum MODIFIER_RESERVED_14_MASK = 16384
      fromEnum MODIFIER_RESERVED_15_MASK = 32768
      fromEnum MODIFIER_RESERVED_16_MASK = 65536
      fromEnum MODIFIER_RESERVED_17_MASK = 131072
      fromEnum MODIFIER_RESERVED_18_MASK = 262144
      fromEnum MODIFIER_RESERVED_19_MASK = 524288
      fromEnum MODIFIER_RESERVED_20_MASK = 1048576
      fromEnum MODIFIER_RESERVED_21_MASK = 2097152
      fromEnum MODIFIER_RESERVED_22_MASK = 4194304
      fromEnum MODIFIER_RESERVED_23_MASK = 8388608
      fromEnum MODIFIER_RESERVED_24_MASK = 16777216
      fromEnum MODIFIER_RESERVED_25_MASK = 33554432
      fromEnum Super = 67108864
      fromEnum Hyper = 134217728
      fromEnum Meta = 268435456
      fromEnum MODIFIER_RESERVED_29_MASK = 536870912
      fromEnum Release = 1073741824
      fromEnum ModifierMask = 1543512063

      toEnum 1 = Shift
      toEnum 2 = Lock
      toEnum 4 = Control
      toEnum 8 = Alt
      toEnum 16 = Alt2
      toEnum 32 = Alt3
      toEnum 64 = Alt4
      toEnum 128 = Alt5
      toEnum 256 = Button1
      toEnum 512 = Button2
      toEnum 1024 = Button3
      toEnum 2048 = Button4
      toEnum 4096 = Button5
      toEnum 8192 = MODIFIER_RESERVED_13_MASK
      toEnum 16384 = MODIFIER_RESERVED_14_MASK
      toEnum 32768 = MODIFIER_RESERVED_15_MASK
      toEnum 65536 = MODIFIER_RESERVED_16_MASK
      toEnum 131072 = MODIFIER_RESERVED_17_MASK
      toEnum 262144 = MODIFIER_RESERVED_18_MASK
      toEnum 524288 = MODIFIER_RESERVED_19_MASK
      toEnum 1048576 = MODIFIER_RESERVED_20_MASK
      toEnum 2097152 = MODIFIER_RESERVED_21_MASK
      toEnum 4194304 = MODIFIER_RESERVED_22_MASK
      toEnum 8388608 = MODIFIER_RESERVED_23_MASK
      toEnum 16777216 = MODIFIER_RESERVED_24_MASK
      toEnum 33554432 = MODIFIER_RESERVED_25_MASK
      toEnum 67108864 = Super
      toEnum 134217728 = Hyper
      toEnum 268435456 = Meta
      toEnum 536870912 = MODIFIER_RESERVED_29_MASK
      toEnum 1073741824 = Release
      toEnum 1543512063 = ModifierMask
      toEnum unmatched = error ("Modifier.toEnum: Cannot match " ++ show unmatched)

      succ Shift = Lock
      succ Lock = Control
      succ Control = Alt
      succ Alt = Alt2
      succ Alt2 = Alt3
      succ Alt3 = Alt4
      succ Alt4 = Alt5
      succ Alt5 = Button1
      succ Button1 = Button2
      succ Button2 = Button3
      succ Button3 = Button4
      succ Button4 = Button5
      succ Button5 = MODIFIER_RESERVED_13_MASK
      succ MODIFIER_RESERVED_13_MASK = MODIFIER_RESERVED_14_MASK
      succ MODIFIER_RESERVED_14_MASK = MODIFIER_RESERVED_15_MASK
      succ MODIFIER_RESERVED_15_MASK = MODIFIER_RESERVED_16_MASK
      succ MODIFIER_RESERVED_16_MASK = MODIFIER_RESERVED_17_MASK
      succ MODIFIER_RESERVED_17_MASK = MODIFIER_RESERVED_18_MASK
      succ MODIFIER_RESERVED_18_MASK = MODIFIER_RESERVED_19_MASK
      succ MODIFIER_RESERVED_19_MASK = MODIFIER_RESERVED_20_MASK
      succ MODIFIER_RESERVED_20_MASK = MODIFIER_RESERVED_21_MASK
      succ MODIFIER_RESERVED_21_MASK = MODIFIER_RESERVED_22_MASK
      succ MODIFIER_RESERVED_22_MASK = MODIFIER_RESERVED_23_MASK
      succ MODIFIER_RESERVED_23_MASK = MODIFIER_RESERVED_24_MASK
      succ MODIFIER_RESERVED_24_MASK = MODIFIER_RESERVED_25_MASK
      succ MODIFIER_RESERVED_25_MASK = Super
      succ Super = Hyper
      succ Hyper = Meta
      succ Meta = MODIFIER_RESERVED_29_MASK
      succ MODIFIER_RESERVED_29_MASK = Release
      pred :: NotifyType -> NotifyType
    succ Release = ModifierMask
      succ _ = undefined

      pred Lock = Shift
      pred Control = Lock
      pred Alt = Control
      pred Alt2 = Alt
      pred Alt3 = Alt2
      pred Alt4 = Alt3
      pred Alt5 = Alt4
      pred Button1 = Alt5
      pred Button2 = Button1
      pred Button3 = Button2
      pred Button4 = Button3
      pred Button5 = Button4
      pred MODIFIER_RESERVED_13_MASK = Button5
      pred MODIFIER_RESERVED_14_MASK = MODIFIER_RESERVED_13_MASK
      pred MODIFIER_RESERVED_15_MASK = MODIFIER_RESERVED_14_MASK
      pred MODIFIER_RESERVED_16_MASK = MODIFIER_RESERVED_15_MASK
      pred MODIFIER_RESERVED_17_MASK = MODIFIER_RESERVED_16_MASK
      pred MODIFIER_RESERVED_18_MASK = MODIFIER_RESERVED_17_MASK
      pred MODIFIER_RESERVED_19_MASK = MODIFIER_RESERVED_18_MASK
      pred MODIFIER_RESERVED_20_MASK = MODIFIER_RESERVED_19_MASK
      pred MODIFIER_RESERVED_21_MASK = MODIFIER_RESERVED_20_MASK
      pred MODIFIER_RESERVED_22_MASK = MODIFIER_RESERVED_21_MASK
      pred MODIFIER_RESERVED_23_MASK = MODIFIER_RESERVED_22_MASK
      pred MODIFIER_RESERVED_24_MASK = MODIFIER_RESERVED_23_MASK
      pred MODIFIER_RESERVED_25_MASK = MODIFIER_RESERVED_24_MASK
      pred Super = MODIFIER_RESERVED_25_MASK
      pred Hyper = Super
      pred Meta = Hyper
      pred MODIFIER_RESERVED_29_MASK = Meta
      pred Release = MODIFIER_RESERVED_29_MASK
      pred ModifierMask = Release
      pred _ = undefined

      enumFromTo :: Modifier -> Modifier -> [Modifier]
    enumFromTo Modifier
    x Modifier
    y | Modifier -> Int
    forall a. Enum a => a -> Int
    fromEnum Modifier
    x Int -> Int -> Bool
    forall a. Eq a => a -> a -> Bool
    == Modifier -> Int
    forall a. Enum a => a -> Int
    fromEnum Modifier
    y = [ Modifier
    y ]
                     | Bool
    otherwise = Modifier
    x Modifier -> [Modifier] -> [Modifier]
    forall a. a -> [a] -> [a]
    : Modifier -> Modifier -> [Modifier]
    forall a. Enum a => a -> a -> [a]
    enumFromTo (Modifier -> Modifier
    forall a. Enum a => a -> a
    succ Modifier
    x) Modifier
    y
      enumFrom x = enumFromTo x ModifierMask
      enumFromThen _ _ =     error "Enum Modifier: enumFromThen not implemented"
      enumFromThenTo _ _ _ =     error "Enum Modifier: enumFromThenTo not implemented"

    {-# LINE 170 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
    instance Flags Modifier

    data ModifierIntent = ModifierIntentPrimaryAccelerator
                        | ModifierIntentContextMenu
                        | ModifierIntentExtendSelection
                        | ModifierIntentModifySelection
                        | ModifierIntentNoTextInput
                        | ModifierIntentShiftGroup
                        | ModifierIntentDefaultModMask
                        deriving (Enum,Eq,Show)

    {-# LINE 211 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
    -- | Information on from what level of the widget hierarchy the mouse
    -- cursor came.
    --
    -- ['NotifyAncestor'] The window is entered from an ancestor or left towards
    -- an ancestor.
    --
    -- ['NotifyVirtual'] The pointer moves between an ancestor and an inferior
    -- of the window.
    --
    -- ['NotifyInferior'] The window is entered from an inferior or left
    -- towards an inferior.
    --
    -- ['NotifyNonlinear'] The window is entered from or left towards a
    -- window which is neither an ancestor nor an inferior.
    --
    -- ['NotifyNonlinearVirtual'] The pointer moves between two windows which
    -- are not ancestors of each other and the window is part of the ancestor
    -- chain between one of these windows and their least common ancestor.
    --
    -- ['NotifyUnknown'] The level change does not fit into any of the other
    -- categories or could not be determined.
    --
    data NotifyType = NotifyAncestor
                    | NotifyVirtual
                    | NotifyInferior
                    | NotifyNonlinear
                    | NotifyNonlinearVirtual
                    | NotifyUnknown
                    deriving (Eq,Show)
    instance Enum NotifyType where
      fromEnum NotifyAncestor = 0
      fromEnum NotifyVirtual = 1
      fromEnum NotifyInferior = 2
      fromEnum NotifyNonlinear = 3
      fromEnum NotifyNonlinearVirtual = 4
      fromEnum NotifyUnknown = 5

      toEnum 0 = NotifyAncestor
      toEnum 1 = NotifyVirtual
      toEnum 2 = NotifyInferior
      toEnum 3 = NotifyNonlinear
      toEnum 4 = NotifyNonlinearVirtual
      toEnum 5 = NotifyUnknown
      toEnum unmatched = error ("NotifyType.toEnum: Cannot match " ++ show unmatched)

      succ NotifyAncestor = NotifyVirtual
      succ NotifyVirtual = NotifyInferior
      succ NotifyInferior = NotifyNonlinear
      succ NotifyNonlinear = NotifyNonlinearVirtual
      succ NotifyNonlinearVirtual = NotifyUnknown
      succ _ = undefined

      pred NotifyVirtual = NotifyAncestor
      pred NotifyInferior = NotifyVirtual
      pred NotifyNonlinear = NotifyInferior
      pred NotifyNonlinearVirtual = NotifyNonlinear
      pred NotifyUnknown = NotifyNonlinearVirtual
      pred _ = undefined

      enumFromTo x y | fromEnum x == fromEnum y = [ y ]
                     | otherwise = x : enumFromTo (succ x) y
      enumFrom x = enumFromTo x NotifyUnknown
      enumFromThen _ _ =     error "Enum NotifyType: enumFromThen not implemented"
      enumFromThenTo _ _ _ =     error "Enum NotifyType: enumFromThenTo not implemented"

    {-# LINE 234 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | in which direction was scrolled?
    --
    data ScrollDirection = ScrollUp
                         | ScrollDown
                         | ScrollLeft
                         | ScrollRight
                         | ScrollSmooth
                         deriving (Enum,Eq,Show)

    {-# LINE 247 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}
    -- | visibility of a window
    --
    data VisibilityState = VisibilityUnobscured
                         | VisibilityPartialObscured
                         | VisibilityFullyObscured
                         deriving (Enum,Eq,Show)

    {-# LINE 252 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | The state a @DrawWindow@ is in.
    --
    data WindowState = WindowStateWithdrawn
                     | WindowStateIconified
                     | WindowStateMaximized
                     | WindowStateSticky
                     | WindowStateFullscreen
                     | WindowStateAbove
                     | WindowStateBelow
                     | WindowStateFocused
                     | WindowStateTiled
                     | WindowStateTopTiled
                     | WindowStateTopResizable
                     | WindowStateRightTiled
                     | WindowStateRightResizable
                     | WindowStateBottomTiled
                     | WindowStateBottomResizable
                     | WindowStateLeftTiled
                     | WindowStateLeftResizable
                     deriving (Eq,Bounded,Show)
    instance Enum WindowState where
      fromEnum WindowStateWithdrawn = 1
      fromEnum WindowStateIconified = 2
      fromEnum WindowStateMaximized = 4
      fromEnum WindowStateSticky = 8
      fromEnum WindowStateFullscreen = 16
      fromEnum WindowStateAbove = 32
      fromEnum WindowStateBelow = 64
      fromEnum WindowStateFocused = 128
      fromEnum WindowStateTiled = 256
      fromEnum WindowStateTopTiled = 512
      fromEnum WindowStateTopResizable = 1024
      fromEnum WindowStateRightTiled = 2048
      fromEnum WindowStateRightResizable = 4096
      fromEnum WindowStateBottomTiled = 8192
      fromEnum WindowStateBottomResizable = 16384
      fromEnum WindowStateLeftTiled = 32768
      fromEnum WindowStateLeftResizable = 65536

      toEnum 1 = WindowStateWithdrawn
      toEnum 2 = WindowStateIconified
      toEnum 4 = WindowStateMaximized
      toEnum 8 = WindowStateSticky
      toEnum 16 = WindowStateFullscreen
      toEnum 32 = WindowStateAbove
      toEnum 64 = WindowStateBelow
      toEnum 128 = WindowStateFocused
      toEnum 256 = WindowStateTiled
      toEnum 512 = WindowStateTopTiled
      toEnum 1024 = WindowStateTopResizable
      toEnum 2048 = WindowStateRightTiled
      toEnum 4096 = WindowStateRightResizable
      toEnum 8192 = WindowStateBottomTiled
      toEnum 16384 = WindowStateBottomResizable
      toEnum 32768 = WindowStateLeftTiled
      toEnum 65536 = WindowStateLeftResizable
      toEnum :: Int -> GrabStatus
    toEnum unmatched = error ("WindowState.toEnum: Cannot match " ++ show unmatched)

      succ WindowStateWithdrawn = WindowStateIconified
      succ WindowStateIconified = WindowStateMaximized
      succ WindowStateMaximized = WindowStateSticky
      succ WindowStateSticky = WindowStateFullscreen
      succ WindowStateFullscreen = WindowStateAbove
      succ WindowStateAbove = WindowStateBelow
      succ :: GrabStatus -> GrabStatus
    succ WindowStateBelow = WindowStateFocused
      succ GrabStatus
    WindowStateFocused = WindowStateTiled
      succ WindowStateTiled = WindowStateTopTiled
      succ WindowStateTopTiled = WindowStateTopResizable
      succ WindowStateTopResizable = WindowStateRightTiled
      succ WindowStateRightTiled = WindowStateRightResizable
      pred :: Gravity -> Gravity
    succ WindowStateRightResizable = WindowStateBottomTiled
      pred :: GrabStatus -> GrabStatus
    succ WindowStateBottomTiled = WindowStateBottomResizable
      succ WindowStateBottomResizable = WindowStateLeftTiled
      succ WindowStateLeftTiled = WindowStateLeftResizable
      succ _ = undefined

      pred WindowStateIconified = WindowStateWithdrawn
      pred WindowStateMaximized = WindowStateIconified
      pred WindowStateSticky = WindowStateMaximized
      pred WindowStateFullscreen = WindowStateSticky
      pred WindowStateAbove = WindowStateFullscreen
      pred WindowStateBelow = WindowStateAbove
      pred WindowStateFocused = WindowStateBelow
      pred WindowStateTiled = WindowStateFocused
      pred WindowStateTopTiled = WindowStateTiled
      pred WindowStateTopResizable = WindowStateTopTiled
      pred WindowStateRightTiled = WindowStateTopResizable
      pred WindowStateRightResizable = WindowStateRightTiled
      pred WindowStateBottomTiled = WindowStateRightResizable
      pred WindowStateBottomResizable = WindowStateBottomTiled
      pred WindowStateLeftTiled = WindowStateBottomResizable
      pred WindowStateLeftResizable = WindowStateLeftTiled
      pred _ = undefined

      enumFromTo :: WindowState -> WindowState -> [WindowState]
    enumFromTo WindowState
    x WindowState
    y | WindowState -> Int
    forall a. Enum a => a -> Int
    fromEnum WindowState
    x Int -> Int -> Bool
    forall a. Eq a => a -> a -> Bool
    == WindowState -> Int
    forall a. Enum a => a -> Int
    fromEnum WindowState
    y = [ WindowState
    y ]
                     | Bool
    otherwise = WindowState
    x WindowState -> [WindowState] -> [WindowState]
    forall a. a -> [a] -> [a]
    : WindowState -> WindowState -> [WindowState]
    forall a. Enum a => a -> a -> [a]
    enumFromTo (WindowState -> WindowState
    forall a. Enum a => a -> a
    succ WindowState
    x) WindowState
    y
      enumFrom :: WindowState -> [WindowState]
    enumFrom WindowState
    x = WindowState -> WindowState -> [WindowState]
    forall a. Enum a => a -> a -> [a]
    enumFromTo WindowState
    x WindowState
    WindowStateLeftResizable
      enumFromThen :: WindowState -> WindowState -> [WindowState]
    enumFromThen WindowState
    _ WindowState
    _ =     String -> [WindowState]
    forall a. HasCallStack => String -> a
    error String
    "Enum WindowState: enumFromThen not implemented"
      enumFromThenTo :: WindowState -> WindowState -> WindowState -> [WindowState]
    enumFromThenTo WindowState
    _ WindowState
    _ WindowState
    _ =     String -> [WindowState]
    forall a. HasCallStack => String -> a
    error String
    "Enum WindowState: enumFromThenTo not implemented"

    {-# LINE 256 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    instance Flags WindowState

    -- | Determines a window edge or corner.
    --
    data WindowEdge = WindowEdgeNorthWest
                    | WindowEdgeNorth
                    | WindowEdgeNorthEast
                    | WindowEdgeWest
                    | WindowEdgeEast
                    | WindowEdgeSouthWest
                    | WindowEdgeSouth
                    | WindowEdgeSouthEast
                    deriving (Enum,Eq,Show)

    {-# LINE 262 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | These are hints for the window manager that indicate what type of function
    -- the window has. The window manager can use this when determining decoration
    -- and behaviour of the window. The hint must be set before mapping the window.
    --
    -- See the extended window manager hints specification for more details about
    -- window types.
    --
    data WindowTypeHint = WindowTypeHintNormal
                        | WindowTypeHintDialog
                        | WindowTypeHintMenu
                        | WindowTypeHintToolbar
                        | WindowTypeHintSplashscreen
                        | WindowTypeHintUtility
                        | WindowTypeHintDock
                        | WindowTypeHintDesktop
                        | WindowTypeHintDropdownMenu
                        | WindowTypeHintPopupMenu
                        | WindowTypeHintTooltip
                        | WindowTypeHintNotification
                        | WindowTypeHintCombo
                        | WindowTypeHintDnd
                        deriving (Enum,Eq,Show)

    {-# LINE 271 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | Defines the reference point of a window and the meaning of coordinates
    -- passed to 'Graphics.UI.Gtk.Windows.Window.windowMove'. See
    -- 'Graphics.UI.Gtk.Windows.Window.windowMove' and the "implementation notes"
    -- section of the extended window manager hints specification for more details.
    --
    data Gravity = GravityNorthWest
                 | GravityNorth
                 | GravityNorthEast
                 | GravityWest
                 | GravityCenter
                 | GravityEast
                 | GravitySouthWest
                 | GravitySouth
                 | GravitySouthEast
                 | GravityStatic
                 deriving (Eq,Show)
    instance Enum Gravity where
      fromEnum GravityNorthWest = 1
      fromEnum GravityNorth = 2
      fromEnum GravityNorthEast = 3
      fromEnum GravityWest = 4
      fromEnum GravityCenter = 5
      fromEnum GravityEast = 6
      fromEnum GravitySouthWest = 7
      fromEnum GravitySouth = 8
      fromEnum GravitySouthEast = 9
      fromEnum GravityStatic = 10

      toEnum 1 = GravityNorthWest
      toEnum 2 = GravityNorth
      toEnum 3 = GravityNorthEast
      toEnum 4 = GravityWest
      toEnum 5 = GravityCenter
      toEnum 6 = GravityEast
      toEnum 7 = GravitySouthWest
      toEnum 8 = GravitySouth
      toEnum 9 = GravitySouthEast
      toEnum 10 = GravityStatic
      toEnum unmatched = error ("Gravity.toEnum: Cannot match " ++ show unmatched)

      succ GravityNorthWest = GravityNorth
      succ GravityNorth = GravityNorthEast
      succ GravityNorthEast = GravityWest
      succ GravityWest = GravityCenter
      succ GravityCenter = GravityEast
      succ GravityEast = GravitySouthWest
      succ GravitySouthWest = GravitySouth
      succ GravitySouth = GravitySouthEast
      succ GravitySouthEast = GravityStatic
      succ _ = undefined

      pred GravityNorth = GravityNorthWest
      pred GravityNorthEast = GravityNorth
      pred GravityWest = GravityNorthEast
      pred GravityCenter = GravityWest
      pred GravityEast = GravityCenter
      pred GravitySouthWest = GravityEast
      pred GravitySouth = GravitySouthWest
      pred GravitySouthEast = GravitySouth
      pred GravityStatic = GravitySouthEast
      pred _ = undefined

      enumFromTo x y | fromEnum x == fromEnum y = [ y ]
                     | otherwise = x : enumFromTo (succ x) y
      enumFrom x = enumFromTo x GravityStatic
      enumFromThen _ _ =     error "Enum Gravity: enumFromThen not implemented"
      enumFromThenTo _ _ _ =     error "Enum Gravity: enumFromThenTo not implemented"

    {-# LINE 278 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | Returned by 'pointerGrab' and 'keyboardGrab' to indicate success or the
    -- reason for the failure of the grab attempt.
    --
    -- [@GrabSuccess@] the resource was successfully grabbed.
    --
    -- [@GrabAlreadyGrabbed@] the resource is actively grabbed by another client.
    --
    -- [@GrabInvalidTime@] the resource was grabbed more recently than the
    -- specified time.
    --
    -- [@GrabNotViewable@] the grab window or the confine_to window are not
    -- viewable.
    --
    -- [@GrabFrozen@] the resource is frozen by an active grab of another client.
    --
    data GrabStatus = GrabSuccess
                    | GrabAlreadyGrabbed
                    | GrabInvalidTime
                    | GrabNotViewable
                    | GrabFrozen
                    | GrabFailed
                    deriving (Eq,Show)
    instance Enum GrabStatus where
      fromEnum GrabSuccess = 0
      fromEnum GrabAlreadyGrabbed = 1
      fromEnum GrabInvalidTime = 2
      fromEnum GrabNotViewable = 3
      fromEnum GrabFrozen = 4
      fromEnum GrabFailed = 5

      toEnum 0 = GrabSuccess
      toEnum 1 = GrabAlreadyGrabbed
      toEnum 2 = GrabInvalidTime
      toEnum 3 = GrabNotViewable
      toEnum 4 = GrabFrozen
      toEnum 5 = GrabFailed
      toEnum unmatched = error ("GrabStatus.toEnum: Cannot match " ++ show unmatched)

      succ GrabSuccess = GrabAlreadyGrabbed
      succ GrabAlreadyGrabbed = GrabInvalidTime
      succ GrabInvalidTime = GrabNotViewable
      succ GrabNotViewable = GrabFrozen
      succ GrabFrozen = GrabFailed
      succ _ = undefined

      pred GrabAlreadyGrabbed = GrabSuccess
      pred GrabInvalidTime = GrabAlreadyGrabbed
      pred GrabNotViewable = GrabInvalidTime
      pred GrabFrozen = GrabNotViewable
      pred GrabFailed = GrabFrozen
      pred _ = undefined

      enumFromTo x y | fromEnum x == fromEnum y = [ y ]
                     | otherwise = x : enumFromTo (succ x) y
      enumFrom x = enumFromTo x GrabFailed
      enumFromThen _ _ =     error "Enum GrabStatus: enumFromThen not implemented"
      enumFromThenTo _ _ _ =     error "Enum GrabStatus: enumFromThenTo not implemented"

    {-# LINE 295 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}

    -- | Specifies why a selection ownership was changed.
    --
    -- [@OwnerChangeNewOwner@] some other application claimed the ownership
    --
    -- [@OwnerChangeDestroy@] the window was destroyed
    --
    -- [@OwnerChangeClose@] the client was closed
    --
    data OwnerChange = OwnerChangeNewOwner
                     | OwnerChangeDestroy
                     | OwnerChangeClose
                     deriving (Enum,Eq,Show)

    {-# LINE 306 "./Graphics/UI/Gtk/Gdk/Enums.chs" #-}