{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Pango.Structs.FontDescription
(
FontDescription(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveFontDescriptionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FontDescriptionBetterMatchMethodInfo ,
#endif
fontDescriptionBetterMatch ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionCopyMethodInfo ,
#endif
fontDescriptionCopy ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionCopyStaticMethodInfo ,
#endif
fontDescriptionCopyStatic ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionEqualMethodInfo ,
#endif
fontDescriptionEqual ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionFreeMethodInfo ,
#endif
fontDescriptionFree ,
fontDescriptionFromString ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetFamilyMethodInfo ,
#endif
fontDescriptionGetFamily ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetGravityMethodInfo ,
#endif
fontDescriptionGetGravity ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetSetFieldsMethodInfo ,
#endif
fontDescriptionGetSetFields ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetSizeMethodInfo ,
#endif
fontDescriptionGetSize ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetSizeIsAbsoluteMethodInfo,
#endif
fontDescriptionGetSizeIsAbsolute ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetStretchMethodInfo ,
#endif
fontDescriptionGetStretch ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetStyleMethodInfo ,
#endif
fontDescriptionGetStyle ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetVariantMethodInfo ,
#endif
fontDescriptionGetVariant ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetVariationsMethodInfo ,
#endif
fontDescriptionGetVariations ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionGetWeightMethodInfo ,
#endif
fontDescriptionGetWeight ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionHashMethodInfo ,
#endif
fontDescriptionHash ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionMergeMethodInfo ,
#endif
fontDescriptionMerge ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionMergeStaticMethodInfo ,
#endif
fontDescriptionMergeStatic ,
fontDescriptionNew ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetAbsoluteSizeMethodInfo,
#endif
fontDescriptionSetAbsoluteSize ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetFamilyMethodInfo ,
#endif
fontDescriptionSetFamily ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetFamilyStaticMethodInfo,
#endif
fontDescriptionSetFamilyStatic ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetGravityMethodInfo ,
#endif
fontDescriptionSetGravity ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetSizeMethodInfo ,
#endif
fontDescriptionSetSize ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetStretchMethodInfo ,
#endif
fontDescriptionSetStretch ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetStyleMethodInfo ,
#endif
fontDescriptionSetStyle ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetVariantMethodInfo ,
#endif
fontDescriptionSetVariant ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetVariationsMethodInfo ,
#endif
fontDescriptionSetVariations ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetVariationsStaticMethodInfo,
#endif
fontDescriptionSetVariationsStatic ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionSetWeightMethodInfo ,
#endif
fontDescriptionSetWeight ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionToFilenameMethodInfo ,
#endif
fontDescriptionToFilename ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionToStringMethodInfo ,
#endif
fontDescriptionToString ,
#if defined(ENABLE_OVERLOADING)
FontDescriptionUnsetFieldsMethodInfo ,
#endif
fontDescriptionUnsetFields ,
) 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 {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums
import {-# SOURCE #-} qualified GI.Pango.Flags as Pango.Flags
newtype FontDescription = FontDescription (SP.ManagedPtr FontDescription)
deriving (FontDescription -> FontDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FontDescription -> FontDescription -> Bool
$c/= :: FontDescription -> FontDescription -> Bool
== :: FontDescription -> FontDescription -> Bool
$c== :: FontDescription -> FontDescription -> Bool
Eq)
instance SP.ManagedPtrNewtype FontDescription where
toManagedPtr :: FontDescription -> ManagedPtr FontDescription
toManagedPtr (FontDescription ManagedPtr FontDescription
p) = ManagedPtr FontDescription
p
foreign import ccall "pango_font_description_get_type" c_pango_font_description_get_type ::
IO GType
type instance O.ParentTypes FontDescription = '[]
instance O.HasParentTypes FontDescription
instance B.Types.TypedObject FontDescription where
glibType :: IO GType
glibType = IO GType
c_pango_font_description_get_type
instance B.Types.GBoxed FontDescription
instance B.GValue.IsGValue (Maybe FontDescription) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_pango_font_description_get_type
gvalueSet_ :: Ptr GValue -> Maybe FontDescription -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FontDescription
P.Nothing = forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr FontDescription)
gvalueSet_ Ptr GValue
gv (P.Just FontDescription
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FontDescription
obj (forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FontDescription)
gvalueGet_ Ptr GValue
gv = do
Ptr FontDescription
ptr <- forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr FontDescription)
if Ptr FontDescription
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr FontDescription -> FontDescription
FontDescription Ptr FontDescription
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FontDescription
type instance O.AttributeList FontDescription = FontDescriptionAttributeList
type FontDescriptionAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "pango_font_description_new" pango_font_description_new ::
IO (Ptr FontDescription)
fontDescriptionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FontDescription
fontDescriptionNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
m FontDescription
fontDescriptionNew = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
result <- IO (Ptr FontDescription)
pango_font_description_new
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontDescriptionNew" Ptr FontDescription
result
FontDescription
result' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontDescription -> FontDescription
FontDescription) Ptr FontDescription
result
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "pango_font_description_better_match" pango_font_description_better_match ::
Ptr FontDescription ->
Ptr FontDescription ->
Ptr FontDescription ->
IO CInt
fontDescriptionBetterMatch ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Maybe (FontDescription)
-> FontDescription
-> m Bool
fontDescriptionBetterMatch :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription
-> Maybe FontDescription -> FontDescription -> m Bool
fontDescriptionBetterMatch FontDescription
desc Maybe FontDescription
oldMatch FontDescription
newMatch = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription
maybeOldMatch <- case Maybe FontDescription
oldMatch of
Maybe FontDescription
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just FontDescription
jOldMatch -> do
Ptr FontDescription
jOldMatch' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
jOldMatch
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontDescription
jOldMatch'
Ptr FontDescription
newMatch' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
newMatch
CInt
result <- Ptr FontDescription
-> Ptr FontDescription -> Ptr FontDescription -> IO CInt
pango_font_description_better_match Ptr FontDescription
desc' Ptr FontDescription
maybeOldMatch Ptr FontDescription
newMatch'
let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe FontDescription
oldMatch forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
newMatch
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionBetterMatchMethodInfo
instance (signature ~ (Maybe (FontDescription) -> FontDescription -> m Bool), MonadIO m) => O.OverloadedMethod FontDescriptionBetterMatchMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionBetterMatch
instance O.OverloadedMethodInfo FontDescriptionBetterMatchMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionBetterMatch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionBetterMatch"
})
#endif
foreign import ccall "pango_font_description_copy" pango_font_description_copy ::
Ptr FontDescription ->
IO (Ptr FontDescription)
fontDescriptionCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m (Maybe FontDescription)
fontDescriptionCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m (Maybe FontDescription)
fontDescriptionCopy FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription
result <- Ptr FontDescription -> IO (Ptr FontDescription)
pango_font_description_copy Ptr FontDescription
desc'
Maybe FontDescription
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontDescription
result forall a b. (a -> b) -> a -> b
$ \Ptr FontDescription
result' -> do
FontDescription
result'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontDescription -> FontDescription
FontDescription) Ptr FontDescription
result'
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontDescription
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontDescriptionCopyMethodInfo
instance (signature ~ (m (Maybe FontDescription)), MonadIO m) => O.OverloadedMethod FontDescriptionCopyMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionCopy
instance O.OverloadedMethodInfo FontDescriptionCopyMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionCopy"
})
#endif
foreign import ccall "pango_font_description_copy_static" pango_font_description_copy_static ::
Ptr FontDescription ->
IO (Ptr FontDescription)
fontDescriptionCopyStatic ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m (Maybe FontDescription)
fontDescriptionCopyStatic :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m (Maybe FontDescription)
fontDescriptionCopyStatic FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription
result <- Ptr FontDescription -> IO (Ptr FontDescription)
pango_font_description_copy_static Ptr FontDescription
desc'
Maybe FontDescription
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontDescription
result forall a b. (a -> b) -> a -> b
$ \Ptr FontDescription
result' -> do
FontDescription
result'' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontDescription -> FontDescription
FontDescription) Ptr FontDescription
result'
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontDescription
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontDescriptionCopyStaticMethodInfo
instance (signature ~ (m (Maybe FontDescription)), MonadIO m) => O.OverloadedMethod FontDescriptionCopyStaticMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionCopyStatic
instance O.OverloadedMethodInfo FontDescriptionCopyStaticMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionCopyStatic",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionCopyStatic"
})
#endif
foreign import ccall "pango_font_description_equal" pango_font_description_equal ::
Ptr FontDescription ->
Ptr FontDescription ->
IO CInt
fontDescriptionEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> FontDescription
-> m Bool
fontDescriptionEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> FontDescription -> m Bool
fontDescriptionEqual FontDescription
desc1 FontDescription
desc2 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc1' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc1
Ptr FontDescription
desc2' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc2
CInt
result <- Ptr FontDescription -> Ptr FontDescription -> IO CInt
pango_font_description_equal Ptr FontDescription
desc1' Ptr FontDescription
desc2'
let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc1
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc2
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionEqualMethodInfo
instance (signature ~ (FontDescription -> m Bool), MonadIO m) => O.OverloadedMethod FontDescriptionEqualMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionEqual
instance O.OverloadedMethodInfo FontDescriptionEqualMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionEqual"
})
#endif
foreign import ccall "pango_font_description_free" pango_font_description_free ::
Ptr FontDescription ->
IO ()
fontDescriptionFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m ()
fontDescriptionFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m ()
fontDescriptionFree FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription -> IO ()
pango_font_description_free Ptr FontDescription
desc'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod FontDescriptionFreeMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionFree
instance O.OverloadedMethodInfo FontDescriptionFreeMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionFree"
})
#endif
foreign import ccall "pango_font_description_get_family" pango_font_description_get_family ::
Ptr FontDescription ->
IO CString
fontDescriptionGetFamily ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m (Maybe T.Text)
fontDescriptionGetFamily :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m (Maybe Text)
fontDescriptionGetFamily FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
result <- Ptr FontDescription -> IO CString
pango_font_description_get_family Ptr FontDescription
desc'
Maybe Text
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
cstringToText CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetFamilyMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod FontDescriptionGetFamilyMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetFamily
instance O.OverloadedMethodInfo FontDescriptionGetFamilyMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetFamily",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetFamily"
})
#endif
foreign import ccall "pango_font_description_get_gravity" pango_font_description_get_gravity ::
Ptr FontDescription ->
IO CUInt
fontDescriptionGetGravity ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Pango.Enums.Gravity
fontDescriptionGetGravity :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Gravity
fontDescriptionGetGravity FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CUInt
result <- Ptr FontDescription -> IO CUInt
pango_font_description_get_gravity Ptr FontDescription
desc'
let result' :: Gravity
result' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Gravity
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetGravityMethodInfo
instance (signature ~ (m Pango.Enums.Gravity), MonadIO m) => O.OverloadedMethod FontDescriptionGetGravityMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetGravity
instance O.OverloadedMethodInfo FontDescriptionGetGravityMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetGravity",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetGravity"
})
#endif
foreign import ccall "pango_font_description_get_set_fields" pango_font_description_get_set_fields ::
Ptr FontDescription ->
IO CUInt
fontDescriptionGetSetFields ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m [Pango.Flags.FontMask]
fontDescriptionGetSetFields :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m [FontMask]
fontDescriptionGetSetFields FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CUInt
result <- Ptr FontDescription -> IO CUInt
pango_font_description_get_set_fields Ptr FontDescription
desc'
let result' :: [FontMask]
result' = forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return [FontMask]
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetSetFieldsMethodInfo
instance (signature ~ (m [Pango.Flags.FontMask]), MonadIO m) => O.OverloadedMethod FontDescriptionGetSetFieldsMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetSetFields
instance O.OverloadedMethodInfo FontDescriptionGetSetFieldsMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetSetFields"
})
#endif
foreign import ccall "pango_font_description_get_size" pango_font_description_get_size ::
Ptr FontDescription ->
IO Int32
fontDescriptionGetSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Int32
fontDescriptionGetSize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Int32
fontDescriptionGetSize FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Int32
result <- Ptr FontDescription -> IO Int32
pango_font_description_get_size Ptr FontDescription
desc'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.OverloadedMethod FontDescriptionGetSizeMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetSize
instance O.OverloadedMethodInfo FontDescriptionGetSizeMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetSize"
})
#endif
foreign import ccall "pango_font_description_get_size_is_absolute" pango_font_description_get_size_is_absolute ::
Ptr FontDescription ->
IO CInt
fontDescriptionGetSizeIsAbsolute ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Bool
fontDescriptionGetSizeIsAbsolute :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Bool
fontDescriptionGetSizeIsAbsolute FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CInt
result <- Ptr FontDescription -> IO CInt
pango_font_description_get_size_is_absolute Ptr FontDescription
desc'
let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetSizeIsAbsoluteMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod FontDescriptionGetSizeIsAbsoluteMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetSizeIsAbsolute
instance O.OverloadedMethodInfo FontDescriptionGetSizeIsAbsoluteMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetSizeIsAbsolute",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetSizeIsAbsolute"
})
#endif
foreign import ccall "pango_font_description_get_stretch" pango_font_description_get_stretch ::
Ptr FontDescription ->
IO CUInt
fontDescriptionGetStretch ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Pango.Enums.Stretch
fontDescriptionGetStretch :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Stretch
fontDescriptionGetStretch FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CUInt
result <- Ptr FontDescription -> IO CUInt
pango_font_description_get_stretch Ptr FontDescription
desc'
let result' :: Stretch
result' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Stretch
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetStretchMethodInfo
instance (signature ~ (m Pango.Enums.Stretch), MonadIO m) => O.OverloadedMethod FontDescriptionGetStretchMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetStretch
instance O.OverloadedMethodInfo FontDescriptionGetStretchMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetStretch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetStretch"
})
#endif
foreign import ccall "pango_font_description_get_style" pango_font_description_get_style ::
Ptr FontDescription ->
IO CUInt
fontDescriptionGetStyle ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Pango.Enums.Style
fontDescriptionGetStyle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Style
fontDescriptionGetStyle FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CUInt
result <- Ptr FontDescription -> IO CUInt
pango_font_description_get_style Ptr FontDescription
desc'
let result' :: Style
result' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Style
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetStyleMethodInfo
instance (signature ~ (m Pango.Enums.Style), MonadIO m) => O.OverloadedMethod FontDescriptionGetStyleMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetStyle
instance O.OverloadedMethodInfo FontDescriptionGetStyleMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetStyle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetStyle"
})
#endif
foreign import ccall "pango_font_description_get_variant" pango_font_description_get_variant ::
Ptr FontDescription ->
IO CUInt
fontDescriptionGetVariant ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Pango.Enums.Variant
fontDescriptionGetVariant :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Variant
fontDescriptionGetVariant FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CUInt
result <- Ptr FontDescription -> IO CUInt
pango_font_description_get_variant Ptr FontDescription
desc'
let result' :: Variant
result' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Variant
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetVariantMethodInfo
instance (signature ~ (m Pango.Enums.Variant), MonadIO m) => O.OverloadedMethod FontDescriptionGetVariantMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetVariant
instance O.OverloadedMethodInfo FontDescriptionGetVariantMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetVariant",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetVariant"
})
#endif
foreign import ccall "pango_font_description_get_variations" pango_font_description_get_variations ::
Ptr FontDescription ->
IO CString
fontDescriptionGetVariations ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m (Maybe T.Text)
fontDescriptionGetVariations :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m (Maybe Text)
fontDescriptionGetVariations FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
result <- Ptr FontDescription -> IO CString
pango_font_description_get_variations Ptr FontDescription
desc'
Maybe Text
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
cstringToText CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetVariationsMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod FontDescriptionGetVariationsMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetVariations
instance O.OverloadedMethodInfo FontDescriptionGetVariationsMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetVariations",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetVariations"
})
#endif
foreign import ccall "pango_font_description_get_weight" pango_font_description_get_weight ::
Ptr FontDescription ->
IO CUInt
fontDescriptionGetWeight ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Pango.Enums.Weight
fontDescriptionGetWeight :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Weight
fontDescriptionGetWeight FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CUInt
result <- Ptr FontDescription -> IO CUInt
pango_font_description_get_weight Ptr FontDescription
desc'
let result' :: Weight
result' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Weight
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionGetWeightMethodInfo
instance (signature ~ (m Pango.Enums.Weight), MonadIO m) => O.OverloadedMethod FontDescriptionGetWeightMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionGetWeight
instance O.OverloadedMethodInfo FontDescriptionGetWeightMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionGetWeight",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionGetWeight"
})
#endif
foreign import ccall "pango_font_description_hash" pango_font_description_hash ::
Ptr FontDescription ->
IO Word32
fontDescriptionHash ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m Word32
fontDescriptionHash :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Word32
fontDescriptionHash FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Word32
result <- Ptr FontDescription -> IO Word32
pango_font_description_hash Ptr FontDescription
desc'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data FontDescriptionHashMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod FontDescriptionHashMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionHash
instance O.OverloadedMethodInfo FontDescriptionHashMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionHash",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionHash"
})
#endif
foreign import ccall "pango_font_description_merge" pango_font_description_merge ::
Ptr FontDescription ->
Ptr FontDescription ->
CInt ->
IO ()
fontDescriptionMerge ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Maybe (FontDescription)
-> Bool
-> m ()
fontDescriptionMerge :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Maybe FontDescription -> Bool -> m ()
fontDescriptionMerge FontDescription
desc Maybe FontDescription
descToMerge Bool
replaceExisting = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription
maybeDescToMerge <- case Maybe FontDescription
descToMerge of
Maybe FontDescription
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just FontDescription
jDescToMerge -> do
Ptr FontDescription
jDescToMerge' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
jDescToMerge
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontDescription
jDescToMerge'
let replaceExisting' :: CInt
replaceExisting' = (forall a b. (Integral a, Num b) => a -> b
P.fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
P.fromEnum) Bool
replaceExisting
Ptr FontDescription -> Ptr FontDescription -> CInt -> IO ()
pango_font_description_merge Ptr FontDescription
desc' Ptr FontDescription
maybeDescToMerge CInt
replaceExisting'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe FontDescription
descToMerge forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionMergeMethodInfo
instance (signature ~ (Maybe (FontDescription) -> Bool -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionMergeMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionMerge
instance O.OverloadedMethodInfo FontDescriptionMergeMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionMerge",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionMerge"
})
#endif
foreign import ccall "pango_font_description_merge_static" pango_font_description_merge_static ::
Ptr FontDescription ->
Ptr FontDescription ->
CInt ->
IO ()
fontDescriptionMergeStatic ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> FontDescription
-> Bool
-> m ()
fontDescriptionMergeStatic :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> FontDescription -> Bool -> m ()
fontDescriptionMergeStatic FontDescription
desc FontDescription
descToMerge Bool
replaceExisting = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription
descToMerge' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
descToMerge
let replaceExisting' :: CInt
replaceExisting' = (forall a b. (Integral a, Num b) => a -> b
P.fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
P.fromEnum) Bool
replaceExisting
Ptr FontDescription -> Ptr FontDescription -> CInt -> IO ()
pango_font_description_merge_static Ptr FontDescription
desc' Ptr FontDescription
descToMerge' CInt
replaceExisting'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
descToMerge
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionMergeStaticMethodInfo
instance (signature ~ (FontDescription -> Bool -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionMergeStaticMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionMergeStatic
instance O.OverloadedMethodInfo FontDescriptionMergeStaticMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionMergeStatic",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionMergeStatic"
})
#endif
foreign import ccall "pango_font_description_set_absolute_size" pango_font_description_set_absolute_size ::
Ptr FontDescription ->
CDouble ->
IO ()
fontDescriptionSetAbsoluteSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Double
-> m ()
fontDescriptionSetAbsoluteSize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Double -> m ()
fontDescriptionSetAbsoluteSize FontDescription
desc Double
size = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let size' :: CDouble
size' = forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
size
Ptr FontDescription -> CDouble -> IO ()
pango_font_description_set_absolute_size Ptr FontDescription
desc' CDouble
size'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetAbsoluteSizeMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetAbsoluteSizeMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetAbsoluteSize
instance O.OverloadedMethodInfo FontDescriptionSetAbsoluteSizeMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetAbsoluteSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetAbsoluteSize"
})
#endif
foreign import ccall "pango_font_description_set_family" pango_font_description_set_family ::
Ptr FontDescription ->
CString ->
IO ()
fontDescriptionSetFamily ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> T.Text
-> m ()
fontDescriptionSetFamily :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Text -> m ()
fontDescriptionSetFamily FontDescription
desc Text
family = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
family' <- Text -> IO CString
textToCString Text
family
Ptr FontDescription -> CString -> IO ()
pango_font_description_set_family Ptr FontDescription
desc' CString
family'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall a. Ptr a -> IO ()
freeMem CString
family'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetFamilyMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetFamilyMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetFamily
instance O.OverloadedMethodInfo FontDescriptionSetFamilyMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetFamily",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetFamily"
})
#endif
foreign import ccall "pango_font_description_set_family_static" pango_font_description_set_family_static ::
Ptr FontDescription ->
CString ->
IO ()
fontDescriptionSetFamilyStatic ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> T.Text
-> m ()
fontDescriptionSetFamilyStatic :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Text -> m ()
fontDescriptionSetFamilyStatic FontDescription
desc Text
family = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
family' <- Text -> IO CString
textToCString Text
family
Ptr FontDescription -> CString -> IO ()
pango_font_description_set_family_static Ptr FontDescription
desc' CString
family'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall a. Ptr a -> IO ()
freeMem CString
family'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetFamilyStaticMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetFamilyStaticMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetFamilyStatic
instance O.OverloadedMethodInfo FontDescriptionSetFamilyStaticMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetFamilyStatic",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetFamilyStatic"
})
#endif
foreign import ccall "pango_font_description_set_gravity" pango_font_description_set_gravity ::
Ptr FontDescription ->
CUInt ->
IO ()
fontDescriptionSetGravity ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Pango.Enums.Gravity
-> m ()
fontDescriptionSetGravity :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Gravity -> m ()
fontDescriptionSetGravity FontDescription
desc Gravity
gravity = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let gravity' :: CUInt
gravity' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Gravity
gravity
Ptr FontDescription -> CUInt -> IO ()
pango_font_description_set_gravity Ptr FontDescription
desc' CUInt
gravity'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetGravityMethodInfo
instance (signature ~ (Pango.Enums.Gravity -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetGravityMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetGravity
instance O.OverloadedMethodInfo FontDescriptionSetGravityMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetGravity",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetGravity"
})
#endif
foreign import ccall "pango_font_description_set_size" pango_font_description_set_size ::
Ptr FontDescription ->
Int32 ->
IO ()
fontDescriptionSetSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Int32
-> m ()
fontDescriptionSetSize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Int32 -> m ()
fontDescriptionSetSize FontDescription
desc Int32
size = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
Ptr FontDescription -> Int32 -> IO ()
pango_font_description_set_size Ptr FontDescription
desc' Int32
size
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetSizeMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetSizeMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetSize
instance O.OverloadedMethodInfo FontDescriptionSetSizeMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetSize"
})
#endif
foreign import ccall "pango_font_description_set_stretch" pango_font_description_set_stretch ::
Ptr FontDescription ->
CUInt ->
IO ()
fontDescriptionSetStretch ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Pango.Enums.Stretch
-> m ()
fontDescriptionSetStretch :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Stretch -> m ()
fontDescriptionSetStretch FontDescription
desc Stretch
stretch = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let stretch' :: CUInt
stretch' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Stretch
stretch
Ptr FontDescription -> CUInt -> IO ()
pango_font_description_set_stretch Ptr FontDescription
desc' CUInt
stretch'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetStretchMethodInfo
instance (signature ~ (Pango.Enums.Stretch -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetStretchMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetStretch
instance O.OverloadedMethodInfo FontDescriptionSetStretchMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetStretch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetStretch"
})
#endif
foreign import ccall "pango_font_description_set_style" pango_font_description_set_style ::
Ptr FontDescription ->
CUInt ->
IO ()
fontDescriptionSetStyle ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Pango.Enums.Style
-> m ()
fontDescriptionSetStyle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Style -> m ()
fontDescriptionSetStyle FontDescription
desc Style
style = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let style' :: CUInt
style' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Style
style
Ptr FontDescription -> CUInt -> IO ()
pango_font_description_set_style Ptr FontDescription
desc' CUInt
style'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetStyleMethodInfo
instance (signature ~ (Pango.Enums.Style -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetStyleMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetStyle
instance O.OverloadedMethodInfo FontDescriptionSetStyleMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetStyle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetStyle"
})
#endif
foreign import ccall "pango_font_description_set_variant" pango_font_description_set_variant ::
Ptr FontDescription ->
CUInt ->
IO ()
fontDescriptionSetVariant ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Pango.Enums.Variant
-> m ()
fontDescriptionSetVariant :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Variant -> m ()
fontDescriptionSetVariant FontDescription
desc Variant
variant = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let variant' :: CUInt
variant' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Variant
variant
Ptr FontDescription -> CUInt -> IO ()
pango_font_description_set_variant Ptr FontDescription
desc' CUInt
variant'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetVariantMethodInfo
instance (signature ~ (Pango.Enums.Variant -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetVariantMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetVariant
instance O.OverloadedMethodInfo FontDescriptionSetVariantMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetVariant",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetVariant"
})
#endif
foreign import ccall "pango_font_description_set_variations" pango_font_description_set_variations ::
Ptr FontDescription ->
CString ->
IO ()
fontDescriptionSetVariations ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Maybe (T.Text)
-> m ()
fontDescriptionSetVariations :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Maybe Text -> m ()
fontDescriptionSetVariations FontDescription
desc Maybe Text
variations = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
maybeVariations <- case Maybe Text
variations of
Maybe Text
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just Text
jVariations -> do
CString
jVariations' <- Text -> IO CString
textToCString Text
jVariations
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jVariations'
Ptr FontDescription -> CString -> IO ()
pango_font_description_set_variations Ptr FontDescription
desc' CString
maybeVariations
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall a. Ptr a -> IO ()
freeMem CString
maybeVariations
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetVariationsMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetVariationsMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetVariations
instance O.OverloadedMethodInfo FontDescriptionSetVariationsMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetVariations",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetVariations"
})
#endif
foreign import ccall "pango_font_description_set_variations_static" pango_font_description_set_variations_static ::
Ptr FontDescription ->
CString ->
IO ()
fontDescriptionSetVariationsStatic ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> T.Text
-> m ()
fontDescriptionSetVariationsStatic :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Text -> m ()
fontDescriptionSetVariationsStatic FontDescription
desc Text
variations = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
variations' <- Text -> IO CString
textToCString Text
variations
Ptr FontDescription -> CString -> IO ()
pango_font_description_set_variations_static Ptr FontDescription
desc' CString
variations'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall a. Ptr a -> IO ()
freeMem CString
variations'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetVariationsStaticMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetVariationsStaticMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetVariationsStatic
instance O.OverloadedMethodInfo FontDescriptionSetVariationsStaticMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetVariationsStatic",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetVariationsStatic"
})
#endif
foreign import ccall "pango_font_description_set_weight" pango_font_description_set_weight ::
Ptr FontDescription ->
CUInt ->
IO ()
fontDescriptionSetWeight ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> Pango.Enums.Weight
-> m ()
fontDescriptionSetWeight :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> Weight -> m ()
fontDescriptionSetWeight FontDescription
desc Weight
weight = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let weight' :: CUInt
weight' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Weight
weight
Ptr FontDescription -> CUInt -> IO ()
pango_font_description_set_weight Ptr FontDescription
desc' CUInt
weight'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionSetWeightMethodInfo
instance (signature ~ (Pango.Enums.Weight -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionSetWeightMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionSetWeight
instance O.OverloadedMethodInfo FontDescriptionSetWeightMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionSetWeight",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionSetWeight"
})
#endif
foreign import ccall "pango_font_description_to_filename" pango_font_description_to_filename ::
Ptr FontDescription ->
IO CString
fontDescriptionToFilename ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m (Maybe T.Text)
fontDescriptionToFilename :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m (Maybe Text)
fontDescriptionToFilename FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
result <- Ptr FontDescription -> IO CString
pango_font_description_to_filename Ptr FontDescription
desc'
Maybe Text
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
cstringToText CString
result'
forall a. Ptr a -> IO ()
freeMem CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontDescriptionToFilenameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod FontDescriptionToFilenameMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionToFilename
instance O.OverloadedMethodInfo FontDescriptionToFilenameMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionToFilename",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionToFilename"
})
#endif
foreign import ccall "pango_font_description_to_string" pango_font_description_to_string ::
Ptr FontDescription ->
IO CString
fontDescriptionToString ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> m T.Text
fontDescriptionToString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Text
fontDescriptionToString FontDescription
desc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
CString
result <- Ptr FontDescription -> IO CString
pango_font_description_to_string Ptr FontDescription
desc'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontDescriptionToString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
cstringToText CString
result
forall a. Ptr a -> IO ()
freeMem CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontDescriptionToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod FontDescriptionToStringMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionToString
instance O.OverloadedMethodInfo FontDescriptionToStringMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionToString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionToString"
})
#endif
foreign import ccall "pango_font_description_unset_fields" pango_font_description_unset_fields ::
Ptr FontDescription ->
CUInt ->
IO ()
fontDescriptionUnsetFields ::
(B.CallStack.HasCallStack, MonadIO m) =>
FontDescription
-> [Pango.Flags.FontMask]
-> m ()
fontDescriptionUnsetFields :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> [FontMask] -> m ()
fontDescriptionUnsetFields FontDescription
desc [FontMask]
toUnset = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontDescription
desc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
desc
let toUnset' :: CUInt
toUnset' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [FontMask]
toUnset
Ptr FontDescription -> CUInt -> IO ()
pango_font_description_unset_fields Ptr FontDescription
desc' CUInt
toUnset'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
desc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontDescriptionUnsetFieldsMethodInfo
instance (signature ~ ([Pango.Flags.FontMask] -> m ()), MonadIO m) => O.OverloadedMethod FontDescriptionUnsetFieldsMethodInfo FontDescription signature where
overloadedMethod = fontDescriptionUnsetFields
instance O.OverloadedMethodInfo FontDescriptionUnsetFieldsMethodInfo FontDescription where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Pango.Structs.FontDescription.fontDescriptionUnsetFields",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-pango-1.0.27/docs/GI-Pango-Structs-FontDescription.html#v:fontDescriptionUnsetFields"
})
#endif
foreign import ccall "pango_font_description_from_string" pango_font_description_from_string ::
CString ->
IO (Ptr FontDescription)
fontDescriptionFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m FontDescription
fontDescriptionFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m FontDescription
fontDescriptionFromString Text
str = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
CString
str' <- Text -> IO CString
textToCString Text
str
Ptr FontDescription
result <- CString -> IO (Ptr FontDescription)
pango_font_description_from_string CString
str'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontDescriptionFromString" Ptr FontDescription
result
FontDescription
result' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FontDescription -> FontDescription
FontDescription) Ptr FontDescription
result
forall a. Ptr a -> IO ()
freeMem CString
str'
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result'
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFontDescriptionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveFontDescriptionMethod "betterMatch" o = FontDescriptionBetterMatchMethodInfo
ResolveFontDescriptionMethod "copy" o = FontDescriptionCopyMethodInfo
ResolveFontDescriptionMethod "copyStatic" o = FontDescriptionCopyStaticMethodInfo
ResolveFontDescriptionMethod "equal" o = FontDescriptionEqualMethodInfo
ResolveFontDescriptionMethod "free" o = FontDescriptionFreeMethodInfo
ResolveFontDescriptionMethod "hash" o = FontDescriptionHashMethodInfo
ResolveFontDescriptionMethod "merge" o = FontDescriptionMergeMethodInfo
ResolveFontDescriptionMethod "mergeStatic" o = FontDescriptionMergeStaticMethodInfo
ResolveFontDescriptionMethod "toFilename" o = FontDescriptionToFilenameMethodInfo
ResolveFontDescriptionMethod "toString" o = FontDescriptionToStringMethodInfo
ResolveFontDescriptionMethod "unsetFields" o = FontDescriptionUnsetFieldsMethodInfo
ResolveFontDescriptionMethod "getFamily" o = FontDescriptionGetFamilyMethodInfo
ResolveFontDescriptionMethod "getGravity" o = FontDescriptionGetGravityMethodInfo
ResolveFontDescriptionMethod "getSetFields" o = FontDescriptionGetSetFieldsMethodInfo
ResolveFontDescriptionMethod "getSize" o = FontDescriptionGetSizeMethodInfo
ResolveFontDescriptionMethod "getSizeIsAbsolute" o = FontDescriptionGetSizeIsAbsoluteMethodInfo
ResolveFontDescriptionMethod "getStretch" o = FontDescriptionGetStretchMethodInfo
ResolveFontDescriptionMethod "getStyle" o = FontDescriptionGetStyleMethodInfo
ResolveFontDescriptionMethod "getVariant" o = FontDescriptionGetVariantMethodInfo
ResolveFontDescriptionMethod "getVariations" o = FontDescriptionGetVariationsMethodInfo
ResolveFontDescriptionMethod "getWeight" o = FontDescriptionGetWeightMethodInfo
ResolveFontDescriptionMethod "setAbsoluteSize" o = FontDescriptionSetAbsoluteSizeMethodInfo
ResolveFontDescriptionMethod "setFamily" o = FontDescriptionSetFamilyMethodInfo
ResolveFontDescriptionMethod "setFamilyStatic" o = FontDescriptionSetFamilyStaticMethodInfo
ResolveFontDescriptionMethod "setGravity" o = FontDescriptionSetGravityMethodInfo
ResolveFontDescriptionMethod "setSize" o = FontDescriptionSetSizeMethodInfo
ResolveFontDescriptionMethod "setStretch" o = FontDescriptionSetStretchMethodInfo
ResolveFontDescriptionMethod "setStyle" o = FontDescriptionSetStyleMethodInfo
ResolveFontDescriptionMethod "setVariant" o = FontDescriptionSetVariantMethodInfo
ResolveFontDescriptionMethod "setVariations" o = FontDescriptionSetVariationsMethodInfo
ResolveFontDescriptionMethod "setVariationsStatic" o = FontDescriptionSetVariationsStaticMethodInfo
ResolveFontDescriptionMethod "setWeight" o = FontDescriptionSetWeightMethodInfo
ResolveFontDescriptionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFontDescriptionMethod t FontDescription, O.OverloadedMethod info FontDescription p) => OL.IsLabel t (FontDescription -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveFontDescriptionMethod t FontDescription, O.OverloadedMethod info FontDescription p, R.HasField t FontDescription p) => R.HasField t FontDescription p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFontDescriptionMethod t FontDescription, O.OverloadedMethodInfo info FontDescription) => OL.IsLabel t (O.MethodProxy info FontDescription) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif