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

 -- * Enumerations


-- ** ArrayType #enum:ArrayType#

    ArrayType(..)                           ,


-- ** Direction #enum:Direction#

    Direction(..)                           ,


-- ** InfoType #enum:InfoType#

    InfoType(..)                            ,


-- ** NvokeError #enum:NvokeError#

    NvokeError(..)                          ,


-- ** RepositoryError #enum:RepositoryError#

    RepositoryError(..)                     ,


-- ** ScopeType #enum:ScopeType#

    ScopeType(..)                           ,


-- ** Transfer #enum:Transfer#

    Transfer(..)                            ,


-- ** TypeTag #enum:TypeTag#

    TypeTag(..)                             ,




    ) 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.Coerce as Coerce
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 nvokeError
-- | An error occuring while invoking a function via
-- @/g_function_info_invoke()/@.
data NvokeError = 
      NvokeErrorFailed
    -- ^ invokation failed, unknown error.
    | NvokeErrorSymbolNotFound
    -- ^ symbol couldn\'t be found in any of the
    -- libraries associated with the typelib of the function.
    | NvokeErrorArgumentMismatch
    -- ^ the arguments provided didn\'t match
    -- the expected arguments for the functions type signature.
    | AnotherNvokeError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> NvokeError -> ShowS
[NvokeError] -> ShowS
NvokeError -> String
(Int -> NvokeError -> ShowS)
-> (NvokeError -> String)
-> ([NvokeError] -> ShowS)
-> Show NvokeError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NvokeError] -> ShowS
$cshowList :: [NvokeError] -> ShowS
show :: NvokeError -> String
$cshow :: NvokeError -> String
showsPrec :: Int -> NvokeError -> ShowS
$cshowsPrec :: Int -> NvokeError -> ShowS
Show, NvokeError -> NvokeError -> Bool
(NvokeError -> NvokeError -> Bool)
-> (NvokeError -> NvokeError -> Bool) -> Eq NvokeError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NvokeError -> NvokeError -> Bool
$c/= :: NvokeError -> NvokeError -> Bool
== :: NvokeError -> NvokeError -> Bool
$c== :: NvokeError -> NvokeError -> Bool
Eq)

instance P.Enum NvokeError where
    fromEnum :: NvokeError -> Int
fromEnum NvokeError
NvokeErrorFailed = Int
0
    fromEnum NvokeError
NvokeErrorSymbolNotFound = Int
1
    fromEnum NvokeError
NvokeErrorArgumentMismatch = Int
2
    fromEnum (AnotherNvokeError Int
k) = Int
k

    toEnum :: Int -> NvokeError
toEnum Int
0 = NvokeError
NvokeErrorFailed
    toEnum Int
1 = NvokeError
NvokeErrorSymbolNotFound
    toEnum Int
2 = NvokeError
NvokeErrorArgumentMismatch
    toEnum Int
k = Int -> NvokeError
AnotherNvokeError Int
k

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

-- Enum TypeTag
-- | The type tag of a @/GITypeInfo/@.
data TypeTag = 
      TypeTagVoid
    -- ^ void
    | TypeTagBoolean
    -- ^ boolean
    | TypeTagInt8
    -- ^ 8-bit signed integer
    | TypeTagUint8
    -- ^ 8-bit unsigned integer
    | TypeTagInt16
    -- ^ 16-bit signed integer
    | TypeTagUint16
    -- ^ 16-bit unsigned integer
    | TypeTagInt32
    -- ^ 32-bit signed integer
    | TypeTagUint32
    -- ^ 32-bit unsigned integer
    | TypeTagInt64
    -- ^ 64-bit signed integer
    | TypeTagUint64
    -- ^ 64-bit unsigned integer
    | TypeTagFloat
    -- ^ float
    | TypeTagDouble
    -- ^ double floating point
    | TypeTagGtype
    -- ^ a t'GType'
    | TypeTagUtf8
    -- ^ a UTF-8 encoded string
    | TypeTagFilename
    -- ^ a filename, encoded in the same encoding
    --   as the native filesystem is using.
    | TypeTagArray
    -- ^ an array
    | TypeTagInterface
    -- ^ an extended interface object
    | TypeTagGlist
    -- ^ a t'GI.GLib.Structs.List.List'
    | TypeTagGslist
    -- ^ a t'GI.GLib.Structs.SList.SList'
    | TypeTagGhash
    -- ^ a t'GI.GLib.Structs.HashTable.HashTable'
    | TypeTagError
    -- ^ a t'GError'
    | TypeTagUnichar
    -- ^ Unicode character
    | AnotherTypeTag Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TypeTag -> ShowS
[TypeTag] -> ShowS
TypeTag -> String
(Int -> TypeTag -> ShowS)
-> (TypeTag -> String) -> ([TypeTag] -> ShowS) -> Show TypeTag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeTag] -> ShowS
$cshowList :: [TypeTag] -> ShowS
show :: TypeTag -> String
$cshow :: TypeTag -> String
showsPrec :: Int -> TypeTag -> ShowS
$cshowsPrec :: Int -> TypeTag -> ShowS
Show, TypeTag -> TypeTag -> Bool
(TypeTag -> TypeTag -> Bool)
-> (TypeTag -> TypeTag -> Bool) -> Eq TypeTag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeTag -> TypeTag -> Bool
$c/= :: TypeTag -> TypeTag -> Bool
== :: TypeTag -> TypeTag -> Bool
$c== :: TypeTag -> TypeTag -> Bool
Eq)

instance P.Enum TypeTag where
    fromEnum :: TypeTag -> Int
fromEnum TypeTag
TypeTagVoid = Int
0
    fromEnum TypeTag
TypeTagBoolean = Int
1
    fromEnum TypeTag
TypeTagInt8 = Int
2
    fromEnum TypeTag
TypeTagUint8 = Int
3
    fromEnum TypeTag
TypeTagInt16 = Int
4
    fromEnum TypeTag
TypeTagUint16 = Int
5
    fromEnum TypeTag
TypeTagInt32 = Int
6
    fromEnum TypeTag
TypeTagUint32 = Int
7
    fromEnum TypeTag
TypeTagInt64 = Int
8
    fromEnum TypeTag
TypeTagUint64 = Int
9
    fromEnum TypeTag
TypeTagFloat = Int
10
    fromEnum TypeTag
TypeTagDouble = Int
11
    fromEnum TypeTag
TypeTagGtype = Int
12
    fromEnum TypeTag
TypeTagUtf8 = Int
13
    fromEnum TypeTag
TypeTagFilename = Int
14
    fromEnum TypeTag
TypeTagArray = Int
15
    fromEnum TypeTag
TypeTagInterface = Int
16
    fromEnum TypeTag
TypeTagGlist = Int
17
    fromEnum TypeTag
TypeTagGslist = Int
18
    fromEnum TypeTag
TypeTagGhash = Int
19
    fromEnum TypeTag
TypeTagError = Int
20
    fromEnum TypeTag
TypeTagUnichar = Int
21
    fromEnum (AnotherTypeTag Int
k) = Int
k

    toEnum :: Int -> TypeTag
toEnum Int
0 = TypeTag
TypeTagVoid
    toEnum Int
1 = TypeTag
TypeTagBoolean
    toEnum Int
2 = TypeTag
TypeTagInt8
    toEnum Int
3 = TypeTag
TypeTagUint8
    toEnum Int
4 = TypeTag
TypeTagInt16
    toEnum Int
5 = TypeTag
TypeTagUint16
    toEnum Int
6 = TypeTag
TypeTagInt32
    toEnum Int
7 = TypeTag
TypeTagUint32
    toEnum Int
8 = TypeTag
TypeTagInt64
    toEnum Int
9 = TypeTag
TypeTagUint64
    toEnum Int
10 = TypeTag
TypeTagFloat
    toEnum Int
11 = TypeTag
TypeTagDouble
    toEnum Int
12 = TypeTag
TypeTagGtype
    toEnum Int
13 = TypeTag
TypeTagUtf8
    toEnum Int
14 = TypeTag
TypeTagFilename
    toEnum Int
15 = TypeTag
TypeTagArray
    toEnum Int
16 = TypeTag
TypeTagInterface
    toEnum Int
17 = TypeTag
TypeTagGlist
    toEnum Int
18 = TypeTag
TypeTagGslist
    toEnum Int
19 = TypeTag
TypeTagGhash
    toEnum Int
20 = TypeTag
TypeTagError
    toEnum Int
21 = TypeTag
TypeTagUnichar
    toEnum Int
k = Int -> TypeTag
AnotherTypeTag Int
k

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

-- Enum Transfer
-- | The transfer is the exchange of data between two parts, from the callee to
-- the caller. The callee is either a function\/method\/signal or an
-- object\/interface where a property is defined. The caller is the side
-- accessing a property or calling a function.
-- t'GI.GIRepository.Enums.Transfer' specifies who\'s responsible for freeing the resources after the
-- ownership transfer is complete. In case of a containing type such as a list,
-- an array or a hash table the container itself is specified differently from
-- the items within the container itself. Each container is freed differently,
-- check the documentation for the types themselves for information on how to
-- free them.
data Transfer = 
      TransferNothing
    -- ^ transfer nothing from the callee (function or the type
    -- instance the property belongs to) to the caller. The callee retains the
    -- ownership of the transfer and the caller doesn\'t need to do anything to free
    -- up the resources of this transfer.
    | TransferContainer
    -- ^ transfer the container (list, array, hash table) from
    -- the callee to the caller. The callee retains the ownership of the individual
    -- items in the container and the caller has to free up the container resources
    -- (@/g_list_free()/@\/'GI.GLib.Functions.hashTableDestroy' etc) of this transfer.
    | TransferEverything
    -- ^ transfer everything, eg the container and its
    -- contents from the callee to the caller. This is the case when the callee
    -- creates a copy of all the data it returns. The caller is responsible for
    -- cleaning up the container and item resources of this transfer.
    | AnotherTransfer Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Transfer -> ShowS
[Transfer] -> ShowS
Transfer -> String
(Int -> Transfer -> ShowS)
-> (Transfer -> String) -> ([Transfer] -> ShowS) -> Show Transfer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Transfer] -> ShowS
$cshowList :: [Transfer] -> ShowS
show :: Transfer -> String
$cshow :: Transfer -> String
showsPrec :: Int -> Transfer -> ShowS
$cshowsPrec :: Int -> Transfer -> ShowS
Show, Transfer -> Transfer -> Bool
(Transfer -> Transfer -> Bool)
-> (Transfer -> Transfer -> Bool) -> Eq Transfer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Transfer -> Transfer -> Bool
$c/= :: Transfer -> Transfer -> Bool
== :: Transfer -> Transfer -> Bool
$c== :: Transfer -> Transfer -> Bool
Eq)

instance P.Enum Transfer where
    fromEnum :: Transfer -> Int
fromEnum Transfer
TransferNothing = Int
0
    fromEnum Transfer
TransferContainer = Int
1
    fromEnum Transfer
TransferEverything = Int
2
    fromEnum (AnotherTransfer Int
k) = Int
k

    toEnum :: Int -> Transfer
toEnum Int
0 = Transfer
TransferNothing
    toEnum Int
1 = Transfer
TransferContainer
    toEnum Int
2 = Transfer
TransferEverything
    toEnum Int
k = Int -> Transfer
AnotherTransfer Int
k

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

-- Enum ScopeType
-- | Scope type of a @/GIArgInfo/@ representing callback, determines how the
-- callback is invoked and is used to decided when the invoke structs
-- can be freed.
data ScopeType = 
      ScopeTypeInvalid
    -- ^ The argument is not of callback type.
    | ScopeTypeCall
    -- ^ The callback and associated user_data is only
    -- used during the call to this function.
    | ScopeTypeAsync
    -- ^ The callback and associated user_data is
    -- only used until the callback is invoked, and the callback.
    -- is invoked always exactly once.
    | ScopeTypeNotified
    -- ^ The callback and and associated
    -- user_data is used until the caller is notfied via the destroy_notify.
    | AnotherScopeType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ScopeType -> ShowS
[ScopeType] -> ShowS
ScopeType -> String
(Int -> ScopeType -> ShowS)
-> (ScopeType -> String)
-> ([ScopeType] -> ShowS)
-> Show ScopeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScopeType] -> ShowS
$cshowList :: [ScopeType] -> ShowS
show :: ScopeType -> String
$cshow :: ScopeType -> String
showsPrec :: Int -> ScopeType -> ShowS
$cshowsPrec :: Int -> ScopeType -> ShowS
Show, ScopeType -> ScopeType -> Bool
(ScopeType -> ScopeType -> Bool)
-> (ScopeType -> ScopeType -> Bool) -> Eq ScopeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScopeType -> ScopeType -> Bool
$c/= :: ScopeType -> ScopeType -> Bool
== :: ScopeType -> ScopeType -> Bool
$c== :: ScopeType -> ScopeType -> Bool
Eq)

instance P.Enum ScopeType where
    fromEnum :: ScopeType -> Int
fromEnum ScopeType
ScopeTypeInvalid = Int
0
    fromEnum ScopeType
ScopeTypeCall = Int
1
    fromEnum ScopeType
ScopeTypeAsync = Int
2
    fromEnum ScopeType
ScopeTypeNotified = Int
3
    fromEnum (AnotherScopeType Int
k) = Int
k

    toEnum :: Int -> ScopeType
toEnum Int
0 = ScopeType
ScopeTypeInvalid
    toEnum Int
1 = ScopeType
ScopeTypeCall
    toEnum Int
2 = ScopeType
ScopeTypeAsync
    toEnum Int
3 = ScopeType
ScopeTypeNotified
    toEnum Int
k = Int -> ScopeType
AnotherScopeType Int
k

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

-- Enum RepositoryError
-- | An error code used with @/G_IREPOSITORY_ERROR/@ in a t'GError' returned
-- from a t'GI.GIRepository.Objects.Repository.Repository' routine.
data RepositoryError = 
      RepositoryErrorTypelibNotFound
    -- ^ the typelib could not be found.
    | RepositoryErrorNamespaceMismatch
    -- ^ the namespace does not match the
    --   requested namespace.
    | RepositoryErrorNamespaceVersionConflict
    -- ^ the version of the
    --   typelib does not match the requested version.
    | RepositoryErrorLibraryNotFound
    -- ^ the library used by the typelib
    --   could not be found.
    | AnotherRepositoryError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> RepositoryError -> ShowS
[RepositoryError] -> ShowS
RepositoryError -> String
(Int -> RepositoryError -> ShowS)
-> (RepositoryError -> String)
-> ([RepositoryError] -> ShowS)
-> Show RepositoryError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryError] -> ShowS
$cshowList :: [RepositoryError] -> ShowS
show :: RepositoryError -> String
$cshow :: RepositoryError -> String
showsPrec :: Int -> RepositoryError -> ShowS
$cshowsPrec :: Int -> RepositoryError -> ShowS
Show, RepositoryError -> RepositoryError -> Bool
(RepositoryError -> RepositoryError -> Bool)
-> (RepositoryError -> RepositoryError -> Bool)
-> Eq RepositoryError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryError -> RepositoryError -> Bool
$c/= :: RepositoryError -> RepositoryError -> Bool
== :: RepositoryError -> RepositoryError -> Bool
$c== :: RepositoryError -> RepositoryError -> Bool
Eq)

instance P.Enum RepositoryError where
    fromEnum :: RepositoryError -> Int
fromEnum RepositoryError
RepositoryErrorTypelibNotFound = Int
0
    fromEnum RepositoryError
RepositoryErrorNamespaceMismatch = Int
1
    fromEnum RepositoryError
RepositoryErrorNamespaceVersionConflict = Int
2
    fromEnum RepositoryError
RepositoryErrorLibraryNotFound = Int
3
    fromEnum (AnotherRepositoryError Int
k) = Int
k

    toEnum :: Int -> RepositoryError
toEnum Int
0 = RepositoryError
RepositoryErrorTypelibNotFound
    toEnum Int
1 = RepositoryError
RepositoryErrorNamespaceMismatch
    toEnum Int
2 = RepositoryError
RepositoryErrorNamespaceVersionConflict
    toEnum Int
3 = RepositoryError
RepositoryErrorLibraryNotFound
    toEnum Int
k = Int -> RepositoryError
AnotherRepositoryError Int
k

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

-- Enum InfoType
-- | The type of a GIBaseInfo struct.
data InfoType = 
      InfoTypeInvalid
    -- ^ invalid type
    | InfoTypeFunction
    -- ^ function, see @/GIFunctionInfo/@
    | InfoTypeCallback
    -- ^ callback, see @/GIFunctionInfo/@
    | InfoTypeStruct
    -- ^ struct, see @/GIStructInfo/@
    | InfoTypeBoxed
    -- ^ boxed, see @/GIStructInfo/@ or @/GIUnionInfo/@
    | InfoTypeEnum
    -- ^ enum, see @/GIEnumInfo/@
    | InfoTypeFlags
    -- ^ flags, see @/GIEnumInfo/@
    | InfoTypeObject
    -- ^ object, see @/GIObjectInfo/@
    | InfoTypeInterface
    -- ^ interface, see @/GIInterfaceInfo/@
    | InfoTypeConstant
    -- ^ contant, see @/GIConstantInfo/@
    | InfoTypeInvalid0
    -- ^ deleted, used to be GI_INFO_TYPE_ERROR_DOMAIN.
    | InfoTypeUnion
    -- ^ union, see @/GIUnionInfo/@
    | InfoTypeValue
    -- ^ enum value, see @/GIValueInfo/@
    | InfoTypeSignal
    -- ^ signal, see @/GISignalInfo/@
    | InfoTypeVfunc
    -- ^ virtual function, see @/GIVFuncInfo/@
    | InfoTypeProperty
    -- ^ GObject property, see @/GIPropertyInfo/@
    | InfoTypeField
    -- ^ struct or union field, see @/GIFieldInfo/@
    | InfoTypeArg
    -- ^ argument of a function or callback, see @/GIArgInfo/@
    | InfoTypeType
    -- ^ type information, see @/GITypeInfo/@
    | InfoTypeUnresolved
    -- ^ unresolved type, a type which is not present in
    --   the typelib, or any of its dependencies.
    | AnotherInfoType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> InfoType -> ShowS
[InfoType] -> ShowS
InfoType -> String
(Int -> InfoType -> ShowS)
-> (InfoType -> String) -> ([InfoType] -> ShowS) -> Show InfoType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InfoType] -> ShowS
$cshowList :: [InfoType] -> ShowS
show :: InfoType -> String
$cshow :: InfoType -> String
showsPrec :: Int -> InfoType -> ShowS
$cshowsPrec :: Int -> InfoType -> ShowS
Show, InfoType -> InfoType -> Bool
(InfoType -> InfoType -> Bool)
-> (InfoType -> InfoType -> Bool) -> Eq InfoType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InfoType -> InfoType -> Bool
$c/= :: InfoType -> InfoType -> Bool
== :: InfoType -> InfoType -> Bool
$c== :: InfoType -> InfoType -> Bool
Eq)

instance P.Enum InfoType where
    fromEnum :: InfoType -> Int
fromEnum InfoType
InfoTypeInvalid = Int
0
    fromEnum InfoType
InfoTypeFunction = Int
1
    fromEnum InfoType
InfoTypeCallback = Int
2
    fromEnum InfoType
InfoTypeStruct = Int
3
    fromEnum InfoType
InfoTypeBoxed = Int
4
    fromEnum InfoType
InfoTypeEnum = Int
5
    fromEnum InfoType
InfoTypeFlags = Int
6
    fromEnum InfoType
InfoTypeObject = Int
7
    fromEnum InfoType
InfoTypeInterface = Int
8
    fromEnum InfoType
InfoTypeConstant = Int
9
    fromEnum InfoType
InfoTypeInvalid0 = Int
10
    fromEnum InfoType
InfoTypeUnion = Int
11
    fromEnum InfoType
InfoTypeValue = Int
12
    fromEnum InfoType
InfoTypeSignal = Int
13
    fromEnum InfoType
InfoTypeVfunc = Int
14
    fromEnum InfoType
InfoTypeProperty = Int
15
    fromEnum InfoType
InfoTypeField = Int
16
    fromEnum InfoType
InfoTypeArg = Int
17
    fromEnum InfoType
InfoTypeType = Int
18
    fromEnum InfoType
InfoTypeUnresolved = Int
19
    fromEnum (AnotherInfoType Int
k) = Int
k

    toEnum :: Int -> InfoType
toEnum Int
0 = InfoType
InfoTypeInvalid
    toEnum Int
1 = InfoType
InfoTypeFunction
    toEnum Int
2 = InfoType
InfoTypeCallback
    toEnum Int
3 = InfoType
InfoTypeStruct
    toEnum Int
4 = InfoType
InfoTypeBoxed
    toEnum Int
5 = InfoType
InfoTypeEnum
    toEnum Int
6 = InfoType
InfoTypeFlags
    toEnum Int
7 = InfoType
InfoTypeObject
    toEnum Int
8 = InfoType
InfoTypeInterface
    toEnum Int
9 = InfoType
InfoTypeConstant
    toEnum Int
10 = InfoType
InfoTypeInvalid0
    toEnum Int
11 = InfoType
InfoTypeUnion
    toEnum Int
12 = InfoType
InfoTypeValue
    toEnum Int
13 = InfoType
InfoTypeSignal
    toEnum Int
14 = InfoType
InfoTypeVfunc
    toEnum Int
15 = InfoType
InfoTypeProperty
    toEnum Int
16 = InfoType
InfoTypeField
    toEnum Int
17 = InfoType
InfoTypeArg
    toEnum Int
18 = InfoType
InfoTypeType
    toEnum Int
19 = InfoType
InfoTypeUnresolved
    toEnum Int
k = Int -> InfoType
AnotherInfoType Int
k

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

-- Enum Direction
-- | The direction of a @/GIArgInfo/@.
data Direction = 
      DirectionIn
    -- ^ in argument.
    | DirectionOut
    -- ^ out argument.
    | DirectionInout
    -- ^ in and out argument.
    | AnotherDirection Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Direction -> ShowS
[Direction] -> ShowS
Direction -> String
(Int -> Direction -> ShowS)
-> (Direction -> String)
-> ([Direction] -> ShowS)
-> Show Direction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Direction] -> ShowS
$cshowList :: [Direction] -> ShowS
show :: Direction -> String
$cshow :: Direction -> String
showsPrec :: Int -> Direction -> ShowS
$cshowsPrec :: Int -> Direction -> ShowS
Show, Direction -> Direction -> Bool
(Direction -> Direction -> Bool)
-> (Direction -> Direction -> Bool) -> Eq Direction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Direction -> Direction -> Bool
$c/= :: Direction -> Direction -> Bool
== :: Direction -> Direction -> Bool
$c== :: Direction -> Direction -> Bool
Eq)

instance P.Enum Direction where
    fromEnum :: Direction -> Int
fromEnum Direction
DirectionIn = Int
0
    fromEnum Direction
DirectionOut = Int
1
    fromEnum Direction
DirectionInout = Int
2
    fromEnum (AnotherDirection Int
k) = Int
k

    toEnum :: Int -> Direction
toEnum Int
0 = Direction
DirectionIn
    toEnum Int
1 = Direction
DirectionOut
    toEnum Int
2 = Direction
DirectionInout
    toEnum Int
k = Int -> Direction
AnotherDirection Int
k

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

-- Enum ArrayType
-- | The type of array in a @/GITypeInfo/@.
data ArrayType = 
      ArrayTypeC
    -- ^ a C array, char[] for instance
    | ArrayTypeArray
    -- ^ a /@gArray@/ array
    | ArrayTypePtrArray
    -- ^ a t'GI.GLib.Structs.PtrArray.PtrArray' array
    | ArrayTypeByteArray
    -- ^ a t'GI.GLib.Structs.ByteArray.ByteArray' array
    | AnotherArrayType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ArrayType -> ShowS
[ArrayType] -> ShowS
ArrayType -> String
(Int -> ArrayType -> ShowS)
-> (ArrayType -> String)
-> ([ArrayType] -> ShowS)
-> Show ArrayType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArrayType] -> ShowS
$cshowList :: [ArrayType] -> ShowS
show :: ArrayType -> String
$cshow :: ArrayType -> String
showsPrec :: Int -> ArrayType -> ShowS
$cshowsPrec :: Int -> ArrayType -> ShowS
Show, ArrayType -> ArrayType -> Bool
(ArrayType -> ArrayType -> Bool)
-> (ArrayType -> ArrayType -> Bool) -> Eq ArrayType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArrayType -> ArrayType -> Bool
$c/= :: ArrayType -> ArrayType -> Bool
== :: ArrayType -> ArrayType -> Bool
$c== :: ArrayType -> ArrayType -> Bool
Eq)

instance P.Enum ArrayType where
    fromEnum :: ArrayType -> Int
fromEnum ArrayType
ArrayTypeC = Int
0
    fromEnum ArrayType
ArrayTypeArray = Int
1
    fromEnum ArrayType
ArrayTypePtrArray = Int
2
    fromEnum ArrayType
ArrayTypeByteArray = Int
3
    fromEnum (AnotherArrayType Int
k) = Int
k

    toEnum :: Int -> ArrayType
toEnum Int
0 = ArrayType
ArrayTypeC
    toEnum Int
1 = ArrayType
ArrayTypeArray
    toEnum Int
2 = ArrayType
ArrayTypePtrArray
    toEnum Int
3 = ArrayType
ArrayTypeByteArray
    toEnum Int
k = Int -> ArrayType
AnotherArrayType Int
k

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