-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- 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(..)                      ,


-- ** CompletionError #enum:CompletionError#

    CompletionError(..)                     ,
    catchCompletionError                    ,
    handleCompletionError                   ,


-- ** 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.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.Text as T
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


-- 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
showList :: [ViewGutterPosition] -> ShowS
$cshowList :: [ViewGutterPosition] -> ShowS
show :: ViewGutterPosition -> String
$cshow :: ViewGutterPosition -> String
showsPrec :: Int -> ViewGutterPosition -> ShowS
$cshowsPrec :: Int -> ViewGutterPosition -> ShowS
Show, ViewGutterPosition -> ViewGutterPosition -> Bool
(ViewGutterPosition -> ViewGutterPosition -> Bool)
-> (ViewGutterPosition -> ViewGutterPosition -> Bool)
-> Eq ViewGutterPosition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ViewGutterPosition -> ViewGutterPosition -> Bool
$c/= :: ViewGutterPosition -> ViewGutterPosition -> Bool
== :: ViewGutterPosition -> ViewGutterPosition -> Bool
$c== :: 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
showList :: [SmartHomeEndType] -> ShowS
$cshowList :: [SmartHomeEndType] -> ShowS
show :: SmartHomeEndType -> String
$cshow :: SmartHomeEndType -> String
showsPrec :: Int -> SmartHomeEndType -> ShowS
$cshowsPrec :: Int -> SmartHomeEndType -> ShowS
Show, SmartHomeEndType -> SmartHomeEndType -> Bool
(SmartHomeEndType -> SmartHomeEndType -> Bool)
-> (SmartHomeEndType -> SmartHomeEndType -> Bool)
-> Eq SmartHomeEndType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SmartHomeEndType -> SmartHomeEndType -> Bool
$c/= :: SmartHomeEndType -> SmartHomeEndType -> Bool
== :: SmartHomeEndType -> SmartHomeEndType -> Bool
$c== :: 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./
-- 
-- /Since: 3.14/
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
showList :: [NewlineType] -> ShowS
$cshowList :: [NewlineType] -> ShowS
show :: NewlineType -> String
$cshow :: NewlineType -> String
showsPrec :: Int -> NewlineType -> ShowS
$cshowsPrec :: Int -> NewlineType -> ShowS
Show, NewlineType -> NewlineType -> Bool
(NewlineType -> NewlineType -> Bool)
-> (NewlineType -> NewlineType -> Bool) -> Eq NewlineType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NewlineType -> NewlineType -> Bool
$c/= :: NewlineType -> NewlineType -> Bool
== :: NewlineType -> NewlineType -> Bool
$c== :: 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
showList :: [GutterRendererAlignmentMode] -> ShowS
$cshowList :: [GutterRendererAlignmentMode] -> ShowS
show :: GutterRendererAlignmentMode -> String
$cshow :: GutterRendererAlignmentMode -> String
showsPrec :: Int -> GutterRendererAlignmentMode -> ShowS
$cshowsPrec :: Int -> GutterRendererAlignmentMode -> ShowS
Show, GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
(GutterRendererAlignmentMode
 -> GutterRendererAlignmentMode -> Bool)
-> (GutterRendererAlignmentMode
    -> GutterRendererAlignmentMode -> Bool)
-> Eq GutterRendererAlignmentMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
$c/= :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
== :: GutterRendererAlignmentMode -> GutterRendererAlignmentMode -> Bool
$c== :: 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.
-- 
-- /Since: 3.14/
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
showList :: [FileSaverError] -> ShowS
$cshowList :: [FileSaverError] -> ShowS
show :: FileSaverError -> String
$cshow :: FileSaverError -> String
showsPrec :: Int -> FileSaverError -> ShowS
$cshowsPrec :: Int -> FileSaverError -> ShowS
Show, FileSaverError -> FileSaverError -> Bool
(FileSaverError -> FileSaverError -> Bool)
-> (FileSaverError -> FileSaverError -> Bool) -> Eq FileSaverError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSaverError -> FileSaverError -> Bool
$c/= :: FileSaverError -> FileSaverError -> Bool
== :: FileSaverError -> FileSaverError -> Bool
$c== :: 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
showList :: [FileLoaderError] -> ShowS
$cshowList :: [FileLoaderError] -> ShowS
show :: FileLoaderError -> String
$cshow :: FileLoaderError -> String
showsPrec :: Int -> FileLoaderError -> ShowS
$cshowsPrec :: Int -> FileLoaderError -> ShowS
Show, FileLoaderError -> FileLoaderError -> Bool
(FileLoaderError -> FileLoaderError -> Bool)
-> (FileLoaderError -> FileLoaderError -> Bool)
-> Eq FileLoaderError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileLoaderError -> FileLoaderError -> Bool
$c/= :: FileLoaderError -> FileLoaderError -> Bool
== :: FileLoaderError -> FileLoaderError -> Bool
$c== :: 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./
-- 
-- /Since: 3.14/
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
showList :: [CompressionType] -> ShowS
$cshowList :: [CompressionType] -> ShowS
show :: CompressionType -> String
$cshow :: CompressionType -> String
showsPrec :: Int -> CompressionType -> ShowS
$cshowsPrec :: Int -> CompressionType -> ShowS
Show, CompressionType -> CompressionType -> Bool
(CompressionType -> CompressionType -> Bool)
-> (CompressionType -> CompressionType -> Bool)
-> Eq CompressionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompressionType -> CompressionType -> Bool
$c/= :: CompressionType -> CompressionType -> Bool
== :: CompressionType -> CompressionType -> Bool
$c== :: 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 CompletionError
-- | An error code used with @/GTK_SOURCE_COMPLETION_ERROR/@ in a t'GError' returned
-- from a completion-related function.
data CompletionError = 
      CompletionErrorAlreadyBound
    -- ^ The t'GI.GtkSource.Interfaces.CompletionProvider.CompletionProvider'
    -- is already bound to the t'GI.GtkSource.Objects.Completion.Completion' object.
    | CompletionErrorNotBound
    -- ^ The t'GI.GtkSource.Interfaces.CompletionProvider.CompletionProvider' is
    -- not bound to the t'GI.GtkSource.Objects.Completion.Completion' object.
    | AnotherCompletionError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CompletionError -> ShowS
[CompletionError] -> ShowS
CompletionError -> String
(Int -> CompletionError -> ShowS)
-> (CompletionError -> String)
-> ([CompletionError] -> ShowS)
-> Show CompletionError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CompletionError] -> ShowS
$cshowList :: [CompletionError] -> ShowS
show :: CompletionError -> String
$cshow :: CompletionError -> String
showsPrec :: Int -> CompletionError -> ShowS
$cshowsPrec :: Int -> CompletionError -> ShowS
Show, CompletionError -> CompletionError -> Bool
(CompletionError -> CompletionError -> Bool)
-> (CompletionError -> CompletionError -> Bool)
-> Eq CompletionError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompletionError -> CompletionError -> Bool
$c/= :: CompletionError -> CompletionError -> Bool
== :: CompletionError -> CompletionError -> Bool
$c== :: CompletionError -> CompletionError -> Bool
Eq)

instance P.Enum CompletionError where
    fromEnum :: CompletionError -> Int
fromEnum CompletionError
CompletionErrorAlreadyBound = Int
0
    fromEnum CompletionError
CompletionErrorNotBound = Int
1
    fromEnum (AnotherCompletionError Int
k) = Int
k

    toEnum :: Int -> CompletionError
toEnum Int
0 = CompletionError
CompletionErrorAlreadyBound
    toEnum Int
1 = CompletionError
CompletionErrorNotBound
    toEnum Int
k = Int -> CompletionError
AnotherCompletionError Int
k

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

instance GErrorClass CompletionError where
    gerrorClassDomain :: CompletionError -> Text
gerrorClassDomain CompletionError
_ = Text
"gtk-source-completion-error-quark"

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

-- | Handle exceptions of type `CompletionError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleCompletionError ::
    (CompletionError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleCompletionError :: forall a. (CompletionError -> Text -> IO a) -> IO a -> IO a
handleCompletionError = (CompletionError -> 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 CompletionError = '[]
instance O.HasParentTypes CompletionError

foreign import ccall "gtk_source_completion_error_get_type" c_gtk_source_completion_error_get_type :: 
    IO GType

instance B.Types.TypedObject CompletionError where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_completion_error_get_type

instance B.Types.BoxedEnum CompletionError

-- Enum ChangeCaseType
-- | /No description available in the introspection data./
-- 
-- /Since: 3.12/
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
showList :: [ChangeCaseType] -> ShowS
$cshowList :: [ChangeCaseType] -> ShowS
show :: ChangeCaseType -> String
$cshow :: ChangeCaseType -> String
showsPrec :: Int -> ChangeCaseType -> ShowS
$cshowsPrec :: Int -> ChangeCaseType -> ShowS
Show, ChangeCaseType -> ChangeCaseType -> Bool
(ChangeCaseType -> ChangeCaseType -> Bool)
-> (ChangeCaseType -> ChangeCaseType -> Bool) -> Eq ChangeCaseType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangeCaseType -> ChangeCaseType -> Bool
$c/= :: ChangeCaseType -> ChangeCaseType -> Bool
== :: ChangeCaseType -> ChangeCaseType -> Bool
$c== :: 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
showList :: [BracketMatchType] -> ShowS
$cshowList :: [BracketMatchType] -> ShowS
show :: BracketMatchType -> String
$cshow :: BracketMatchType -> String
showsPrec :: Int -> BracketMatchType -> ShowS
$cshowsPrec :: Int -> BracketMatchType -> ShowS
Show, BracketMatchType -> BracketMatchType -> Bool
(BracketMatchType -> BracketMatchType -> Bool)
-> (BracketMatchType -> BracketMatchType -> Bool)
-> Eq BracketMatchType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BracketMatchType -> BracketMatchType -> Bool
$c/= :: BracketMatchType -> BracketMatchType -> Bool
== :: BracketMatchType -> BracketMatchType -> Bool
$c== :: 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./
-- 
-- /Since: 3.16/
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
showList :: [BackgroundPatternType] -> ShowS
$cshowList :: [BackgroundPatternType] -> ShowS
show :: BackgroundPatternType -> String
$cshow :: BackgroundPatternType -> String
showsPrec :: Int -> BackgroundPatternType -> ShowS
$cshowsPrec :: Int -> BackgroundPatternType -> ShowS
Show, BackgroundPatternType -> BackgroundPatternType -> Bool
(BackgroundPatternType -> BackgroundPatternType -> Bool)
-> (BackgroundPatternType -> BackgroundPatternType -> Bool)
-> Eq BackgroundPatternType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackgroundPatternType -> BackgroundPatternType -> Bool
$c/= :: BackgroundPatternType -> BackgroundPatternType -> Bool
== :: BackgroundPatternType -> BackgroundPatternType -> Bool
$c== :: 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