-- | 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.ManagedPtr as B.ManagedPtr
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 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


-- 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 ViewGutterPositionLines = -30
    fromEnum ViewGutterPositionMarks = -20
    fromEnum (AnotherViewGutterPosition k :: Int
k) = Int
k

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

instance P.Ord ViewGutterPosition where
    compare :: ViewGutterPosition -> ViewGutterPosition -> Ordering
compare a :: ViewGutterPosition
a b :: 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)

foreign import ccall "gtk_source_view_gutter_position_get_type" c_gtk_source_view_gutter_position_get_type :: 
    IO GType

instance BoxedEnum ViewGutterPosition where
    boxedEnumType :: ViewGutterPosition -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_view_gutter_position_get_type

-- 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 SmartHomeEndTypeDisabled = 0
    fromEnum SmartHomeEndTypeBefore = 1
    fromEnum SmartHomeEndTypeAfter = 2
    fromEnum SmartHomeEndTypeAlways = 3
    fromEnum (AnotherSmartHomeEndType k :: Int
k) = Int
k

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

instance P.Ord SmartHomeEndType where
    compare :: SmartHomeEndType -> SmartHomeEndType -> Ordering
compare a :: SmartHomeEndType
a b :: 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)

foreign import ccall "gtk_source_smart_home_end_type_get_type" c_gtk_source_smart_home_end_type_get_type :: 
    IO GType

instance BoxedEnum SmartHomeEndType where
    boxedEnumType :: SmartHomeEndType -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_smart_home_end_type_get_type

-- 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 NewlineTypeLf = 0
    fromEnum NewlineTypeCr = 1
    fromEnum NewlineTypeCrLf = 2
    fromEnum (AnotherNewlineType k :: Int
k) = Int
k

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

instance P.Ord NewlineType where
    compare :: NewlineType -> NewlineType -> Ordering
compare a :: NewlineType
a b :: 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)

foreign import ccall "gtk_source_newline_type_get_type" c_gtk_source_newline_type_get_type :: 
    IO GType

instance BoxedEnum NewlineType where
    boxedEnumType :: NewlineType -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_newline_type_get_type

-- 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 GutterRendererAlignmentModeCell = 0
    fromEnum GutterRendererAlignmentModeFirst = 1
    fromEnum GutterRendererAlignmentModeLast = 2
    fromEnum (AnotherGutterRendererAlignmentMode k :: Int
k) = Int
k

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

instance P.Ord GutterRendererAlignmentMode where
    compare :: GutterRendererAlignmentMode
-> GutterRendererAlignmentMode -> Ordering
compare a :: GutterRendererAlignmentMode
a b :: 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)

foreign import ccall "gtk_source_gutter_renderer_alignment_mode_get_type" c_gtk_source_gutter_renderer_alignment_mode_get_type :: 
    IO GType

instance BoxedEnum GutterRendererAlignmentMode where
    boxedEnumType :: GutterRendererAlignmentMode -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_gutter_renderer_alignment_mode_get_type

-- 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 FileSaverErrorInvalidChars = 0
    fromEnum FileSaverErrorExternallyModified = 1
    fromEnum (AnotherFileSaverError k :: Int
k) = Int
k

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

instance P.Ord FileSaverError where
    compare :: FileSaverError -> FileSaverError -> Ordering
compare a :: FileSaverError
a b :: 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 _ = "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 :: 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 :: (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

foreign import ccall "gtk_source_file_saver_error_get_type" c_gtk_source_file_saver_error_get_type :: 
    IO GType

instance BoxedEnum FileSaverError where
    boxedEnumType :: FileSaverError -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_file_saver_error_get_type

-- 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 FileLoaderErrorTooBig = 0
    fromEnum FileLoaderErrorEncodingAutoDetectionFailed = 1
    fromEnum FileLoaderErrorConversionFallback = 2
    fromEnum (AnotherFileLoaderError k :: Int
k) = Int
k

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

instance P.Ord FileLoaderError where
    compare :: FileLoaderError -> FileLoaderError -> Ordering
compare a :: FileLoaderError
a b :: 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 _ = "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 :: 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 :: (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

foreign import ccall "gtk_source_file_loader_error_get_type" c_gtk_source_file_loader_error_get_type :: 
    IO GType

instance BoxedEnum FileLoaderError where
    boxedEnumType :: FileLoaderError -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_file_loader_error_get_type

-- 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 CompressionTypeNone = 0
    fromEnum CompressionTypeGzip = 1
    fromEnum (AnotherCompressionType k :: Int
k) = Int
k

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

instance P.Ord CompressionType where
    compare :: CompressionType -> CompressionType -> Ordering
compare a :: CompressionType
a b :: 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)

foreign import ccall "gtk_source_compression_type_get_type" c_gtk_source_compression_type_get_type :: 
    IO GType

instance BoxedEnum CompressionType where
    boxedEnumType :: CompressionType -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_compression_type_get_type

-- 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 CompletionErrorAlreadyBound = 0
    fromEnum CompletionErrorNotBound = 1
    fromEnum (AnotherCompletionError k :: Int
k) = Int
k

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

instance P.Ord CompletionError where
    compare :: CompletionError -> CompletionError -> Ordering
compare a :: CompletionError
a b :: 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 _ = "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 :: 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 :: (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

foreign import ccall "gtk_source_completion_error_get_type" c_gtk_source_completion_error_get_type :: 
    IO GType

instance BoxedEnum CompletionError where
    boxedEnumType :: CompletionError -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_completion_error_get_type

-- 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 ChangeCaseTypeLower = 0
    fromEnum ChangeCaseTypeUpper = 1
    fromEnum ChangeCaseTypeToggle = 2
    fromEnum ChangeCaseTypeTitle = 3
    fromEnum (AnotherChangeCaseType k :: Int
k) = Int
k

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

instance P.Ord ChangeCaseType where
    compare :: ChangeCaseType -> ChangeCaseType -> Ordering
compare a :: ChangeCaseType
a b :: 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)

foreign import ccall "gtk_source_change_case_type_get_type" c_gtk_source_change_case_type_get_type :: 
    IO GType

instance BoxedEnum ChangeCaseType where
    boxedEnumType :: ChangeCaseType -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_change_case_type_get_type

-- 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 BracketMatchTypeNone = 0
    fromEnum BracketMatchTypeOutOfRange = 1
    fromEnum BracketMatchTypeNotFound = 2
    fromEnum BracketMatchTypeFound = 3
    fromEnum (AnotherBracketMatchType k :: Int
k) = Int
k

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

instance P.Ord BracketMatchType where
    compare :: BracketMatchType -> BracketMatchType -> Ordering
compare a :: BracketMatchType
a b :: 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)

foreign import ccall "gtk_source_bracket_match_type_get_type" c_gtk_source_bracket_match_type_get_type :: 
    IO GType

instance BoxedEnum BracketMatchType where
    boxedEnumType :: BracketMatchType -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_bracket_match_type_get_type

-- 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 BackgroundPatternTypeNone = 0
    fromEnum BackgroundPatternTypeGrid = 1
    fromEnum (AnotherBackgroundPatternType k :: Int
k) = Int
k

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

instance P.Ord BackgroundPatternType where
    compare :: BackgroundPatternType -> BackgroundPatternType -> Ordering
compare a :: BackgroundPatternType
a b :: 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)

foreign import ccall "gtk_source_background_pattern_type_get_type" c_gtk_source_background_pattern_type_get_type :: 
    IO GType

instance BoxedEnum BackgroundPatternType where
    boxedEnumType :: BackgroundPatternType -> IO GType
boxedEnumType _ = IO GType
c_gtk_source_background_pattern_type_get_type