module GI.Gtk.Objects.FontButton
(
FontButton(..) ,
FontButtonK ,
toFontButton ,
noFontButton ,
fontButtonGetFontName ,
fontButtonGetShowSize ,
fontButtonGetShowStyle ,
fontButtonGetTitle ,
fontButtonGetUseFont ,
fontButtonGetUseSize ,
fontButtonNew ,
fontButtonNewWithFont ,
fontButtonSetFontName ,
fontButtonSetShowSize ,
fontButtonSetShowStyle ,
fontButtonSetTitle ,
fontButtonSetUseFont ,
fontButtonSetUseSize ,
FontButtonFontNamePropertyInfo ,
constructFontButtonFontName ,
getFontButtonFontName ,
setFontButtonFontName ,
FontButtonShowSizePropertyInfo ,
constructFontButtonShowSize ,
getFontButtonShowSize ,
setFontButtonShowSize ,
FontButtonShowStylePropertyInfo ,
constructFontButtonShowStyle ,
getFontButtonShowStyle ,
setFontButtonShowStyle ,
FontButtonTitlePropertyInfo ,
constructFontButtonTitle ,
getFontButtonTitle ,
setFontButtonTitle ,
FontButtonUseFontPropertyInfo ,
constructFontButtonUseFont ,
getFontButtonUseFont ,
setFontButtonUseFont ,
FontButtonUseSizePropertyInfo ,
constructFontButtonUseSize ,
getFontButtonUseSize ,
setFontButtonUseSize ,
FontButtonFontSetCallback ,
FontButtonFontSetCallbackC ,
FontButtonFontSetSignalInfo ,
afterFontButtonFontSet ,
fontButtonFontSetCallbackWrapper ,
fontButtonFontSetClosure ,
mkFontButtonFontSetCallback ,
noFontButtonFontSetCallback ,
onFontButtonFontSet ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.Atk as Atk
import qualified GI.GObject as GObject
newtype FontButton = FontButton (ForeignPtr FontButton)
foreign import ccall "gtk_font_button_get_type"
c_gtk_font_button_get_type :: IO GType
type instance ParentTypes FontButton = FontButtonParentTypes
type FontButtonParentTypes = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable, FontChooser]
instance GObject FontButton where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_gtk_font_button_get_type
class GObject o => FontButtonK o
instance (GObject o, IsDescendantOf FontButton o) => FontButtonK o
toFontButton :: FontButtonK o => o -> IO FontButton
toFontButton = unsafeCastTo FontButton
noFontButton :: Maybe FontButton
noFontButton = Nothing
type FontButtonFontSetCallback =
IO ()
noFontButtonFontSetCallback :: Maybe FontButtonFontSetCallback
noFontButtonFontSetCallback = Nothing
type FontButtonFontSetCallbackC =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mkFontButtonFontSetCallback :: FontButtonFontSetCallbackC -> IO (FunPtr FontButtonFontSetCallbackC)
fontButtonFontSetClosure :: FontButtonFontSetCallback -> IO Closure
fontButtonFontSetClosure cb = newCClosure =<< mkFontButtonFontSetCallback wrapped
where wrapped = fontButtonFontSetCallbackWrapper cb
fontButtonFontSetCallbackWrapper ::
FontButtonFontSetCallback ->
Ptr () ->
Ptr () ->
IO ()
fontButtonFontSetCallbackWrapper _cb _ _ = do
_cb
onFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
onFontButtonFontSet obj cb = liftIO $ connectFontButtonFontSet obj cb SignalConnectBefore
afterFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
afterFontButtonFontSet obj cb = connectFontButtonFontSet obj cb SignalConnectAfter
connectFontButtonFontSet :: (GObject a, MonadIO m) =>
a -> FontButtonFontSetCallback -> SignalConnectMode -> m SignalHandlerId
connectFontButtonFontSet obj cb after = liftIO $ do
cb' <- mkFontButtonFontSetCallback (fontButtonFontSetCallbackWrapper cb)
connectSignalFunPtr obj "font-set" cb' after
getFontButtonFontName :: (MonadIO m, FontButtonK o) => o -> m T.Text
getFontButtonFontName obj = liftIO $ getObjectPropertyString obj "font-name"
setFontButtonFontName :: (MonadIO m, FontButtonK o) => o -> T.Text -> m ()
setFontButtonFontName obj val = liftIO $ setObjectPropertyString obj "font-name" val
constructFontButtonFontName :: T.Text -> IO ([Char], GValue)
constructFontButtonFontName val = constructObjectPropertyString "font-name" val
data FontButtonFontNamePropertyInfo
instance AttrInfo FontButtonFontNamePropertyInfo where
type AttrAllowedOps FontButtonFontNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontButtonFontNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint FontButtonFontNamePropertyInfo = FontButtonK
type AttrGetType FontButtonFontNamePropertyInfo = T.Text
type AttrLabel FontButtonFontNamePropertyInfo = "FontButton::font-name"
attrGet _ = getFontButtonFontName
attrSet _ = setFontButtonFontName
attrConstruct _ = constructFontButtonFontName
getFontButtonShowSize :: (MonadIO m, FontButtonK o) => o -> m Bool
getFontButtonShowSize obj = liftIO $ getObjectPropertyBool obj "show-size"
setFontButtonShowSize :: (MonadIO m, FontButtonK o) => o -> Bool -> m ()
setFontButtonShowSize obj val = liftIO $ setObjectPropertyBool obj "show-size" val
constructFontButtonShowSize :: Bool -> IO ([Char], GValue)
constructFontButtonShowSize val = constructObjectPropertyBool "show-size" val
data FontButtonShowSizePropertyInfo
instance AttrInfo FontButtonShowSizePropertyInfo where
type AttrAllowedOps FontButtonShowSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontButtonShowSizePropertyInfo = (~) Bool
type AttrBaseTypeConstraint FontButtonShowSizePropertyInfo = FontButtonK
type AttrGetType FontButtonShowSizePropertyInfo = Bool
type AttrLabel FontButtonShowSizePropertyInfo = "FontButton::show-size"
attrGet _ = getFontButtonShowSize
attrSet _ = setFontButtonShowSize
attrConstruct _ = constructFontButtonShowSize
getFontButtonShowStyle :: (MonadIO m, FontButtonK o) => o -> m Bool
getFontButtonShowStyle obj = liftIO $ getObjectPropertyBool obj "show-style"
setFontButtonShowStyle :: (MonadIO m, FontButtonK o) => o -> Bool -> m ()
setFontButtonShowStyle obj val = liftIO $ setObjectPropertyBool obj "show-style" val
constructFontButtonShowStyle :: Bool -> IO ([Char], GValue)
constructFontButtonShowStyle val = constructObjectPropertyBool "show-style" val
data FontButtonShowStylePropertyInfo
instance AttrInfo FontButtonShowStylePropertyInfo where
type AttrAllowedOps FontButtonShowStylePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontButtonShowStylePropertyInfo = (~) Bool
type AttrBaseTypeConstraint FontButtonShowStylePropertyInfo = FontButtonK
type AttrGetType FontButtonShowStylePropertyInfo = Bool
type AttrLabel FontButtonShowStylePropertyInfo = "FontButton::show-style"
attrGet _ = getFontButtonShowStyle
attrSet _ = setFontButtonShowStyle
attrConstruct _ = constructFontButtonShowStyle
getFontButtonTitle :: (MonadIO m, FontButtonK o) => o -> m T.Text
getFontButtonTitle obj = liftIO $ getObjectPropertyString obj "title"
setFontButtonTitle :: (MonadIO m, FontButtonK o) => o -> T.Text -> m ()
setFontButtonTitle obj val = liftIO $ setObjectPropertyString obj "title" val
constructFontButtonTitle :: T.Text -> IO ([Char], GValue)
constructFontButtonTitle val = constructObjectPropertyString "title" val
data FontButtonTitlePropertyInfo
instance AttrInfo FontButtonTitlePropertyInfo where
type AttrAllowedOps FontButtonTitlePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontButtonTitlePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint FontButtonTitlePropertyInfo = FontButtonK
type AttrGetType FontButtonTitlePropertyInfo = T.Text
type AttrLabel FontButtonTitlePropertyInfo = "FontButton::title"
attrGet _ = getFontButtonTitle
attrSet _ = setFontButtonTitle
attrConstruct _ = constructFontButtonTitle
getFontButtonUseFont :: (MonadIO m, FontButtonK o) => o -> m Bool
getFontButtonUseFont obj = liftIO $ getObjectPropertyBool obj "use-font"
setFontButtonUseFont :: (MonadIO m, FontButtonK o) => o -> Bool -> m ()
setFontButtonUseFont obj val = liftIO $ setObjectPropertyBool obj "use-font" val
constructFontButtonUseFont :: Bool -> IO ([Char], GValue)
constructFontButtonUseFont val = constructObjectPropertyBool "use-font" val
data FontButtonUseFontPropertyInfo
instance AttrInfo FontButtonUseFontPropertyInfo where
type AttrAllowedOps FontButtonUseFontPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontButtonUseFontPropertyInfo = (~) Bool
type AttrBaseTypeConstraint FontButtonUseFontPropertyInfo = FontButtonK
type AttrGetType FontButtonUseFontPropertyInfo = Bool
type AttrLabel FontButtonUseFontPropertyInfo = "FontButton::use-font"
attrGet _ = getFontButtonUseFont
attrSet _ = setFontButtonUseFont
attrConstruct _ = constructFontButtonUseFont
getFontButtonUseSize :: (MonadIO m, FontButtonK o) => o -> m Bool
getFontButtonUseSize obj = liftIO $ getObjectPropertyBool obj "use-size"
setFontButtonUseSize :: (MonadIO m, FontButtonK o) => o -> Bool -> m ()
setFontButtonUseSize obj val = liftIO $ setObjectPropertyBool obj "use-size" val
constructFontButtonUseSize :: Bool -> IO ([Char], GValue)
constructFontButtonUseSize val = constructObjectPropertyBool "use-size" val
data FontButtonUseSizePropertyInfo
instance AttrInfo FontButtonUseSizePropertyInfo where
type AttrAllowedOps FontButtonUseSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontButtonUseSizePropertyInfo = (~) Bool
type AttrBaseTypeConstraint FontButtonUseSizePropertyInfo = FontButtonK
type AttrGetType FontButtonUseSizePropertyInfo = Bool
type AttrLabel FontButtonUseSizePropertyInfo = "FontButton::use-size"
attrGet _ = getFontButtonUseSize
attrSet _ = setFontButtonUseSize
attrConstruct _ = constructFontButtonUseSize
type instance AttributeList FontButton = FontButtonAttributeList
type FontButtonAttributeList = ('[ '("action-name", ActionableActionNamePropertyInfo), '("action-target", ActionableActionTargetPropertyInfo), '("always-show-image", ButtonAlwaysShowImagePropertyInfo), '("app-paintable", WidgetAppPaintablePropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("focus-on-click", ButtonFocusOnClickPropertyInfo), '("font", FontChooserFontPropertyInfo), '("font-desc", FontChooserFontDescPropertyInfo), '("font-name", FontButtonFontNamePropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("image", ButtonImagePropertyInfo), '("image-position", ButtonImagePositionPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("label", ButtonLabelPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("preview-text", FontChooserPreviewTextPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("related-action", ActivatableRelatedActionPropertyInfo), '("relief", ButtonReliefPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("show-preview-entry", FontChooserShowPreviewEntryPropertyInfo), '("show-size", FontButtonShowSizePropertyInfo), '("show-style", FontButtonShowStylePropertyInfo), '("style", WidgetStylePropertyInfo), '("title", FontButtonTitlePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("use-action-appearance", ActivatableUseActionAppearancePropertyInfo), '("use-font", FontButtonUseFontPropertyInfo), '("use-size", FontButtonUseSizePropertyInfo), '("use-stock", ButtonUseStockPropertyInfo), '("use-underline", ButtonUseUnderlinePropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo), '("xalign", ButtonXalignPropertyInfo), '("yalign", ButtonYalignPropertyInfo)] :: [(Symbol, *)])
data FontButtonFontSetSignalInfo
instance SignalInfo FontButtonFontSetSignalInfo where
type HaskellCallbackType FontButtonFontSetSignalInfo = FontButtonFontSetCallback
connectSignal _ = connectFontButtonFontSet
type instance SignalList FontButton = FontButtonSignalList
type FontButtonSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("activate", ButtonActivateSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("clicked", ButtonClickedSignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter", ButtonEnterSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("font-activated", FontChooserFontActivatedSignalInfo), '("font-set", FontButtonFontSetSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave", ButtonLeaveSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("pressed", ButtonPressedSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("released", ButtonReleasedSignalInfo), '("remove", ContainerRemoveSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_font_button_new" gtk_font_button_new ::
IO (Ptr FontButton)
fontButtonNew ::
(MonadIO m) =>
m FontButton
fontButtonNew = liftIO $ do
result <- gtk_font_button_new
checkUnexpectedReturnNULL "gtk_font_button_new" result
result' <- (newObject FontButton) result
return result'
foreign import ccall "gtk_font_button_new_with_font" gtk_font_button_new_with_font ::
CString ->
IO (Ptr FontButton)
fontButtonNewWithFont ::
(MonadIO m) =>
T.Text ->
m FontButton
fontButtonNewWithFont fontname = liftIO $ do
fontname' <- textToCString fontname
result <- gtk_font_button_new_with_font fontname'
checkUnexpectedReturnNULL "gtk_font_button_new_with_font" result
result' <- (newObject FontButton) result
freeMem fontname'
return result'
foreign import ccall "gtk_font_button_get_font_name" gtk_font_button_get_font_name ::
Ptr FontButton ->
IO CString
fontButtonGetFontName ::
(MonadIO m, FontButtonK a) =>
a ->
m T.Text
fontButtonGetFontName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_button_get_font_name _obj'
checkUnexpectedReturnNULL "gtk_font_button_get_font_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_font_button_get_show_size" gtk_font_button_get_show_size ::
Ptr FontButton ->
IO CInt
fontButtonGetShowSize ::
(MonadIO m, FontButtonK a) =>
a ->
m Bool
fontButtonGetShowSize _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_button_get_show_size _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_font_button_get_show_style" gtk_font_button_get_show_style ::
Ptr FontButton ->
IO CInt
fontButtonGetShowStyle ::
(MonadIO m, FontButtonK a) =>
a ->
m Bool
fontButtonGetShowStyle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_button_get_show_style _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_font_button_get_title" gtk_font_button_get_title ::
Ptr FontButton ->
IO CString
fontButtonGetTitle ::
(MonadIO m, FontButtonK a) =>
a ->
m T.Text
fontButtonGetTitle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_button_get_title _obj'
checkUnexpectedReturnNULL "gtk_font_button_get_title" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_font_button_get_use_font" gtk_font_button_get_use_font ::
Ptr FontButton ->
IO CInt
fontButtonGetUseFont ::
(MonadIO m, FontButtonK a) =>
a ->
m Bool
fontButtonGetUseFont _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_button_get_use_font _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_font_button_get_use_size" gtk_font_button_get_use_size ::
Ptr FontButton ->
IO CInt
fontButtonGetUseSize ::
(MonadIO m, FontButtonK a) =>
a ->
m Bool
fontButtonGetUseSize _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_button_get_use_size _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_font_button_set_font_name" gtk_font_button_set_font_name ::
Ptr FontButton ->
CString ->
IO CInt
fontButtonSetFontName ::
(MonadIO m, FontButtonK a) =>
a ->
T.Text ->
m Bool
fontButtonSetFontName _obj fontname = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
fontname' <- textToCString fontname
result <- gtk_font_button_set_font_name _obj' fontname'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem fontname'
return result'
foreign import ccall "gtk_font_button_set_show_size" gtk_font_button_set_show_size ::
Ptr FontButton ->
CInt ->
IO ()
fontButtonSetShowSize ::
(MonadIO m, FontButtonK a) =>
a ->
Bool ->
m ()
fontButtonSetShowSize _obj show_size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let show_size' = (fromIntegral . fromEnum) show_size
gtk_font_button_set_show_size _obj' show_size'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_font_button_set_show_style" gtk_font_button_set_show_style ::
Ptr FontButton ->
CInt ->
IO ()
fontButtonSetShowStyle ::
(MonadIO m, FontButtonK a) =>
a ->
Bool ->
m ()
fontButtonSetShowStyle _obj show_style = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let show_style' = (fromIntegral . fromEnum) show_style
gtk_font_button_set_show_style _obj' show_style'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_font_button_set_title" gtk_font_button_set_title ::
Ptr FontButton ->
CString ->
IO ()
fontButtonSetTitle ::
(MonadIO m, FontButtonK a) =>
a ->
T.Text ->
m ()
fontButtonSetTitle _obj title = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
title' <- textToCString title
gtk_font_button_set_title _obj' title'
touchManagedPtr _obj
freeMem title'
return ()
foreign import ccall "gtk_font_button_set_use_font" gtk_font_button_set_use_font ::
Ptr FontButton ->
CInt ->
IO ()
fontButtonSetUseFont ::
(MonadIO m, FontButtonK a) =>
a ->
Bool ->
m ()
fontButtonSetUseFont _obj use_font = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let use_font' = (fromIntegral . fromEnum) use_font
gtk_font_button_set_use_font _obj' use_font'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_font_button_set_use_size" gtk_font_button_set_use_size ::
Ptr FontButton ->
CInt ->
IO ()
fontButtonSetUseSize ::
(MonadIO m, FontButtonK a) =>
a ->
Bool ->
m ()
fontButtonSetUseSize _obj use_size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let use_size' = (fromIntegral . fromEnum) use_size
gtk_font_button_set_use_size _obj' use_size'
touchManagedPtr _obj
return ()