packages feed

gi-wireplumber-0.5.14: GI/Wp/Enums.hs


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

 -- * Enumerations


-- ** ConstraintType #enum:ConstraintType#

    ConstraintType(..)                      ,


-- ** ConstraintVerb #enum:ConstraintVerb#

    ConstraintVerb(..)                      ,


-- ** Direction #enum:Direction#

    Direction(..)                           ,


-- ** LibraryErrorEnum #enum:LibraryErrorEnum#

    LibraryErrorEnum(..)                    ,


-- ** LinkState #enum:LinkState#

    LinkState(..)                           ,


-- ** NodeState #enum:NodeState#

    NodeState(..)                           ,


-- ** SettingsSpecType #enum:SettingsSpecType#

    SettingsSpecType(..)                    ,


-- ** SiAdapterPortsState #enum:SiAdapterPortsState#

    SiAdapterPortsState(..)                 ,


-- ** TransitionStep #enum:TransitionStep#

    TransitionStep(..)                      ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)

#else

#endif

-- Enum TransitionStep
-- | /No description available in the introspection data./
data TransitionStep = 
      TransitionStepNone
    -- ^ /No description available in the introspection data./
    | TransitionStepError
    -- ^ /No description available in the introspection data./
    | TransitionStepCustomStart
    -- ^ /No description available in the introspection data./
    | AnotherTransitionStep Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum TransitionStep where
    fromEnum TransitionStepNone = 0
    fromEnum TransitionStepError = 1
    fromEnum TransitionStepCustomStart = 16
    fromEnum (AnotherTransitionStep k) = k

    toEnum 0 = TransitionStepNone
    toEnum 1 = TransitionStepError
    toEnum 16 = TransitionStepCustomStart
    toEnum k = AnotherTransitionStep k

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

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

foreign import ccall "wp_transition_step_get_type" c_wp_transition_step_get_type :: 
    IO GType

instance B.Types.TypedObject TransitionStep where
    glibType = c_wp_transition_step_get_type

instance B.Types.BoxedEnum TransitionStep

-- Enum SiAdapterPortsState
-- | /No description available in the introspection data./
data SiAdapterPortsState = 
      SiAdapterPortsStateNone
    -- ^ /No description available in the introspection data./
    | SiAdapterPortsStateConfiguring
    -- ^ /No description available in the introspection data./
    | SiAdapterPortsStateConfigured
    -- ^ /No description available in the introspection data./
    | AnotherSiAdapterPortsState Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum SiAdapterPortsState where
    fromEnum SiAdapterPortsStateNone = 0
    fromEnum SiAdapterPortsStateConfiguring = 1
    fromEnum SiAdapterPortsStateConfigured = 2
    fromEnum (AnotherSiAdapterPortsState k) = k

    toEnum 0 = SiAdapterPortsStateNone
    toEnum 1 = SiAdapterPortsStateConfiguring
    toEnum 2 = SiAdapterPortsStateConfigured
    toEnum k = AnotherSiAdapterPortsState k

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

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

foreign import ccall "wp_si_adapter_ports_state_get_type" c_wp_si_adapter_ports_state_get_type :: 
    IO GType

instance B.Types.TypedObject SiAdapterPortsState where
    glibType = c_wp_si_adapter_ports_state_get_type

instance B.Types.BoxedEnum SiAdapterPortsState

-- Enum SettingsSpecType
-- | /No description available in the introspection data./
data SettingsSpecType = 
      SettingsSpecTypeUnknown
    -- ^ /No description available in the introspection data./
    | SettingsSpecTypeBool
    -- ^ /No description available in the introspection data./
    | SettingsSpecTypeInt
    -- ^ /No description available in the introspection data./
    | SettingsSpecTypeFloat
    -- ^ /No description available in the introspection data./
    | SettingsSpecTypeString
    -- ^ /No description available in the introspection data./
    | SettingsSpecTypeArray
    -- ^ /No description available in the introspection data./
    | SettingsSpecTypeObject
    -- ^ /No description available in the introspection data./
    | AnotherSettingsSpecType Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum SettingsSpecType where
    fromEnum SettingsSpecTypeUnknown = 0
    fromEnum SettingsSpecTypeBool = 1
    fromEnum SettingsSpecTypeInt = 2
    fromEnum SettingsSpecTypeFloat = 3
    fromEnum SettingsSpecTypeString = 4
    fromEnum SettingsSpecTypeArray = 5
    fromEnum SettingsSpecTypeObject = 6
    fromEnum (AnotherSettingsSpecType k) = k

    toEnum 0 = SettingsSpecTypeUnknown
    toEnum 1 = SettingsSpecTypeBool
    toEnum 2 = SettingsSpecTypeInt
    toEnum 3 = SettingsSpecTypeFloat
    toEnum 4 = SettingsSpecTypeString
    toEnum 5 = SettingsSpecTypeArray
    toEnum 6 = SettingsSpecTypeObject
    toEnum k = AnotherSettingsSpecType k

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

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

foreign import ccall "wp_settings_spec_type_get_type" c_wp_settings_spec_type_get_type :: 
    IO GType

instance B.Types.TypedObject SettingsSpecType where
    glibType = c_wp_settings_spec_type_get_type

instance B.Types.BoxedEnum SettingsSpecType

-- Enum NodeState
-- | /No description available in the introspection data./
data NodeState = 
      NodeStateError
    -- ^ /No description available in the introspection data./
    | NodeStateCreating
    -- ^ /No description available in the introspection data./
    | NodeStateSuspended
    -- ^ /No description available in the introspection data./
    | NodeStateIdle
    -- ^ /No description available in the introspection data./
    | NodeStateRunning
    -- ^ /No description available in the introspection data./
    | AnotherNodeState Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum NodeState where
    fromEnum NodeStateError = -1
    fromEnum NodeStateCreating = 0
    fromEnum NodeStateSuspended = 1
    fromEnum NodeStateIdle = 2
    fromEnum NodeStateRunning = 3
    fromEnum (AnotherNodeState k) = k

    toEnum -1 = NodeStateError
    toEnum 0 = NodeStateCreating
    toEnum 1 = NodeStateSuspended
    toEnum 2 = NodeStateIdle
    toEnum 3 = NodeStateRunning
    toEnum k = AnotherNodeState k

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

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

foreign import ccall "wp_node_state_get_type" c_wp_node_state_get_type :: 
    IO GType

instance B.Types.TypedObject NodeState where
    glibType = c_wp_node_state_get_type

instance B.Types.BoxedEnum NodeState

-- Enum LinkState
-- | /No description available in the introspection data./
data LinkState = 
      LinkStateError
    -- ^ /No description available in the introspection data./
    | LinkStateUnlinked
    -- ^ /No description available in the introspection data./
    | LinkStateInit
    -- ^ /No description available in the introspection data./
    | LinkStateNegotiating
    -- ^ /No description available in the introspection data./
    | LinkStateAllocating
    -- ^ /No description available in the introspection data./
    | LinkStatePaused
    -- ^ /No description available in the introspection data./
    | LinkStateActive
    -- ^ /No description available in the introspection data./
    | AnotherLinkState Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum LinkState where
    fromEnum LinkStateError = -2
    fromEnum LinkStateUnlinked = -1
    fromEnum LinkStateInit = 0
    fromEnum LinkStateNegotiating = 1
    fromEnum LinkStateAllocating = 2
    fromEnum LinkStatePaused = 3
    fromEnum LinkStateActive = 4
    fromEnum (AnotherLinkState k) = k

    toEnum -2 = LinkStateError
    toEnum -1 = LinkStateUnlinked
    toEnum 0 = LinkStateInit
    toEnum 1 = LinkStateNegotiating
    toEnum 2 = LinkStateAllocating
    toEnum 3 = LinkStatePaused
    toEnum 4 = LinkStateActive
    toEnum k = AnotherLinkState k

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

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

foreign import ccall "wp_link_state_get_type" c_wp_link_state_get_type :: 
    IO GType

instance B.Types.TypedObject LinkState where
    glibType = c_wp_link_state_get_type

instance B.Types.BoxedEnum LinkState

-- Enum LibraryErrorEnum
-- | /No description available in the introspection data./
data LibraryErrorEnum = 
      LibraryErrorEnumInvariant
    -- ^ /No description available in the introspection data./
    | LibraryErrorEnumInvalidArgument
    -- ^ /No description available in the introspection data./
    | LibraryErrorEnumOperationFailed
    -- ^ /No description available in the introspection data./
    | LibraryErrorEnumServiceUnavailable
    -- ^ /No description available in the introspection data./
    | AnotherLibraryErrorEnum Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum LibraryErrorEnum where
    fromEnum LibraryErrorEnumInvariant = 0
    fromEnum LibraryErrorEnumInvalidArgument = 1
    fromEnum LibraryErrorEnumOperationFailed = 2
    fromEnum LibraryErrorEnumServiceUnavailable = 3
    fromEnum (AnotherLibraryErrorEnum k) = k

    toEnum 0 = LibraryErrorEnumInvariant
    toEnum 1 = LibraryErrorEnumInvalidArgument
    toEnum 2 = LibraryErrorEnumOperationFailed
    toEnum 3 = LibraryErrorEnumServiceUnavailable
    toEnum k = AnotherLibraryErrorEnum k

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

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

foreign import ccall "wp_library_error_enum_get_type" c_wp_library_error_enum_get_type :: 
    IO GType

instance B.Types.TypedObject LibraryErrorEnum where
    glibType = c_wp_library_error_enum_get_type

instance B.Types.BoxedEnum LibraryErrorEnum

-- Enum Direction
-- | /No description available in the introspection data./
data Direction = 
      DirectionInput
    -- ^ /No description available in the introspection data./
    | DirectionOutput
    -- ^ /No description available in the introspection data./
    | AnotherDirection Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum Direction where
    fromEnum DirectionInput = 0
    fromEnum DirectionOutput = 1
    fromEnum (AnotherDirection k) = k

    toEnum 0 = DirectionInput
    toEnum 1 = DirectionOutput
    toEnum k = AnotherDirection k

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

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

foreign import ccall "wp_direction_get_type" c_wp_direction_get_type :: 
    IO GType

instance B.Types.TypedObject Direction where
    glibType = c_wp_direction_get_type

instance B.Types.BoxedEnum Direction

-- Enum ConstraintVerb
-- | /No description available in the introspection data./
data ConstraintVerb = 
      ConstraintVerbEquals
    -- ^ /No description available in the introspection data./
    | ConstraintVerbNotEquals
    -- ^ /No description available in the introspection data./
    | ConstraintVerbInList
    -- ^ /No description available in the introspection data./
    | ConstraintVerbInRange
    -- ^ /No description available in the introspection data./
    | ConstraintVerbMatches
    -- ^ /No description available in the introspection data./
    | ConstraintVerbIsPresent
    -- ^ /No description available in the introspection data./
    | ConstraintVerbIsAbsent
    -- ^ /No description available in the introspection data./
    | AnotherConstraintVerb Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum ConstraintVerb where
    fromEnum ConstraintVerbEquals = 61
    fromEnum ConstraintVerbNotEquals = 33
    fromEnum ConstraintVerbInList = 99
    fromEnum ConstraintVerbInRange = 126
    fromEnum ConstraintVerbMatches = 35
    fromEnum ConstraintVerbIsPresent = 43
    fromEnum ConstraintVerbIsAbsent = 45
    fromEnum (AnotherConstraintVerb k) = k

    toEnum 61 = ConstraintVerbEquals
    toEnum 33 = ConstraintVerbNotEquals
    toEnum 99 = ConstraintVerbInList
    toEnum 126 = ConstraintVerbInRange
    toEnum 35 = ConstraintVerbMatches
    toEnum 43 = ConstraintVerbIsPresent
    toEnum 45 = ConstraintVerbIsAbsent
    toEnum k = AnotherConstraintVerb k

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

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

foreign import ccall "wp_constraint_verb_get_type" c_wp_constraint_verb_get_type :: 
    IO GType

instance B.Types.TypedObject ConstraintVerb where
    glibType = c_wp_constraint_verb_get_type

instance B.Types.BoxedEnum ConstraintVerb

-- Enum ConstraintType
-- | /No description available in the introspection data./
data ConstraintType = 
      ConstraintTypeNone
    -- ^ /No description available in the introspection data./
    | ConstraintTypePwGlobalProperty
    -- ^ /No description available in the introspection data./
    | ConstraintTypePwProperty
    -- ^ /No description available in the introspection data./
    | ConstraintTypeGProperty
    -- ^ /No description available in the introspection data./
    | AnotherConstraintType Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum ConstraintType where
    fromEnum ConstraintTypeNone = 0
    fromEnum ConstraintTypePwGlobalProperty = 1
    fromEnum ConstraintTypePwProperty = 2
    fromEnum ConstraintTypeGProperty = 3
    fromEnum (AnotherConstraintType k) = k

    toEnum 0 = ConstraintTypeNone
    toEnum 1 = ConstraintTypePwGlobalProperty
    toEnum 2 = ConstraintTypePwProperty
    toEnum 3 = ConstraintTypeGProperty
    toEnum k = AnotherConstraintType k

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

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

foreign import ccall "wp_constraint_type_get_type" c_wp_constraint_type_get_type :: 
    IO GType

instance B.Types.TypedObject ConstraintType where
    glibType = c_wp_constraint_type_get_type

instance B.Types.BoxedEnum ConstraintType