{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.FontChooser
(
FontChooser(..) ,
noFontChooser ,
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 ,
C_FontChooserFontActivatedCallback ,
FontChooserFontActivatedCallback ,
#if defined(ENABLE_OVERLOADING)
FontChooserFontActivatedSignalInfo ,
#endif
afterFontChooserFontActivated ,
genClosure_FontChooserFontActivated ,
mk_FontChooserFontActivatedCallback ,
noFontChooserFontActivatedCallback ,
onFontChooserFontActivated ,
wrap_FontChooserFontActivatedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
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 (ManagedPtr FontChooser)
deriving (Eq)
noFontChooser :: Maybe FontChooser
noFontChooser = Nothing
type FontChooserFontActivatedCallback =
T.Text
-> IO ()
noFontChooserFontActivatedCallback :: Maybe FontChooserFontActivatedCallback
noFontChooserFontActivatedCallback = Nothing
type C_FontChooserFontActivatedCallback =
Ptr () ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_FontChooserFontActivatedCallback :: C_FontChooserFontActivatedCallback -> IO (FunPtr C_FontChooserFontActivatedCallback)
genClosure_FontChooserFontActivated :: MonadIO m => FontChooserFontActivatedCallback -> m (GClosure C_FontChooserFontActivatedCallback)
genClosure_FontChooserFontActivated cb = liftIO $ do
let cb' = wrap_FontChooserFontActivatedCallback cb
mk_FontChooserFontActivatedCallback cb' >>= B.GClosure.newGClosure
wrap_FontChooserFontActivatedCallback ::
FontChooserFontActivatedCallback ->
C_FontChooserFontActivatedCallback
wrap_FontChooserFontActivatedCallback _cb _ fontname _ = do
fontname' <- cstringToText fontname
_cb fontname'
onFontChooserFontActivated :: (IsFontChooser a, MonadIO m) => a -> FontChooserFontActivatedCallback -> m SignalHandlerId
onFontChooserFontActivated obj cb = liftIO $ do
let cb' = wrap_FontChooserFontActivatedCallback cb
cb'' <- mk_FontChooserFontActivatedCallback cb'
connectSignalFunPtr obj "font-activated" cb'' SignalConnectBefore Nothing
afterFontChooserFontActivated :: (IsFontChooser a, MonadIO m) => a -> FontChooserFontActivatedCallback -> m SignalHandlerId
afterFontChooserFontActivated obj cb = liftIO $ do
let cb' = wrap_FontChooserFontActivatedCallback cb
cb'' <- mk_FontChooserFontActivatedCallback cb'
connectSignalFunPtr obj "font-activated" cb'' SignalConnectAfter 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
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FontChooser = FontChooserSignalList
type FontChooserSignalList = ('[ '("fontActivated", FontChooserFontActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_font_chooser_get_type"
c_gtk_font_chooser_get_type :: IO GType
instance GObject FontChooser where
gobjectType = c_gtk_font_chooser_get_type
instance B.GValue.IsGValue FontChooser where
toGValue o = do
gtype <- c_gtk_font_chooser_get_type
B.ManagedPtr.withManagedPtr o (B.GValue.buildGValue gtype B.GValue.set_object)
fromGValue gv = do
ptr <- B.GValue.get_object gv :: IO (Ptr FontChooser)
B.ManagedPtr.newObject FontChooser ptr
class (GObject o, O.IsDescendantOf FontChooser o) => IsFontChooser o
instance (GObject o, O.IsDescendantOf FontChooser o) => IsFontChooser o
instance O.HasParentTypes FontChooser
type instance O.ParentTypes FontChooser = '[GObject.Object.Object]
toFontChooser :: (MonadIO m, IsFontChooser o) => o -> m FontChooser
toFontChooser = liftIO . unsafeCastTo FontChooser
getFontChooserFont :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserFont obj = liftIO $ B.Properties.getObjectPropertyString obj "font"
setFontChooserFont :: (MonadIO m, IsFontChooser o) => o -> T.Text -> m ()
setFontChooserFont obj val = liftIO $ B.Properties.setObjectPropertyString obj "font" (Just val)
constructFontChooserFont :: (IsFontChooser o) => T.Text -> IO (GValueConstruct o)
constructFontChooserFont val = B.Properties.constructObjectPropertyString "font" (Just 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
#endif
getFontChooserFontDesc :: (MonadIO m, IsFontChooser o) => o -> m (Maybe Pango.FontDescription.FontDescription)
getFontChooserFontDesc obj = liftIO $ B.Properties.getObjectPropertyBoxed obj "font-desc" Pango.FontDescription.FontDescription
setFontChooserFontDesc :: (MonadIO m, IsFontChooser o) => o -> Pango.FontDescription.FontDescription -> m ()
setFontChooserFontDesc obj val = liftIO $ B.Properties.setObjectPropertyBoxed obj "font-desc" (Just val)
constructFontChooserFontDesc :: (IsFontChooser o) => Pango.FontDescription.FontDescription -> IO (GValueConstruct o)
constructFontChooserFontDesc val = B.Properties.constructObjectPropertyBoxed "font-desc" (Just 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
#endif
getFontChooserFontFeatures :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserFontFeatures obj = liftIO $ B.Properties.getObjectPropertyString obj "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
#endif
getFontChooserLanguage :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserLanguage obj = liftIO $ B.Properties.getObjectPropertyString obj "language"
setFontChooserLanguage :: (MonadIO m, IsFontChooser o) => o -> T.Text -> m ()
setFontChooserLanguage obj val = liftIO $ B.Properties.setObjectPropertyString obj "language" (Just val)
constructFontChooserLanguage :: (IsFontChooser o) => T.Text -> IO (GValueConstruct o)
constructFontChooserLanguage val = B.Properties.constructObjectPropertyString "language" (Just 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
#endif
getFontChooserLevel :: (MonadIO m, IsFontChooser o) => o -> m [Gtk.Flags.FontChooserLevel]
getFontChooserLevel obj = liftIO $ B.Properties.getObjectPropertyFlags obj "level"
setFontChooserLevel :: (MonadIO m, IsFontChooser o) => o -> [Gtk.Flags.FontChooserLevel] -> m ()
setFontChooserLevel obj val = liftIO $ B.Properties.setObjectPropertyFlags obj "level" val
constructFontChooserLevel :: (IsFontChooser o) => [Gtk.Flags.FontChooserLevel] -> IO (GValueConstruct o)
constructFontChooserLevel val = B.Properties.constructObjectPropertyFlags "level" 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
#endif
getFontChooserPreviewText :: (MonadIO m, IsFontChooser o) => o -> m (Maybe T.Text)
getFontChooserPreviewText obj = liftIO $ B.Properties.getObjectPropertyString obj "preview-text"
setFontChooserPreviewText :: (MonadIO m, IsFontChooser o) => o -> T.Text -> m ()
setFontChooserPreviewText obj val = liftIO $ B.Properties.setObjectPropertyString obj "preview-text" (Just val)
constructFontChooserPreviewText :: (IsFontChooser o) => T.Text -> IO (GValueConstruct o)
constructFontChooserPreviewText val = B.Properties.constructObjectPropertyString "preview-text" (Just 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
#endif
getFontChooserShowPreviewEntry :: (MonadIO m, IsFontChooser o) => o -> m Bool
getFontChooserShowPreviewEntry obj = liftIO $ B.Properties.getObjectPropertyBool obj "show-preview-entry"
setFontChooserShowPreviewEntry :: (MonadIO m, IsFontChooser o) => o -> Bool -> m ()
setFontChooserShowPreviewEntry obj val = liftIO $ B.Properties.setObjectPropertyBool obj "show-preview-entry" val
constructFontChooserShowPreviewEntry :: (IsFontChooser o) => Bool -> IO (GValueConstruct o)
constructFontChooserShowPreviewEntry val = B.Properties.constructObjectPropertyBool "show-preview-entry" 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
#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, *)])
#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 :: *) :: * 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.MethodInfo 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
#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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font fontchooser'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
freeMem result'
return result''
touchManagedPtr fontchooser
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font_desc fontchooser'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed Pango.FontDescription.FontDescription) result'
return result''
touchManagedPtr fontchooser
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontDescMethodInfo
instance (signature ~ (m (Maybe Pango.FontDescription.FontDescription)), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontDescMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font_face fontchooser'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Pango.FontFace.FontFace) result'
return result''
touchManagedPtr fontchooser
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontFaceMethodInfo
instance (signature ~ (m (Maybe Pango.FontFace.FontFace)), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontFaceMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font_family fontchooser'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Pango.FontFamily.FontFamily) result'
return result''
touchManagedPtr fontchooser
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontFamilyMethodInfo
instance (signature ~ (m (Maybe Pango.FontFamily.FontFamily)), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontFamilyMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font_features fontchooser'
checkUnexpectedReturnNULL "fontChooserGetFontFeatures" result
result' <- cstringToText result
freeMem result
touchManagedPtr fontchooser
return result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontFeaturesMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontFeaturesMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font_map fontchooser'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapObject Pango.FontMap.FontMap) result'
return result''
touchManagedPtr fontchooser
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontMapMethodInfo
instance (signature ~ (m (Maybe Pango.FontMap.FontMap)), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontMapMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_font_size fontchooser'
touchManagedPtr fontchooser
return result
#if defined(ENABLE_OVERLOADING)
data FontChooserGetFontSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetFontSizeMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_language fontchooser'
checkUnexpectedReturnNULL "fontChooserGetLanguage" result
result' <- cstringToText result
freeMem result
touchManagedPtr fontchooser
return result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetLanguageMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetLanguageMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_level fontchooser'
let result' = wordToGFlags result
touchManagedPtr fontchooser
return result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetLevelMethodInfo
instance (signature ~ (m [Gtk.Flags.FontChooserLevel]), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetLevelMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_preview_text fontchooser'
checkUnexpectedReturnNULL "fontChooserGetPreviewText" result
result' <- cstringToText result
freeMem result
touchManagedPtr fontchooser
return result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetPreviewTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetPreviewTextMethodInfo a signature where
overloadedMethod = 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 fontchooser = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
result <- gtk_font_chooser_get_show_preview_entry fontchooser'
let result' = (/= 0) result
touchManagedPtr fontchooser
return result'
#if defined(ENABLE_OVERLOADING)
data FontChooserGetShowPreviewEntryMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserGetShowPreviewEntryMethodInfo a signature where
overloadedMethod = 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 fontchooser filter = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
maybeFilter <- case filter of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jFilter -> do
jFilter' <- Gtk.Callbacks.mk_FontFilterFunc (Gtk.Callbacks.wrap_FontFilterFunc Nothing (Gtk.Callbacks.drop_closures_FontFilterFunc jFilter))
return jFilter'
let userData = castFunPtrToPtr maybeFilter
let destroy = safeFreeFunPtrPtr
gtk_font_chooser_set_filter_func fontchooser' maybeFilter userData destroy
touchManagedPtr fontchooser
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFilterFuncMethodInfo
instance (signature ~ (Maybe (Gtk.Callbacks.FontFilterFunc) -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetFilterFuncMethodInfo a signature where
overloadedMethod = 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 fontchooser fontname = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
fontname' <- textToCString fontname
gtk_font_chooser_set_font fontchooser' fontname'
touchManagedPtr fontchooser
freeMem fontname'
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFontMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetFontMethodInfo a signature where
overloadedMethod = 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 fontchooser fontDesc = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
fontDesc' <- unsafeManagedPtrGetPtr fontDesc
gtk_font_chooser_set_font_desc fontchooser' fontDesc'
touchManagedPtr fontchooser
touchManagedPtr fontDesc
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFontDescMethodInfo
instance (signature ~ (Pango.FontDescription.FontDescription -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetFontDescMethodInfo a signature where
overloadedMethod = 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 fontchooser fontmap = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
maybeFontmap <- case fontmap of
Nothing -> return nullPtr
Just jFontmap -> do
jFontmap' <- unsafeManagedPtrCastPtr jFontmap
return jFontmap'
gtk_font_chooser_set_font_map fontchooser' maybeFontmap
touchManagedPtr fontchooser
whenJust fontmap touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetFontMapMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsFontChooser a, Pango.FontMap.IsFontMap b) => O.MethodInfo FontChooserSetFontMapMethodInfo a signature where
overloadedMethod = 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 fontchooser language = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
language' <- textToCString language
gtk_font_chooser_set_language fontchooser' language'
touchManagedPtr fontchooser
freeMem language'
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetLanguageMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetLanguageMethodInfo a signature where
overloadedMethod = 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 fontchooser level = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
let level' = gflagsToWord level
gtk_font_chooser_set_level fontchooser' level'
touchManagedPtr fontchooser
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetLevelMethodInfo
instance (signature ~ ([Gtk.Flags.FontChooserLevel] -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetLevelMethodInfo a signature where
overloadedMethod = 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 fontchooser text = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
text' <- textToCString text
gtk_font_chooser_set_preview_text fontchooser' text'
touchManagedPtr fontchooser
freeMem text'
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetPreviewTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetPreviewTextMethodInfo a signature where
overloadedMethod = 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 fontchooser showPreviewEntry = liftIO $ do
fontchooser' <- unsafeManagedPtrCastPtr fontchooser
let showPreviewEntry' = (fromIntegral . fromEnum) showPreviewEntry
gtk_font_chooser_set_show_preview_entry fontchooser' showPreviewEntry'
touchManagedPtr fontchooser
return ()
#if defined(ENABLE_OVERLOADING)
data FontChooserSetShowPreviewEntryMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFontChooser a) => O.MethodInfo FontChooserSetShowPreviewEntryMethodInfo a signature where
overloadedMethod = fontChooserSetShowPreviewEntry
#endif