gi-gtk-0.3.16.12: GI/Gtk/Objects/FontSelection.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Gtk.Objects.FontSelection
(
-- * Exported types
FontSelection(..) ,
FontSelectionK ,
toFontSelection ,
noFontSelection ,
-- * Methods
-- ** fontSelectionGetFace
fontSelectionGetFace ,
-- ** fontSelectionGetFaceList
fontSelectionGetFaceList ,
-- ** fontSelectionGetFamily
fontSelectionGetFamily ,
-- ** fontSelectionGetFamilyList
fontSelectionGetFamilyList ,
-- ** fontSelectionGetFontName
fontSelectionGetFontName ,
-- ** fontSelectionGetPreviewEntry
fontSelectionGetPreviewEntry ,
-- ** fontSelectionGetPreviewText
fontSelectionGetPreviewText ,
-- ** fontSelectionGetSize
fontSelectionGetSize ,
-- ** fontSelectionGetSizeEntry
fontSelectionGetSizeEntry ,
-- ** fontSelectionGetSizeList
fontSelectionGetSizeList ,
-- ** fontSelectionNew
fontSelectionNew ,
-- ** fontSelectionSetFontName
fontSelectionSetFontName ,
-- ** fontSelectionSetPreviewText
fontSelectionSetPreviewText ,
-- * Properties
-- ** FontName
FontSelectionFontNamePropertyInfo ,
constructFontSelectionFontName ,
getFontSelectionFontName ,
setFontSelectionFontName ,
-- ** PreviewText
FontSelectionPreviewTextPropertyInfo ,
constructFontSelectionPreviewText ,
getFontSelectionPreviewText ,
setFontSelectionPreviewText ,
) 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
import qualified GI.Pango as Pango
newtype FontSelection = FontSelection (ForeignPtr FontSelection)
foreign import ccall "gtk_font_selection_get_type"
c_gtk_font_selection_get_type :: IO GType
type instance ParentTypes FontSelection = FontSelectionParentTypes
type FontSelectionParentTypes = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]
instance GObject FontSelection where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_gtk_font_selection_get_type
class GObject o => FontSelectionK o
instance (GObject o, IsDescendantOf FontSelection o) => FontSelectionK o
toFontSelection :: FontSelectionK o => o -> IO FontSelection
toFontSelection = unsafeCastTo FontSelection
noFontSelection :: Maybe FontSelection
noFontSelection = Nothing
-- VVV Prop "font-name"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable]
getFontSelectionFontName :: (MonadIO m, FontSelectionK o) => o -> m T.Text
getFontSelectionFontName obj = liftIO $ getObjectPropertyString obj "font-name"
setFontSelectionFontName :: (MonadIO m, FontSelectionK o) => o -> T.Text -> m ()
setFontSelectionFontName obj val = liftIO $ setObjectPropertyString obj "font-name" val
constructFontSelectionFontName :: T.Text -> IO ([Char], GValue)
constructFontSelectionFontName val = constructObjectPropertyString "font-name" val
data FontSelectionFontNamePropertyInfo
instance AttrInfo FontSelectionFontNamePropertyInfo where
type AttrAllowedOps FontSelectionFontNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontSelectionFontNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint FontSelectionFontNamePropertyInfo = FontSelectionK
type AttrGetType FontSelectionFontNamePropertyInfo = T.Text
type AttrLabel FontSelectionFontNamePropertyInfo = "FontSelection::font-name"
attrGet _ = getFontSelectionFontName
attrSet _ = setFontSelectionFontName
attrConstruct _ = constructFontSelectionFontName
-- VVV Prop "preview-text"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable]
getFontSelectionPreviewText :: (MonadIO m, FontSelectionK o) => o -> m T.Text
getFontSelectionPreviewText obj = liftIO $ getObjectPropertyString obj "preview-text"
setFontSelectionPreviewText :: (MonadIO m, FontSelectionK o) => o -> T.Text -> m ()
setFontSelectionPreviewText obj val = liftIO $ setObjectPropertyString obj "preview-text" val
constructFontSelectionPreviewText :: T.Text -> IO ([Char], GValue)
constructFontSelectionPreviewText val = constructObjectPropertyString "preview-text" val
data FontSelectionPreviewTextPropertyInfo
instance AttrInfo FontSelectionPreviewTextPropertyInfo where
type AttrAllowedOps FontSelectionPreviewTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FontSelectionPreviewTextPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint FontSelectionPreviewTextPropertyInfo = FontSelectionK
type AttrGetType FontSelectionPreviewTextPropertyInfo = T.Text
type AttrLabel FontSelectionPreviewTextPropertyInfo = "FontSelection::preview-text"
attrGet _ = getFontSelectionPreviewText
attrSet _ = setFontSelectionPreviewText
attrConstruct _ = constructFontSelectionPreviewText
type instance AttributeList FontSelection = FontSelectionAttributeList
type FontSelectionAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("baseline-position", BoxBaselinePositionPropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("font-name", FontSelectionFontNamePropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("homogeneous", BoxHomogeneousPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("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), '("orientation", OrientableOrientationPropertyInfo), '("parent", WidgetParentPropertyInfo), '("preview-text", FontSelectionPreviewTextPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("spacing", BoxSpacingPropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])
type instance SignalList FontSelection = FontSelectionSignalList
type FontSelectionSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("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-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("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-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), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("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, *)])
-- method FontSelection::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FontSelection"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_new" gtk_font_selection_new ::
IO (Ptr FontSelection)
{-# DEPRECATED fontSelectionNew ["(Since version 3.2)","Use #GtkFontChooserWidget instead"]#-}
fontSelectionNew ::
(MonadIO m) =>
m FontSelection
fontSelectionNew = liftIO $ do
result <- gtk_font_selection_new
checkUnexpectedReturnNULL "gtk_font_selection_new" result
result' <- (newObject FontSelection) result
return result'
-- method FontSelection::get_face
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontFace"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_face" gtk_font_selection_get_face ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Pango.FontFace)
{-# DEPRECATED fontSelectionGetFace ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFace ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Pango.FontFace
fontSelectionGetFace _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_face _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_face" result
result' <- (newObject Pango.FontFace) result
touchManagedPtr _obj
return result'
-- method FontSelection::get_face_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_face_list" gtk_font_selection_get_face_list ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Widget)
{-# DEPRECATED fontSelectionGetFaceList ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFaceList ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Widget
fontSelectionGetFaceList _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_face_list _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_face_list" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
-- method FontSelection::get_family
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontFamily"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_family" gtk_font_selection_get_family ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Pango.FontFamily)
{-# DEPRECATED fontSelectionGetFamily ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFamily ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Pango.FontFamily
fontSelectionGetFamily _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_family _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_family" result
result' <- (newObject Pango.FontFamily) result
touchManagedPtr _obj
return result'
-- method FontSelection::get_family_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_family_list" gtk_font_selection_get_family_list ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Widget)
{-# DEPRECATED fontSelectionGetFamilyList ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFamilyList ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Widget
fontSelectionGetFamilyList _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_family_list _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_family_list" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
-- method FontSelection::get_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_font_name" gtk_font_selection_get_font_name ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO CString
{-# DEPRECATED fontSelectionGetFontName ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFontName ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m T.Text
fontSelectionGetFontName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_font_name _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_font_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method FontSelection::get_preview_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_preview_entry" gtk_font_selection_get_preview_entry ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Widget)
{-# DEPRECATED fontSelectionGetPreviewEntry ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetPreviewEntry ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Widget
fontSelectionGetPreviewEntry _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_preview_entry _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_preview_entry" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
-- method FontSelection::get_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_preview_text" gtk_font_selection_get_preview_text ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO CString
{-# DEPRECATED fontSelectionGetPreviewText ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetPreviewText ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m T.Text
fontSelectionGetPreviewText _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_preview_text _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_preview_text" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method FontSelection::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_size" gtk_font_selection_get_size ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO Int32
{-# DEPRECATED fontSelectionGetSize ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetSize ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Int32
fontSelectionGetSize _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_size _obj'
touchManagedPtr _obj
return result
-- method FontSelection::get_size_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_size_entry" gtk_font_selection_get_size_entry ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Widget)
{-# DEPRECATED fontSelectionGetSizeEntry ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetSizeEntry ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Widget
fontSelectionGetSizeEntry _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_size_entry _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_size_entry" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
-- method FontSelection::get_size_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_get_size_list" gtk_font_selection_get_size_list ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
IO (Ptr Widget)
{-# DEPRECATED fontSelectionGetSizeList ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetSizeList ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
m Widget
fontSelectionGetSizeList _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_font_selection_get_size_list _obj'
checkUnexpectedReturnNULL "gtk_font_selection_get_size_list" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
-- method FontSelection::set_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_set_font_name" gtk_font_selection_set_font_name ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
CString -> -- fontname : TBasicType TUTF8
IO CInt
{-# DEPRECATED fontSelectionSetFontName ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionSetFontName ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
T.Text -> -- fontname
m Bool
fontSelectionSetFontName _obj fontname = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
fontname' <- textToCString fontname
result <- gtk_font_selection_set_font_name _obj' fontname'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem fontname'
return result'
-- method FontSelection::set_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_font_selection_set_preview_text" gtk_font_selection_set_preview_text ::
Ptr FontSelection -> -- _obj : TInterface "Gtk" "FontSelection"
CString -> -- text : TBasicType TUTF8
IO ()
{-# DEPRECATED fontSelectionSetPreviewText ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionSetPreviewText ::
(MonadIO m, FontSelectionK a) =>
a -> -- _obj
T.Text -> -- text
m ()
fontSelectionSetPreviewText _obj text = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
text' <- textToCString text
gtk_font_selection_set_preview_text _obj' text'
touchManagedPtr _obj
freeMem text'
return ()