#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Pango.Flags
(
FontMask(..) ,
) 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
data FontMask =
FontMaskFamily
| FontMaskStyle
| FontMaskVariant
| FontMaskWeight
| FontMaskStretch
| FontMaskSize
| FontMaskGravity
| FontMaskVariations
| AnotherFontMask Int
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 FontMaskFamily = 1
fromEnum FontMaskStyle = 2
fromEnum FontMaskVariant = 4
fromEnum FontMaskWeight = 8
fromEnum FontMaskStretch = 16
fromEnum FontMaskSize = 32
fromEnum FontMaskGravity = 64
fromEnum FontMaskVariations = 128
fromEnum (AnotherFontMask k :: Int
k) = Int
k
toEnum :: Int -> FontMask
toEnum 1 = FontMask
FontMaskFamily
toEnum 2 = FontMask
FontMaskStyle
toEnum 4 = FontMask
FontMaskVariant
toEnum 8 = FontMask
FontMaskWeight
toEnum 16 = FontMask
FontMaskStretch
toEnum 32 = FontMask
FontMaskSize
toEnum 64 = FontMask
FontMaskGravity
toEnum 128 = FontMask
FontMaskVariations
toEnum k :: Int
k = Int -> FontMask
AnotherFontMask Int
k
instance P.Ord FontMask where
compare :: FontMask -> FontMask -> Ordering
compare a :: FontMask
a b :: 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)
foreign import ccall "pango_font_mask_get_type" c_pango_font_mask_get_type ::
IO GType
instance BoxedFlags FontMask where
boxedFlagsType :: Proxy FontMask -> IO GType
boxedFlagsType _ = IO GType
c_pango_font_mask_get_type
instance IsGFlag FontMask