{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.FontChooser
(
FontChooser(..) ,
IsFontChooser ,
toFontChooser ,
#if defined(ENABLE_OVERLOADING)
ResolveFontChooserMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontMethodInfo ,
#endif
fontChooserGetFont ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontDescMethodInfo ,
#endif
fontChooserGetFontDesc ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontFaceMethodInfo ,
#endif
fontChooserGetFontFace ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontFamilyMethodInfo ,
#endif
fontChooserGetFontFamily ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontFeaturesMethodInfo ,
#endif
fontChooserGetFontFeatures ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontMapMethodInfo ,
#endif
fontChooserGetFontMap ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetFontSizeMethodInfo ,
#endif
fontChooserGetFontSize ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetLanguageMethodInfo ,
#endif
fontChooserGetLanguage ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetLevelMethodInfo ,
#endif
fontChooserGetLevel ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetPreviewTextMethodInfo ,
#endif
fontChooserGetPreviewText ,
#if defined(ENABLE_OVERLOADING)
FontChooserGetShowPreviewEntryMethodInfo,
#endif
fontChooserGetShowPreviewEntry ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetFilterFuncMethodInfo ,
#endif
fontChooserSetFilterFunc ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetFontMethodInfo ,
#endif
fontChooserSetFont ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetFontDescMethodInfo ,
#endif
fontChooserSetFontDesc ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetFontMapMethodInfo ,
#endif
fontChooserSetFontMap ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetLanguageMethodInfo ,
#endif
fontChooserSetLanguage ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetLevelMethodInfo ,
#endif
fontChooserSetLevel ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetPreviewTextMethodInfo ,
#endif
fontChooserSetPreviewText ,
#if defined(ENABLE_OVERLOADING)
FontChooserSetShowPreviewEntryMethodInfo,
#endif
fontChooserSetShowPreviewEntry ,
#if defined(ENABLE_OVERLOADING)
FontChooserFontPropertyInfo ,
#endif
constructFontChooserFont ,
#if defined(ENABLE_OVERLOADING)
fontChooserFont ,
#endif
getFontChooserFont ,
setFontChooserFont ,
#if defined(ENABLE_OVERLOADING)
FontChooserFontDescPropertyInfo ,
#endif
constructFontChooserFontDesc ,
#if defined(ENABLE_OVERLOADING)
fontChooserFontDesc ,
#endif
getFontChooserFontDesc ,
setFontChooserFontDesc ,
#if defined(ENABLE_OVERLOADING)
FontChooserFontFeaturesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
fontChooserFontFeatures ,
#endif
getFontChooserFontFeatures ,
#if defined(ENABLE_OVERLOADING)
FontChooserLanguagePropertyInfo ,
#endif
constructFontChooserLanguage ,
#if defined(ENABLE_OVERLOADING)
fontChooserLanguage ,
#endif
getFontChooserLanguage ,
setFontChooserLanguage ,
#if defined(ENABLE_OVERLOADING)
FontChooserLevelPropertyInfo ,
#endif
constructFontChooserLevel ,
#if defined(ENABLE_OVERLOADING)
fontChooserLevel ,
#endif
getFontChooserLevel ,
setFontChooserLevel ,
#if defined(ENABLE_OVERLOADING)
FontChooserPreviewTextPropertyInfo ,
#endif
constructFontChooserPreviewText ,
#if defined(ENABLE_OVERLOADING)
fontChooserPreviewText ,
#endif
getFontChooserPreviewText ,
setFontChooserPreviewText ,
#if defined(ENABLE_OVERLOADING)
FontChooserShowPreviewEntryPropertyInfo ,
#endif
constructFontChooserShowPreviewEntry ,
#if defined(ENABLE_OVERLOADING)
fontChooserShowPreviewEntry ,
#endif
getFontChooserShowPreviewEntry ,
setFontChooserShowPreviewEntry ,
FontChooserFontActivatedCallback ,
#if defined(ENABLE_OVERLOADING)
FontChooserFontActivatedSignalInfo ,
#endif
afterFontChooserFontActivated ,
onFontChooserFontActivated ,
) 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 GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import qualified GI.Pango.Objects.FontFace as Pango.FontFace
import qualified GI.Pango.Objects.FontFamily as Pango.FontFamily
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription
newtype FontChooser = FontChooser (SP.ManagedPtr FontChooser)
deriving (FontChooser -> FontChooser -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FontChooser -> FontChooser -> Bool
$c/= :: FontChooser -> FontChooser -> Bool
== :: FontChooser -> FontChooser -> Bool
$c== :: FontChooser -> FontChooser -> Bool
Eq)
instance SP.ManagedPtrNewtype FontChooser where
toManagedPtr :: FontChooser -> ManagedPtr FontChooser
toManagedPtr (FontChooser ManagedPtr FontChooser
p) = ManagedPtr FontChooser
p
foreign import ccall "gtk_font_chooser_get_type"
c_gtk_font_chooser_get_type :: IO B.Types.GType
instance B.Types.TypedObject FontChooser where
glibType :: IO GType
glibType = IO GType
c_gtk_font_chooser_get_type
instance B.Types.GObject FontChooser
class (SP.GObject o, O.IsDescendantOf FontChooser o) => IsFontChooser o
instance (SP.GObject o, O.IsDescendantOf FontChooser o) => IsFontChooser o
instance O.HasParentTypes FontChooser
type instance O.ParentTypes FontChooser = '[GObject.Object.Object]
toFontChooser :: (MIO.MonadIO m, IsFontChooser o) => o -> m FontChooser
toFontChooser :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m FontChooser
toFontChooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr FontChooser -> FontChooser
FontChooser
instance B.GValue.IsGValue (Maybe FontChooser) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_font_chooser_get_type
gvalueSet_ :: Ptr GValue -> Maybe FontChooser -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FontChooser
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr FontChooser)
gvalueSet_ Ptr GValue
gv (P.Just FontChooser
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FontChooser
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FontChooser)
gvalueGet_ Ptr GValue
gv = do
Ptr FontChooser
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr FontChooser)
if Ptr FontChooser
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 b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FontChooser -> FontChooser
FontChooser Ptr FontChooser
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
getFontChooserFont :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserFont :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m (Maybe Text)
getFontChooserFont o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"font"
setFontChooserFont :: (MonadIO m, IsFontChooser o) => o -> T.Text -> m ()
setFontChooserFont :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> Text -> m ()
setFontChooserFont o
obj Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"font" (forall a. a -> Maybe a
Just Text
val)
constructFontChooserFont :: (IsFontChooser o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructFontChooserFont :: forall o (m :: * -> *).
(IsFontChooser o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructFontChooserFont Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"font" (forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data FontChooserFontPropertyInfo
instance AttrInfo FontChooserFontPropertyInfo where
type AttrAllowedOps FontChooserFontPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FontChooserFontPropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserFontPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint FontChooserFontPropertyInfo = (~) T.Text
type AttrTransferType FontChooserFontPropertyInfo = T.Text
type AttrGetType FontChooserFontPropertyInfo = (Maybe T.Text)
type AttrLabel FontChooserFontPropertyInfo = "font"
type AttrOrigin FontChooserFontPropertyInfo = FontChooser
attrGet = getFontChooserFont
attrSet = setFontChooserFont
attrTransfer _ v = do
return v
attrConstruct = constructFontChooserFont
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.font"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:font"
})
#endif
getFontChooserFontDesc :: (MonadIO m, IsFontChooser o) => o -> m (Maybe Pango.FontDescription.FontDescription)
getFontChooserFontDesc :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m (Maybe FontDescription)
getFontChooserFontDesc o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"font-desc" ManagedPtr FontDescription -> FontDescription
Pango.FontDescription.FontDescription
setFontChooserFontDesc :: (MonadIO m, IsFontChooser o) => o -> Pango.FontDescription.FontDescription -> m ()
setFontChooserFontDesc :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> FontDescription -> m ()
setFontChooserFontDesc o
obj FontDescription
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"font-desc" (forall a. a -> Maybe a
Just FontDescription
val)
constructFontChooserFontDesc :: (IsFontChooser o, MIO.MonadIO m) => Pango.FontDescription.FontDescription -> m (GValueConstruct o)
constructFontChooserFontDesc :: forall o (m :: * -> *).
(IsFontChooser o, MonadIO m) =>
FontDescription -> m (GValueConstruct o)
constructFontChooserFontDesc FontDescription
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"font-desc" (forall a. a -> Maybe a
P.Just FontDescription
val)
#if defined(ENABLE_OVERLOADING)
data FontChooserFontDescPropertyInfo
instance AttrInfo FontChooserFontDescPropertyInfo where
type AttrAllowedOps FontChooserFontDescPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FontChooserFontDescPropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserFontDescPropertyInfo = (~) Pango.FontDescription.FontDescription
type AttrTransferTypeConstraint FontChooserFontDescPropertyInfo = (~) Pango.FontDescription.FontDescription
type AttrTransferType FontChooserFontDescPropertyInfo = Pango.FontDescription.FontDescription
type AttrGetType FontChooserFontDescPropertyInfo = (Maybe Pango.FontDescription.FontDescription)
type AttrLabel FontChooserFontDescPropertyInfo = "font-desc"
type AttrOrigin FontChooserFontDescPropertyInfo = FontChooser
attrGet = getFontChooserFontDesc
attrSet = setFontChooserFontDesc
attrTransfer _ v = do
return v
attrConstruct = constructFontChooserFontDesc
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontDesc"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:fontDesc"
})
#endif
getFontChooserFontFeatures :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserFontFeatures :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m (Maybe Text)
getFontChooserFontFeatures o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"font-features"
#if defined(ENABLE_OVERLOADING)
data FontChooserFontFeaturesPropertyInfo
instance AttrInfo FontChooserFontFeaturesPropertyInfo where
type AttrAllowedOps FontChooserFontFeaturesPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint FontChooserFontFeaturesPropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserFontFeaturesPropertyInfo = (~) ()
type AttrTransferTypeConstraint FontChooserFontFeaturesPropertyInfo = (~) ()
type AttrTransferType FontChooserFontFeaturesPropertyInfo = ()
type AttrGetType FontChooserFontFeaturesPropertyInfo = (Maybe T.Text)
type AttrLabel FontChooserFontFeaturesPropertyInfo = "font-features"
type AttrOrigin FontChooserFontFeaturesPropertyInfo = FontChooser
attrGet = getFontChooserFontFeatures
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontFeatures"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:fontFeatures"
})
#endif
getFontChooserLanguage :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserLanguage :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m (Maybe Text)
getFontChooserLanguage o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"language"
setFontChooserLanguage :: (MonadIO m, IsFontChooser o) => o -> T.Text -> m ()
setFontChooserLanguage :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> Text -> m ()
setFontChooserLanguage o
obj Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"language" (forall a. a -> Maybe a
Just Text
val)
constructFontChooserLanguage :: (IsFontChooser o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructFontChooserLanguage :: forall o (m :: * -> *).
(IsFontChooser o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructFontChooserLanguage Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"language" (forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data FontChooserLanguagePropertyInfo
instance AttrInfo FontChooserLanguagePropertyInfo where
type AttrAllowedOps FontChooserLanguagePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FontChooserLanguagePropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserLanguagePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint FontChooserLanguagePropertyInfo = (~) T.Text
type AttrTransferType FontChooserLanguagePropertyInfo = T.Text
type AttrGetType FontChooserLanguagePropertyInfo = (Maybe T.Text)
type AttrLabel FontChooserLanguagePropertyInfo = "language"
type AttrOrigin FontChooserLanguagePropertyInfo = FontChooser
attrGet = getFontChooserLanguage
attrSet = setFontChooserLanguage
attrTransfer _ v = do
return v
attrConstruct = constructFontChooserLanguage
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.language"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:language"
})
#endif
getFontChooserLevel :: (MonadIO m, IsFontChooser o) => o -> m [Gtk.Flags.FontChooserLevel]
getFontChooserLevel :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m [FontChooserLevel]
getFontChooserLevel o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"level"
setFontChooserLevel :: (MonadIO m, IsFontChooser o) => o -> [Gtk.Flags.FontChooserLevel] -> m ()
setFontChooserLevel :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> [FontChooserLevel] -> m ()
setFontChooserLevel o
obj [FontChooserLevel]
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj String
"level" [FontChooserLevel]
val
constructFontChooserLevel :: (IsFontChooser o, MIO.MonadIO m) => [Gtk.Flags.FontChooserLevel] -> m (GValueConstruct o)
constructFontChooserLevel :: forall o (m :: * -> *).
(IsFontChooser o, MonadIO m) =>
[FontChooserLevel] -> m (GValueConstruct o)
constructFontChooserLevel [FontChooserLevel]
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"level" [FontChooserLevel]
val
#if defined(ENABLE_OVERLOADING)
data FontChooserLevelPropertyInfo
instance AttrInfo FontChooserLevelPropertyInfo where
type AttrAllowedOps FontChooserLevelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FontChooserLevelPropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserLevelPropertyInfo = (~) [Gtk.Flags.FontChooserLevel]
type AttrTransferTypeConstraint FontChooserLevelPropertyInfo = (~) [Gtk.Flags.FontChooserLevel]
type AttrTransferType FontChooserLevelPropertyInfo = [Gtk.Flags.FontChooserLevel]
type AttrGetType FontChooserLevelPropertyInfo = [Gtk.Flags.FontChooserLevel]
type AttrLabel FontChooserLevelPropertyInfo = "level"
type AttrOrigin FontChooserLevelPropertyInfo = FontChooser
attrGet = getFontChooserLevel
attrSet = setFontChooserLevel
attrTransfer _ v = do
return v
attrConstruct = constructFontChooserLevel
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.level"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:level"
})
#endif
getFontChooserPreviewText :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserPreviewText :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> m (Maybe Text)
getFontChooserPreviewText o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"preview-text"
setFontChooserPreviewText :: (MonadIO m, IsFontChooser o) => o -> T.Text -> m ()
setFontChooserPreviewText :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> Text -> m ()
setFontChooserPreviewText o
obj Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"preview-text" (forall a. a -> Maybe a
Just Text
val)
constructFontChooserPreviewText :: (IsFontChooser o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructFontChooserPreviewText :: forall o (m :: * -> *).
(IsFontChooser o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructFontChooserPreviewText Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"preview-text" (forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data FontChooserPreviewTextPropertyInfo
instance AttrInfo FontChooserPreviewTextPropertyInfo where
type AttrAllowedOps FontChooserPreviewTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FontChooserPreviewTextPropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserPreviewTextPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint FontChooserPreviewTextPropertyInfo = (~) T.Text
type AttrTransferType FontChooserPreviewTextPropertyInfo = T.Text
type AttrGetType FontChooserPreviewTextPropertyInfo = (Maybe T.Text)
type AttrLabel FontChooserPreviewTextPropertyInfo = "preview-text"
type AttrOrigin FontChooserPreviewTextPropertyInfo = FontChooser
attrGet = getFontChooserPreviewText
attrSet = setFontChooserPreviewText
attrTransfer _ v = do
return v
attrConstruct = constructFontChooserPreviewText
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.previewText"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:previewText"
})
#endif
getFontChooserShowPreviewEntry :: (MonadIO m, IsFontChooser o) => o -> m Bool
getFontChooserShowPreviewEntry :: forall (m :: * -> *) o. (MonadIO m, IsFontChooser o) => o -> m Bool
getFontChooserShowPreviewEntry o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"show-preview-entry"
setFontChooserShowPreviewEntry :: (MonadIO m, IsFontChooser o) => o -> Bool -> m ()
setFontChooserShowPreviewEntry :: forall (m :: * -> *) o.
(MonadIO m, IsFontChooser o) =>
o -> Bool -> m ()
setFontChooserShowPreviewEntry o
obj Bool
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"show-preview-entry" Bool
val
constructFontChooserShowPreviewEntry :: (IsFontChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFontChooserShowPreviewEntry :: forall o (m :: * -> *).
(IsFontChooser o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructFontChooserShowPreviewEntry Bool
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-preview-entry" Bool
val
#if defined(ENABLE_OVERLOADING)
data FontChooserShowPreviewEntryPropertyInfo
instance AttrInfo FontChooserShowPreviewEntryPropertyInfo where
type AttrAllowedOps FontChooserShowPreviewEntryPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FontChooserShowPreviewEntryPropertyInfo = IsFontChooser
type AttrSetTypeConstraint FontChooserShowPreviewEntryPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FontChooserShowPreviewEntryPropertyInfo = (~) Bool
type AttrTransferType FontChooserShowPreviewEntryPropertyInfo = Bool
type AttrGetType FontChooserShowPreviewEntryPropertyInfo = Bool
type AttrLabel FontChooserShowPreviewEntryPropertyInfo = "show-preview-entry"
type AttrOrigin FontChooserShowPreviewEntryPropertyInfo = FontChooser
attrGet = getFontChooserShowPreviewEntry
attrSet = setFontChooserShowPreviewEntry
attrTransfer _ v = do
return v
attrConstruct = constructFontChooserShowPreviewEntry
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.showPreviewEntry"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:attr:showPreviewEntry"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FontChooser
type instance O.AttributeList FontChooser = FontChooserAttributeList
type FontChooserAttributeList = ('[ '("font", FontChooserFontPropertyInfo), '("fontDesc", FontChooserFontDescPropertyInfo), '("fontFeatures", FontChooserFontFeaturesPropertyInfo), '("language", FontChooserLanguagePropertyInfo), '("level", FontChooserLevelPropertyInfo), '("previewText", FontChooserPreviewTextPropertyInfo), '("showPreviewEntry", FontChooserShowPreviewEntryPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
fontChooserFont :: AttrLabelProxy "font"
fontChooserFont = AttrLabelProxy
fontChooserFontDesc :: AttrLabelProxy "fontDesc"
fontChooserFontDesc = AttrLabelProxy
fontChooserFontFeatures :: AttrLabelProxy "fontFeatures"
fontChooserFontFeatures = AttrLabelProxy
fontChooserLanguage :: AttrLabelProxy "language"
fontChooserLanguage = AttrLabelProxy
fontChooserLevel :: AttrLabelProxy "level"
fontChooserLevel = AttrLabelProxy
fontChooserPreviewText :: AttrLabelProxy "previewText"
fontChooserPreviewText = AttrLabelProxy
fontChooserShowPreviewEntry :: AttrLabelProxy "showPreviewEntry"
fontChooserShowPreviewEntry = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFontChooserMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveFontChooserMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFontChooserMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFontChooserMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFontChooserMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFontChooserMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFontChooserMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFontChooserMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFontChooserMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFontChooserMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFontChooserMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFontChooserMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFontChooserMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFontChooserMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFontChooserMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFontChooserMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFontChooserMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFontChooserMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFontChooserMethod "getFont" o = FontChooserGetFontMethodInfo
ResolveFontChooserMethod "getFontDesc" o = FontChooserGetFontDescMethodInfo
ResolveFontChooserMethod "getFontFace" o = FontChooserGetFontFaceMethodInfo
ResolveFontChooserMethod "getFontFamily" o = FontChooserGetFontFamilyMethodInfo
ResolveFontChooserMethod "getFontFeatures" o = FontChooserGetFontFeaturesMethodInfo
ResolveFontChooserMethod "getFontMap" o = FontChooserGetFontMapMethodInfo
ResolveFontChooserMethod "getFontSize" o = FontChooserGetFontSizeMethodInfo
ResolveFontChooserMethod "getLanguage" o = FontChooserGetLanguageMethodInfo
ResolveFontChooserMethod "getLevel" o = FontChooserGetLevelMethodInfo
ResolveFontChooserMethod "getPreviewText" o = FontChooserGetPreviewTextMethodInfo
ResolveFontChooserMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFontChooserMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFontChooserMethod "getShowPreviewEntry" o = FontChooserGetShowPreviewEntryMethodInfo
ResolveFontChooserMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFontChooserMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFontChooserMethod "setFilterFunc" o = FontChooserSetFilterFuncMethodInfo
ResolveFontChooserMethod "setFont" o = FontChooserSetFontMethodInfo
ResolveFontChooserMethod "setFontDesc" o = FontChooserSetFontDescMethodInfo
ResolveFontChooserMethod "setFontMap" o = FontChooserSetFontMapMethodInfo
ResolveFontChooserMethod "setLanguage" o = FontChooserSetLanguageMethodInfo
ResolveFontChooserMethod "setLevel" o = FontChooserSetLevelMethodInfo
ResolveFontChooserMethod "setPreviewText" o = FontChooserSetPreviewTextMethodInfo
ResolveFontChooserMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFontChooserMethod "setShowPreviewEntry" o = FontChooserSetShowPreviewEntryMethodInfo
ResolveFontChooserMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFontChooserMethod t FontChooser, O.OverloadedMethod info FontChooser p) => OL.IsLabel t (FontChooser -> 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 ~ ResolveFontChooserMethod t FontChooser, O.OverloadedMethod info FontChooser p, R.HasField t FontChooser p) => R.HasField t FontChooser p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFontChooserMethod t FontChooser, O.OverloadedMethodInfo info FontChooser) => OL.IsLabel t (O.MethodProxy info FontChooser) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "gtk_font_chooser_get_font" gtk_font_chooser_get_font ::
Ptr FontChooser ->
IO CString
fontChooserGetFont ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m (Maybe T.Text)
fontChooserGetFont :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m (Maybe Text)
fontChooserGetFont a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
result <- Ptr FontChooser -> IO CString
gtk_font_chooser_get_font Ptr FontChooser
fontchooser'
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 a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontMethodInfo a signature where
overloadedMethod = fontChooserGetFont
instance O.OverloadedMethodInfo FontChooserGetFontMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFont",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFont"
})
#endif
foreign import ccall "gtk_font_chooser_get_font_desc" gtk_font_chooser_get_font_desc ::
Ptr FontChooser ->
IO (Ptr Pango.FontDescription.FontDescription)
fontChooserGetFontDesc ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m (Maybe Pango.FontDescription.FontDescription)
fontChooserGetFontDesc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m (Maybe FontDescription)
fontChooserGetFontDesc a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Ptr FontDescription
result <- Ptr FontChooser -> IO (Ptr FontDescription)
gtk_font_chooser_get_font_desc Ptr FontChooser
fontchooser'
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
Pango.FontDescription.FontDescription) Ptr FontDescription
result'
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontDescription
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontDescMethodInfo
instance (signature ~ (m (Maybe Pango.FontDescription.FontDescription)), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontDescMethodInfo a signature where
overloadedMethod = fontChooserGetFontDesc
instance O.OverloadedMethodInfo FontChooserGetFontDescMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFontDesc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFontDesc"
})
#endif
foreign import ccall "gtk_font_chooser_get_font_face" gtk_font_chooser_get_font_face ::
Ptr FontChooser ->
IO (Ptr Pango.FontFace.FontFace)
fontChooserGetFontFace ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m (Maybe Pango.FontFace.FontFace)
fontChooserGetFontFace :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m (Maybe FontFace)
fontChooserGetFontFace a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Ptr FontFace
result <- Ptr FontChooser -> IO (Ptr FontFace)
gtk_font_chooser_get_font_face Ptr FontChooser
fontchooser'
Maybe FontFace
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontFace
result forall a b. (a -> b) -> a -> b
$ \Ptr FontFace
result' -> do
FontFace
result'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FontFace -> FontFace
Pango.FontFace.FontFace) Ptr FontFace
result'
forall (m :: * -> *) a. Monad m => a -> m a
return FontFace
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontFace
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontFaceMethodInfo
instance (signature ~ (m (Maybe Pango.FontFace.FontFace)), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontFaceMethodInfo a signature where
overloadedMethod = fontChooserGetFontFace
instance O.OverloadedMethodInfo FontChooserGetFontFaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFontFace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFontFace"
})
#endif
foreign import ccall "gtk_font_chooser_get_font_family" gtk_font_chooser_get_font_family ::
Ptr FontChooser ->
IO (Ptr Pango.FontFamily.FontFamily)
fontChooserGetFontFamily ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m (Maybe Pango.FontFamily.FontFamily)
fontChooserGetFontFamily :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m (Maybe FontFamily)
fontChooserGetFontFamily a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Ptr FontFamily
result <- Ptr FontChooser -> IO (Ptr FontFamily)
gtk_font_chooser_get_font_family Ptr FontChooser
fontchooser'
Maybe FontFamily
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontFamily
result forall a b. (a -> b) -> a -> b
$ \Ptr FontFamily
result' -> do
FontFamily
result'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FontFamily -> FontFamily
Pango.FontFamily.FontFamily) Ptr FontFamily
result'
forall (m :: * -> *) a. Monad m => a -> m a
return FontFamily
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontFamily
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontFamilyMethodInfo
instance (signature ~ (m (Maybe Pango.FontFamily.FontFamily)), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontFamilyMethodInfo a signature where
overloadedMethod = fontChooserGetFontFamily
instance O.OverloadedMethodInfo FontChooserGetFontFamilyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFontFamily",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFontFamily"
})
#endif
foreign import ccall "gtk_font_chooser_get_font_features" gtk_font_chooser_get_font_features ::
Ptr FontChooser ->
IO CString
fontChooserGetFontFeatures ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m T.Text
fontChooserGetFontFeatures :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m Text
fontChooserGetFontFeatures a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
result <- Ptr FontChooser -> IO CString
gtk_font_chooser_get_font_features Ptr FontChooser
fontchooser'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontChooserGetFontFeatures" 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 a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontFeaturesMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontFeaturesMethodInfo a signature where
overloadedMethod = fontChooserGetFontFeatures
instance O.OverloadedMethodInfo FontChooserGetFontFeaturesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFontFeatures",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFontFeatures"
})
#endif
foreign import ccall "gtk_font_chooser_get_font_map" gtk_font_chooser_get_font_map ::
Ptr FontChooser ->
IO (Ptr Pango.FontMap.FontMap)
fontChooserGetFontMap ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m (Maybe Pango.FontMap.FontMap)
fontChooserGetFontMap :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m (Maybe FontMap)
fontChooserGetFontMap a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Ptr FontMap
result <- Ptr FontChooser -> IO (Ptr FontMap)
gtk_font_chooser_get_font_map Ptr FontChooser
fontchooser'
Maybe FontMap
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontMap
result forall a b. (a -> b) -> a -> b
$ \Ptr FontMap
result' -> do
FontMap
result'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr FontMap -> FontMap
Pango.FontMap.FontMap) Ptr FontMap
result'
forall (m :: * -> *) a. Monad m => a -> m a
return FontMap
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontMap
maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontMapMethodInfo
instance (signature ~ (m (Maybe Pango.FontMap.FontMap)), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontMapMethodInfo a signature where
overloadedMethod = fontChooserGetFontMap
instance O.OverloadedMethodInfo FontChooserGetFontMapMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFontMap",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFontMap"
})
#endif
foreign import ccall "gtk_font_chooser_get_font_size" gtk_font_chooser_get_font_size ::
Ptr FontChooser ->
IO Int32
fontChooserGetFontSize ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m Int32
fontChooserGetFontSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m Int32
fontChooserGetFontSize a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Int32
result <- Ptr FontChooser -> IO Int32
gtk_font_chooser_get_font_size Ptr FontChooser
fontchooser'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetFontSizeMethodInfo a signature where
overloadedMethod = fontChooserGetFontSize
instance O.OverloadedMethodInfo FontChooserGetFontSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetFontSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetFontSize"
})
#endif
foreign import ccall "gtk_font_chooser_get_language" gtk_font_chooser_get_language ::
Ptr FontChooser ->
IO CString
fontChooserGetLanguage ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m T.Text
fontChooserGetLanguage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m Text
fontChooserGetLanguage a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
result <- Ptr FontChooser -> IO CString
gtk_font_chooser_get_language Ptr FontChooser
fontchooser'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontChooserGetLanguage" 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 a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetLanguageMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetLanguageMethodInfo a signature where
overloadedMethod = fontChooserGetLanguage
instance O.OverloadedMethodInfo FontChooserGetLanguageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetLanguage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetLanguage"
})
#endif
foreign import ccall "gtk_font_chooser_get_level" gtk_font_chooser_get_level ::
Ptr FontChooser ->
IO CUInt
fontChooserGetLevel ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m [Gtk.Flags.FontChooserLevel]
fontChooserGetLevel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m [FontChooserLevel]
fontChooserGetLevel a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CUInt
result <- Ptr FontChooser -> IO CUInt
gtk_font_chooser_get_level Ptr FontChooser
fontchooser'
let result' :: [FontChooserLevel]
result' = forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return [FontChooserLevel]
result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetLevelMethodInfo
instance (signature ~ (m [Gtk.Flags.FontChooserLevel]), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetLevelMethodInfo a signature where
overloadedMethod = fontChooserGetLevel
instance O.OverloadedMethodInfo FontChooserGetLevelMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetLevel",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetLevel"
})
#endif
foreign import ccall "gtk_font_chooser_get_preview_text" gtk_font_chooser_get_preview_text ::
Ptr FontChooser ->
IO CString
fontChooserGetPreviewText ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m T.Text
fontChooserGetPreviewText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m Text
fontChooserGetPreviewText a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
result <- Ptr FontChooser -> IO CString
gtk_font_chooser_get_preview_text Ptr FontChooser
fontchooser'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fontChooserGetPreviewText" 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 a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetPreviewTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetPreviewTextMethodInfo a signature where
overloadedMethod = fontChooserGetPreviewText
instance O.OverloadedMethodInfo FontChooserGetPreviewTextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetPreviewText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetPreviewText"
})
#endif
foreign import ccall "gtk_font_chooser_get_show_preview_entry" gtk_font_chooser_get_show_preview_entry ::
Ptr FontChooser ->
IO CInt
fontChooserGetShowPreviewEntry ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> m Bool
fontChooserGetShowPreviewEntry :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> m Bool
fontChooserGetShowPreviewEntry a
fontchooser = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CInt
result <- Ptr FontChooser -> IO CInt
gtk_font_chooser_get_show_preview_entry Ptr FontChooser
fontchooser'
let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetShowPreviewEntryMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserGetShowPreviewEntryMethodInfo a signature where
overloadedMethod = fontChooserGetShowPreviewEntry
instance O.OverloadedMethodInfo FontChooserGetShowPreviewEntryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserGetShowPreviewEntry",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserGetShowPreviewEntry"
})
#endif
foreign import ccall "gtk_font_chooser_set_filter_func" gtk_font_chooser_set_filter_func ::
Ptr FontChooser ->
FunPtr Gtk.Callbacks.C_FontFilterFunc ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
fontChooserSetFilterFunc ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> Maybe (Gtk.Callbacks.FontFilterFunc)
-> m ()
fontChooserSetFilterFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> Maybe FontFilterFunc -> m ()
fontChooserSetFilterFunc a
fontchooser Maybe FontFilterFunc
filter = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
FunPtr C_FontFilterFunc
maybeFilter <- case Maybe FontFilterFunc
filter of
Maybe FontFilterFunc
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return (forall a b. Ptr a -> FunPtr b
castPtrToFunPtr forall a. Ptr a
nullPtr)
Just FontFilterFunc
jFilter -> do
FunPtr C_FontFilterFunc
jFilter' <- C_FontFilterFunc -> IO (FunPtr C_FontFilterFunc)
Gtk.Callbacks.mk_FontFilterFunc (Maybe (Ptr (FunPtr C_FontFilterFunc))
-> FontFilterFunc_WithClosures -> C_FontFilterFunc
Gtk.Callbacks.wrap_FontFilterFunc forall a. Maybe a
Nothing (FontFilterFunc -> FontFilterFunc_WithClosures
Gtk.Callbacks.drop_closures_FontFilterFunc FontFilterFunc
jFilter))
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_FontFilterFunc
jFilter'
let userData :: Ptr ()
userData = forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_FontFilterFunc
maybeFilter
let destroy :: FunPtr (Ptr a -> IO ())
destroy = forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr FontChooser
-> FunPtr C_FontFilterFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_font_chooser_set_filter_func Ptr FontChooser
fontchooser' FunPtr C_FontFilterFunc
maybeFilter Ptr ()
userData forall a. FunPtr (Ptr a -> IO ())
destroy
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFilterFuncMethodInfo
instance (signature ~ (Maybe (Gtk.Callbacks.FontFilterFunc) -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetFilterFuncMethodInfo a signature where
overloadedMethod = fontChooserSetFilterFunc
instance O.OverloadedMethodInfo FontChooserSetFilterFuncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetFilterFunc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetFilterFunc"
})
#endif
foreign import ccall "gtk_font_chooser_set_font" gtk_font_chooser_set_font ::
Ptr FontChooser ->
CString ->
IO ()
fontChooserSetFont ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> T.Text
-> m ()
fontChooserSetFont :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> Text -> m ()
fontChooserSetFont a
fontchooser Text
fontname = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
fontname' <- Text -> IO CString
textToCString Text
fontname
Ptr FontChooser -> CString -> IO ()
gtk_font_chooser_set_font Ptr FontChooser
fontchooser' CString
fontname'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall a. Ptr a -> IO ()
freeMem CString
fontname'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFontMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetFontMethodInfo a signature where
overloadedMethod = fontChooserSetFont
instance O.OverloadedMethodInfo FontChooserSetFontMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetFont",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetFont"
})
#endif
foreign import ccall "gtk_font_chooser_set_font_desc" gtk_font_chooser_set_font_desc ::
Ptr FontChooser ->
Ptr Pango.FontDescription.FontDescription ->
IO ()
fontChooserSetFontDesc ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> Pango.FontDescription.FontDescription
-> m ()
fontChooserSetFontDesc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> FontDescription -> m ()
fontChooserSetFontDesc a
fontchooser FontDescription
fontDesc = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Ptr FontDescription
fontDesc' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
fontDesc
Ptr FontChooser -> Ptr FontDescription -> IO ()
gtk_font_chooser_set_font_desc Ptr FontChooser
fontchooser' Ptr FontDescription
fontDesc'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
fontDesc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFontDescMethodInfo
instance (signature ~ (Pango.FontDescription.FontDescription -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetFontDescMethodInfo a signature where
overloadedMethod = fontChooserSetFontDesc
instance O.OverloadedMethodInfo FontChooserSetFontDescMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetFontDesc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetFontDesc"
})
#endif
foreign import ccall "gtk_font_chooser_set_font_map" gtk_font_chooser_set_font_map ::
Ptr FontChooser ->
Ptr Pango.FontMap.FontMap ->
IO ()
fontChooserSetFontMap ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a, Pango.FontMap.IsFontMap b) =>
a
-> Maybe (b)
-> m ()
fontChooserSetFontMap :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFontChooser a, IsFontMap b) =>
a -> Maybe b -> m ()
fontChooserSetFontMap a
fontchooser Maybe b
fontmap = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
Ptr FontMap
maybeFontmap <- case Maybe b
fontmap of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jFontmap -> do
Ptr FontMap
jFontmap' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFontmap
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontMap
jFontmap'
Ptr FontChooser -> Ptr FontMap -> IO ()
gtk_font_chooser_set_font_map Ptr FontChooser
fontchooser' Ptr FontMap
maybeFontmap
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
fontmap forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFontMapMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsFontChooser a, Pango.FontMap.IsFontMap b) => O.OverloadedMethod FontChooserSetFontMapMethodInfo a signature where
overloadedMethod = fontChooserSetFontMap
instance O.OverloadedMethodInfo FontChooserSetFontMapMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetFontMap",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetFontMap"
})
#endif
foreign import ccall "gtk_font_chooser_set_language" gtk_font_chooser_set_language ::
Ptr FontChooser ->
CString ->
IO ()
fontChooserSetLanguage ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> T.Text
-> m ()
fontChooserSetLanguage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> Text -> m ()
fontChooserSetLanguage a
fontchooser Text
language = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
language' <- Text -> IO CString
textToCString Text
language
Ptr FontChooser -> CString -> IO ()
gtk_font_chooser_set_language Ptr FontChooser
fontchooser' CString
language'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall a. Ptr a -> IO ()
freeMem CString
language'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetLanguageMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetLanguageMethodInfo a signature where
overloadedMethod = fontChooserSetLanguage
instance O.OverloadedMethodInfo FontChooserSetLanguageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetLanguage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetLanguage"
})
#endif
foreign import ccall "gtk_font_chooser_set_level" gtk_font_chooser_set_level ::
Ptr FontChooser ->
CUInt ->
IO ()
fontChooserSetLevel ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> [Gtk.Flags.FontChooserLevel]
-> m ()
fontChooserSetLevel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> [FontChooserLevel] -> m ()
fontChooserSetLevel a
fontchooser [FontChooserLevel]
level = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
let level' :: CUInt
level' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [FontChooserLevel]
level
Ptr FontChooser -> CUInt -> IO ()
gtk_font_chooser_set_level Ptr FontChooser
fontchooser' CUInt
level'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetLevelMethodInfo
instance (signature ~ ([Gtk.Flags.FontChooserLevel] -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetLevelMethodInfo a signature where
overloadedMethod = fontChooserSetLevel
instance O.OverloadedMethodInfo FontChooserSetLevelMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetLevel",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetLevel"
})
#endif
foreign import ccall "gtk_font_chooser_set_preview_text" gtk_font_chooser_set_preview_text ::
Ptr FontChooser ->
CString ->
IO ()
fontChooserSetPreviewText ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> T.Text
-> m ()
fontChooserSetPreviewText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> Text -> m ()
fontChooserSetPreviewText a
fontchooser Text
text = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
CString
text' <- Text -> IO CString
textToCString Text
text
Ptr FontChooser -> CString -> IO ()
gtk_font_chooser_set_preview_text Ptr FontChooser
fontchooser' CString
text'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall a. Ptr a -> IO ()
freeMem CString
text'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetPreviewTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetPreviewTextMethodInfo a signature where
overloadedMethod = fontChooserSetPreviewText
instance O.OverloadedMethodInfo FontChooserSetPreviewTextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetPreviewText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetPreviewText"
})
#endif
foreign import ccall "gtk_font_chooser_set_show_preview_entry" gtk_font_chooser_set_show_preview_entry ::
Ptr FontChooser ->
CInt ->
IO ()
fontChooserSetShowPreviewEntry ::
(B.CallStack.HasCallStack, MonadIO m, IsFontChooser a) =>
a
-> Bool
-> m ()
fontChooserSetShowPreviewEntry :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFontChooser a) =>
a -> Bool -> m ()
fontChooserSetShowPreviewEntry a
fontchooser Bool
showPreviewEntry = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr FontChooser
fontchooser' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
fontchooser
let showPreviewEntry' :: CInt
showPreviewEntry' = (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
showPreviewEntry
Ptr FontChooser -> CInt -> IO ()
gtk_font_chooser_set_show_preview_entry Ptr FontChooser
fontchooser' CInt
showPreviewEntry'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
fontchooser
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetShowPreviewEntryMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFontChooser a) => O.OverloadedMethod FontChooserSetShowPreviewEntryMethodInfo a signature where
overloadedMethod = fontChooserSetShowPreviewEntry
instance O.OverloadedMethodInfo FontChooserSetShowPreviewEntryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser.fontChooserSetShowPreviewEntry",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#v:fontChooserSetShowPreviewEntry"
})
#endif
type FontChooserFontActivatedCallback =
T.Text
-> IO ()
type C_FontChooserFontActivatedCallback =
Ptr FontChooser ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_FontChooserFontActivatedCallback :: C_FontChooserFontActivatedCallback -> IO (FunPtr C_FontChooserFontActivatedCallback)
wrap_FontChooserFontActivatedCallback ::
GObject a => (a -> FontChooserFontActivatedCallback) ->
C_FontChooserFontActivatedCallback
wrap_FontChooserFontActivatedCallback :: forall a.
GObject a =>
(a -> FontChooserFontActivatedCallback)
-> C_FontChooserFontActivatedCallback
wrap_FontChooserFontActivatedCallback a -> FontChooserFontActivatedCallback
gi'cb Ptr FontChooser
gi'selfPtr CString
fontname Ptr ()
_ = do
Text
fontname' <- HasCallStack => CString -> IO Text
cstringToText CString
fontname
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr FontChooser
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \FontChooser
gi'self -> a -> FontChooserFontActivatedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce FontChooser
gi'self) Text
fontname'
onFontChooserFontActivated :: (IsFontChooser a, MonadIO m) => a -> ((?self :: a) => FontChooserFontActivatedCallback) -> m SignalHandlerId
onFontChooserFontActivated :: forall a (m :: * -> *).
(IsFontChooser a, MonadIO m) =>
a
-> ((?self::a) => FontChooserFontActivatedCallback)
-> m SignalHandlerId
onFontChooserFontActivated a
obj (?self::a) => FontChooserFontActivatedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> FontChooserFontActivatedCallback
wrapped a
self = let ?self = a
self in (?self::a) => FontChooserFontActivatedCallback
cb
let wrapped' :: C_FontChooserFontActivatedCallback
wrapped' = forall a.
GObject a =>
(a -> FontChooserFontActivatedCallback)
-> C_FontChooserFontActivatedCallback
wrap_FontChooserFontActivatedCallback a -> FontChooserFontActivatedCallback
wrapped
FunPtr C_FontChooserFontActivatedCallback
wrapped'' <- C_FontChooserFontActivatedCallback
-> IO (FunPtr C_FontChooserFontActivatedCallback)
mk_FontChooserFontActivatedCallback C_FontChooserFontActivatedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"font-activated" FunPtr C_FontChooserFontActivatedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing
afterFontChooserFontActivated :: (IsFontChooser a, MonadIO m) => a -> ((?self :: a) => FontChooserFontActivatedCallback) -> m SignalHandlerId
afterFontChooserFontActivated :: forall a (m :: * -> *).
(IsFontChooser a, MonadIO m) =>
a
-> ((?self::a) => FontChooserFontActivatedCallback)
-> m SignalHandlerId
afterFontChooserFontActivated a
obj (?self::a) => FontChooserFontActivatedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> FontChooserFontActivatedCallback
wrapped a
self = let ?self = a
self in (?self::a) => FontChooserFontActivatedCallback
cb
let wrapped' :: C_FontChooserFontActivatedCallback
wrapped' = forall a.
GObject a =>
(a -> FontChooserFontActivatedCallback)
-> C_FontChooserFontActivatedCallback
wrap_FontChooserFontActivatedCallback a -> FontChooserFontActivatedCallback
wrapped
FunPtr C_FontChooserFontActivatedCallback
wrapped'' <- C_FontChooserFontActivatedCallback
-> IO (FunPtr C_FontChooserFontActivatedCallback)
mk_FontChooserFontActivatedCallback C_FontChooserFontActivatedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"font-activated" FunPtr C_FontChooserFontActivatedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data FontChooserFontActivatedSignalInfo
instance SignalInfo FontChooserFontActivatedSignalInfo where
type HaskellCallbackType FontChooserFontActivatedSignalInfo = FontChooserFontActivatedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_FontChooserFontActivatedCallback cb
cb'' <- mk_FontChooserFontActivatedCallback cb'
connectSignalFunPtr obj "font-activated" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.FontChooser::font-activated"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Interfaces-FontChooser.html#g:signal:fontActivated"})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FontChooser = FontChooserSignalList
type FontChooserSignalList = ('[ '("fontActivated", FontChooserFontActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif