

-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GtkLayerShell.Enums
    ( 

 -- * Enumerations


-- ** Edge #enum:Edge#

    Edge(..)                                ,


-- ** KeyboardMode #enum:KeyboardMode#

    KeyboardMode(..)                        ,


-- ** Layer #enum:Layer#

    Layer(..)                               ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)

#else

#endif

-- Enum Layer
-- | /No description available in the introspection data./
data Layer = 
      LayerBackground
    -- ^ The background layer.
    | LayerBottom
    -- ^ The bottom layer.
    | LayerTop
    -- ^ The top layer.
    | LayerOverlay
    -- ^ The overlay layer.
    | LayerEntryNumber
    -- ^ Should not be used except to get the number of entries. (NOTE: may change in
    -- future releases as more entries are added)
    | AnotherLayer Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum Layer where
    fromEnum LayerBackground = 0
    fromEnum LayerBottom = 1
    fromEnum LayerTop = 2
    fromEnum LayerOverlay = 3
    fromEnum LayerEntryNumber = 4
    fromEnum (AnotherLayer k) = k

    toEnum 0 = LayerBackground
    toEnum 1 = LayerBottom
    toEnum 2 = LayerTop
    toEnum 3 = LayerOverlay
    toEnum 4 = LayerEntryNumber
    toEnum k = AnotherLayer k

instance P.Ord Layer where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

-- Enum KeyboardMode
-- | /No description available in the introspection data./
data KeyboardMode = 
      KeyboardModeNone
    -- ^ This window should not receive keyboard events.
    | KeyboardModeExclusive
    -- ^ This window should have exclusive focus if it is on the top or overlay layer.
    | KeyboardModeOnDemand
    -- ^ The user should be able to focus and unfocues this window in an implementation
    -- defined way. Not supported for protocol version \< 4.
    | KeyboardModeEntryNumber
    -- ^ Should not be used except to get the number of entries. (NOTE: may change in
    -- future releases as more entries are added)
    | AnotherKeyboardMode Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum KeyboardMode where
    fromEnum KeyboardModeNone = 0
    fromEnum KeyboardModeExclusive = 1
    fromEnum KeyboardModeOnDemand = 2
    fromEnum KeyboardModeEntryNumber = 3
    fromEnum (AnotherKeyboardMode k) = k

    toEnum 0 = KeyboardModeNone
    toEnum 1 = KeyboardModeExclusive
    toEnum 2 = KeyboardModeOnDemand
    toEnum 3 = KeyboardModeEntryNumber
    toEnum k = AnotherKeyboardMode k

instance P.Ord KeyboardMode where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

-- Enum Edge
-- | /No description available in the introspection data./
data Edge = 
      EdgeLeft
    -- ^ The left edge of the screen.
    | EdgeRight
    -- ^ The right edge of the screen.
    | EdgeTop
    -- ^ The top edge of the screen.
    | EdgeBottom
    -- ^ The bottom edge of the screen.
    | EdgeEntryNumber
    -- ^ Should not be used except to get the number of entries. (NOTE: may change in
    -- future releases as more entries are added)
    | AnotherEdge Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum Edge where
    fromEnum EdgeLeft = 0
    fromEnum EdgeRight = 1
    fromEnum EdgeTop = 2
    fromEnum EdgeBottom = 3
    fromEnum EdgeEntryNumber = 4
    fromEnum (AnotherEdge k) = k

    toEnum 0 = EdgeLeft
    toEnum 1 = EdgeRight
    toEnum 2 = EdgeTop
    toEnum 3 = EdgeBottom
    toEnum 4 = EdgeEntryNumber
    toEnum k = AnotherEdge k

instance P.Ord Edge where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)


