    {- |
    Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
    License    : LGPL-2.1
    Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
    -}

    #define ENABLE_OVERLOADING \
           (!defined(__HADDOCK_VERSION__))

    module GI.Vte.Flags
        (

     -- * Flags
    -- ** PtyFlags #flag:PtyFlags#

        PtyFlags(..)                            ,

        ) 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.ManagedPtr as B.ManagedPtr
    import qualified Data.GI.Base.GError as B.GError
    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.Text as T
    import qualified Data.ByteString.Char8 as B
    import qualified Data.Map as Map
    import qualified Foreign.Ptr as FP

    -- Flags PtyFlags
    {- |
    /No description available in the introspection data./
    -}
    data PtyFlags =
          PtyFlagsNoLastlog
        {- ^
        Unused. Deprecated: 0.38
        -}
        | PtyFlagsNoUtmp
        {- ^
        Unused. Deprecated: 0.38
        -}
        | PtyFlagsNoWtmp
        {- ^
        Unused. Deprecated: 0.38
        -}
        | PtyFlagsNoHelper
        {- ^
        Unused. Deprecated: 0.38
        -}
        | PtyFlagsNoFallback
        {- ^
        Unused. Deprecated: 0.38
        -}
        | PtyFlagsNoSession
        {- ^
        Do not start a new session for the child in
          'GI.Vte.Objects.Pty.ptyChildSetup'. See man:setsid(2) for more information. Since: 0.58
        -}
        | PtyFlagsNoCtty
        {- ^
        Do not set the PTY as the controlling TTY for the child
          in 'GI.Vte.Objects.Pty.ptyChildSetup'. See man:tty_ioctl(4) for more information. Since: 0.58
        -}
        | PtyFlagsDefault
        {- ^
        the default flags
        -}
        | AnotherPtyFlags Int
        -- ^ Catch-all for unknown values
        deriving (Show, Eq)

    instance P.Enum PtyFlags where
        fromEnum PtyFlagsNoLastlog = 1
        fromEnum PtyFlagsNoUtmp = 2
        fromEnum PtyFlagsNoWtmp = 4
        fromEnum PtyFlagsNoHelper = 8
        fromEnum PtyFlagsNoFallback = 16
        fromEnum PtyFlagsNoSession = 32
        fromEnum PtyFlagsNoCtty = 64
        fromEnum PtyFlagsDefault = 0
        fromEnum (AnotherPtyFlags k) = k

        toEnum 1 = PtyFlagsNoLastlog
        toEnum 2 = PtyFlagsNoUtmp
        toEnum 4 = PtyFlagsNoWtmp
        toEnum 8 = PtyFlagsNoHelper
        toEnum 16 = PtyFlagsNoFallback
        toEnum 32 = PtyFlagsNoSession
        toEnum 64 = PtyFlagsNoCtty
        toEnum 0 = PtyFlagsDefault
        toEnum k = AnotherPtyFlags k

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

    foreign import ccall "vte_pty_flags_get_type" c_vte_pty_flags_get_type ::
        IO GType

    instance BoxedFlags PtyFlags where
        boxedFlagsType _ = c_vte_pty_flags_get_type

    instance IsGFlag PtyFlags