-- | 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.Dazzle.Flags
    ( 

 -- * Flags


-- ** FileTransferFlags #flag:FileTransferFlags#

    FileTransferFlags(..)                   ,


-- ** PropertiesFlags #flag:PropertiesFlags#

    PropertiesFlags(..)                     ,


-- ** ShortcutPhase #flag:ShortcutPhase#

    ShortcutPhase(..)                       ,


-- ** TabStyle #flag:TabStyle#

    TabStyle(..)                            ,




    ) 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

-- Flags TabStyle
-- | /No description available in the introspection data./
data TabStyle = 
      TabStyleIcons
    -- ^ /No description available in the introspection data./
    | TabStyleText
    -- ^ /No description available in the introspection data./
    | TabStyleBoth
    -- ^ /No description available in the introspection data./
    | AnotherTabStyle Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TabStyle -> ShowS
[TabStyle] -> ShowS
TabStyle -> String
(Int -> TabStyle -> ShowS)
-> (TabStyle -> String) -> ([TabStyle] -> ShowS) -> Show TabStyle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TabStyle -> ShowS
showsPrec :: Int -> TabStyle -> ShowS
$cshow :: TabStyle -> String
show :: TabStyle -> String
$cshowList :: [TabStyle] -> ShowS
showList :: [TabStyle] -> ShowS
Show, TabStyle -> TabStyle -> Bool
(TabStyle -> TabStyle -> Bool)
-> (TabStyle -> TabStyle -> Bool) -> Eq TabStyle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TabStyle -> TabStyle -> Bool
== :: TabStyle -> TabStyle -> Bool
$c/= :: TabStyle -> TabStyle -> Bool
/= :: TabStyle -> TabStyle -> Bool
Eq)

instance P.Enum TabStyle where
    fromEnum :: TabStyle -> Int
fromEnum TabStyle
TabStyleIcons = Int
2
    fromEnum TabStyle
TabStyleText = Int
1
    fromEnum TabStyle
TabStyleBoth = Int
3
    fromEnum (AnotherTabStyle Int
k) = Int
k

    toEnum :: Int -> TabStyle
toEnum Int
2 = TabStyle
TabStyleIcons
    toEnum Int
1 = TabStyle
TabStyleText
    toEnum Int
3 = TabStyle
TabStyleBoth
    toEnum Int
k = Int -> TabStyle
AnotherTabStyle Int
k

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

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

foreign import ccall "dzl_tab_style_get_type" c_dzl_tab_style_get_type :: 
    IO GType

instance B.Types.TypedObject TabStyle where
    glibType :: IO GType
glibType = IO GType
c_dzl_tab_style_get_type

instance B.Types.BoxedFlags TabStyle

instance IsGFlag TabStyle

-- Flags ShortcutPhase
-- | /No description available in the introspection data./
data ShortcutPhase = 
      ShortcutPhaseDispatch
    -- ^ /No description available in the introspection data./
    | ShortcutPhaseCapture
    -- ^ Indicates the capture phase of the shortcut
    --   activation. This allows parent widgets to intercept the keybinding before
    --   it is dispatched to the target t'GI.Gdk.Objects.Window.Window'.
    | ShortcutPhaseBubble
    -- ^ /No description available in the introspection data./
    | ShortcutPhaseGlobal
    -- ^ /No description available in the introspection data./
    | AnotherShortcutPhase Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ShortcutPhase -> ShowS
[ShortcutPhase] -> ShowS
ShortcutPhase -> String
(Int -> ShortcutPhase -> ShowS)
-> (ShortcutPhase -> String)
-> ([ShortcutPhase] -> ShowS)
-> Show ShortcutPhase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ShortcutPhase -> ShowS
showsPrec :: Int -> ShortcutPhase -> ShowS
$cshow :: ShortcutPhase -> String
show :: ShortcutPhase -> String
$cshowList :: [ShortcutPhase] -> ShowS
showList :: [ShortcutPhase] -> ShowS
Show, ShortcutPhase -> ShortcutPhase -> Bool
(ShortcutPhase -> ShortcutPhase -> Bool)
-> (ShortcutPhase -> ShortcutPhase -> Bool) -> Eq ShortcutPhase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ShortcutPhase -> ShortcutPhase -> Bool
== :: ShortcutPhase -> ShortcutPhase -> Bool
$c/= :: ShortcutPhase -> ShortcutPhase -> Bool
/= :: ShortcutPhase -> ShortcutPhase -> Bool
Eq)

instance P.Enum ShortcutPhase where
    fromEnum :: ShortcutPhase -> Int
fromEnum ShortcutPhase
ShortcutPhaseDispatch = Int
0
    fromEnum ShortcutPhase
ShortcutPhaseCapture = Int
1
    fromEnum ShortcutPhase
ShortcutPhaseBubble = Int
2
    fromEnum ShortcutPhase
ShortcutPhaseGlobal = Int
4
    fromEnum (AnotherShortcutPhase Int
k) = Int
k

    toEnum :: Int -> ShortcutPhase
toEnum Int
0 = ShortcutPhase
ShortcutPhaseDispatch
    toEnum Int
1 = ShortcutPhase
ShortcutPhaseCapture
    toEnum Int
2 = ShortcutPhase
ShortcutPhaseBubble
    toEnum Int
4 = ShortcutPhase
ShortcutPhaseGlobal
    toEnum Int
k = Int -> ShortcutPhase
AnotherShortcutPhase Int
k

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

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

foreign import ccall "dzl_shortcut_phase_get_type" c_dzl_shortcut_phase_get_type :: 
    IO GType

instance B.Types.TypedObject ShortcutPhase where
    glibType :: IO GType
glibType = IO GType
c_dzl_shortcut_phase_get_type

instance B.Types.BoxedFlags ShortcutPhase

instance IsGFlag ShortcutPhase

-- Flags PropertiesFlags
-- | /No description available in the introspection data./
data PropertiesFlags = 
      PropertiesFlagsNone
    -- ^ /No description available in the introspection data./
    | PropertiesFlagsStatefulBooleans
    -- ^ /No description available in the introspection data./
    | AnotherPropertiesFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> PropertiesFlags -> ShowS
[PropertiesFlags] -> ShowS
PropertiesFlags -> String
(Int -> PropertiesFlags -> ShowS)
-> (PropertiesFlags -> String)
-> ([PropertiesFlags] -> ShowS)
-> Show PropertiesFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PropertiesFlags -> ShowS
showsPrec :: Int -> PropertiesFlags -> ShowS
$cshow :: PropertiesFlags -> String
show :: PropertiesFlags -> String
$cshowList :: [PropertiesFlags] -> ShowS
showList :: [PropertiesFlags] -> ShowS
Show, PropertiesFlags -> PropertiesFlags -> Bool
(PropertiesFlags -> PropertiesFlags -> Bool)
-> (PropertiesFlags -> PropertiesFlags -> Bool)
-> Eq PropertiesFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PropertiesFlags -> PropertiesFlags -> Bool
== :: PropertiesFlags -> PropertiesFlags -> Bool
$c/= :: PropertiesFlags -> PropertiesFlags -> Bool
/= :: PropertiesFlags -> PropertiesFlags -> Bool
Eq)

instance P.Enum PropertiesFlags where
    fromEnum :: PropertiesFlags -> Int
fromEnum PropertiesFlags
PropertiesFlagsNone = Int
0
    fromEnum PropertiesFlags
PropertiesFlagsStatefulBooleans = Int
1
    fromEnum (AnotherPropertiesFlags Int
k) = Int
k

    toEnum :: Int -> PropertiesFlags
toEnum Int
0 = PropertiesFlags
PropertiesFlagsNone
    toEnum Int
1 = PropertiesFlags
PropertiesFlagsStatefulBooleans
    toEnum Int
k = Int -> PropertiesFlags
AnotherPropertiesFlags Int
k

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

instance IsGFlag PropertiesFlags

-- Flags FileTransferFlags
-- | /No description available in the introspection data./
data FileTransferFlags = 
      FileTransferFlagsNone
    -- ^ /No description available in the introspection data./
    | FileTransferFlagsMove
    -- ^ /No description available in the introspection data./
    | AnotherFileTransferFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> FileTransferFlags -> ShowS
[FileTransferFlags] -> ShowS
FileTransferFlags -> String
(Int -> FileTransferFlags -> ShowS)
-> (FileTransferFlags -> String)
-> ([FileTransferFlags] -> ShowS)
-> Show FileTransferFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileTransferFlags -> ShowS
showsPrec :: Int -> FileTransferFlags -> ShowS
$cshow :: FileTransferFlags -> String
show :: FileTransferFlags -> String
$cshowList :: [FileTransferFlags] -> ShowS
showList :: [FileTransferFlags] -> ShowS
Show, FileTransferFlags -> FileTransferFlags -> Bool
(FileTransferFlags -> FileTransferFlags -> Bool)
-> (FileTransferFlags -> FileTransferFlags -> Bool)
-> Eq FileTransferFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileTransferFlags -> FileTransferFlags -> Bool
== :: FileTransferFlags -> FileTransferFlags -> Bool
$c/= :: FileTransferFlags -> FileTransferFlags -> Bool
/= :: FileTransferFlags -> FileTransferFlags -> Bool
Eq)

instance P.Enum FileTransferFlags where
    fromEnum :: FileTransferFlags -> Int
fromEnum FileTransferFlags
FileTransferFlagsNone = Int
0
    fromEnum FileTransferFlags
FileTransferFlagsMove = Int
1
    fromEnum (AnotherFileTransferFlags Int
k) = Int
k

    toEnum :: Int -> FileTransferFlags
toEnum Int
0 = FileTransferFlags
FileTransferFlagsNone
    toEnum Int
1 = FileTransferFlags
FileTransferFlagsMove
    toEnum Int
k = Int -> FileTransferFlags
AnotherFileTransferFlags Int
k

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

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

foreign import ccall "dzl_file_transfer_flags_get_type" c_dzl_file_transfer_flags_get_type :: 
    IO GType

instance B.Types.TypedObject FileTransferFlags where
    glibType :: IO GType
glibType = IO GType
c_dzl_file_transfer_flags_get_type

instance B.Types.BoxedFlags FileTransferFlags

instance IsGFlag FileTransferFlags