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

 -- * Flags


-- ** FontMask #flag:FontMask#

    FontMask(..)                            ,


-- ** LayoutDeserializeFlags #flag:LayoutDeserializeFlags#

    LayoutDeserializeFlags(..)              ,


-- ** LayoutSerializeFlags #flag:LayoutSerializeFlags#

    LayoutSerializeFlags(..)                ,


-- ** ShapeFlags #flag:ShapeFlags#

    ShapeFlags(..)                          ,


-- ** ShowFlags #flag:ShowFlags#

    ShowFlags(..)                           ,




    ) 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


-- Flags ShowFlags
-- | These flags affect how Pango treats characters that are normally
-- not visible in the output.
-- 
-- /Since: 1.44/
data ShowFlags = 
      ShowFlagsNone
    -- ^ No special treatment for invisible characters
    | ShowFlagsSpaces
    -- ^ Render spaces, tabs and newlines visibly
    | ShowFlagsLineBreaks
    -- ^ Render line breaks visibly
    | ShowFlagsIgnorables
    -- ^ Render default-ignorable Unicode
    --   characters visibly
    | AnotherShowFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ShowFlags -> ShowS
[ShowFlags] -> ShowS
ShowFlags -> String
(Int -> ShowFlags -> ShowS)
-> (ShowFlags -> String)
-> ([ShowFlags] -> ShowS)
-> Show ShowFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ShowFlags] -> ShowS
$cshowList :: [ShowFlags] -> ShowS
show :: ShowFlags -> String
$cshow :: ShowFlags -> String
showsPrec :: Int -> ShowFlags -> ShowS
$cshowsPrec :: Int -> ShowFlags -> ShowS
Show, ShowFlags -> ShowFlags -> Bool
(ShowFlags -> ShowFlags -> Bool)
-> (ShowFlags -> ShowFlags -> Bool) -> Eq ShowFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ShowFlags -> ShowFlags -> Bool
$c/= :: ShowFlags -> ShowFlags -> Bool
== :: ShowFlags -> ShowFlags -> Bool
$c== :: ShowFlags -> ShowFlags -> Bool
Eq)

instance P.Enum ShowFlags where
    fromEnum :: ShowFlags -> Int
fromEnum ShowFlags
ShowFlagsNone = Int
0
    fromEnum ShowFlags
ShowFlagsSpaces = Int
1
    fromEnum ShowFlags
ShowFlagsLineBreaks = Int
2
    fromEnum ShowFlags
ShowFlagsIgnorables = Int
4
    fromEnum (AnotherShowFlags Int
k) = Int
k

    toEnum :: Int -> ShowFlags
toEnum Int
0 = ShowFlags
ShowFlagsNone
    toEnum Int
1 = ShowFlags
ShowFlagsSpaces
    toEnum Int
2 = ShowFlags
ShowFlagsLineBreaks
    toEnum Int
4 = ShowFlags
ShowFlagsIgnorables
    toEnum Int
k = Int -> ShowFlags
AnotherShowFlags Int
k

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

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

foreign import ccall "pango_show_flags_get_type" c_pango_show_flags_get_type :: 
    IO GType

instance B.Types.TypedObject ShowFlags where
    glibType :: IO GType
glibType = IO GType
c_pango_show_flags_get_type

instance B.Types.BoxedFlags ShowFlags

instance IsGFlag ShowFlags

-- Flags ShapeFlags
-- | Flags influencing the shaping process.
-- 
-- @PangoShapeFlags@ can be passed to 'GI.Pango.Functions.shapeWithFlags'.
-- 
-- /Since: 1.44/
data ShapeFlags = 
      ShapeFlagsNone
    -- ^ Default value
    | ShapeFlagsRoundPositions
    -- ^ Round glyph positions and widths to whole device units
    --   This option should be set if the target renderer can\'t do subpixel positioning of glyphs
    | AnotherShapeFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ShapeFlags -> ShowS
[ShapeFlags] -> ShowS
ShapeFlags -> String
(Int -> ShapeFlags -> ShowS)
-> (ShapeFlags -> String)
-> ([ShapeFlags] -> ShowS)
-> Show ShapeFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ShapeFlags] -> ShowS
$cshowList :: [ShapeFlags] -> ShowS
show :: ShapeFlags -> String
$cshow :: ShapeFlags -> String
showsPrec :: Int -> ShapeFlags -> ShowS
$cshowsPrec :: Int -> ShapeFlags -> ShowS
Show, ShapeFlags -> ShapeFlags -> Bool
(ShapeFlags -> ShapeFlags -> Bool)
-> (ShapeFlags -> ShapeFlags -> Bool) -> Eq ShapeFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ShapeFlags -> ShapeFlags -> Bool
$c/= :: ShapeFlags -> ShapeFlags -> Bool
== :: ShapeFlags -> ShapeFlags -> Bool
$c== :: ShapeFlags -> ShapeFlags -> Bool
Eq)

instance P.Enum ShapeFlags where
    fromEnum :: ShapeFlags -> Int
fromEnum ShapeFlags
ShapeFlagsNone = Int
0
    fromEnum ShapeFlags
ShapeFlagsRoundPositions = Int
1
    fromEnum (AnotherShapeFlags Int
k) = Int
k

    toEnum :: Int -> ShapeFlags
toEnum Int
0 = ShapeFlags
ShapeFlagsNone
    toEnum Int
1 = ShapeFlags
ShapeFlagsRoundPositions
    toEnum Int
k = Int -> ShapeFlags
AnotherShapeFlags Int
k

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

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

foreign import ccall "pango_shape_flags_get_type" c_pango_shape_flags_get_type :: 
    IO GType

instance B.Types.TypedObject ShapeFlags where
    glibType :: IO GType
glibType = IO GType
c_pango_shape_flags_get_type

instance B.Types.BoxedFlags ShapeFlags

instance IsGFlag ShapeFlags

-- Flags LayoutSerializeFlags
-- | Flags that influence the behavior of 'GI.Pango.Objects.Layout.layoutSerialize'.
-- 
-- New members may be added to this enumeration over time.
-- 
-- /Since: 1.50/
data LayoutSerializeFlags = 
      LayoutSerializeFlagsDefault
    -- ^ Default behavior
    | LayoutSerializeFlagsContext
    -- ^ Include context information
    | LayoutSerializeFlagsOutput
    -- ^ Include information about the formatted output
    | AnotherLayoutSerializeFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> LayoutSerializeFlags -> ShowS
[LayoutSerializeFlags] -> ShowS
LayoutSerializeFlags -> String
(Int -> LayoutSerializeFlags -> ShowS)
-> (LayoutSerializeFlags -> String)
-> ([LayoutSerializeFlags] -> ShowS)
-> Show LayoutSerializeFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LayoutSerializeFlags] -> ShowS
$cshowList :: [LayoutSerializeFlags] -> ShowS
show :: LayoutSerializeFlags -> String
$cshow :: LayoutSerializeFlags -> String
showsPrec :: Int -> LayoutSerializeFlags -> ShowS
$cshowsPrec :: Int -> LayoutSerializeFlags -> ShowS
Show, LayoutSerializeFlags -> LayoutSerializeFlags -> Bool
(LayoutSerializeFlags -> LayoutSerializeFlags -> Bool)
-> (LayoutSerializeFlags -> LayoutSerializeFlags -> Bool)
-> Eq LayoutSerializeFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LayoutSerializeFlags -> LayoutSerializeFlags -> Bool
$c/= :: LayoutSerializeFlags -> LayoutSerializeFlags -> Bool
== :: LayoutSerializeFlags -> LayoutSerializeFlags -> Bool
$c== :: LayoutSerializeFlags -> LayoutSerializeFlags -> Bool
Eq)

instance P.Enum LayoutSerializeFlags where
    fromEnum :: LayoutSerializeFlags -> Int
fromEnum LayoutSerializeFlags
LayoutSerializeFlagsDefault = Int
0
    fromEnum LayoutSerializeFlags
LayoutSerializeFlagsContext = Int
1
    fromEnum LayoutSerializeFlags
LayoutSerializeFlagsOutput = Int
2
    fromEnum (AnotherLayoutSerializeFlags Int
k) = Int
k

    toEnum :: Int -> LayoutSerializeFlags
toEnum Int
0 = LayoutSerializeFlags
LayoutSerializeFlagsDefault
    toEnum Int
1 = LayoutSerializeFlags
LayoutSerializeFlagsContext
    toEnum Int
2 = LayoutSerializeFlags
LayoutSerializeFlagsOutput
    toEnum Int
k = Int -> LayoutSerializeFlags
AnotherLayoutSerializeFlags Int
k

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

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

foreign import ccall "pango_layout_serialize_flags_get_type" c_pango_layout_serialize_flags_get_type :: 
    IO GType

instance B.Types.TypedObject LayoutSerializeFlags where
    glibType :: IO GType
glibType = IO GType
c_pango_layout_serialize_flags_get_type

instance B.Types.BoxedFlags LayoutSerializeFlags

instance IsGFlag LayoutSerializeFlags

-- Flags LayoutDeserializeFlags
-- | Flags that influence the behavior of [func/@pango@/.Layout.deserialize].
-- 
-- New members may be added to this enumeration over time.
-- 
-- /Since: 1.50/
data LayoutDeserializeFlags = 
      LayoutDeserializeFlagsDefault
    -- ^ Default behavior
    | LayoutDeserializeFlagsContext
    -- ^ Apply context information
    --   from the serialization to the @PangoContext@
    | AnotherLayoutDeserializeFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> LayoutDeserializeFlags -> ShowS
[LayoutDeserializeFlags] -> ShowS
LayoutDeserializeFlags -> String
(Int -> LayoutDeserializeFlags -> ShowS)
-> (LayoutDeserializeFlags -> String)
-> ([LayoutDeserializeFlags] -> ShowS)
-> Show LayoutDeserializeFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LayoutDeserializeFlags] -> ShowS
$cshowList :: [LayoutDeserializeFlags] -> ShowS
show :: LayoutDeserializeFlags -> String
$cshow :: LayoutDeserializeFlags -> String
showsPrec :: Int -> LayoutDeserializeFlags -> ShowS
$cshowsPrec :: Int -> LayoutDeserializeFlags -> ShowS
Show, LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool
(LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool)
-> (LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool)
-> Eq LayoutDeserializeFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool
$c/= :: LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool
== :: LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool
$c== :: LayoutDeserializeFlags -> LayoutDeserializeFlags -> Bool
Eq)

instance P.Enum LayoutDeserializeFlags where
    fromEnum :: LayoutDeserializeFlags -> Int
fromEnum LayoutDeserializeFlags
LayoutDeserializeFlagsDefault = Int
0
    fromEnum LayoutDeserializeFlags
LayoutDeserializeFlagsContext = Int
1
    fromEnum (AnotherLayoutDeserializeFlags Int
k) = Int
k

    toEnum :: Int -> LayoutDeserializeFlags
toEnum Int
0 = LayoutDeserializeFlags
LayoutDeserializeFlagsDefault
    toEnum Int
1 = LayoutDeserializeFlags
LayoutDeserializeFlagsContext
    toEnum Int
k = Int -> LayoutDeserializeFlags
AnotherLayoutDeserializeFlags Int
k

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

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

foreign import ccall "pango_layout_deserialize_flags_get_type" c_pango_layout_deserialize_flags_get_type :: 
    IO GType

instance B.Types.TypedObject LayoutDeserializeFlags where
    glibType :: IO GType
glibType = IO GType
c_pango_layout_deserialize_flags_get_type

instance B.Types.BoxedFlags LayoutDeserializeFlags

instance IsGFlag LayoutDeserializeFlags

-- Flags FontMask
-- | The bits in a @PangoFontMask@ correspond to the set fields in a
-- @PangoFontDescription@.
data FontMask = 
      FontMaskFamily
    -- ^ the font family is specified.
    | FontMaskStyle
    -- ^ the font style is specified.
    | FontMaskVariant
    -- ^ the font variant is specified.
    | FontMaskWeight
    -- ^ the font weight is specified.
    | FontMaskStretch
    -- ^ the font stretch is specified.
    | FontMaskSize
    -- ^ the font size is specified.
    | FontMaskGravity
    -- ^ the font gravity is specified (Since: 1.16.)
    | FontMaskVariations
    -- ^ OpenType font variations are specified (Since: 1.42)
    | AnotherFontMask Int
    -- ^ Catch-all for unknown values
    deriving (Int -> FontMask -> ShowS
[FontMask] -> ShowS
FontMask -> String
(Int -> FontMask -> ShowS)
-> (FontMask -> String) -> ([FontMask] -> ShowS) -> Show FontMask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FontMask] -> ShowS
$cshowList :: [FontMask] -> ShowS
show :: FontMask -> String
$cshow :: FontMask -> String
showsPrec :: Int -> FontMask -> ShowS
$cshowsPrec :: Int -> FontMask -> ShowS
Show, FontMask -> FontMask -> Bool
(FontMask -> FontMask -> Bool)
-> (FontMask -> FontMask -> Bool) -> Eq FontMask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FontMask -> FontMask -> Bool
$c/= :: FontMask -> FontMask -> Bool
== :: FontMask -> FontMask -> Bool
$c== :: FontMask -> FontMask -> Bool
Eq)

instance P.Enum FontMask where
    fromEnum :: FontMask -> Int
fromEnum FontMask
FontMaskFamily = Int
1
    fromEnum FontMask
FontMaskStyle = Int
2
    fromEnum FontMask
FontMaskVariant = Int
4
    fromEnum FontMask
FontMaskWeight = Int
8
    fromEnum FontMask
FontMaskStretch = Int
16
    fromEnum FontMask
FontMaskSize = Int
32
    fromEnum FontMask
FontMaskGravity = Int
64
    fromEnum FontMask
FontMaskVariations = Int
128
    fromEnum (AnotherFontMask Int
k) = Int
k

    toEnum :: Int -> FontMask
toEnum Int
1 = FontMask
FontMaskFamily
    toEnum Int
2 = FontMask
FontMaskStyle
    toEnum Int
4 = FontMask
FontMaskVariant
    toEnum Int
8 = FontMask
FontMaskWeight
    toEnum Int
16 = FontMask
FontMaskStretch
    toEnum Int
32 = FontMask
FontMaskSize
    toEnum Int
64 = FontMask
FontMaskGravity
    toEnum Int
128 = FontMask
FontMaskVariations
    toEnum Int
k = Int -> FontMask
AnotherFontMask Int
k

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

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

foreign import ccall "pango_font_mask_get_type" c_pango_font_mask_get_type :: 
    IO GType

instance B.Types.TypedObject FontMask where
    glibType :: IO GType
glibType = IO GType
c_pango_font_mask_get_type

instance B.Types.BoxedFlags FontMask

instance IsGFlag FontMask