gi-gtk-0.3.18.12: GI/Gtk/Objects/StyleContext.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.StyleContext
(
-- * Exported types
StyleContext(..) ,
StyleContextK ,
toStyleContext ,
noStyleContext ,
-- * Methods
-- ** styleContextAddClass
styleContextAddClass ,
-- ** styleContextAddProvider
styleContextAddProvider ,
-- ** styleContextAddProviderForScreen
styleContextAddProviderForScreen ,
-- ** styleContextAddRegion
styleContextAddRegion ,
-- ** styleContextCancelAnimations
styleContextCancelAnimations ,
-- ** styleContextGetBackgroundColor
styleContextGetBackgroundColor ,
-- ** styleContextGetBorder
styleContextGetBorder ,
-- ** styleContextGetBorderColor
styleContextGetBorderColor ,
-- ** styleContextGetColor
styleContextGetColor ,
-- ** styleContextGetDirection
styleContextGetDirection ,
-- ** styleContextGetFont
styleContextGetFont ,
-- ** styleContextGetFrameClock
styleContextGetFrameClock ,
-- ** styleContextGetJunctionSides
styleContextGetJunctionSides ,
-- ** styleContextGetMargin
styleContextGetMargin ,
-- ** styleContextGetPadding
styleContextGetPadding ,
-- ** styleContextGetParent
styleContextGetParent ,
-- ** styleContextGetPath
styleContextGetPath ,
-- ** styleContextGetProperty
styleContextGetProperty ,
-- ** styleContextGetScale
styleContextGetScale ,
-- ** styleContextGetScreen
styleContextGetScreen ,
-- ** styleContextGetSection
styleContextGetSection ,
-- ** styleContextGetState
styleContextGetState ,
-- ** styleContextGetStyleProperty
styleContextGetStyleProperty ,
-- ** styleContextHasClass
styleContextHasClass ,
-- ** styleContextHasRegion
styleContextHasRegion ,
-- ** styleContextInvalidate
styleContextInvalidate ,
-- ** styleContextListClasses
styleContextListClasses ,
-- ** styleContextListRegions
styleContextListRegions ,
-- ** styleContextLookupColor
styleContextLookupColor ,
-- ** styleContextLookupIconSet
styleContextLookupIconSet ,
-- ** styleContextNew
styleContextNew ,
-- ** styleContextNotifyStateChange
styleContextNotifyStateChange ,
-- ** styleContextPopAnimatableRegion
styleContextPopAnimatableRegion ,
-- ** styleContextPushAnimatableRegion
styleContextPushAnimatableRegion ,
-- ** styleContextRemoveClass
styleContextRemoveClass ,
-- ** styleContextRemoveProvider
styleContextRemoveProvider ,
-- ** styleContextRemoveProviderForScreen
styleContextRemoveProviderForScreen ,
-- ** styleContextRemoveRegion
styleContextRemoveRegion ,
-- ** styleContextResetWidgets
styleContextResetWidgets ,
-- ** styleContextRestore
styleContextRestore ,
-- ** styleContextSave
styleContextSave ,
-- ** styleContextScrollAnimations
styleContextScrollAnimations ,
-- ** styleContextSetBackground
styleContextSetBackground ,
-- ** styleContextSetDirection
styleContextSetDirection ,
-- ** styleContextSetFrameClock
styleContextSetFrameClock ,
-- ** styleContextSetJunctionSides
styleContextSetJunctionSides ,
-- ** styleContextSetParent
styleContextSetParent ,
-- ** styleContextSetPath
styleContextSetPath ,
-- ** styleContextSetScale
styleContextSetScale ,
-- ** styleContextSetScreen
styleContextSetScreen ,
-- ** styleContextSetState
styleContextSetState ,
-- ** styleContextStateIsRunning
styleContextStateIsRunning ,
-- * Properties
-- ** Direction
StyleContextDirectionPropertyInfo ,
constructStyleContextDirection ,
getStyleContextDirection ,
setStyleContextDirection ,
-- ** PaintClock
StyleContextPaintClockPropertyInfo ,
constructStyleContextPaintClock ,
getStyleContextPaintClock ,
setStyleContextPaintClock ,
-- ** Parent
StyleContextParentPropertyInfo ,
constructStyleContextParent ,
getStyleContextParent ,
setStyleContextParent ,
-- ** Screen
StyleContextScreenPropertyInfo ,
constructStyleContextScreen ,
getStyleContextScreen ,
setStyleContextScreen ,
-- * Signals
-- ** Changed
StyleContextChangedCallback ,
StyleContextChangedCallbackC ,
StyleContextChangedSignalInfo ,
afterStyleContextChanged ,
mkStyleContextChangedCallback ,
noStyleContextChangedCallback ,
onStyleContextChanged ,
styleContextChangedCallbackWrapper ,
styleContextChangedClosure ,
) 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.GObject as GObject
import qualified GI.Gdk as Gdk
import qualified GI.Pango as Pango
newtype StyleContext = StyleContext (ForeignPtr StyleContext)
foreign import ccall "gtk_style_context_get_type"
c_gtk_style_context_get_type :: IO GType
type instance ParentTypes StyleContext = StyleContextParentTypes
type StyleContextParentTypes = '[GObject.Object]
instance GObject StyleContext where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_gtk_style_context_get_type
class GObject o => StyleContextK o
instance (GObject o, IsDescendantOf StyleContext o) => StyleContextK o
toStyleContext :: StyleContextK o => o -> IO StyleContext
toStyleContext = unsafeCastTo StyleContext
noStyleContext :: Maybe StyleContext
noStyleContext = Nothing
-- signal StyleContext::changed
type StyleContextChangedCallback =
IO ()
noStyleContextChangedCallback :: Maybe StyleContextChangedCallback
noStyleContextChangedCallback = Nothing
type StyleContextChangedCallbackC =
Ptr () -> -- object
Ptr () -> -- user_data
IO ()
foreign import ccall "wrapper"
mkStyleContextChangedCallback :: StyleContextChangedCallbackC -> IO (FunPtr StyleContextChangedCallbackC)
styleContextChangedClosure :: StyleContextChangedCallback -> IO Closure
styleContextChangedClosure cb = newCClosure =<< mkStyleContextChangedCallback wrapped
where wrapped = styleContextChangedCallbackWrapper cb
styleContextChangedCallbackWrapper ::
StyleContextChangedCallback ->
Ptr () ->
Ptr () ->
IO ()
styleContextChangedCallbackWrapper _cb _ _ = do
_cb
onStyleContextChanged :: (GObject a, MonadIO m) => a -> StyleContextChangedCallback -> m SignalHandlerId
onStyleContextChanged obj cb = liftIO $ connectStyleContextChanged obj cb SignalConnectBefore
afterStyleContextChanged :: (GObject a, MonadIO m) => a -> StyleContextChangedCallback -> m SignalHandlerId
afterStyleContextChanged obj cb = connectStyleContextChanged obj cb SignalConnectAfter
connectStyleContextChanged :: (GObject a, MonadIO m) =>
a -> StyleContextChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectStyleContextChanged obj cb after = liftIO $ do
cb' <- mkStyleContextChangedCallback (styleContextChangedCallbackWrapper cb)
connectSignalFunPtr obj "changed" cb' after
-- VVV Prop "direction"
-- Type: TInterface "Gtk" "TextDirection"
-- Flags: [PropertyReadable,PropertyWritable]
getStyleContextDirection :: (MonadIO m, StyleContextK o) => o -> m TextDirection
getStyleContextDirection obj = liftIO $ getObjectPropertyEnum obj "direction"
setStyleContextDirection :: (MonadIO m, StyleContextK o) => o -> TextDirection -> m ()
setStyleContextDirection obj val = liftIO $ setObjectPropertyEnum obj "direction" val
constructStyleContextDirection :: TextDirection -> IO ([Char], GValue)
constructStyleContextDirection val = constructObjectPropertyEnum "direction" val
data StyleContextDirectionPropertyInfo
instance AttrInfo StyleContextDirectionPropertyInfo where
type AttrAllowedOps StyleContextDirectionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint StyleContextDirectionPropertyInfo = (~) TextDirection
type AttrBaseTypeConstraint StyleContextDirectionPropertyInfo = StyleContextK
type AttrGetType StyleContextDirectionPropertyInfo = TextDirection
type AttrLabel StyleContextDirectionPropertyInfo = "StyleContext::direction"
attrGet _ = getStyleContextDirection
attrSet _ = setStyleContextDirection
attrConstruct _ = constructStyleContextDirection
-- VVV Prop "paint-clock"
-- Type: TInterface "Gdk" "FrameClock"
-- Flags: [PropertyReadable,PropertyWritable]
getStyleContextPaintClock :: (MonadIO m, StyleContextK o) => o -> m Gdk.FrameClock
getStyleContextPaintClock obj = liftIO $ getObjectPropertyObject obj "paint-clock" Gdk.FrameClock
setStyleContextPaintClock :: (MonadIO m, StyleContextK o, Gdk.FrameClockK a) => o -> a -> m ()
setStyleContextPaintClock obj val = liftIO $ setObjectPropertyObject obj "paint-clock" val
constructStyleContextPaintClock :: (Gdk.FrameClockK a) => a -> IO ([Char], GValue)
constructStyleContextPaintClock val = constructObjectPropertyObject "paint-clock" val
data StyleContextPaintClockPropertyInfo
instance AttrInfo StyleContextPaintClockPropertyInfo where
type AttrAllowedOps StyleContextPaintClockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint StyleContextPaintClockPropertyInfo = Gdk.FrameClockK
type AttrBaseTypeConstraint StyleContextPaintClockPropertyInfo = StyleContextK
type AttrGetType StyleContextPaintClockPropertyInfo = Gdk.FrameClock
type AttrLabel StyleContextPaintClockPropertyInfo = "StyleContext::paint-clock"
attrGet _ = getStyleContextPaintClock
attrSet _ = setStyleContextPaintClock
attrConstruct _ = constructStyleContextPaintClock
-- VVV Prop "parent"
-- Type: TInterface "Gtk" "StyleContext"
-- Flags: [PropertyReadable,PropertyWritable]
getStyleContextParent :: (MonadIO m, StyleContextK o) => o -> m StyleContext
getStyleContextParent obj = liftIO $ getObjectPropertyObject obj "parent" StyleContext
setStyleContextParent :: (MonadIO m, StyleContextK o, StyleContextK a) => o -> a -> m ()
setStyleContextParent obj val = liftIO $ setObjectPropertyObject obj "parent" val
constructStyleContextParent :: (StyleContextK a) => a -> IO ([Char], GValue)
constructStyleContextParent val = constructObjectPropertyObject "parent" val
data StyleContextParentPropertyInfo
instance AttrInfo StyleContextParentPropertyInfo where
type AttrAllowedOps StyleContextParentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint StyleContextParentPropertyInfo = StyleContextK
type AttrBaseTypeConstraint StyleContextParentPropertyInfo = StyleContextK
type AttrGetType StyleContextParentPropertyInfo = StyleContext
type AttrLabel StyleContextParentPropertyInfo = "StyleContext::parent"
attrGet _ = getStyleContextParent
attrSet _ = setStyleContextParent
attrConstruct _ = constructStyleContextParent
-- VVV Prop "screen"
-- Type: TInterface "Gdk" "Screen"
-- Flags: [PropertyReadable,PropertyWritable]
getStyleContextScreen :: (MonadIO m, StyleContextK o) => o -> m Gdk.Screen
getStyleContextScreen obj = liftIO $ getObjectPropertyObject obj "screen" Gdk.Screen
setStyleContextScreen :: (MonadIO m, StyleContextK o, Gdk.ScreenK a) => o -> a -> m ()
setStyleContextScreen obj val = liftIO $ setObjectPropertyObject obj "screen" val
constructStyleContextScreen :: (Gdk.ScreenK a) => a -> IO ([Char], GValue)
constructStyleContextScreen val = constructObjectPropertyObject "screen" val
data StyleContextScreenPropertyInfo
instance AttrInfo StyleContextScreenPropertyInfo where
type AttrAllowedOps StyleContextScreenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint StyleContextScreenPropertyInfo = Gdk.ScreenK
type AttrBaseTypeConstraint StyleContextScreenPropertyInfo = StyleContextK
type AttrGetType StyleContextScreenPropertyInfo = Gdk.Screen
type AttrLabel StyleContextScreenPropertyInfo = "StyleContext::screen"
attrGet _ = getStyleContextScreen
attrSet _ = setStyleContextScreen
attrConstruct _ = constructStyleContextScreen
type instance AttributeList StyleContext = StyleContextAttributeList
type StyleContextAttributeList = ('[ '("direction", StyleContextDirectionPropertyInfo), '("paint-clock", StyleContextPaintClockPropertyInfo), '("parent", StyleContextParentPropertyInfo), '("screen", StyleContextScreenPropertyInfo)] :: [(Symbol, *)])
data StyleContextChangedSignalInfo
instance SignalInfo StyleContextChangedSignalInfo where
type HaskellCallbackType StyleContextChangedSignalInfo = StyleContextChangedCallback
connectSignal _ = connectStyleContextChanged
type instance SignalList StyleContext = StyleContextSignalList
type StyleContextSignalList = ('[ '("changed", StyleContextChangedSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method StyleContext::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "StyleContext"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_new" gtk_style_context_new ::
IO (Ptr StyleContext)
styleContextNew ::
(MonadIO m) =>
m StyleContext
styleContextNew = liftIO $ do
result <- gtk_style_context_new
checkUnexpectedReturnNULL "gtk_style_context_new" result
result' <- (wrapObject StyleContext) result
return result'
-- method StyleContext::add_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", 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_style_context_add_class" gtk_style_context_add_class ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- class_name : TBasicType TUTF8
IO ()
styleContextAddClass ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- class_name
m ()
styleContextAddClass _obj class_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
class_name' <- textToCString class_name
gtk_style_context_add_class _obj' class_name'
touchManagedPtr _obj
freeMem class_name'
return ()
-- method StyleContext::add_provider
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_add_provider" gtk_style_context_add_provider ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr StyleProvider -> -- provider : TInterface "Gtk" "StyleProvider"
Word32 -> -- priority : TBasicType TUInt32
IO ()
styleContextAddProvider ::
(MonadIO m, StyleContextK a, StyleProviderK b) =>
a -> -- _obj
b -> -- provider
Word32 -> -- priority
m ()
styleContextAddProvider _obj provider priority = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let provider' = unsafeManagedPtrCastPtr provider
gtk_style_context_add_provider _obj' provider' priority
touchManagedPtr _obj
touchManagedPtr provider
return ()
-- method StyleContext::add_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_add_region" gtk_style_context_add_region ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- region_name : TBasicType TUTF8
CUInt -> -- flags : TInterface "Gtk" "RegionFlags"
IO ()
{-# DEPRECATED styleContextAddRegion ["(Since version 3.14)"]#-}
styleContextAddRegion ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- region_name
[RegionFlags] -> -- flags
m ()
styleContextAddRegion _obj region_name flags = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
region_name' <- textToCString region_name
let flags' = gflagsToWord flags
gtk_style_context_add_region _obj' region_name' flags'
touchManagedPtr _obj
freeMem region_name'
return ()
-- method StyleContext::cancel_animations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_cancel_animations" gtk_style_context_cancel_animations ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr () -> -- region_id : TBasicType TVoid
IO ()
{-# DEPRECATED styleContextCancelAnimations ["(Since version 3.6)","This function does nothing."]#-}
styleContextCancelAnimations ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
Maybe (Ptr ()) -> -- region_id
m ()
styleContextCancelAnimations _obj region_id = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeRegion_id <- case region_id of
Nothing -> return nullPtr
Just jRegion_id -> do
return jRegion_id
gtk_style_context_cancel_animations _obj' maybeRegion_id
touchManagedPtr _obj
return ()
-- method StyleContext::get_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_background_color" gtk_style_context_get_background_color ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA"
IO ()
{-# DEPRECATED styleContextGetBackgroundColor ["(Since version 3.16)","Use gtk_render_background() instead."]#-}
styleContextGetBackgroundColor ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m (Gdk.RGBA)
styleContextGetBackgroundColor _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
gtk_style_context_get_background_color _obj' state' color
color' <- (wrapBoxed Gdk.RGBA) color
touchManagedPtr _obj
return color'
-- method StyleContext::get_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_border" gtk_style_context_get_border ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr Border -> -- border : TInterface "Gtk" "Border"
IO ()
styleContextGetBorder ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m (Border)
styleContextGetBorder _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
border <- callocBoxedBytes 8 :: IO (Ptr Border)
gtk_style_context_get_border _obj' state' border
border' <- (wrapBoxed Border) border
touchManagedPtr _obj
return border'
-- method StyleContext::get_border_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_border_color" gtk_style_context_get_border_color ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA"
IO ()
{-# DEPRECATED styleContextGetBorderColor ["(Since version 3.16)","Use gtk_render_border() instead."]#-}
styleContextGetBorderColor ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m (Gdk.RGBA)
styleContextGetBorderColor _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
gtk_style_context_get_border_color _obj' state' color
color' <- (wrapBoxed Gdk.RGBA) color
touchManagedPtr _obj
return color'
-- method StyleContext::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_color" gtk_style_context_get_color ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA"
IO ()
styleContextGetColor ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m (Gdk.RGBA)
styleContextGetColor _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
gtk_style_context_get_color _obj' state' color
color' <- (wrapBoxed Gdk.RGBA) color
touchManagedPtr _obj
return color'
-- method StyleContext::get_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_direction" gtk_style_context_get_direction ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO CUInt
{-# DEPRECATED styleContextGetDirection ["(Since version 3.8)","Use gtk_style_context_get_state() and"," check for #GTK_STATE_FLAG_DIR_LTR and"," #GTK_STATE_FLAG_DIR_RTL instead."]#-}
styleContextGetDirection ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m TextDirection
styleContextGetDirection _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_direction _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method StyleContext::get_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontDescription"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_font" gtk_style_context_get_font ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
IO (Ptr Pango.FontDescription)
{-# DEPRECATED styleContextGetFont ["(Since version 3.8)","Use gtk_style_context_get() for \"font\" or"," subproperties instead."]#-}
styleContextGetFont ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m Pango.FontDescription
styleContextGetFont _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
result <- gtk_style_context_get_font _obj' state'
checkUnexpectedReturnNULL "gtk_style_context_get_font" result
result' <- (newBoxed Pango.FontDescription) result
touchManagedPtr _obj
return result'
-- method StyleContext::get_frame_clock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "FrameClock"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_frame_clock" gtk_style_context_get_frame_clock ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO (Ptr Gdk.FrameClock)
styleContextGetFrameClock ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m Gdk.FrameClock
styleContextGetFrameClock _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_frame_clock _obj'
checkUnexpectedReturnNULL "gtk_style_context_get_frame_clock" result
result' <- (newObject Gdk.FrameClock) result
touchManagedPtr _obj
return result'
-- method StyleContext::get_junction_sides
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "JunctionSides"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_junction_sides" gtk_style_context_get_junction_sides ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO CUInt
styleContextGetJunctionSides ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m [JunctionSides]
styleContextGetJunctionSides _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_junction_sides _obj'
let result' = wordToGFlags result
touchManagedPtr _obj
return result'
-- method StyleContext::get_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_margin" gtk_style_context_get_margin ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr Border -> -- margin : TInterface "Gtk" "Border"
IO ()
styleContextGetMargin ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m (Border)
styleContextGetMargin _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
margin <- callocBoxedBytes 8 :: IO (Ptr Border)
gtk_style_context_get_margin _obj' state' margin
margin' <- (wrapBoxed Border) margin
touchManagedPtr _obj
return margin'
-- method StyleContext::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_padding" gtk_style_context_get_padding ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr Border -> -- padding : TInterface "Gtk" "Border"
IO ()
styleContextGetPadding ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- state
m (Border)
styleContextGetPadding _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = gflagsToWord state
padding <- callocBoxedBytes 8 :: IO (Ptr Border)
gtk_style_context_get_padding _obj' state' padding
padding' <- (wrapBoxed Border) padding
touchManagedPtr _obj
return padding'
-- method StyleContext::get_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StyleContext"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_parent" gtk_style_context_get_parent ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO (Ptr StyleContext)
styleContextGetParent ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m StyleContext
styleContextGetParent _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_parent _obj'
checkUnexpectedReturnNULL "gtk_style_context_get_parent" result
result' <- (newObject StyleContext) result
touchManagedPtr _obj
return result'
-- method StyleContext::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_path" gtk_style_context_get_path ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO (Ptr WidgetPath)
styleContextGetPath ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m WidgetPath
styleContextGetPath _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_path _obj'
checkUnexpectedReturnNULL "gtk_style_context_get_path" result
result' <- (newBoxed WidgetPath) result
touchManagedPtr _obj
return result'
-- method StyleContext::get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_property" gtk_style_context_get_property ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- property : TBasicType TUTF8
CUInt -> -- state : TInterface "Gtk" "StateFlags"
Ptr GValue -> -- value : TInterface "GObject" "Value"
IO ()
styleContextGetProperty ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- property
[StateFlags] -> -- state
m (GValue)
styleContextGetProperty _obj property state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
property' <- textToCString property
let state' = gflagsToWord state
value <- callocBoxedBytes 24 :: IO (Ptr GValue)
gtk_style_context_get_property _obj' property' state' value
value' <- (wrapBoxed GValue) value
touchManagedPtr _obj
freeMem property'
return value'
-- method StyleContext::get_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_scale" gtk_style_context_get_scale ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO Int32
styleContextGetScale ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m Int32
styleContextGetScale _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_scale _obj'
touchManagedPtr _obj
return result
-- method StyleContext::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_screen" gtk_style_context_get_screen ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO (Ptr Gdk.Screen)
styleContextGetScreen ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m Gdk.Screen
styleContextGetScreen _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_screen _obj'
checkUnexpectedReturnNULL "gtk_style_context_get_screen" result
result' <- (newObject Gdk.Screen) result
touchManagedPtr _obj
return result'
-- method StyleContext::get_section
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CssSection"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_section" gtk_style_context_get_section ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- property : TBasicType TUTF8
IO (Ptr CssSection)
styleContextGetSection ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- property
m CssSection
styleContextGetSection _obj property = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
property' <- textToCString property
result <- gtk_style_context_get_section _obj' property'
checkUnexpectedReturnNULL "gtk_style_context_get_section" result
result' <- (wrapBoxed CssSection) result
touchManagedPtr _obj
freeMem property'
return result'
-- method StyleContext::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateFlags"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_state" gtk_style_context_get_state ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO CUInt
styleContextGetState ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m [StateFlags]
styleContextGetState _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_get_state _obj'
let result' = wordToGFlags result
touchManagedPtr _obj
return result'
-- method StyleContext::get_style_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_get_style_property" gtk_style_context_get_style_property ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- property_name : TBasicType TUTF8
Ptr GValue -> -- value : TInterface "GObject" "Value"
IO ()
styleContextGetStyleProperty ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- property_name
GValue -> -- value
m ()
styleContextGetStyleProperty _obj property_name value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
property_name' <- textToCString property_name
let value' = unsafeManagedPtrGetPtr value
gtk_style_context_get_style_property _obj' property_name' value'
touchManagedPtr _obj
touchManagedPtr value
freeMem property_name'
return ()
-- method StyleContext::has_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", 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_style_context_has_class" gtk_style_context_has_class ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- class_name : TBasicType TUTF8
IO CInt
styleContextHasClass ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- class_name
m Bool
styleContextHasClass _obj class_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
class_name' <- textToCString class_name
result <- gtk_style_context_has_class _obj' class_name'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem class_name'
return result'
-- method StyleContext::has_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags_return", argType = TInterface "Gtk" "RegionFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", 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_style_context_has_region" gtk_style_context_has_region ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- region_name : TBasicType TUTF8
Ptr CUInt -> -- flags_return : TInterface "Gtk" "RegionFlags"
IO CInt
{-# DEPRECATED styleContextHasRegion ["(Since version 3.14)"]#-}
styleContextHasRegion ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- region_name
m (Bool,[RegionFlags])
styleContextHasRegion _obj region_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
region_name' <- textToCString region_name
flags_return <- allocMem :: IO (Ptr CUInt)
result <- gtk_style_context_has_region _obj' region_name' flags_return
let result' = (/= 0) result
flags_return' <- peek flags_return
let flags_return'' = wordToGFlags flags_return'
touchManagedPtr _obj
freeMem region_name'
freeMem flags_return
return (result', flags_return'')
-- method StyleContext::invalidate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_invalidate" gtk_style_context_invalidate ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO ()
{-# DEPRECATED styleContextInvalidate ["(Since version 3.12)","Style contexts are invalidated automatically."]#-}
styleContextInvalidate ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m ()
styleContextInvalidate _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_style_context_invalidate _obj'
touchManagedPtr _obj
return ()
-- method StyleContext::list_classes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_list_classes" gtk_style_context_list_classes ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO (Ptr (GList CString))
styleContextListClasses ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m [T.Text]
styleContextListClasses _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_list_classes _obj'
checkUnexpectedReturnNULL "gtk_style_context_list_classes" result
result' <- unpackGList result
result'' <- mapM cstringToText result'
g_list_free result
touchManagedPtr _obj
return result''
-- method StyleContext::list_regions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_list_regions" gtk_style_context_list_regions ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO (Ptr (GList CString))
{-# DEPRECATED styleContextListRegions ["(Since version 3.14)"]#-}
styleContextListRegions ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m [T.Text]
styleContextListRegions _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_style_context_list_regions _obj'
checkUnexpectedReturnNULL "gtk_style_context_list_regions" result
result' <- unpackGList result
result'' <- mapM cstringToText result'
g_list_free result
touchManagedPtr _obj
return result''
-- method StyleContext::lookup_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", 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_style_context_lookup_color" gtk_style_context_lookup_color ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- color_name : TBasicType TUTF8
Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA"
IO CInt
styleContextLookupColor ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- color_name
m (Bool,Gdk.RGBA)
styleContextLookupColor _obj color_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
color_name' <- textToCString color_name
color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
result <- gtk_style_context_lookup_color _obj' color_name' color
let result' = (/= 0) result
color' <- (wrapBoxed Gdk.RGBA) color
touchManagedPtr _obj
freeMem color_name'
return (result', color')
-- method StyleContext::lookup_icon_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_lookup_icon_set" gtk_style_context_lookup_icon_set ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- stock_id : TBasicType TUTF8
IO (Ptr IconSet)
{-# DEPRECATED styleContextLookupIconSet ["(Since version 3.10)","Use gtk_icon_theme_lookup_icon() instead."]#-}
styleContextLookupIconSet ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- stock_id
m IconSet
styleContextLookupIconSet _obj stock_id = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
stock_id' <- textToCString stock_id
result <- gtk_style_context_lookup_icon_set _obj' stock_id'
checkUnexpectedReturnNULL "gtk_style_context_lookup_icon_set" result
result' <- (newBoxed IconSet) result
touchManagedPtr _obj
freeMem stock_id'
return result'
-- method StyleContext::notify_state_change
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_notify_state_change" gtk_style_context_notify_state_change ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr Gdk.Window -> -- window : TInterface "Gdk" "Window"
Ptr () -> -- region_id : TBasicType TVoid
CUInt -> -- state : TInterface "Gtk" "StateType"
CInt -> -- state_value : TBasicType TBoolean
IO ()
{-# DEPRECATED styleContextNotifyStateChange ["(Since version 3.6)","This function does nothing."]#-}
styleContextNotifyStateChange ::
(MonadIO m, StyleContextK a, Gdk.WindowK b) =>
a -> -- _obj
b -> -- window
Maybe (Ptr ()) -> -- region_id
StateType -> -- state
Bool -> -- state_value
m ()
styleContextNotifyStateChange _obj window region_id state state_value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let window' = unsafeManagedPtrCastPtr window
maybeRegion_id <- case region_id of
Nothing -> return nullPtr
Just jRegion_id -> do
return jRegion_id
let state' = (fromIntegral . fromEnum) state
let state_value' = (fromIntegral . fromEnum) state_value
gtk_style_context_notify_state_change _obj' window' maybeRegion_id state' state_value'
touchManagedPtr _obj
touchManagedPtr window
return ()
-- method StyleContext::pop_animatable_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_pop_animatable_region" gtk_style_context_pop_animatable_region ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO ()
{-# DEPRECATED styleContextPopAnimatableRegion ["(Since version 3.6)","This function does nothing."]#-}
styleContextPopAnimatableRegion ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m ()
styleContextPopAnimatableRegion _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_style_context_pop_animatable_region _obj'
touchManagedPtr _obj
return ()
-- method StyleContext::push_animatable_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_push_animatable_region" gtk_style_context_push_animatable_region ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr () -> -- region_id : TBasicType TVoid
IO ()
{-# DEPRECATED styleContextPushAnimatableRegion ["(Since version 3.6)","This function does nothing."]#-}
styleContextPushAnimatableRegion ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
Ptr () -> -- region_id
m ()
styleContextPushAnimatableRegion _obj region_id = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_style_context_push_animatable_region _obj' region_id
touchManagedPtr _obj
return ()
-- method StyleContext::remove_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", 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_style_context_remove_class" gtk_style_context_remove_class ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- class_name : TBasicType TUTF8
IO ()
styleContextRemoveClass ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- class_name
m ()
styleContextRemoveClass _obj class_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
class_name' <- textToCString class_name
gtk_style_context_remove_class _obj' class_name'
touchManagedPtr _obj
freeMem class_name'
return ()
-- method StyleContext::remove_provider
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_remove_provider" gtk_style_context_remove_provider ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr StyleProvider -> -- provider : TInterface "Gtk" "StyleProvider"
IO ()
styleContextRemoveProvider ::
(MonadIO m, StyleContextK a, StyleProviderK b) =>
a -> -- _obj
b -> -- provider
m ()
styleContextRemoveProvider _obj provider = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let provider' = unsafeManagedPtrCastPtr provider
gtk_style_context_remove_provider _obj' provider'
touchManagedPtr _obj
touchManagedPtr provider
return ()
-- method StyleContext::remove_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", 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_style_context_remove_region" gtk_style_context_remove_region ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CString -> -- region_name : TBasicType TUTF8
IO ()
{-# DEPRECATED styleContextRemoveRegion ["(Since version 3.14)"]#-}
styleContextRemoveRegion ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
T.Text -> -- region_name
m ()
styleContextRemoveRegion _obj region_name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
region_name' <- textToCString region_name
gtk_style_context_remove_region _obj' region_name'
touchManagedPtr _obj
freeMem region_name'
return ()
-- method StyleContext::restore
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_restore" gtk_style_context_restore ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO ()
styleContextRestore ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m ()
styleContextRestore _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_style_context_restore _obj'
touchManagedPtr _obj
return ()
-- method StyleContext::save
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_save" gtk_style_context_save ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
IO ()
styleContextSave ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
m ()
styleContextSave _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_style_context_save _obj'
touchManagedPtr _obj
return ()
-- method StyleContext::scroll_animations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_scroll_animations" gtk_style_context_scroll_animations ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr Gdk.Window -> -- window : TInterface "Gdk" "Window"
Int32 -> -- dx : TBasicType TInt32
Int32 -> -- dy : TBasicType TInt32
IO ()
{-# DEPRECATED styleContextScrollAnimations ["(Since version 3.6)","This function does nothing."]#-}
styleContextScrollAnimations ::
(MonadIO m, StyleContextK a, Gdk.WindowK b) =>
a -> -- _obj
b -> -- window
Int32 -> -- dx
Int32 -> -- dy
m ()
styleContextScrollAnimations _obj window dx dy = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let window' = unsafeManagedPtrCastPtr window
gtk_style_context_scroll_animations _obj' window' dx dy
touchManagedPtr _obj
touchManagedPtr window
return ()
-- method StyleContext::set_background
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_background" gtk_style_context_set_background ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr Gdk.Window -> -- window : TInterface "Gdk" "Window"
IO ()
{-# DEPRECATED styleContextSetBackground ["(Since version 3.18)","Use gtk_render_background() instead."," Note that clients still using this function are now responsible"," for calling this function again whenever @context is invalidated."]#-}
styleContextSetBackground ::
(MonadIO m, StyleContextK a, Gdk.WindowK b) =>
a -> -- _obj
b -> -- window
m ()
styleContextSetBackground _obj window = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let window' = unsafeManagedPtrCastPtr window
gtk_style_context_set_background _obj' window'
touchManagedPtr _obj
touchManagedPtr window
return ()
-- method StyleContext::set_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_direction" gtk_style_context_set_direction ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- direction : TInterface "Gtk" "TextDirection"
IO ()
{-# DEPRECATED styleContextSetDirection ["(Since version 3.8)","Use gtk_style_context_set_state() with"," #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL"," instead."]#-}
styleContextSetDirection ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
TextDirection -> -- direction
m ()
styleContextSetDirection _obj direction = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let direction' = (fromIntegral . fromEnum) direction
gtk_style_context_set_direction _obj' direction'
touchManagedPtr _obj
return ()
-- method StyleContext::set_frame_clock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "frame_clock", argType = TInterface "Gdk" "FrameClock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "frame_clock", argType = TInterface "Gdk" "FrameClock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_frame_clock" gtk_style_context_set_frame_clock ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr Gdk.FrameClock -> -- frame_clock : TInterface "Gdk" "FrameClock"
IO ()
styleContextSetFrameClock ::
(MonadIO m, StyleContextK a, Gdk.FrameClockK b) =>
a -> -- _obj
b -> -- frame_clock
m ()
styleContextSetFrameClock _obj frame_clock = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let frame_clock' = unsafeManagedPtrCastPtr frame_clock
gtk_style_context_set_frame_clock _obj' frame_clock'
touchManagedPtr _obj
touchManagedPtr frame_clock
return ()
-- method StyleContext::set_junction_sides
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sides", argType = TInterface "Gtk" "JunctionSides", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sides", argType = TInterface "Gtk" "JunctionSides", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_junction_sides" gtk_style_context_set_junction_sides ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- sides : TInterface "Gtk" "JunctionSides"
IO ()
styleContextSetJunctionSides ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[JunctionSides] -> -- sides
m ()
styleContextSetJunctionSides _obj sides = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let sides' = gflagsToWord sides
gtk_style_context_set_junction_sides _obj' sides'
touchManagedPtr _obj
return ()
-- method StyleContext::set_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_parent" gtk_style_context_set_parent ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr StyleContext -> -- parent : TInterface "Gtk" "StyleContext"
IO ()
styleContextSetParent ::
(MonadIO m, StyleContextK a, StyleContextK b) =>
a -> -- _obj
Maybe (b) -> -- parent
m ()
styleContextSetParent _obj parent = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
let jParent' = unsafeManagedPtrCastPtr jParent
return jParent'
gtk_style_context_set_parent _obj' maybeParent
touchManagedPtr _obj
whenJust parent touchManagedPtr
return ()
-- method StyleContext::set_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_path" gtk_style_context_set_path ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr WidgetPath -> -- path : TInterface "Gtk" "WidgetPath"
IO ()
styleContextSetPath ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
WidgetPath -> -- path
m ()
styleContextSetPath _obj path = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let path' = unsafeManagedPtrGetPtr path
gtk_style_context_set_path _obj' path'
touchManagedPtr _obj
touchManagedPtr path
return ()
-- method StyleContext::set_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_scale" gtk_style_context_set_scale ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Int32 -> -- scale : TBasicType TInt32
IO ()
styleContextSetScale ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
Int32 -> -- scale
m ()
styleContextSetScale _obj scale = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_style_context_set_scale _obj' scale
touchManagedPtr _obj
return ()
-- method StyleContext::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_screen" gtk_style_context_set_screen ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
Ptr Gdk.Screen -> -- screen : TInterface "Gdk" "Screen"
IO ()
styleContextSetScreen ::
(MonadIO m, StyleContextK a, Gdk.ScreenK b) =>
a -> -- _obj
b -> -- screen
m ()
styleContextSetScreen _obj screen = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let screen' = unsafeManagedPtrCastPtr screen
gtk_style_context_set_screen _obj' screen'
touchManagedPtr _obj
touchManagedPtr screen
return ()
-- method StyleContext::set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_set_state" gtk_style_context_set_state ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- flags : TInterface "Gtk" "StateFlags"
IO ()
styleContextSetState ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
[StateFlags] -> -- flags
m ()
styleContextSetState _obj flags = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let flags' = gflagsToWord flags
gtk_style_context_set_state _obj' flags'
touchManagedPtr _obj
return ()
-- method StyleContext::state_is_running
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "progress", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_state_is_running" gtk_style_context_state_is_running ::
Ptr StyleContext -> -- _obj : TInterface "Gtk" "StyleContext"
CUInt -> -- state : TInterface "Gtk" "StateType"
Ptr CDouble -> -- progress : TBasicType TDouble
IO CInt
{-# DEPRECATED styleContextStateIsRunning ["(Since version 3.6)","This function always returns %FALSE"]#-}
styleContextStateIsRunning ::
(MonadIO m, StyleContextK a) =>
a -> -- _obj
StateType -> -- state
m (Bool,Double)
styleContextStateIsRunning _obj state = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let state' = (fromIntegral . fromEnum) state
progress <- allocMem :: IO (Ptr CDouble)
result <- gtk_style_context_state_is_running _obj' state' progress
let result' = (/= 0) result
progress' <- peek progress
let progress'' = realToFrac progress'
touchManagedPtr _obj
freeMem progress
return (result', progress'')
-- method StyleContext::add_provider_for_screen
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_add_provider_for_screen" gtk_style_context_add_provider_for_screen ::
Ptr Gdk.Screen -> -- screen : TInterface "Gdk" "Screen"
Ptr StyleProvider -> -- provider : TInterface "Gtk" "StyleProvider"
Word32 -> -- priority : TBasicType TUInt32
IO ()
styleContextAddProviderForScreen ::
(MonadIO m, Gdk.ScreenK a, StyleProviderK b) =>
a -> -- screen
b -> -- provider
Word32 -> -- priority
m ()
styleContextAddProviderForScreen screen provider priority = liftIO $ do
let screen' = unsafeManagedPtrCastPtr screen
let provider' = unsafeManagedPtrCastPtr provider
gtk_style_context_add_provider_for_screen screen' provider' priority
touchManagedPtr screen
touchManagedPtr provider
return ()
-- method StyleContext::remove_provider_for_screen
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_remove_provider_for_screen" gtk_style_context_remove_provider_for_screen ::
Ptr Gdk.Screen -> -- screen : TInterface "Gdk" "Screen"
Ptr StyleProvider -> -- provider : TInterface "Gtk" "StyleProvider"
IO ()
styleContextRemoveProviderForScreen ::
(MonadIO m, Gdk.ScreenK a, StyleProviderK b) =>
a -> -- screen
b -> -- provider
m ()
styleContextRemoveProviderForScreen screen provider = liftIO $ do
let screen' = unsafeManagedPtrCastPtr screen
let provider' = unsafeManagedPtrCastPtr provider
gtk_style_context_remove_provider_for_screen screen' provider'
touchManagedPtr screen
touchManagedPtr provider
return ()
-- method StyleContext::reset_widgets
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_style_context_reset_widgets" gtk_style_context_reset_widgets ::
Ptr Gdk.Screen -> -- screen : TInterface "Gdk" "Screen"
IO ()
styleContextResetWidgets ::
(MonadIO m, Gdk.ScreenK a) =>
a -> -- screen
m ()
styleContextResetWidgets screen = liftIO $ do
let screen' = unsafeManagedPtrCastPtr screen
gtk_style_context_reset_widgets screen'
touchManagedPtr screen
return ()