-- | 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.GtkSource.Enums
    ( 

 -- * Enumerations


-- ** BackgroundPatternType #enum:BackgroundPatternType#

    BackgroundPatternType(..)               ,


-- ** BracketMatchType #enum:BracketMatchType#

    BracketMatchType(..)                    ,


-- ** ChangeCaseType #enum:ChangeCaseType#

    ChangeCaseType(..)                      ,


-- ** CompletionActivation #enum:CompletionActivation#

    CompletionActivation(..)                ,


-- ** CompletionColumn #enum:CompletionColumn#

    CompletionColumn(..)                    ,


-- ** CompressionType #enum:CompressionType#

    CompressionType(..)                     ,


-- ** FileLoaderError #enum:FileLoaderError#

    FileLoaderError(..)                     ,
    catchFileLoaderError                    ,
    handleFileLoaderError                   ,


-- ** FileSaverError #enum:FileSaverError#

    FileSaverError(..)                      ,
    catchFileSaverError                     ,
    handleFileSaverError                    ,


-- ** GutterRendererAlignmentMode #enum:GutterRendererAlignmentMode#

    GutterRendererAlignmentMode(..)         ,


-- ** NewlineType #enum:NewlineType#

    NewlineType(..)                         ,


-- ** SmartHomeEndType #enum:SmartHomeEndType#

    SmartHomeEndType(..)                    ,


-- ** ViewGutterPosition #enum:ViewGutterPosition#

    ViewGutterPosition(..)                  ,




    ) 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 ViewGutterPosition
-- | /No description available in the introspection data./
data ViewGutterPosition = 
      ViewGutterPositionLines
    -- ^ the gutter position of the lines
    -- renderer
    | ViewGutterPositionMarks
    -- ^ the gutter position of the marks
    -- renderer
    | AnotherViewGutterPosition Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ViewGutterPosition -> ShowS
[ViewGutterPosition] -> ShowS
ViewGutterPosition -> String
(Int -> ViewGutterPosition -> ShowS)
-> (ViewGutterPosition -> String)
-> ([ViewGutterPosition] -> ShowS)
-> Show ViewGutterPosition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ViewGutterPosition -> ShowS
showsPrec :: Int -> ViewGutterPosition -> ShowS
$cshow :: ViewGutterPosition -> String
show :: ViewGutterPosition -> String
$cshowList :: [ViewGutterPosition] -> ShowS
showList :: [ViewGutterPosition] -> ShowS
Show, ViewGutterPosition -> ViewGutterPosition -> Bool
(ViewGutterPosition -> ViewGutterPosition -> Bool)
-> (ViewGutterPosition -> ViewGutterPosition -> Bool)
-> Eq ViewGutterPosition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ViewGutterPosition -> ViewGutterPosition -> Bool
== :: ViewGutterPosition -> ViewGutterPosition -> Bool
$c/= :: ViewGutterPosition -> ViewGutterPosition -> Bool
/= :: ViewGutterPosition -> ViewGutterPosition -> Bool
Eq)

instance P.Enum ViewGutterPosition where
    fromEnum :: ViewGutterPosition -> Int
fromEnum ViewGutterPosition
ViewGutterPositionLines = Int
-30
    fromEnum ViewGutterPosition
ViewGutterPositionMarks = Int
-20
    fromEnum (AnotherViewGutterPosition Int
k) = Int
k

    toEnum :: Int -> ViewGutterPosition
toEnum Int
-30 = ViewGutterPosition
ViewGutterPositionLines
    toEnum Int
-20 = ViewGutterPosition
ViewGutterPositionMarks
    toEnum Int
k = Int -> ViewGutterPosition
AnotherViewGutterPosition Int
k

instance P.Ord ViewGutterPosition where
    compare :: ViewGutterPosition -> ViewGutterPosition -> Ordering
compare ViewGutterPosition
a ViewGutterPosition
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ViewGutterPosition -> Int
forall a. Enum a => a -> Int
P.fromEnum ViewGutterPosition
a) (ViewGutterPosition -> Int
forall a. Enum a => a -> Int
P.fromEnum ViewGutterPosition
b)

type instance O.ParentTypes ViewGutterPosition = '[]
instance O.HasParentTypes ViewGutterPosition

foreign import ccall "gtk_source_view_gutter_position_get_type" c_gtk_source_view_gutter_position_get_type :: 
    IO GType

instance B.Types.TypedObject ViewGutterPosition where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_view_gutter_position_get_type

instance B.Types.BoxedEnum ViewGutterPosition

-- Enum SmartHomeEndType
-- | /No description available in the introspection data./
data SmartHomeEndType = 
      SmartHomeEndTypeDisabled
    -- ^ smart-home-end disabled.
    | SmartHomeEndTypeBefore
    -- ^ move to the first\/last
    -- non-whitespace character on the first press of the HOME\/END keys and
    -- to the beginning\/end of the line on the second press.
    | SmartHomeEndTypeAfter
    -- ^ move to the beginning\/end of the
    -- line on the first press of the HOME\/END keys and to the first\/last
    -- non-whitespace character on the second press.
    | SmartHomeEndTypeAlways
    -- ^ always move to the first\/last
    -- non-whitespace character when the HOME\/END keys are pressed.
    | AnotherSmartHomeEndType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SmartHomeEndType -> ShowS
[SmartHomeEndType] -> ShowS
SmartHomeEndType -> String
(Int -> SmartHomeEndType -> ShowS)
-> (SmartHomeEndType -> String)
-> ([SmartHomeEndType] -> ShowS)
-> Show SmartHomeEndType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SmartHomeEndType -> ShowS
showsPrec :: Int -> SmartHomeEndType -> ShowS
$cshow :: SmartHomeEndType -> String
show :: SmartHomeEndType -> String
$cshowList :: [SmartHomeEndType] -> ShowS
showList :: [SmartHomeEndType] -> ShowS
Show, SmartHomeEndType -> SmartHomeEndType -> Bool
(SmartHomeEndType -> SmartHomeEndType -> Bool)
-> (SmartHomeEndType -> SmartHomeEndType -> Bool)
-> Eq SmartHomeEndType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SmartHomeEndType -> SmartHomeEndType -> Bool
== :: SmartHomeEndType -> SmartHomeEndType -> Bool
$c/= :: SmartHomeEndType -> SmartHomeEndType -> Bool
/= :: SmartHomeEndType -> SmartHomeEndType -> Bool
Eq)

instance P.Enum SmartHomeEndType where
    fromEnum :: SmartHomeEndType -> Int
fromEnum SmartHomeEndType
SmartHomeEndTypeDisabled = Int
0
    fromEnum SmartHomeEndType
SmartHomeEndTypeBefore = Int
1
    fromEnum SmartHomeEndType
SmartHomeEndTypeAfter = Int
2
    fromEnum SmartHomeEndType
SmartHomeEndTypeAlways = Int
3
    fromEnum (AnotherSmartHomeEndType Int
k) = Int
k

    toEnum :: Int -> SmartHomeEndType
toEnum Int
0 = SmartHomeEndType
SmartHomeEndTypeDisabled
    toEnum Int
1 = SmartHomeEndType
SmartHomeEndTypeBefore
    toEnum Int
2 = SmartHomeEndType
SmartHomeEndTypeAfter
    toEnum Int
3 = SmartHomeEndType
SmartHomeEndTypeAlways
    toEnum Int
k = Int -> SmartHomeEndType
AnotherSmartHomeEndType Int
k

instance P.Ord SmartHomeEndType where
    compare :: SmartHomeEndType -> SmartHomeEndType -> Ordering
compare SmartHomeEndType
a SmartHomeEndType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SmartHomeEndType -> Int
forall a. Enum a => a -> Int
P.fromEnum SmartHomeEndType
a) (SmartHomeEndType -> Int
forall a. Enum a => a -> Int
P.fromEnum SmartHomeEndType
b)

type instance O.ParentTypes SmartHomeEndType = '[]
instance O.HasParentTypes SmartHomeEndType

foreign import ccall "gtk_source_smart_home_end_type_get_type" c_gtk_source_smart_home_end_type_get_type :: 
    IO GType

instance B.Types.TypedObject SmartHomeEndType where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_smart_home_end_type_get_type

instance B.Types.BoxedEnum SmartHomeEndType

-- Enum NewlineType
-- | /No description available in the introspection data./
data NewlineType = 
      NewlineTypeLf
    -- ^ line feed, used on UNIX.
    | NewlineTypeCr
    -- ^ carriage return, used on Mac.
    | NewlineTypeCrLf
    -- ^ carriage return followed by a line feed, used
    --   on Windows.
    | AnotherNewlineType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> NewlineType -> ShowS
[NewlineType] -> ShowS
NewlineType -> String
(Int -> NewlineType -> ShowS)
-> (NewlineType -> String)
-> ([NewlineType] -> ShowS)
-> Show NewlineType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NewlineType -> ShowS
showsPrec :: Int -> NewlineType -> ShowS
$cshow :: NewlineType -> String
show :: NewlineType -> String
$cshowList :: [NewlineType] -> ShowS
showList :: [NewlineType] -> ShowS
Show, NewlineType -> NewlineType -> Bool
(NewlineType -> NewlineType -> Bool)
-> (NewlineType -> NewlineType -> Bool) -> Eq NewlineType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NewlineType -> NewlineType -> Bool
== :: NewlineType -> NewlineType -> Bool
$c/= :: NewlineType -> NewlineType -> Bool
/= :: NewlineType -> NewlineType -> Bool
Eq)

instance P.Enum NewlineType where
    fromEnum :: NewlineType -> Int
fromEnum NewlineType
NewlineTypeLf = Int
0
    fromEnum NewlineType
NewlineTypeCr = Int
1
    fromEnum NewlineType
NewlineTypeCrLf = Int
2
    fromEnum (AnotherNewlineType Int
k) = Int
k

    toEnum :: Int -> NewlineType
toEnum Int
0 = NewlineType
NewlineTypeLf
    toEnum Int
1 = NewlineType
NewlineTypeCr
    toEnum Int
2 = NewlineType
NewlineTypeCrLf
    toEnum Int
k = Int -> NewlineType
AnotherNewlineType Int
k

instance P.Ord NewlineType where
    compare :: NewlineType -> NewlineType -> Ordering
compare NewlineType
a NewlineType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (NewlineType -> Int
forall a. Enum a => a -> Int
P.fromEnum NewlineType
a) (NewlineType -> Int
forall a. Enum a => a -> Int
P.fromEnum NewlineType
b)

type instance O.ParentTypes NewlineType = '[]
instance O.HasParentTypes NewlineType

foreign import ccall "gtk_source_newline_type_get_type" c_gtk_source_newline_type_get_type :: 
    IO GType

instance B.Types.TypedObject NewlineType where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_newline_type_get_type

instance B.Types.BoxedEnum NewlineType

-- Enum GutterRendererAlignmentMode
-- | The alignment mode of the renderer, when a cell spans multiple lines (due to
-- text wrapping).
data GutterRendererAlignmentMode = 
      GutterRendererAlignmentModeCell
    -- ^ The full cell.
    | GutterRendererAlignmentModeFirst
    -- ^ The first line.
    | GutterRendererAlignmentModeLast
    -- ^ The last line.
    | AnotherGutterRendererAlignmentMode Int
    -- ^ Catch-all for unknown values
    deriving (Int -> GutterRendererAlignmentMode -> ShowS
[GutterRendererAlignmentMode] -> ShowS
GutterRendererAlignmentMode -> String
(Int -> GutterRendererAlignmentMode -> ShowS)
-> (GutterRendererAlignmentMode -> String)
-> ([GutterRendererAlignmentMode] -> ShowS)
-> Show GutterRendererAlignmentMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GutterRendererAlignmentMode -> ShowS
showsPrec :: Int -> GutterRendererAlignmentMode -> ShowS
$cshow :: GutterRendererAlignmentMode -> String
show :: GutterRendererAlignmentMode -> String
$cshowList :: [GutterRendererAlignmentMode] -> ShowS
showList :: [GutterRendererAlignmentMode] -> ShowS
Show, GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
(GutterRendererAlignmentMode
 -> GutterRendererAlignmentMode -> Bool)
-> (GutterRendererAlignmentMode
    -> GutterRendererAlignmentMode -> Bool)
-> Eq GutterRendererAlignmentMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
== :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
$c/= :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
/= :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
Eq)

instance P.Enum GutterRendererAlignmentMode where
    fromEnum :: GutterRendererAlignmentMode -> Int
fromEnum GutterRendererAlignmentMode
GutterRendererAlignmentModeCell = Int
0
    fromEnum GutterRendererAlignmentMode
GutterRendererAlignmentModeFirst = Int
1
    fromEnum GutterRendererAlignmentMode
GutterRendererAlignmentModeLast = Int
2
    fromEnum (AnotherGutterRendererAlignmentMode Int
k) = Int
k

    toEnum :: Int -> GutterRendererAlignmentMode
toEnum Int
0 = GutterRendererAlignmentMode
GutterRendererAlignmentModeCell
    toEnum Int
1 = GutterRendererAlignmentMode
GutterRendererAlignmentModeFirst
    toEnum Int
2 = GutterRendererAlignmentMode
GutterRendererAlignmentModeLast
    toEnum Int
k = Int -> GutterRendererAlignmentMode
AnotherGutterRendererAlignmentMode Int
k

instance P.Ord GutterRendererAlignmentMode where
    compare :: GutterRendererAlignmentMode
-> GutterRendererAlignmentMode -> Ordering
compare GutterRendererAlignmentMode
a GutterRendererAlignmentMode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (GutterRendererAlignmentMode -> Int
forall a. Enum a => a -> Int
P.fromEnum GutterRendererAlignmentMode
a) (GutterRendererAlignmentMode -> Int
forall a. Enum a => a -> Int
P.fromEnum GutterRendererAlignmentMode
b)

type instance O.ParentTypes GutterRendererAlignmentMode = '[]
instance O.HasParentTypes GutterRendererAlignmentMode

foreign import ccall "gtk_source_gutter_renderer_alignment_mode_get_type" c_gtk_source_gutter_renderer_alignment_mode_get_type :: 
    IO GType

instance B.Types.TypedObject GutterRendererAlignmentMode where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_gutter_renderer_alignment_mode_get_type

instance B.Types.BoxedEnum GutterRendererAlignmentMode

-- Enum FileSaverError
-- | An error code used with the @/GTK_SOURCE_FILE_SAVER_ERROR/@ domain.
data FileSaverError = 
      FileSaverErrorInvalidChars
    -- ^ The buffer contains invalid
    --   characters.
    | FileSaverErrorExternallyModified
    -- ^ The file is externally
    --   modified.
    | AnotherFileSaverError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> FileSaverError -> ShowS
[FileSaverError] -> ShowS
FileSaverError -> String
(Int -> FileSaverError -> ShowS)
-> (FileSaverError -> String)
-> ([FileSaverError] -> ShowS)
-> Show FileSaverError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileSaverError -> ShowS
showsPrec :: Int -> FileSaverError -> ShowS
$cshow :: FileSaverError -> String
show :: FileSaverError -> String
$cshowList :: [FileSaverError] -> ShowS
showList :: [FileSaverError] -> ShowS
Show, FileSaverError -> FileSaverError -> Bool
(FileSaverError -> FileSaverError -> Bool)
-> (FileSaverError -> FileSaverError -> Bool) -> Eq FileSaverError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileSaverError -> FileSaverError -> Bool
== :: FileSaverError -> FileSaverError -> Bool
$c/= :: FileSaverError -> FileSaverError -> Bool
/= :: FileSaverError -> FileSaverError -> Bool
Eq)

instance P.Enum FileSaverError where
    fromEnum :: FileSaverError -> Int
fromEnum FileSaverError
FileSaverErrorInvalidChars = Int
0
    fromEnum FileSaverError
FileSaverErrorExternallyModified = Int
1
    fromEnum (AnotherFileSaverError Int
k) = Int
k

    toEnum :: Int -> FileSaverError
toEnum Int
0 = FileSaverError
FileSaverErrorInvalidChars
    toEnum Int
1 = FileSaverError
FileSaverErrorExternallyModified
    toEnum Int
k = Int -> FileSaverError
AnotherFileSaverError Int
k

instance P.Ord FileSaverError where
    compare :: FileSaverError -> FileSaverError -> Ordering
compare FileSaverError
a FileSaverError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (FileSaverError -> Int
forall a. Enum a => a -> Int
P.fromEnum FileSaverError
a) (FileSaverError -> Int
forall a. Enum a => a -> Int
P.fromEnum FileSaverError
b)

instance GErrorClass FileSaverError where
    gerrorClassDomain :: FileSaverError -> Text
gerrorClassDomain FileSaverError
_ = Text
"gtk-source-file-saver-error"

-- | Catch exceptions of type `FileSaverError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchFileSaverError ::
    IO a ->
    (FileSaverError -> GErrorMessage -> IO a) ->
    IO a
catchFileSaverError :: forall a. IO a -> (FileSaverError -> Text -> IO a) -> IO a
catchFileSaverError = IO a -> (FileSaverError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `FileSaverError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleFileSaverError ::
    (FileSaverError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleFileSaverError :: forall a. (FileSaverError -> Text -> IO a) -> IO a -> IO a
handleFileSaverError = (FileSaverError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

type instance O.ParentTypes FileSaverError = '[]
instance O.HasParentTypes FileSaverError

foreign import ccall "gtk_source_file_saver_error_get_type" c_gtk_source_file_saver_error_get_type :: 
    IO GType

instance B.Types.TypedObject FileSaverError where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_file_saver_error_get_type

instance B.Types.BoxedEnum FileSaverError

-- Enum FileLoaderError
-- | An error code used with the @/GTK_SOURCE_FILE_LOADER_ERROR/@ domain.
data FileLoaderError = 
      FileLoaderErrorTooBig
    -- ^ The file is too big.
    | FileLoaderErrorEncodingAutoDetectionFailed
    -- ^ It is not
    -- possible to detect the encoding automatically.
    | FileLoaderErrorConversionFallback
    -- ^ There was an encoding
    -- conversion error and it was needed to use a fallback character.
    | AnotherFileLoaderError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> FileLoaderError -> ShowS
[FileLoaderError] -> ShowS
FileLoaderError -> String
(Int -> FileLoaderError -> ShowS)
-> (FileLoaderError -> String)
-> ([FileLoaderError] -> ShowS)
-> Show FileLoaderError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileLoaderError -> ShowS
showsPrec :: Int -> FileLoaderError -> ShowS
$cshow :: FileLoaderError -> String
show :: FileLoaderError -> String
$cshowList :: [FileLoaderError] -> ShowS
showList :: [FileLoaderError] -> ShowS
Show, FileLoaderError -> FileLoaderError -> Bool
(FileLoaderError -> FileLoaderError -> Bool)
-> (FileLoaderError -> FileLoaderError -> Bool)
-> Eq FileLoaderError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileLoaderError -> FileLoaderError -> Bool
== :: FileLoaderError -> FileLoaderError -> Bool
$c/= :: FileLoaderError -> FileLoaderError -> Bool
/= :: FileLoaderError -> FileLoaderError -> Bool
Eq)

instance P.Enum FileLoaderError where
    fromEnum :: FileLoaderError -> Int
fromEnum FileLoaderError
FileLoaderErrorTooBig = Int
0
    fromEnum FileLoaderError
FileLoaderErrorEncodingAutoDetectionFailed = Int
1
    fromEnum FileLoaderError
FileLoaderErrorConversionFallback = Int
2
    fromEnum (AnotherFileLoaderError Int
k) = Int
k

    toEnum :: Int -> FileLoaderError
toEnum Int
0 = FileLoaderError
FileLoaderErrorTooBig
    toEnum Int
1 = FileLoaderError
FileLoaderErrorEncodingAutoDetectionFailed
    toEnum Int
2 = FileLoaderError
FileLoaderErrorConversionFallback
    toEnum Int
k = Int -> FileLoaderError
AnotherFileLoaderError Int
k

instance P.Ord FileLoaderError where
    compare :: FileLoaderError -> FileLoaderError -> Ordering
compare FileLoaderError
a FileLoaderError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (FileLoaderError -> Int
forall a. Enum a => a -> Int
P.fromEnum FileLoaderError
a) (FileLoaderError -> Int
forall a. Enum a => a -> Int
P.fromEnum FileLoaderError
b)

instance GErrorClass FileLoaderError where
    gerrorClassDomain :: FileLoaderError -> Text
gerrorClassDomain FileLoaderError
_ = Text
"gtk-source-file-loader-error"

-- | Catch exceptions of type `FileLoaderError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchFileLoaderError ::
    IO a ->
    (FileLoaderError -> GErrorMessage -> IO a) ->
    IO a
catchFileLoaderError :: forall a. IO a -> (FileLoaderError -> Text -> IO a) -> IO a
catchFileLoaderError = IO a -> (FileLoaderError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `FileLoaderError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleFileLoaderError ::
    (FileLoaderError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleFileLoaderError :: forall a. (FileLoaderError -> Text -> IO a) -> IO a -> IO a
handleFileLoaderError = (FileLoaderError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

type instance O.ParentTypes FileLoaderError = '[]
instance O.HasParentTypes FileLoaderError

foreign import ccall "gtk_source_file_loader_error_get_type" c_gtk_source_file_loader_error_get_type :: 
    IO GType

instance B.Types.TypedObject FileLoaderError where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_file_loader_error_get_type

instance B.Types.BoxedEnum FileLoaderError

-- Enum CompressionType
-- | /No description available in the introspection data./
data CompressionType = 
      CompressionTypeNone
    -- ^ plain text.
    | CompressionTypeGzip
    -- ^ gzip compression.
    | AnotherCompressionType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CompressionType -> ShowS
[CompressionType] -> ShowS
CompressionType -> String
(Int -> CompressionType -> ShowS)
-> (CompressionType -> String)
-> ([CompressionType] -> ShowS)
-> Show CompressionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompressionType -> ShowS
showsPrec :: Int -> CompressionType -> ShowS
$cshow :: CompressionType -> String
show :: CompressionType -> String
$cshowList :: [CompressionType] -> ShowS
showList :: [CompressionType] -> ShowS
Show, CompressionType -> CompressionType -> Bool
(CompressionType -> CompressionType -> Bool)
-> (CompressionType -> CompressionType -> Bool)
-> Eq CompressionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompressionType -> CompressionType -> Bool
== :: CompressionType -> CompressionType -> Bool
$c/= :: CompressionType -> CompressionType -> Bool
/= :: CompressionType -> CompressionType -> Bool
Eq)

instance P.Enum CompressionType where
    fromEnum :: CompressionType -> Int
fromEnum CompressionType
CompressionTypeNone = Int
0
    fromEnum CompressionType
CompressionTypeGzip = Int
1
    fromEnum (AnotherCompressionType Int
k) = Int
k

    toEnum :: Int -> CompressionType
toEnum Int
0 = CompressionType
CompressionTypeNone
    toEnum Int
1 = CompressionType
CompressionTypeGzip
    toEnum Int
k = Int -> CompressionType
AnotherCompressionType Int
k

instance P.Ord CompressionType where
    compare :: CompressionType -> CompressionType -> Ordering
compare CompressionType
a CompressionType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CompressionType -> Int
forall a. Enum a => a -> Int
P.fromEnum CompressionType
a) (CompressionType -> Int
forall a. Enum a => a -> Int
P.fromEnum CompressionType
b)

type instance O.ParentTypes CompressionType = '[]
instance O.HasParentTypes CompressionType

foreign import ccall "gtk_source_compression_type_get_type" c_gtk_source_compression_type_get_type :: 
    IO GType

instance B.Types.TypedObject CompressionType where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_compression_type_get_type

instance B.Types.BoxedEnum CompressionType

-- Enum CompletionColumn
-- | /No description available in the introspection data./
data CompletionColumn = 
      CompletionColumnIcon
    -- ^ /No description available in the introspection data./
    | CompletionColumnBefore
    -- ^ /No description available in the introspection data./
    | CompletionColumnTypedText
    -- ^ /No description available in the introspection data./
    | CompletionColumnAfter
    -- ^ /No description available in the introspection data./
    | CompletionColumnComment
    -- ^ /No description available in the introspection data./
    | CompletionColumnDetails
    -- ^ /No description available in the introspection data./
    | AnotherCompletionColumn Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CompletionColumn -> ShowS
[CompletionColumn] -> ShowS
CompletionColumn -> String
(Int -> CompletionColumn -> ShowS)
-> (CompletionColumn -> String)
-> ([CompletionColumn] -> ShowS)
-> Show CompletionColumn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionColumn -> ShowS
showsPrec :: Int -> CompletionColumn -> ShowS
$cshow :: CompletionColumn -> String
show :: CompletionColumn -> String
$cshowList :: [CompletionColumn] -> ShowS
showList :: [CompletionColumn] -> ShowS
Show, CompletionColumn -> CompletionColumn -> Bool
(CompletionColumn -> CompletionColumn -> Bool)
-> (CompletionColumn -> CompletionColumn -> Bool)
-> Eq CompletionColumn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionColumn -> CompletionColumn -> Bool
== :: CompletionColumn -> CompletionColumn -> Bool
$c/= :: CompletionColumn -> CompletionColumn -> Bool
/= :: CompletionColumn -> CompletionColumn -> Bool
Eq)

instance P.Enum CompletionColumn where
    fromEnum :: CompletionColumn -> Int
fromEnum CompletionColumn
CompletionColumnIcon = Int
0
    fromEnum CompletionColumn
CompletionColumnBefore = Int
1
    fromEnum CompletionColumn
CompletionColumnTypedText = Int
2
    fromEnum CompletionColumn
CompletionColumnAfter = Int
3
    fromEnum CompletionColumn
CompletionColumnComment = Int
4
    fromEnum CompletionColumn
CompletionColumnDetails = Int
5
    fromEnum (AnotherCompletionColumn Int
k) = Int
k

    toEnum :: Int -> CompletionColumn
toEnum Int
0 = CompletionColumn
CompletionColumnIcon
    toEnum Int
1 = CompletionColumn
CompletionColumnBefore
    toEnum Int
2 = CompletionColumn
CompletionColumnTypedText
    toEnum Int
3 = CompletionColumn
CompletionColumnAfter
    toEnum Int
4 = CompletionColumn
CompletionColumnComment
    toEnum Int
5 = CompletionColumn
CompletionColumnDetails
    toEnum Int
k = Int -> CompletionColumn
AnotherCompletionColumn Int
k

instance P.Ord CompletionColumn where
    compare :: CompletionColumn -> CompletionColumn -> Ordering
compare CompletionColumn
a CompletionColumn
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CompletionColumn -> Int
forall a. Enum a => a -> Int
P.fromEnum CompletionColumn
a) (CompletionColumn -> Int
forall a. Enum a => a -> Int
P.fromEnum CompletionColumn
b)

type instance O.ParentTypes CompletionColumn = '[]
instance O.HasParentTypes CompletionColumn

foreign import ccall "gtk_source_completion_column_get_type" c_gtk_source_completion_column_get_type :: 
    IO GType

instance B.Types.TypedObject CompletionColumn where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_completion_column_get_type

instance B.Types.BoxedEnum CompletionColumn

-- Enum CompletionActivation
-- | /No description available in the introspection data./
data CompletionActivation = 
      CompletionActivationNone
    -- ^ /No description available in the introspection data./
    | CompletionActivationInteractive
    -- ^ /No description available in the introspection data./
    | CompletionActivationUserRequested
    -- ^ /No description available in the introspection data./
    | AnotherCompletionActivation Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CompletionActivation -> ShowS
[CompletionActivation] -> ShowS
CompletionActivation -> String
(Int -> CompletionActivation -> ShowS)
-> (CompletionActivation -> String)
-> ([CompletionActivation] -> ShowS)
-> Show CompletionActivation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionActivation -> ShowS
showsPrec :: Int -> CompletionActivation -> ShowS
$cshow :: CompletionActivation -> String
show :: CompletionActivation -> String
$cshowList :: [CompletionActivation] -> ShowS
showList :: [CompletionActivation] -> ShowS
Show, CompletionActivation -> CompletionActivation -> Bool
(CompletionActivation -> CompletionActivation -> Bool)
-> (CompletionActivation -> CompletionActivation -> Bool)
-> Eq CompletionActivation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionActivation -> CompletionActivation -> Bool
== :: CompletionActivation -> CompletionActivation -> Bool
$c/= :: CompletionActivation -> CompletionActivation -> Bool
/= :: CompletionActivation -> CompletionActivation -> Bool
Eq)

instance P.Enum CompletionActivation where
    fromEnum :: CompletionActivation -> Int
fromEnum CompletionActivation
CompletionActivationNone = Int
0
    fromEnum CompletionActivation
CompletionActivationInteractive = Int
1
    fromEnum CompletionActivation
CompletionActivationUserRequested = Int
2
    fromEnum (AnotherCompletionActivation Int
k) = Int
k

    toEnum :: Int -> CompletionActivation
toEnum Int
0 = CompletionActivation
CompletionActivationNone
    toEnum Int
1 = CompletionActivation
CompletionActivationInteractive
    toEnum Int
2 = CompletionActivation
CompletionActivationUserRequested
    toEnum Int
k = Int -> CompletionActivation
AnotherCompletionActivation Int
k

instance P.Ord CompletionActivation where
    compare :: CompletionActivation -> CompletionActivation -> Ordering
compare CompletionActivation
a CompletionActivation
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CompletionActivation -> Int
forall a. Enum a => a -> Int
P.fromEnum CompletionActivation
a) (CompletionActivation -> Int
forall a. Enum a => a -> Int
P.fromEnum CompletionActivation
b)

type instance O.ParentTypes CompletionActivation = '[]
instance O.HasParentTypes CompletionActivation

foreign import ccall "gtk_source_completion_activation_get_type" c_gtk_source_completion_activation_get_type :: 
    IO GType

instance B.Types.TypedObject CompletionActivation where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_completion_activation_get_type

instance B.Types.BoxedEnum CompletionActivation

-- Enum ChangeCaseType
-- | /No description available in the introspection data./
data ChangeCaseType = 
      ChangeCaseTypeLower
    -- ^ change case to lowercase.
    | ChangeCaseTypeUpper
    -- ^ change case to uppercase.
    | ChangeCaseTypeToggle
    -- ^ toggle case of each character.
    | ChangeCaseTypeTitle
    -- ^ capitalize each word.
    | AnotherChangeCaseType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ChangeCaseType -> ShowS
[ChangeCaseType] -> ShowS
ChangeCaseType -> String
(Int -> ChangeCaseType -> ShowS)
-> (ChangeCaseType -> String)
-> ([ChangeCaseType] -> ShowS)
-> Show ChangeCaseType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChangeCaseType -> ShowS
showsPrec :: Int -> ChangeCaseType -> ShowS
$cshow :: ChangeCaseType -> String
show :: ChangeCaseType -> String
$cshowList :: [ChangeCaseType] -> ShowS
showList :: [ChangeCaseType] -> ShowS
Show, ChangeCaseType -> ChangeCaseType -> Bool
(ChangeCaseType -> ChangeCaseType -> Bool)
-> (ChangeCaseType -> ChangeCaseType -> Bool) -> Eq ChangeCaseType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChangeCaseType -> ChangeCaseType -> Bool
== :: ChangeCaseType -> ChangeCaseType -> Bool
$c/= :: ChangeCaseType -> ChangeCaseType -> Bool
/= :: ChangeCaseType -> ChangeCaseType -> Bool
Eq)

instance P.Enum ChangeCaseType where
    fromEnum :: ChangeCaseType -> Int
fromEnum ChangeCaseType
ChangeCaseTypeLower = Int
0
    fromEnum ChangeCaseType
ChangeCaseTypeUpper = Int
1
    fromEnum ChangeCaseType
ChangeCaseTypeToggle = Int
2
    fromEnum ChangeCaseType
ChangeCaseTypeTitle = Int
3
    fromEnum (AnotherChangeCaseType Int
k) = Int
k

    toEnum :: Int -> ChangeCaseType
toEnum Int
0 = ChangeCaseType
ChangeCaseTypeLower
    toEnum Int
1 = ChangeCaseType
ChangeCaseTypeUpper
    toEnum Int
2 = ChangeCaseType
ChangeCaseTypeToggle
    toEnum Int
3 = ChangeCaseType
ChangeCaseTypeTitle
    toEnum Int
k = Int -> ChangeCaseType
AnotherChangeCaseType Int
k

instance P.Ord ChangeCaseType where
    compare :: ChangeCaseType -> ChangeCaseType -> Ordering
compare ChangeCaseType
a ChangeCaseType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ChangeCaseType -> Int
forall a. Enum a => a -> Int
P.fromEnum ChangeCaseType
a) (ChangeCaseType -> Int
forall a. Enum a => a -> Int
P.fromEnum ChangeCaseType
b)

type instance O.ParentTypes ChangeCaseType = '[]
instance O.HasParentTypes ChangeCaseType

foreign import ccall "gtk_source_change_case_type_get_type" c_gtk_source_change_case_type_get_type :: 
    IO GType

instance B.Types.TypedObject ChangeCaseType where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_change_case_type_get_type

instance B.Types.BoxedEnum ChangeCaseType

-- Enum BracketMatchType
-- | /No description available in the introspection data./
data BracketMatchType = 
      BracketMatchTypeNone
    -- ^ there is no bracket to match.
    | BracketMatchTypeOutOfRange
    -- ^ matching a bracket
    --  failed because the maximum range was reached.
    | BracketMatchTypeNotFound
    -- ^ a matching bracket was not found.
    | BracketMatchTypeFound
    -- ^ a matching bracket was found.
    | AnotherBracketMatchType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BracketMatchType -> ShowS
[BracketMatchType] -> ShowS
BracketMatchType -> String
(Int -> BracketMatchType -> ShowS)
-> (BracketMatchType -> String)
-> ([BracketMatchType] -> ShowS)
-> Show BracketMatchType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BracketMatchType -> ShowS
showsPrec :: Int -> BracketMatchType -> ShowS
$cshow :: BracketMatchType -> String
show :: BracketMatchType -> String
$cshowList :: [BracketMatchType] -> ShowS
showList :: [BracketMatchType] -> ShowS
Show, BracketMatchType -> BracketMatchType -> Bool
(BracketMatchType -> BracketMatchType -> Bool)
-> (BracketMatchType -> BracketMatchType -> Bool)
-> Eq BracketMatchType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BracketMatchType -> BracketMatchType -> Bool
== :: BracketMatchType -> BracketMatchType -> Bool
$c/= :: BracketMatchType -> BracketMatchType -> Bool
/= :: BracketMatchType -> BracketMatchType -> Bool
Eq)

instance P.Enum BracketMatchType where
    fromEnum :: BracketMatchType -> Int
fromEnum BracketMatchType
BracketMatchTypeNone = Int
0
    fromEnum BracketMatchType
BracketMatchTypeOutOfRange = Int
1
    fromEnum BracketMatchType
BracketMatchTypeNotFound = Int
2
    fromEnum BracketMatchType
BracketMatchTypeFound = Int
3
    fromEnum (AnotherBracketMatchType Int
k) = Int
k

    toEnum :: Int -> BracketMatchType
toEnum Int
0 = BracketMatchType
BracketMatchTypeNone
    toEnum Int
1 = BracketMatchType
BracketMatchTypeOutOfRange
    toEnum Int
2 = BracketMatchType
BracketMatchTypeNotFound
    toEnum Int
3 = BracketMatchType
BracketMatchTypeFound
    toEnum Int
k = Int -> BracketMatchType
AnotherBracketMatchType Int
k

instance P.Ord BracketMatchType where
    compare :: BracketMatchType -> BracketMatchType -> Ordering
compare BracketMatchType
a BracketMatchType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BracketMatchType -> Int
forall a. Enum a => a -> Int
P.fromEnum BracketMatchType
a) (BracketMatchType -> Int
forall a. Enum a => a -> Int
P.fromEnum BracketMatchType
b)

type instance O.ParentTypes BracketMatchType = '[]
instance O.HasParentTypes BracketMatchType

foreign import ccall "gtk_source_bracket_match_type_get_type" c_gtk_source_bracket_match_type_get_type :: 
    IO GType

instance B.Types.TypedObject BracketMatchType where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_bracket_match_type_get_type

instance B.Types.BoxedEnum BracketMatchType

-- Enum BackgroundPatternType
-- | /No description available in the introspection data./
data BackgroundPatternType = 
      BackgroundPatternTypeNone
    -- ^ no pattern
    | BackgroundPatternTypeGrid
    -- ^ grid pattern
    | AnotherBackgroundPatternType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BackgroundPatternType -> ShowS
[BackgroundPatternType] -> ShowS
BackgroundPatternType -> String
(Int -> BackgroundPatternType -> ShowS)
-> (BackgroundPatternType -> String)
-> ([BackgroundPatternType] -> ShowS)
-> Show BackgroundPatternType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BackgroundPatternType -> ShowS
showsPrec :: Int -> BackgroundPatternType -> ShowS
$cshow :: BackgroundPatternType -> String
show :: BackgroundPatternType -> String
$cshowList :: [BackgroundPatternType] -> ShowS
showList :: [BackgroundPatternType] -> ShowS
Show, BackgroundPatternType -> BackgroundPatternType -> Bool
(BackgroundPatternType -> BackgroundPatternType -> Bool)
-> (BackgroundPatternType -> BackgroundPatternType -> Bool)
-> Eq BackgroundPatternType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BackgroundPatternType -> BackgroundPatternType -> Bool
== :: BackgroundPatternType -> BackgroundPatternType -> Bool
$c/= :: BackgroundPatternType -> BackgroundPatternType -> Bool
/= :: BackgroundPatternType -> BackgroundPatternType -> Bool
Eq)

instance P.Enum BackgroundPatternType where
    fromEnum :: BackgroundPatternType -> Int
fromEnum BackgroundPatternType
BackgroundPatternTypeNone = Int
0
    fromEnum BackgroundPatternType
BackgroundPatternTypeGrid = Int
1
    fromEnum (AnotherBackgroundPatternType Int
k) = Int
k

    toEnum :: Int -> BackgroundPatternType
toEnum Int
0 = BackgroundPatternType
BackgroundPatternTypeNone
    toEnum Int
1 = BackgroundPatternType
BackgroundPatternTypeGrid
    toEnum Int
k = Int -> BackgroundPatternType
AnotherBackgroundPatternType Int
k

instance P.Ord BackgroundPatternType where
    compare :: BackgroundPatternType -> BackgroundPatternType -> Ordering
compare BackgroundPatternType
a BackgroundPatternType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BackgroundPatternType -> Int
forall a. Enum a => a -> Int
P.fromEnum BackgroundPatternType
a) (BackgroundPatternType -> Int
forall a. Enum a => a -> Int
P.fromEnum BackgroundPatternType
b)

type instance O.ParentTypes BackgroundPatternType = '[]
instance O.HasParentTypes BackgroundPatternType

foreign import ccall "gtk_source_background_pattern_type_get_type" c_gtk_source_background_pattern_type_get_type :: 
    IO GType

instance B.Types.TypedObject BackgroundPatternType where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_background_pattern_type_get_type

instance B.Types.BoxedEnum BackgroundPatternType