{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.StyleContext
(
StyleContext(..) ,
IsStyleContext ,
toStyleContext ,
#if defined(ENABLE_OVERLOADING)
ResolveStyleContextMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
StyleContextAddClassMethodInfo ,
#endif
styleContextAddClass ,
#if defined(ENABLE_OVERLOADING)
StyleContextAddProviderMethodInfo ,
#endif
styleContextAddProvider ,
styleContextAddProviderForScreen ,
#if defined(ENABLE_OVERLOADING)
StyleContextAddRegionMethodInfo ,
#endif
styleContextAddRegion ,
#if defined(ENABLE_OVERLOADING)
StyleContextCancelAnimationsMethodInfo ,
#endif
styleContextCancelAnimations ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetBackgroundColorMethodInfo,
#endif
styleContextGetBackgroundColor ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetBorderMethodInfo ,
#endif
styleContextGetBorder ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetBorderColorMethodInfo ,
#endif
styleContextGetBorderColor ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetColorMethodInfo ,
#endif
styleContextGetColor ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetDirectionMethodInfo ,
#endif
styleContextGetDirection ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetFontMethodInfo ,
#endif
styleContextGetFont ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetFrameClockMethodInfo ,
#endif
styleContextGetFrameClock ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetJunctionSidesMethodInfo ,
#endif
styleContextGetJunctionSides ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetMarginMethodInfo ,
#endif
styleContextGetMargin ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetPaddingMethodInfo ,
#endif
styleContextGetPadding ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetParentMethodInfo ,
#endif
styleContextGetParent ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetPathMethodInfo ,
#endif
styleContextGetPath ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetPropertyMethodInfo ,
#endif
styleContextGetProperty ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetScaleMethodInfo ,
#endif
styleContextGetScale ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetScreenMethodInfo ,
#endif
styleContextGetScreen ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetSectionMethodInfo ,
#endif
styleContextGetSection ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetStateMethodInfo ,
#endif
styleContextGetState ,
#if defined(ENABLE_OVERLOADING)
StyleContextGetStylePropertyMethodInfo ,
#endif
styleContextGetStyleProperty ,
#if defined(ENABLE_OVERLOADING)
StyleContextHasClassMethodInfo ,
#endif
styleContextHasClass ,
#if defined(ENABLE_OVERLOADING)
StyleContextHasRegionMethodInfo ,
#endif
styleContextHasRegion ,
#if defined(ENABLE_OVERLOADING)
StyleContextInvalidateMethodInfo ,
#endif
styleContextInvalidate ,
#if defined(ENABLE_OVERLOADING)
StyleContextListClassesMethodInfo ,
#endif
styleContextListClasses ,
#if defined(ENABLE_OVERLOADING)
StyleContextListRegionsMethodInfo ,
#endif
styleContextListRegions ,
#if defined(ENABLE_OVERLOADING)
StyleContextLookupColorMethodInfo ,
#endif
styleContextLookupColor ,
#if defined(ENABLE_OVERLOADING)
StyleContextLookupIconSetMethodInfo ,
#endif
styleContextLookupIconSet ,
styleContextNew ,
#if defined(ENABLE_OVERLOADING)
StyleContextNotifyStateChangeMethodInfo ,
#endif
styleContextNotifyStateChange ,
#if defined(ENABLE_OVERLOADING)
StyleContextPopAnimatableRegionMethodInfo,
#endif
styleContextPopAnimatableRegion ,
#if defined(ENABLE_OVERLOADING)
StyleContextPushAnimatableRegionMethodInfo,
#endif
styleContextPushAnimatableRegion ,
#if defined(ENABLE_OVERLOADING)
StyleContextRemoveClassMethodInfo ,
#endif
styleContextRemoveClass ,
#if defined(ENABLE_OVERLOADING)
StyleContextRemoveProviderMethodInfo ,
#endif
styleContextRemoveProvider ,
styleContextRemoveProviderForScreen ,
#if defined(ENABLE_OVERLOADING)
StyleContextRemoveRegionMethodInfo ,
#endif
styleContextRemoveRegion ,
styleContextResetWidgets ,
#if defined(ENABLE_OVERLOADING)
StyleContextRestoreMethodInfo ,
#endif
styleContextRestore ,
#if defined(ENABLE_OVERLOADING)
StyleContextSaveMethodInfo ,
#endif
styleContextSave ,
#if defined(ENABLE_OVERLOADING)
StyleContextScrollAnimationsMethodInfo ,
#endif
styleContextScrollAnimations ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetBackgroundMethodInfo ,
#endif
styleContextSetBackground ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetDirectionMethodInfo ,
#endif
styleContextSetDirection ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetFrameClockMethodInfo ,
#endif
styleContextSetFrameClock ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetJunctionSidesMethodInfo ,
#endif
styleContextSetJunctionSides ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetParentMethodInfo ,
#endif
styleContextSetParent ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetPathMethodInfo ,
#endif
styleContextSetPath ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetScaleMethodInfo ,
#endif
styleContextSetScale ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetScreenMethodInfo ,
#endif
styleContextSetScreen ,
#if defined(ENABLE_OVERLOADING)
StyleContextSetStateMethodInfo ,
#endif
styleContextSetState ,
#if defined(ENABLE_OVERLOADING)
StyleContextStateIsRunningMethodInfo ,
#endif
styleContextStateIsRunning ,
#if defined(ENABLE_OVERLOADING)
StyleContextToStringMethodInfo ,
#endif
styleContextToString ,
#if defined(ENABLE_OVERLOADING)
StyleContextDirectionPropertyInfo ,
#endif
constructStyleContextDirection ,
getStyleContextDirection ,
setStyleContextDirection ,
#if defined(ENABLE_OVERLOADING)
styleContextDirection ,
#endif
#if defined(ENABLE_OVERLOADING)
StyleContextPaintClockPropertyInfo ,
#endif
clearStyleContextPaintClock ,
constructStyleContextPaintClock ,
getStyleContextPaintClock ,
setStyleContextPaintClock ,
#if defined(ENABLE_OVERLOADING)
styleContextPaintClock ,
#endif
#if defined(ENABLE_OVERLOADING)
StyleContextParentPropertyInfo ,
#endif
clearStyleContextParent ,
constructStyleContextParent ,
getStyleContextParent ,
setStyleContextParent ,
#if defined(ENABLE_OVERLOADING)
styleContextParent ,
#endif
#if defined(ENABLE_OVERLOADING)
StyleContextScreenPropertyInfo ,
#endif
constructStyleContextScreen ,
getStyleContextScreen ,
setStyleContextScreen ,
#if defined(ENABLE_OVERLOADING)
styleContextScreen ,
#endif
C_StyleContextChangedCallback ,
StyleContextChangedCallback ,
#if defined(ENABLE_OVERLOADING)
StyleContextChangedSignalInfo ,
#endif
afterStyleContextChanged ,
genClosure_StyleContextChanged ,
mk_StyleContextChangedCallback ,
noStyleContextChangedCallback ,
onStyleContextChanged ,
wrap_StyleContextChangedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Screen as Gdk.Screen
import qualified GI.Gdk.Objects.Window as Gdk.Window
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.CssSection as Gtk.CssSection
import {-# SOURCE #-} qualified GI.Gtk.Structs.IconSet as Gtk.IconSet
import {-# SOURCE #-} qualified GI.Gtk.Structs.WidgetPath as Gtk.WidgetPath
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription
newtype StyleContext = StyleContext (SP.ManagedPtr StyleContext)
deriving (StyleContext -> StyleContext -> Bool
(StyleContext -> StyleContext -> Bool)
-> (StyleContext -> StyleContext -> Bool) -> Eq StyleContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StyleContext -> StyleContext -> Bool
$c/= :: StyleContext -> StyleContext -> Bool
== :: StyleContext -> StyleContext -> Bool
$c== :: StyleContext -> StyleContext -> Bool
Eq)
instance SP.ManagedPtrNewtype StyleContext where
toManagedPtr :: StyleContext -> ManagedPtr StyleContext
toManagedPtr (StyleContext ManagedPtr StyleContext
p) = ManagedPtr StyleContext
p
foreign import ccall "gtk_style_context_get_type"
c_gtk_style_context_get_type :: IO B.Types.GType
instance B.Types.TypedObject StyleContext where
glibType :: IO GType
glibType = IO GType
c_gtk_style_context_get_type
instance B.Types.GObject StyleContext
instance B.GValue.IsGValue StyleContext where
toGValue :: StyleContext -> IO GValue
toGValue StyleContext
o = do
GType
gtype <- IO GType
c_gtk_style_context_get_type
StyleContext -> (Ptr StyleContext -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr StyleContext
o (GType
-> (GValue -> Ptr StyleContext -> IO ())
-> Ptr StyleContext
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr StyleContext -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO StyleContext
fromGValue GValue
gv = do
Ptr StyleContext
ptr <- GValue -> IO (Ptr StyleContext)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr StyleContext)
(ManagedPtr StyleContext -> StyleContext)
-> Ptr StyleContext -> IO StyleContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr StyleContext -> StyleContext
StyleContext Ptr StyleContext
ptr
class (SP.GObject o, O.IsDescendantOf StyleContext o) => IsStyleContext o
instance (SP.GObject o, O.IsDescendantOf StyleContext o) => IsStyleContext o
instance O.HasParentTypes StyleContext
type instance O.ParentTypes StyleContext = '[GObject.Object.Object]
toStyleContext :: (MonadIO m, IsStyleContext o) => o -> m StyleContext
toStyleContext :: o -> m StyleContext
toStyleContext = IO StyleContext -> m StyleContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StyleContext -> m StyleContext)
-> (o -> IO StyleContext) -> o -> m StyleContext
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr StyleContext -> StyleContext) -> o -> IO StyleContext
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr StyleContext -> StyleContext
StyleContext
#if defined(ENABLE_OVERLOADING)
type family ResolveStyleContextMethod (t :: Symbol) (o :: *) :: * where
ResolveStyleContextMethod "addClass" o = StyleContextAddClassMethodInfo
ResolveStyleContextMethod "addProvider" o = StyleContextAddProviderMethodInfo
ResolveStyleContextMethod "addRegion" o = StyleContextAddRegionMethodInfo
ResolveStyleContextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveStyleContextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveStyleContextMethod "cancelAnimations" o = StyleContextCancelAnimationsMethodInfo
ResolveStyleContextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveStyleContextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveStyleContextMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveStyleContextMethod "hasClass" o = StyleContextHasClassMethodInfo
ResolveStyleContextMethod "hasRegion" o = StyleContextHasRegionMethodInfo
ResolveStyleContextMethod "invalidate" o = StyleContextInvalidateMethodInfo
ResolveStyleContextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveStyleContextMethod "listClasses" o = StyleContextListClassesMethodInfo
ResolveStyleContextMethod "listRegions" o = StyleContextListRegionsMethodInfo
ResolveStyleContextMethod "lookupColor" o = StyleContextLookupColorMethodInfo
ResolveStyleContextMethod "lookupIconSet" o = StyleContextLookupIconSetMethodInfo
ResolveStyleContextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveStyleContextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveStyleContextMethod "notifyStateChange" o = StyleContextNotifyStateChangeMethodInfo
ResolveStyleContextMethod "popAnimatableRegion" o = StyleContextPopAnimatableRegionMethodInfo
ResolveStyleContextMethod "pushAnimatableRegion" o = StyleContextPushAnimatableRegionMethodInfo
ResolveStyleContextMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveStyleContextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveStyleContextMethod "removeClass" o = StyleContextRemoveClassMethodInfo
ResolveStyleContextMethod "removeProvider" o = StyleContextRemoveProviderMethodInfo
ResolveStyleContextMethod "removeRegion" o = StyleContextRemoveRegionMethodInfo
ResolveStyleContextMethod "restore" o = StyleContextRestoreMethodInfo
ResolveStyleContextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveStyleContextMethod "save" o = StyleContextSaveMethodInfo
ResolveStyleContextMethod "scrollAnimations" o = StyleContextScrollAnimationsMethodInfo
ResolveStyleContextMethod "stateIsRunning" o = StyleContextStateIsRunningMethodInfo
ResolveStyleContextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveStyleContextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveStyleContextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveStyleContextMethod "toString" o = StyleContextToStringMethodInfo
ResolveStyleContextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveStyleContextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveStyleContextMethod "getBackgroundColor" o = StyleContextGetBackgroundColorMethodInfo
ResolveStyleContextMethod "getBorder" o = StyleContextGetBorderMethodInfo
ResolveStyleContextMethod "getBorderColor" o = StyleContextGetBorderColorMethodInfo
ResolveStyleContextMethod "getColor" o = StyleContextGetColorMethodInfo
ResolveStyleContextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveStyleContextMethod "getDirection" o = StyleContextGetDirectionMethodInfo
ResolveStyleContextMethod "getFont" o = StyleContextGetFontMethodInfo
ResolveStyleContextMethod "getFrameClock" o = StyleContextGetFrameClockMethodInfo
ResolveStyleContextMethod "getJunctionSides" o = StyleContextGetJunctionSidesMethodInfo
ResolveStyleContextMethod "getMargin" o = StyleContextGetMarginMethodInfo
ResolveStyleContextMethod "getPadding" o = StyleContextGetPaddingMethodInfo
ResolveStyleContextMethod "getParent" o = StyleContextGetParentMethodInfo
ResolveStyleContextMethod "getPath" o = StyleContextGetPathMethodInfo
ResolveStyleContextMethod "getProperty" o = StyleContextGetPropertyMethodInfo
ResolveStyleContextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveStyleContextMethod "getScale" o = StyleContextGetScaleMethodInfo
ResolveStyleContextMethod "getScreen" o = StyleContextGetScreenMethodInfo
ResolveStyleContextMethod "getSection" o = StyleContextGetSectionMethodInfo
ResolveStyleContextMethod "getState" o = StyleContextGetStateMethodInfo
ResolveStyleContextMethod "getStyleProperty" o = StyleContextGetStylePropertyMethodInfo
ResolveStyleContextMethod "setBackground" o = StyleContextSetBackgroundMethodInfo
ResolveStyleContextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveStyleContextMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveStyleContextMethod "setDirection" o = StyleContextSetDirectionMethodInfo
ResolveStyleContextMethod "setFrameClock" o = StyleContextSetFrameClockMethodInfo
ResolveStyleContextMethod "setJunctionSides" o = StyleContextSetJunctionSidesMethodInfo
ResolveStyleContextMethod "setParent" o = StyleContextSetParentMethodInfo
ResolveStyleContextMethod "setPath" o = StyleContextSetPathMethodInfo
ResolveStyleContextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveStyleContextMethod "setScale" o = StyleContextSetScaleMethodInfo
ResolveStyleContextMethod "setScreen" o = StyleContextSetScreenMethodInfo
ResolveStyleContextMethod "setState" o = StyleContextSetStateMethodInfo
ResolveStyleContextMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveStyleContextMethod t StyleContext, O.MethodInfo info StyleContext p) => OL.IsLabel t (StyleContext -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type StyleContextChangedCallback =
IO ()
noStyleContextChangedCallback :: Maybe StyleContextChangedCallback
noStyleContextChangedCallback :: Maybe (IO ())
noStyleContextChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_StyleContextChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_StyleContextChangedCallback :: C_StyleContextChangedCallback -> IO (FunPtr C_StyleContextChangedCallback)
genClosure_StyleContextChanged :: MonadIO m => StyleContextChangedCallback -> m (GClosure C_StyleContextChangedCallback)
genClosure_StyleContextChanged :: IO () -> m (GClosure C_StyleContextChangedCallback)
genClosure_StyleContextChanged IO ()
cb = IO (GClosure C_StyleContextChangedCallback)
-> m (GClosure C_StyleContextChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_StyleContextChangedCallback)
-> m (GClosure C_StyleContextChangedCallback))
-> IO (GClosure C_StyleContextChangedCallback)
-> m (GClosure C_StyleContextChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_StyleContextChangedCallback
cb' = IO () -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback IO ()
cb
C_StyleContextChangedCallback
-> IO (FunPtr C_StyleContextChangedCallback)
mk_StyleContextChangedCallback C_StyleContextChangedCallback
cb' IO (FunPtr C_StyleContextChangedCallback)
-> (FunPtr C_StyleContextChangedCallback
-> IO (GClosure C_StyleContextChangedCallback))
-> IO (GClosure C_StyleContextChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_StyleContextChangedCallback
-> IO (GClosure C_StyleContextChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_StyleContextChangedCallback ::
StyleContextChangedCallback ->
C_StyleContextChangedCallback
wrap_StyleContextChangedCallback :: IO () -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onStyleContextChanged :: (IsStyleContext a, MonadIO m) => a -> StyleContextChangedCallback -> m SignalHandlerId
onStyleContextChanged :: a -> IO () -> m SignalHandlerId
onStyleContextChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_StyleContextChangedCallback
cb' = IO () -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback IO ()
cb
FunPtr C_StyleContextChangedCallback
cb'' <- C_StyleContextChangedCallback
-> IO (FunPtr C_StyleContextChangedCallback)
mk_StyleContextChangedCallback C_StyleContextChangedCallback
cb'
a
-> Text
-> FunPtr C_StyleContextChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"changed" FunPtr C_StyleContextChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterStyleContextChanged :: (IsStyleContext a, MonadIO m) => a -> StyleContextChangedCallback -> m SignalHandlerId
afterStyleContextChanged :: a -> IO () -> m SignalHandlerId
afterStyleContextChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_StyleContextChangedCallback
cb' = IO () -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback IO ()
cb
FunPtr C_StyleContextChangedCallback
cb'' <- C_StyleContextChangedCallback
-> IO (FunPtr C_StyleContextChangedCallback)
mk_StyleContextChangedCallback C_StyleContextChangedCallback
cb'
a
-> Text
-> FunPtr C_StyleContextChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"changed" FunPtr C_StyleContextChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data StyleContextChangedSignalInfo
instance SignalInfo StyleContextChangedSignalInfo where
type HaskellCallbackType StyleContextChangedSignalInfo = StyleContextChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_StyleContextChangedCallback cb
cb'' <- mk_StyleContextChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
#endif
getStyleContextDirection :: (MonadIO m, IsStyleContext o) => o -> m Gtk.Enums.TextDirection
getStyleContextDirection :: o -> m TextDirection
getStyleContextDirection o
obj = IO TextDirection -> m TextDirection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextDirection -> m TextDirection)
-> IO TextDirection -> m TextDirection
forall a b. (a -> b) -> a -> b
$ o -> String -> IO TextDirection
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"direction"
setStyleContextDirection :: (MonadIO m, IsStyleContext o) => o -> Gtk.Enums.TextDirection -> m ()
setStyleContextDirection :: o -> TextDirection -> m ()
setStyleContextDirection o
obj TextDirection
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> TextDirection -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"direction" TextDirection
val
constructStyleContextDirection :: (IsStyleContext o, MIO.MonadIO m) => Gtk.Enums.TextDirection -> m (GValueConstruct o)
constructStyleContextDirection :: TextDirection -> m (GValueConstruct o)
constructStyleContextDirection TextDirection
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> TextDirection -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"direction" TextDirection
val
#if defined(ENABLE_OVERLOADING)
data StyleContextDirectionPropertyInfo
instance AttrInfo StyleContextDirectionPropertyInfo where
type AttrAllowedOps StyleContextDirectionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint StyleContextDirectionPropertyInfo = IsStyleContext
type AttrSetTypeConstraint StyleContextDirectionPropertyInfo = (~) Gtk.Enums.TextDirection
type AttrTransferTypeConstraint StyleContextDirectionPropertyInfo = (~) Gtk.Enums.TextDirection
type AttrTransferType StyleContextDirectionPropertyInfo = Gtk.Enums.TextDirection
type AttrGetType StyleContextDirectionPropertyInfo = Gtk.Enums.TextDirection
type AttrLabel StyleContextDirectionPropertyInfo = "direction"
type AttrOrigin StyleContextDirectionPropertyInfo = StyleContext
attrGet = getStyleContextDirection
attrSet = setStyleContextDirection
attrTransfer _ v = do
return v
attrConstruct = constructStyleContextDirection
attrClear = undefined
#endif
getStyleContextPaintClock :: (MonadIO m, IsStyleContext o) => o -> m (Maybe Gdk.FrameClock.FrameClock)
getStyleContextPaintClock :: o -> m (Maybe FrameClock)
getStyleContextPaintClock o
obj = IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FrameClock) -> m (Maybe FrameClock))
-> IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr FrameClock -> FrameClock)
-> IO (Maybe FrameClock)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"paint-clock" ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock
setStyleContextPaintClock :: (MonadIO m, IsStyleContext o, Gdk.FrameClock.IsFrameClock a) => o -> a -> m ()
setStyleContextPaintClock :: o -> a -> m ()
setStyleContextPaintClock o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"paint-clock" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructStyleContextPaintClock :: (IsStyleContext o, MIO.MonadIO m, Gdk.FrameClock.IsFrameClock a) => a -> m (GValueConstruct o)
constructStyleContextPaintClock :: a -> m (GValueConstruct o)
constructStyleContextPaintClock a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"paint-clock" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearStyleContextPaintClock :: (MonadIO m, IsStyleContext o) => o -> m ()
clearStyleContextPaintClock :: o -> m ()
clearStyleContextPaintClock o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe FrameClock -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"paint-clock" (Maybe FrameClock
forall a. Maybe a
Nothing :: Maybe Gdk.FrameClock.FrameClock)
#if defined(ENABLE_OVERLOADING)
data StyleContextPaintClockPropertyInfo
instance AttrInfo StyleContextPaintClockPropertyInfo where
type AttrAllowedOps StyleContextPaintClockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint StyleContextPaintClockPropertyInfo = IsStyleContext
type AttrSetTypeConstraint StyleContextPaintClockPropertyInfo = Gdk.FrameClock.IsFrameClock
type AttrTransferTypeConstraint StyleContextPaintClockPropertyInfo = Gdk.FrameClock.IsFrameClock
type AttrTransferType StyleContextPaintClockPropertyInfo = Gdk.FrameClock.FrameClock
type AttrGetType StyleContextPaintClockPropertyInfo = (Maybe Gdk.FrameClock.FrameClock)
type AttrLabel StyleContextPaintClockPropertyInfo = "paint-clock"
type AttrOrigin StyleContextPaintClockPropertyInfo = StyleContext
attrGet = getStyleContextPaintClock
attrSet = setStyleContextPaintClock
attrTransfer _ v = do
unsafeCastTo Gdk.FrameClock.FrameClock v
attrConstruct = constructStyleContextPaintClock
attrClear = clearStyleContextPaintClock
#endif
getStyleContextParent :: (MonadIO m, IsStyleContext o) => o -> m (Maybe StyleContext)
getStyleContextParent :: o -> m (Maybe StyleContext)
getStyleContextParent o
obj = IO (Maybe StyleContext) -> m (Maybe StyleContext)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe StyleContext) -> m (Maybe StyleContext))
-> IO (Maybe StyleContext) -> m (Maybe StyleContext)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr StyleContext -> StyleContext)
-> IO (Maybe StyleContext)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"parent" ManagedPtr StyleContext -> StyleContext
StyleContext
setStyleContextParent :: (MonadIO m, IsStyleContext o, IsStyleContext a) => o -> a -> m ()
setStyleContextParent :: o -> a -> m ()
setStyleContextParent o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"parent" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructStyleContextParent :: (IsStyleContext o, MIO.MonadIO m, IsStyleContext a) => a -> m (GValueConstruct o)
constructStyleContextParent :: a -> m (GValueConstruct o)
constructStyleContextParent a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"parent" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearStyleContextParent :: (MonadIO m, IsStyleContext o) => o -> m ()
clearStyleContextParent :: o -> m ()
clearStyleContextParent o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe StyleContext -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"parent" (Maybe StyleContext
forall a. Maybe a
Nothing :: Maybe StyleContext)
#if defined(ENABLE_OVERLOADING)
data StyleContextParentPropertyInfo
instance AttrInfo StyleContextParentPropertyInfo where
type AttrAllowedOps StyleContextParentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint StyleContextParentPropertyInfo = IsStyleContext
type AttrSetTypeConstraint StyleContextParentPropertyInfo = IsStyleContext
type AttrTransferTypeConstraint StyleContextParentPropertyInfo = IsStyleContext
type AttrTransferType StyleContextParentPropertyInfo = StyleContext
type AttrGetType StyleContextParentPropertyInfo = (Maybe StyleContext)
type AttrLabel StyleContextParentPropertyInfo = "parent"
type AttrOrigin StyleContextParentPropertyInfo = StyleContext
attrGet = getStyleContextParent
attrSet = setStyleContextParent
attrTransfer _ v = do
unsafeCastTo StyleContext v
attrConstruct = constructStyleContextParent
attrClear = clearStyleContextParent
#endif
getStyleContextScreen :: (MonadIO m, IsStyleContext o) => o -> m Gdk.Screen.Screen
getStyleContextScreen :: o -> m Screen
getStyleContextScreen o
obj = IO Screen -> m Screen
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Screen -> m Screen) -> IO Screen -> m Screen
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Screen) -> IO Screen
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getStyleContextScreen" (IO (Maybe Screen) -> IO Screen) -> IO (Maybe Screen) -> IO Screen
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Screen -> Screen) -> IO (Maybe Screen)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"screen" ManagedPtr Screen -> Screen
Gdk.Screen.Screen
setStyleContextScreen :: (MonadIO m, IsStyleContext o, Gdk.Screen.IsScreen a) => o -> a -> m ()
setStyleContextScreen :: o -> a -> m ()
setStyleContextScreen o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"screen" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructStyleContextScreen :: (IsStyleContext o, MIO.MonadIO m, Gdk.Screen.IsScreen a) => a -> m (GValueConstruct o)
constructStyleContextScreen :: a -> m (GValueConstruct o)
constructStyleContextScreen a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"screen" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data StyleContextScreenPropertyInfo
instance AttrInfo StyleContextScreenPropertyInfo where
type AttrAllowedOps StyleContextScreenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint StyleContextScreenPropertyInfo = IsStyleContext
type AttrSetTypeConstraint StyleContextScreenPropertyInfo = Gdk.Screen.IsScreen
type AttrTransferTypeConstraint StyleContextScreenPropertyInfo = Gdk.Screen.IsScreen
type AttrTransferType StyleContextScreenPropertyInfo = Gdk.Screen.Screen
type AttrGetType StyleContextScreenPropertyInfo = Gdk.Screen.Screen
type AttrLabel StyleContextScreenPropertyInfo = "screen"
type AttrOrigin StyleContextScreenPropertyInfo = StyleContext
attrGet = getStyleContextScreen
attrSet = setStyleContextScreen
attrTransfer _ v = do
unsafeCastTo Gdk.Screen.Screen v
attrConstruct = constructStyleContextScreen
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList StyleContext
type instance O.AttributeList StyleContext = StyleContextAttributeList
type StyleContextAttributeList = ('[ '("direction", StyleContextDirectionPropertyInfo), '("paintClock", StyleContextPaintClockPropertyInfo), '("parent", StyleContextParentPropertyInfo), '("screen", StyleContextScreenPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
styleContextDirection :: AttrLabelProxy "direction"
styleContextDirection = AttrLabelProxy
styleContextPaintClock :: AttrLabelProxy "paintClock"
styleContextPaintClock = AttrLabelProxy
styleContextParent :: AttrLabelProxy "parent"
styleContextParent = AttrLabelProxy
styleContextScreen :: AttrLabelProxy "screen"
styleContextScreen = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList StyleContext = StyleContextSignalList
type StyleContextSignalList = ('[ '("changed", StyleContextChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_style_context_new" gtk_style_context_new ::
IO (Ptr StyleContext)
styleContextNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m StyleContext
styleContextNew :: m StyleContext
styleContextNew = IO StyleContext -> m StyleContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StyleContext -> m StyleContext)
-> IO StyleContext -> m StyleContext
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
result <- IO (Ptr StyleContext)
gtk_style_context_new
Text -> Ptr StyleContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"styleContextNew" Ptr StyleContext
result
StyleContext
result' <- ((ManagedPtr StyleContext -> StyleContext)
-> Ptr StyleContext -> IO StyleContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr StyleContext -> StyleContext
StyleContext) Ptr StyleContext
result
StyleContext -> IO StyleContext
forall (m :: * -> *) a. Monad m => a -> m a
return StyleContext
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_style_context_add_class" gtk_style_context_add_class ::
Ptr StyleContext ->
CString ->
IO ()
styleContextAddClass ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m ()
styleContextAddClass :: a -> Text -> m ()
styleContextAddClass a
context Text
className = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
className' <- Text -> IO CString
textToCString Text
className
Ptr StyleContext -> CString -> IO ()
gtk_style_context_add_class Ptr StyleContext
context' CString
className'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
className'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextAddClassMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextAddClassMethodInfo a signature where
overloadedMethod = styleContextAddClass
#endif
foreign import ccall "gtk_style_context_add_provider" gtk_style_context_add_provider ::
Ptr StyleContext ->
Ptr Gtk.StyleProvider.StyleProvider ->
Word32 ->
IO ()
styleContextAddProvider ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gtk.StyleProvider.IsStyleProvider b) =>
a
-> b
-> Word32
-> m ()
styleContextAddProvider :: a -> b -> Word32 -> m ()
styleContextAddProvider a
context b
provider Word32
priority = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleProvider
provider' <- b -> IO (Ptr StyleProvider)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
provider
Ptr StyleContext -> Ptr StyleProvider -> Word32 -> IO ()
gtk_style_context_add_provider Ptr StyleContext
context' Ptr StyleProvider
provider' Word32
priority
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
provider
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextAddProviderMethodInfo
instance (signature ~ (b -> Word32 -> m ()), MonadIO m, IsStyleContext a, Gtk.StyleProvider.IsStyleProvider b) => O.MethodInfo StyleContextAddProviderMethodInfo a signature where
overloadedMethod = styleContextAddProvider
#endif
foreign import ccall "gtk_style_context_add_region" gtk_style_context_add_region ::
Ptr StyleContext ->
CString ->
CUInt ->
IO ()
{-# DEPRECATED styleContextAddRegion ["(Since version 3.14)"] #-}
styleContextAddRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> [Gtk.Flags.RegionFlags]
-> m ()
styleContextAddRegion :: a -> Text -> [RegionFlags] -> m ()
styleContextAddRegion a
context Text
regionName [RegionFlags]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
regionName' <- Text -> IO CString
textToCString Text
regionName
let flags' :: CUInt
flags' = [RegionFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RegionFlags]
flags
Ptr StyleContext -> CString -> CUInt -> IO ()
gtk_style_context_add_region Ptr StyleContext
context' CString
regionName' CUInt
flags'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
regionName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextAddRegionMethodInfo
instance (signature ~ (T.Text -> [Gtk.Flags.RegionFlags] -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextAddRegionMethodInfo a signature where
overloadedMethod = styleContextAddRegion
#endif
foreign import ccall "gtk_style_context_cancel_animations" gtk_style_context_cancel_animations ::
Ptr StyleContext ->
Ptr () ->
IO ()
{-# DEPRECATED styleContextCancelAnimations ["(Since version 3.6)","This function does nothing."] #-}
styleContextCancelAnimations ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> Ptr ()
-> m ()
styleContextCancelAnimations :: a -> Ptr () -> m ()
styleContextCancelAnimations a
context Ptr ()
regionId = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> Ptr () -> IO ()
gtk_style_context_cancel_animations Ptr StyleContext
context' Ptr ()
regionId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextCancelAnimationsMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextCancelAnimationsMethodInfo a signature where
overloadedMethod = styleContextCancelAnimations
#endif
foreign import ccall "gtk_style_context_get_background_color" gtk_style_context_get_background_color ::
Ptr StyleContext ->
CUInt ->
Ptr Gdk.RGBA.RGBA ->
IO ()
{-# DEPRECATED styleContextGetBackgroundColor ["(Since version 3.16)","Use 'GI.Gtk.Functions.renderBackground' instead."] #-}
styleContextGetBackgroundColor ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gdk.RGBA.RGBA)
styleContextGetBackgroundColor :: a -> [StateFlags] -> m RGBA
styleContextGetBackgroundColor a
context [StateFlags]
state = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr RGBA
color <- Int -> IO (Ptr RGBA)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gdk.RGBA.RGBA)
Ptr StyleContext -> CUInt -> Ptr RGBA -> IO ()
gtk_style_context_get_background_color Ptr StyleContext
context' CUInt
state' Ptr RGBA
color
RGBA
color' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
color
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
color'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetBackgroundColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gdk.RGBA.RGBA)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetBackgroundColorMethodInfo a signature where
overloadedMethod = styleContextGetBackgroundColor
#endif
foreign import ccall "gtk_style_context_get_border" gtk_style_context_get_border ::
Ptr StyleContext ->
CUInt ->
Ptr Gtk.Border.Border ->
IO ()
styleContextGetBorder ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gtk.Border.Border)
styleContextGetBorder :: a -> [StateFlags] -> m Border
styleContextGetBorder a
context [StateFlags]
state = IO Border -> m Border
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Border -> m Border) -> IO Border -> m Border
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr Border
border <- Int -> IO (Ptr Border)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Border.Border)
Ptr StyleContext -> CUInt -> Ptr Border -> IO ()
gtk_style_context_get_border Ptr StyleContext
context' CUInt
state' Ptr Border
border
Border
border' <- ((ManagedPtr Border -> Border) -> Ptr Border -> IO Border
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Border -> Border
Gtk.Border.Border) Ptr Border
border
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Border -> IO Border
forall (m :: * -> *) a. Monad m => a -> m a
return Border
border'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetBorderMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gtk.Border.Border)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetBorderMethodInfo a signature where
overloadedMethod = styleContextGetBorder
#endif
foreign import ccall "gtk_style_context_get_border_color" gtk_style_context_get_border_color ::
Ptr StyleContext ->
CUInt ->
Ptr Gdk.RGBA.RGBA ->
IO ()
{-# DEPRECATED styleContextGetBorderColor ["(Since version 3.16)","Use 'GI.Gtk.Functions.renderFrame' instead."] #-}
styleContextGetBorderColor ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gdk.RGBA.RGBA)
styleContextGetBorderColor :: a -> [StateFlags] -> m RGBA
styleContextGetBorderColor a
context [StateFlags]
state = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr RGBA
color <- Int -> IO (Ptr RGBA)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gdk.RGBA.RGBA)
Ptr StyleContext -> CUInt -> Ptr RGBA -> IO ()
gtk_style_context_get_border_color Ptr StyleContext
context' CUInt
state' Ptr RGBA
color
RGBA
color' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
color
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
color'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetBorderColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gdk.RGBA.RGBA)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetBorderColorMethodInfo a signature where
overloadedMethod = styleContextGetBorderColor
#endif
foreign import ccall "gtk_style_context_get_color" gtk_style_context_get_color ::
Ptr StyleContext ->
CUInt ->
Ptr Gdk.RGBA.RGBA ->
IO ()
styleContextGetColor ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gdk.RGBA.RGBA)
styleContextGetColor :: a -> [StateFlags] -> m RGBA
styleContextGetColor a
context [StateFlags]
state = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr RGBA
color <- Int -> IO (Ptr RGBA)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gdk.RGBA.RGBA)
Ptr StyleContext -> CUInt -> Ptr RGBA -> IO ()
gtk_style_context_get_color Ptr StyleContext
context' CUInt
state' Ptr RGBA
color
RGBA
color' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
color
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
color'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gdk.RGBA.RGBA)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetColorMethodInfo a signature where
overloadedMethod = styleContextGetColor
#endif
foreign import ccall "gtk_style_context_get_direction" gtk_style_context_get_direction ::
Ptr StyleContext ->
IO CUInt
{-# DEPRECATED styleContextGetDirection ["(Since version 3.8)","Use 'GI.Gtk.Objects.StyleContext.styleContextGetState' and"," check for @/GTK_STATE_FLAG_DIR_LTR/@ and"," @/GTK_STATE_FLAG_DIR_RTL/@ instead."] #-}
styleContextGetDirection ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m Gtk.Enums.TextDirection
styleContextGetDirection :: a -> m TextDirection
styleContextGetDirection a
context = IO TextDirection -> m TextDirection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextDirection -> m TextDirection)
-> IO TextDirection -> m TextDirection
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CUInt
result <- Ptr StyleContext -> IO CUInt
gtk_style_context_get_direction Ptr StyleContext
context'
let result' :: TextDirection
result' = (Int -> TextDirection
forall a. Enum a => Int -> a
toEnum (Int -> TextDirection) -> (CUInt -> Int) -> CUInt -> TextDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
TextDirection -> IO TextDirection
forall (m :: * -> *) a. Monad m => a -> m a
return TextDirection
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetDirectionMethodInfo
instance (signature ~ (m Gtk.Enums.TextDirection), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetDirectionMethodInfo a signature where
overloadedMethod = styleContextGetDirection
#endif
foreign import ccall "gtk_style_context_get_font" gtk_style_context_get_font ::
Ptr StyleContext ->
CUInt ->
IO (Ptr Pango.FontDescription.FontDescription)
{-# DEPRECATED styleContextGetFont ["(Since version 3.8)","Use @/gtk_style_context_get()/@ for \\\"font\\\" or"," subproperties instead."] #-}
styleContextGetFont ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m Pango.FontDescription.FontDescription
styleContextGetFont :: a -> [StateFlags] -> m FontDescription
styleContextGetFont a
context [StateFlags]
state = IO FontDescription -> m FontDescription
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontDescription -> m FontDescription)
-> IO FontDescription -> m FontDescription
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr FontDescription
result <- Ptr StyleContext -> CUInt -> IO (Ptr FontDescription)
gtk_style_context_get_font Ptr StyleContext
context' CUInt
state'
Text -> Ptr FontDescription -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"styleContextGetFont" Ptr FontDescription
result
FontDescription
result' <- ((ManagedPtr FontDescription -> FontDescription)
-> Ptr FontDescription -> IO FontDescription
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr FontDescription -> FontDescription
Pango.FontDescription.FontDescription) Ptr FontDescription
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
FontDescription -> IO FontDescription
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetFontMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m Pango.FontDescription.FontDescription), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetFontMethodInfo a signature where
overloadedMethod = styleContextGetFont
#endif
foreign import ccall "gtk_style_context_get_frame_clock" gtk_style_context_get_frame_clock ::
Ptr StyleContext ->
IO (Ptr Gdk.FrameClock.FrameClock)
styleContextGetFrameClock ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m (Maybe Gdk.FrameClock.FrameClock)
styleContextGetFrameClock :: a -> m (Maybe FrameClock)
styleContextGetFrameClock a
context = IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FrameClock) -> m (Maybe FrameClock))
-> IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr FrameClock
result <- Ptr StyleContext -> IO (Ptr FrameClock)
gtk_style_context_get_frame_clock Ptr StyleContext
context'
Maybe FrameClock
maybeResult <- Ptr FrameClock
-> (Ptr FrameClock -> IO FrameClock) -> IO (Maybe FrameClock)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FrameClock
result ((Ptr FrameClock -> IO FrameClock) -> IO (Maybe FrameClock))
-> (Ptr FrameClock -> IO FrameClock) -> IO (Maybe FrameClock)
forall a b. (a -> b) -> a -> b
$ \Ptr FrameClock
result' -> do
FrameClock
result'' <- ((ManagedPtr FrameClock -> FrameClock)
-> Ptr FrameClock -> IO FrameClock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock) Ptr FrameClock
result'
FrameClock -> IO FrameClock
forall (m :: * -> *) a. Monad m => a -> m a
return FrameClock
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe FrameClock -> IO (Maybe FrameClock)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FrameClock
maybeResult
#if defined(ENABLE_OVERLOADING)
data StyleContextGetFrameClockMethodInfo
instance (signature ~ (m (Maybe Gdk.FrameClock.FrameClock)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetFrameClockMethodInfo a signature where
overloadedMethod = styleContextGetFrameClock
#endif
foreign import ccall "gtk_style_context_get_junction_sides" gtk_style_context_get_junction_sides ::
Ptr StyleContext ->
IO CUInt
styleContextGetJunctionSides ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m [Gtk.Flags.JunctionSides]
styleContextGetJunctionSides :: a -> m [JunctionSides]
styleContextGetJunctionSides a
context = IO [JunctionSides] -> m [JunctionSides]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [JunctionSides] -> m [JunctionSides])
-> IO [JunctionSides] -> m [JunctionSides]
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CUInt
result <- Ptr StyleContext -> IO CUInt
gtk_style_context_get_junction_sides Ptr StyleContext
context'
let result' :: [JunctionSides]
result' = CUInt -> [JunctionSides]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
[JunctionSides] -> IO [JunctionSides]
forall (m :: * -> *) a. Monad m => a -> m a
return [JunctionSides]
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetJunctionSidesMethodInfo
instance (signature ~ (m [Gtk.Flags.JunctionSides]), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetJunctionSidesMethodInfo a signature where
overloadedMethod = styleContextGetJunctionSides
#endif
foreign import ccall "gtk_style_context_get_margin" gtk_style_context_get_margin ::
Ptr StyleContext ->
CUInt ->
Ptr Gtk.Border.Border ->
IO ()
styleContextGetMargin ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gtk.Border.Border)
styleContextGetMargin :: a -> [StateFlags] -> m Border
styleContextGetMargin a
context [StateFlags]
state = IO Border -> m Border
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Border -> m Border) -> IO Border -> m Border
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr Border
margin <- Int -> IO (Ptr Border)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Border.Border)
Ptr StyleContext -> CUInt -> Ptr Border -> IO ()
gtk_style_context_get_margin Ptr StyleContext
context' CUInt
state' Ptr Border
margin
Border
margin' <- ((ManagedPtr Border -> Border) -> Ptr Border -> IO Border
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Border -> Border
Gtk.Border.Border) Ptr Border
margin
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Border -> IO Border
forall (m :: * -> *) a. Monad m => a -> m a
return Border
margin'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetMarginMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gtk.Border.Border)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetMarginMethodInfo a signature where
overloadedMethod = styleContextGetMargin
#endif
foreign import ccall "gtk_style_context_get_padding" gtk_style_context_get_padding ::
Ptr StyleContext ->
CUInt ->
Ptr Gtk.Border.Border ->
IO ()
styleContextGetPadding ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gtk.Border.Border)
styleContextGetPadding :: a -> [StateFlags] -> m Border
styleContextGetPadding a
context [StateFlags]
state = IO Border -> m Border
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Border -> m Border) -> IO Border -> m Border
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr Border
padding <- Int -> IO (Ptr Border)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Border.Border)
Ptr StyleContext -> CUInt -> Ptr Border -> IO ()
gtk_style_context_get_padding Ptr StyleContext
context' CUInt
state' Ptr Border
padding
Border
padding' <- ((ManagedPtr Border -> Border) -> Ptr Border -> IO Border
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Border -> Border
Gtk.Border.Border) Ptr Border
padding
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Border -> IO Border
forall (m :: * -> *) a. Monad m => a -> m a
return Border
padding'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetPaddingMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gtk.Border.Border)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetPaddingMethodInfo a signature where
overloadedMethod = styleContextGetPadding
#endif
foreign import ccall "gtk_style_context_get_parent" gtk_style_context_get_parent ::
Ptr StyleContext ->
IO (Ptr StyleContext)
styleContextGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m (Maybe StyleContext)
styleContextGetParent :: a -> m (Maybe StyleContext)
styleContextGetParent a
context = IO (Maybe StyleContext) -> m (Maybe StyleContext)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe StyleContext) -> m (Maybe StyleContext))
-> IO (Maybe StyleContext) -> m (Maybe StyleContext)
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext
result <- Ptr StyleContext -> IO (Ptr StyleContext)
gtk_style_context_get_parent Ptr StyleContext
context'
Maybe StyleContext
maybeResult <- Ptr StyleContext
-> (Ptr StyleContext -> IO StyleContext) -> IO (Maybe StyleContext)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr StyleContext
result ((Ptr StyleContext -> IO StyleContext) -> IO (Maybe StyleContext))
-> (Ptr StyleContext -> IO StyleContext) -> IO (Maybe StyleContext)
forall a b. (a -> b) -> a -> b
$ \Ptr StyleContext
result' -> do
StyleContext
result'' <- ((ManagedPtr StyleContext -> StyleContext)
-> Ptr StyleContext -> IO StyleContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr StyleContext -> StyleContext
StyleContext) Ptr StyleContext
result'
StyleContext -> IO StyleContext
forall (m :: * -> *) a. Monad m => a -> m a
return StyleContext
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe StyleContext -> IO (Maybe StyleContext)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe StyleContext
maybeResult
#if defined(ENABLE_OVERLOADING)
data StyleContextGetParentMethodInfo
instance (signature ~ (m (Maybe StyleContext)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetParentMethodInfo a signature where
overloadedMethod = styleContextGetParent
#endif
foreign import ccall "gtk_style_context_get_path" gtk_style_context_get_path ::
Ptr StyleContext ->
IO (Ptr Gtk.WidgetPath.WidgetPath)
styleContextGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m Gtk.WidgetPath.WidgetPath
styleContextGetPath :: a -> m WidgetPath
styleContextGetPath a
context = IO WidgetPath -> m WidgetPath
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WidgetPath -> m WidgetPath) -> IO WidgetPath -> m WidgetPath
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr WidgetPath
result <- Ptr StyleContext -> IO (Ptr WidgetPath)
gtk_style_context_get_path Ptr StyleContext
context'
Text -> Ptr WidgetPath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"styleContextGetPath" Ptr WidgetPath
result
WidgetPath
result' <- ((ManagedPtr WidgetPath -> WidgetPath)
-> Ptr WidgetPath -> IO WidgetPath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr WidgetPath -> WidgetPath
Gtk.WidgetPath.WidgetPath) Ptr WidgetPath
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
WidgetPath -> IO WidgetPath
forall (m :: * -> *) a. Monad m => a -> m a
return WidgetPath
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetPathMethodInfo
instance (signature ~ (m Gtk.WidgetPath.WidgetPath), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetPathMethodInfo a signature where
overloadedMethod = styleContextGetPath
#endif
foreign import ccall "gtk_style_context_get_property" gtk_style_context_get_property ::
Ptr StyleContext ->
CString ->
CUInt ->
Ptr GValue ->
IO ()
styleContextGetProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> [Gtk.Flags.StateFlags]
-> m (GValue)
styleContextGetProperty :: a -> Text -> [StateFlags] -> m GValue
styleContextGetProperty a
context Text
property [StateFlags]
state = IO GValue -> m GValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
property' <- Text -> IO CString
textToCString Text
property
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr GValue
value <- Int -> IO (Ptr GValue)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
24 :: IO (Ptr GValue)
Ptr StyleContext -> CString -> CUInt -> Ptr GValue -> IO ()
gtk_style_context_get_property Ptr StyleContext
context' CString
property' CUInt
state' Ptr GValue
value
GValue
value' <- Ptr GValue -> IO GValue
B.GValue.wrapGValuePtr Ptr GValue
value
Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
value
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
property'
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
value'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetPropertyMethodInfo
instance (signature ~ (T.Text -> [Gtk.Flags.StateFlags] -> m (GValue)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetPropertyMethodInfo a signature where
overloadedMethod = styleContextGetProperty
#endif
foreign import ccall "gtk_style_context_get_scale" gtk_style_context_get_scale ::
Ptr StyleContext ->
IO Int32
styleContextGetScale ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m Int32
styleContextGetScale :: a -> m Int32
styleContextGetScale a
context = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Int32
result <- Ptr StyleContext -> IO Int32
gtk_style_context_get_scale Ptr StyleContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data StyleContextGetScaleMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetScaleMethodInfo a signature where
overloadedMethod = styleContextGetScale
#endif
foreign import ccall "gtk_style_context_get_screen" gtk_style_context_get_screen ::
Ptr StyleContext ->
IO (Ptr Gdk.Screen.Screen)
styleContextGetScreen ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m Gdk.Screen.Screen
styleContextGetScreen :: a -> m Screen
styleContextGetScreen a
context = IO Screen -> m Screen
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Screen -> m Screen) -> IO Screen -> m Screen
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr Screen
result <- Ptr StyleContext -> IO (Ptr Screen)
gtk_style_context_get_screen Ptr StyleContext
context'
Text -> Ptr Screen -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"styleContextGetScreen" Ptr Screen
result
Screen
result' <- ((ManagedPtr Screen -> Screen) -> Ptr Screen -> IO Screen
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Screen -> IO Screen
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetScreenMethodInfo a signature where
overloadedMethod = styleContextGetScreen
#endif
foreign import ccall "gtk_style_context_get_section" gtk_style_context_get_section ::
Ptr StyleContext ->
CString ->
IO (Ptr Gtk.CssSection.CssSection)
styleContextGetSection ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m (Maybe Gtk.CssSection.CssSection)
styleContextGetSection :: a -> Text -> m (Maybe CssSection)
styleContextGetSection a
context Text
property = IO (Maybe CssSection) -> m (Maybe CssSection)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe CssSection) -> m (Maybe CssSection))
-> IO (Maybe CssSection) -> m (Maybe CssSection)
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
property' <- Text -> IO CString
textToCString Text
property
Ptr CssSection
result <- Ptr StyleContext -> CString -> IO (Ptr CssSection)
gtk_style_context_get_section Ptr StyleContext
context' CString
property'
Maybe CssSection
maybeResult <- Ptr CssSection
-> (Ptr CssSection -> IO CssSection) -> IO (Maybe CssSection)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CssSection
result ((Ptr CssSection -> IO CssSection) -> IO (Maybe CssSection))
-> (Ptr CssSection -> IO CssSection) -> IO (Maybe CssSection)
forall a b. (a -> b) -> a -> b
$ \Ptr CssSection
result' -> do
CssSection
result'' <- ((ManagedPtr CssSection -> CssSection)
-> Ptr CssSection -> IO CssSection
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr CssSection -> CssSection
Gtk.CssSection.CssSection) Ptr CssSection
result'
CssSection -> IO CssSection
forall (m :: * -> *) a. Monad m => a -> m a
return CssSection
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
property'
Maybe CssSection -> IO (Maybe CssSection)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CssSection
maybeResult
#if defined(ENABLE_OVERLOADING)
data StyleContextGetSectionMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.CssSection.CssSection)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetSectionMethodInfo a signature where
overloadedMethod = styleContextGetSection
#endif
foreign import ccall "gtk_style_context_get_state" gtk_style_context_get_state ::
Ptr StyleContext ->
IO CUInt
styleContextGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m [Gtk.Flags.StateFlags]
styleContextGetState :: a -> m [StateFlags]
styleContextGetState a
context = IO [StateFlags] -> m [StateFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [StateFlags] -> m [StateFlags])
-> IO [StateFlags] -> m [StateFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CUInt
result <- Ptr StyleContext -> IO CUInt
gtk_style_context_get_state Ptr StyleContext
context'
let result' :: [StateFlags]
result' = CUInt -> [StateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
[StateFlags] -> IO [StateFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [StateFlags]
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextGetStateMethodInfo
instance (signature ~ (m [Gtk.Flags.StateFlags]), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetStateMethodInfo a signature where
overloadedMethod = styleContextGetState
#endif
foreign import ccall "gtk_style_context_get_style_property" gtk_style_context_get_style_property ::
Ptr StyleContext ->
CString ->
Ptr GValue ->
IO ()
styleContextGetStyleProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> GValue
-> m ()
styleContextGetStyleProperty :: a -> Text -> GValue -> m ()
styleContextGetStyleProperty a
context Text
propertyName GValue
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr StyleContext -> CString -> Ptr GValue -> IO ()
gtk_style_context_get_style_property Ptr StyleContext
context' CString
propertyName' Ptr GValue
value'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
value'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextGetStylePropertyMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextGetStylePropertyMethodInfo a signature where
overloadedMethod = styleContextGetStyleProperty
#endif
foreign import ccall "gtk_style_context_has_class" gtk_style_context_has_class ::
Ptr StyleContext ->
CString ->
IO CInt
styleContextHasClass ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m Bool
styleContextHasClass :: a -> Text -> m Bool
styleContextHasClass a
context Text
className = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
className' <- Text -> IO CString
textToCString Text
className
CInt
result <- Ptr StyleContext -> CString -> IO CInt
gtk_style_context_has_class Ptr StyleContext
context' CString
className'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
className'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextHasClassMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextHasClassMethodInfo a signature where
overloadedMethod = styleContextHasClass
#endif
foreign import ccall "gtk_style_context_has_region" gtk_style_context_has_region ::
Ptr StyleContext ->
CString ->
Ptr CUInt ->
IO CInt
{-# DEPRECATED styleContextHasRegion ["(Since version 3.14)"] #-}
styleContextHasRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m ((Bool, [Gtk.Flags.RegionFlags]))
styleContextHasRegion :: a -> Text -> m (Bool, [RegionFlags])
styleContextHasRegion a
context Text
regionName = IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags]))
-> IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags])
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
regionName' <- Text -> IO CString
textToCString Text
regionName
Ptr CUInt
flagsReturn <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr StyleContext -> CString -> Ptr CUInt -> IO CInt
gtk_style_context_has_region Ptr StyleContext
context' CString
regionName' Ptr CUInt
flagsReturn
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CUInt
flagsReturn' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
flagsReturn
let flagsReturn'' :: [RegionFlags]
flagsReturn'' = CUInt -> [RegionFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
flagsReturn'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
regionName'
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
flagsReturn
(Bool, [RegionFlags]) -> IO (Bool, [RegionFlags])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [RegionFlags]
flagsReturn'')
#if defined(ENABLE_OVERLOADING)
data StyleContextHasRegionMethodInfo
instance (signature ~ (T.Text -> m ((Bool, [Gtk.Flags.RegionFlags]))), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextHasRegionMethodInfo a signature where
overloadedMethod = styleContextHasRegion
#endif
foreign import ccall "gtk_style_context_invalidate" gtk_style_context_invalidate ::
Ptr StyleContext ->
IO ()
{-# DEPRECATED styleContextInvalidate ["(Since version 3.12)","Style contexts are invalidated automatically."] #-}
styleContextInvalidate ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m ()
styleContextInvalidate :: a -> m ()
styleContextInvalidate a
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> IO ()
gtk_style_context_invalidate Ptr StyleContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextInvalidateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextInvalidateMethodInfo a signature where
overloadedMethod = styleContextInvalidate
#endif
foreign import ccall "gtk_style_context_list_classes" gtk_style_context_list_classes ::
Ptr StyleContext ->
IO (Ptr (GList CString))
styleContextListClasses ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m [T.Text]
styleContextListClasses :: a -> m [Text]
styleContextListClasses a
context = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr (GList CString)
result <- Ptr StyleContext -> IO (Ptr (GList CString))
gtk_style_context_list_classes Ptr StyleContext
context'
[CString]
result' <- Ptr (GList CString) -> IO [CString]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
Ptr (GList CString) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data StyleContextListClassesMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextListClassesMethodInfo a signature where
overloadedMethod = styleContextListClasses
#endif
foreign import ccall "gtk_style_context_list_regions" gtk_style_context_list_regions ::
Ptr StyleContext ->
IO (Ptr (GList CString))
{-# DEPRECATED styleContextListRegions ["(Since version 3.14)"] #-}
styleContextListRegions ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m [T.Text]
styleContextListRegions :: a -> m [Text]
styleContextListRegions a
context = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr (GList CString)
result <- Ptr StyleContext -> IO (Ptr (GList CString))
gtk_style_context_list_regions Ptr StyleContext
context'
[CString]
result' <- Ptr (GList CString) -> IO [CString]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
Ptr (GList CString) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data StyleContextListRegionsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextListRegionsMethodInfo a signature where
overloadedMethod = styleContextListRegions
#endif
foreign import ccall "gtk_style_context_lookup_color" gtk_style_context_lookup_color ::
Ptr StyleContext ->
CString ->
Ptr Gdk.RGBA.RGBA ->
IO CInt
styleContextLookupColor ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m ((Bool, Gdk.RGBA.RGBA))
styleContextLookupColor :: a -> Text -> m (Bool, RGBA)
styleContextLookupColor a
context Text
colorName = IO (Bool, RGBA) -> m (Bool, RGBA)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, RGBA) -> m (Bool, RGBA))
-> IO (Bool, RGBA) -> m (Bool, RGBA)
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
colorName' <- Text -> IO CString
textToCString Text
colorName
Ptr RGBA
color <- Int -> IO (Ptr RGBA)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gdk.RGBA.RGBA)
CInt
result <- Ptr StyleContext -> CString -> Ptr RGBA -> IO CInt
gtk_style_context_lookup_color Ptr StyleContext
context' CString
colorName' Ptr RGBA
color
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
RGBA
color' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
color
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
colorName'
(Bool, RGBA) -> IO (Bool, RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', RGBA
color')
#if defined(ENABLE_OVERLOADING)
data StyleContextLookupColorMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Gdk.RGBA.RGBA))), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextLookupColorMethodInfo a signature where
overloadedMethod = styleContextLookupColor
#endif
foreign import ccall "gtk_style_context_lookup_icon_set" gtk_style_context_lookup_icon_set ::
Ptr StyleContext ->
CString ->
IO (Ptr Gtk.IconSet.IconSet)
{-# DEPRECATED styleContextLookupIconSet ["(Since version 3.10)","Use 'GI.Gtk.Objects.IconTheme.iconThemeLookupIcon' instead."] #-}
styleContextLookupIconSet ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m (Maybe Gtk.IconSet.IconSet)
styleContextLookupIconSet :: a -> Text -> m (Maybe IconSet)
styleContextLookupIconSet a
context Text
stockId = IO (Maybe IconSet) -> m (Maybe IconSet)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IconSet) -> m (Maybe IconSet))
-> IO (Maybe IconSet) -> m (Maybe IconSet)
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
stockId' <- Text -> IO CString
textToCString Text
stockId
Ptr IconSet
result <- Ptr StyleContext -> CString -> IO (Ptr IconSet)
gtk_style_context_lookup_icon_set Ptr StyleContext
context' CString
stockId'
Maybe IconSet
maybeResult <- Ptr IconSet -> (Ptr IconSet -> IO IconSet) -> IO (Maybe IconSet)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr IconSet
result ((Ptr IconSet -> IO IconSet) -> IO (Maybe IconSet))
-> (Ptr IconSet -> IO IconSet) -> IO (Maybe IconSet)
forall a b. (a -> b) -> a -> b
$ \Ptr IconSet
result' -> do
IconSet
result'' <- ((ManagedPtr IconSet -> IconSet) -> Ptr IconSet -> IO IconSet
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr IconSet -> IconSet
Gtk.IconSet.IconSet) Ptr IconSet
result'
IconSet -> IO IconSet
forall (m :: * -> *) a. Monad m => a -> m a
return IconSet
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
Maybe IconSet -> IO (Maybe IconSet)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IconSet
maybeResult
#if defined(ENABLE_OVERLOADING)
data StyleContextLookupIconSetMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.IconSet.IconSet)), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextLookupIconSetMethodInfo a signature where
overloadedMethod = styleContextLookupIconSet
#endif
foreign import ccall "gtk_style_context_notify_state_change" gtk_style_context_notify_state_change ::
Ptr StyleContext ->
Ptr Gdk.Window.Window ->
Ptr () ->
CUInt ->
CInt ->
IO ()
{-# DEPRECATED styleContextNotifyStateChange ["(Since version 3.6)","This function does nothing."] #-}
styleContextNotifyStateChange ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) =>
a
-> b
-> Ptr ()
-> Gtk.Enums.StateType
-> Bool
-> m ()
styleContextNotifyStateChange :: a -> b -> Ptr () -> StateType -> Bool -> m ()
styleContextNotifyStateChange a
context b
window Ptr ()
regionId StateType
state Bool
stateValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr Window
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
let stateValue' :: CInt
stateValue' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
stateValue
Ptr StyleContext -> Ptr Window -> Ptr () -> CUInt -> CInt -> IO ()
gtk_style_context_notify_state_change Ptr StyleContext
context' Ptr Window
window' Ptr ()
regionId CUInt
state' CInt
stateValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextNotifyStateChangeMethodInfo
instance (signature ~ (b -> Ptr () -> Gtk.Enums.StateType -> Bool -> m ()), MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) => O.MethodInfo StyleContextNotifyStateChangeMethodInfo a signature where
overloadedMethod = styleContextNotifyStateChange
#endif
foreign import ccall "gtk_style_context_pop_animatable_region" gtk_style_context_pop_animatable_region ::
Ptr StyleContext ->
IO ()
{-# DEPRECATED styleContextPopAnimatableRegion ["(Since version 3.6)","This function does nothing."] #-}
styleContextPopAnimatableRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m ()
styleContextPopAnimatableRegion :: a -> m ()
styleContextPopAnimatableRegion a
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> IO ()
gtk_style_context_pop_animatable_region Ptr StyleContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextPopAnimatableRegionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextPopAnimatableRegionMethodInfo a signature where
overloadedMethod = styleContextPopAnimatableRegion
#endif
foreign import ccall "gtk_style_context_push_animatable_region" gtk_style_context_push_animatable_region ::
Ptr StyleContext ->
Ptr () ->
IO ()
{-# DEPRECATED styleContextPushAnimatableRegion ["(Since version 3.6)","This function does nothing."] #-}
styleContextPushAnimatableRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> Ptr ()
-> m ()
styleContextPushAnimatableRegion :: a -> Ptr () -> m ()
styleContextPushAnimatableRegion a
context Ptr ()
regionId = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> Ptr () -> IO ()
gtk_style_context_push_animatable_region Ptr StyleContext
context' Ptr ()
regionId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextPushAnimatableRegionMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextPushAnimatableRegionMethodInfo a signature where
overloadedMethod = styleContextPushAnimatableRegion
#endif
foreign import ccall "gtk_style_context_remove_class" gtk_style_context_remove_class ::
Ptr StyleContext ->
CString ->
IO ()
styleContextRemoveClass ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m ()
styleContextRemoveClass :: a -> Text -> m ()
styleContextRemoveClass a
context Text
className = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
className' <- Text -> IO CString
textToCString Text
className
Ptr StyleContext -> CString -> IO ()
gtk_style_context_remove_class Ptr StyleContext
context' CString
className'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
className'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextRemoveClassMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextRemoveClassMethodInfo a signature where
overloadedMethod = styleContextRemoveClass
#endif
foreign import ccall "gtk_style_context_remove_provider" gtk_style_context_remove_provider ::
Ptr StyleContext ->
Ptr Gtk.StyleProvider.StyleProvider ->
IO ()
styleContextRemoveProvider ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gtk.StyleProvider.IsStyleProvider b) =>
a
-> b
-> m ()
styleContextRemoveProvider :: a -> b -> m ()
styleContextRemoveProvider a
context b
provider = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleProvider
provider' <- b -> IO (Ptr StyleProvider)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
provider
Ptr StyleContext -> Ptr StyleProvider -> IO ()
gtk_style_context_remove_provider Ptr StyleContext
context' Ptr StyleProvider
provider'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
provider
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextRemoveProviderMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsStyleContext a, Gtk.StyleProvider.IsStyleProvider b) => O.MethodInfo StyleContextRemoveProviderMethodInfo a signature where
overloadedMethod = styleContextRemoveProvider
#endif
foreign import ccall "gtk_style_context_remove_region" gtk_style_context_remove_region ::
Ptr StyleContext ->
CString ->
IO ()
{-# DEPRECATED styleContextRemoveRegion ["(Since version 3.14)"] #-}
styleContextRemoveRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> T.Text
-> m ()
styleContextRemoveRegion :: a -> Text -> m ()
styleContextRemoveRegion a
context Text
regionName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
regionName' <- Text -> IO CString
textToCString Text
regionName
Ptr StyleContext -> CString -> IO ()
gtk_style_context_remove_region Ptr StyleContext
context' CString
regionName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
regionName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextRemoveRegionMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextRemoveRegionMethodInfo a signature where
overloadedMethod = styleContextRemoveRegion
#endif
foreign import ccall "gtk_style_context_restore" gtk_style_context_restore ::
Ptr StyleContext ->
IO ()
styleContextRestore ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m ()
styleContextRestore :: a -> m ()
styleContextRestore a
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> IO ()
gtk_style_context_restore Ptr StyleContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextRestoreMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextRestoreMethodInfo a signature where
overloadedMethod = styleContextRestore
#endif
foreign import ccall "gtk_style_context_save" gtk_style_context_save ::
Ptr StyleContext ->
IO ()
styleContextSave ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> m ()
styleContextSave :: a -> m ()
styleContextSave a
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> IO ()
gtk_style_context_save Ptr StyleContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSaveMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextSaveMethodInfo a signature where
overloadedMethod = styleContextSave
#endif
foreign import ccall "gtk_style_context_scroll_animations" gtk_style_context_scroll_animations ::
Ptr StyleContext ->
Ptr Gdk.Window.Window ->
Int32 ->
Int32 ->
IO ()
{-# DEPRECATED styleContextScrollAnimations ["(Since version 3.6)","This function does nothing."] #-}
styleContextScrollAnimations ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) =>
a
-> b
-> Int32
-> Int32
-> m ()
styleContextScrollAnimations :: a -> b -> Int32 -> Int32 -> m ()
styleContextScrollAnimations a
context b
window Int32
dx Int32
dy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr Window
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
Ptr StyleContext -> Ptr Window -> Int32 -> Int32 -> IO ()
gtk_style_context_scroll_animations Ptr StyleContext
context' Ptr Window
window' Int32
dx Int32
dy
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextScrollAnimationsMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> m ()), MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) => O.MethodInfo StyleContextScrollAnimationsMethodInfo a signature where
overloadedMethod = styleContextScrollAnimations
#endif
foreign import ccall "gtk_style_context_set_background" gtk_style_context_set_background ::
Ptr StyleContext ->
Ptr Gdk.Window.Window ->
IO ()
{-# DEPRECATED styleContextSetBackground ["(Since version 3.18)","Use 'GI.Gtk.Functions.renderBackground' instead."," Note that clients still using this function are now responsible"," for calling this function again whenever /@context@/ is invalidated."] #-}
styleContextSetBackground ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) =>
a
-> b
-> m ()
styleContextSetBackground :: a -> b -> m ()
styleContextSetBackground a
context b
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr Window
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
Ptr StyleContext -> Ptr Window -> IO ()
gtk_style_context_set_background Ptr StyleContext
context' Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetBackgroundMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) => O.MethodInfo StyleContextSetBackgroundMethodInfo a signature where
overloadedMethod = styleContextSetBackground
#endif
foreign import ccall "gtk_style_context_set_direction" gtk_style_context_set_direction ::
Ptr StyleContext ->
CUInt ->
IO ()
{-# DEPRECATED styleContextSetDirection ["(Since version 3.8)","Use 'GI.Gtk.Objects.StyleContext.styleContextSetState' with"," @/GTK_STATE_FLAG_DIR_LTR/@ and @/GTK_STATE_FLAG_DIR_RTL/@"," instead."] #-}
styleContextSetDirection ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> Gtk.Enums.TextDirection
-> m ()
styleContextSetDirection :: a -> TextDirection -> m ()
styleContextSetDirection a
context TextDirection
direction = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TextDirection -> Int) -> TextDirection -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TextDirection -> Int
forall a. Enum a => a -> Int
fromEnum) TextDirection
direction
Ptr StyleContext -> CUInt -> IO ()
gtk_style_context_set_direction Ptr StyleContext
context' CUInt
direction'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetDirectionMethodInfo
instance (signature ~ (Gtk.Enums.TextDirection -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextSetDirectionMethodInfo a signature where
overloadedMethod = styleContextSetDirection
#endif
foreign import ccall "gtk_style_context_set_frame_clock" gtk_style_context_set_frame_clock ::
Ptr StyleContext ->
Ptr Gdk.FrameClock.FrameClock ->
IO ()
styleContextSetFrameClock ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.FrameClock.IsFrameClock b) =>
a
-> b
-> m ()
styleContextSetFrameClock :: a -> b -> m ()
styleContextSetFrameClock a
context b
frameClock = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr FrameClock
frameClock' <- b -> IO (Ptr FrameClock)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
frameClock
Ptr StyleContext -> Ptr FrameClock -> IO ()
gtk_style_context_set_frame_clock Ptr StyleContext
context' Ptr FrameClock
frameClock'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
frameClock
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetFrameClockMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsStyleContext a, Gdk.FrameClock.IsFrameClock b) => O.MethodInfo StyleContextSetFrameClockMethodInfo a signature where
overloadedMethod = styleContextSetFrameClock
#endif
foreign import ccall "gtk_style_context_set_junction_sides" gtk_style_context_set_junction_sides ::
Ptr StyleContext ->
CUInt ->
IO ()
styleContextSetJunctionSides ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.JunctionSides]
-> m ()
styleContextSetJunctionSides :: a -> [JunctionSides] -> m ()
styleContextSetJunctionSides a
context [JunctionSides]
sides = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let sides' :: CUInt
sides' = [JunctionSides] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [JunctionSides]
sides
Ptr StyleContext -> CUInt -> IO ()
gtk_style_context_set_junction_sides Ptr StyleContext
context' CUInt
sides'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetJunctionSidesMethodInfo
instance (signature ~ ([Gtk.Flags.JunctionSides] -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextSetJunctionSidesMethodInfo a signature where
overloadedMethod = styleContextSetJunctionSides
#endif
foreign import ccall "gtk_style_context_set_parent" gtk_style_context_set_parent ::
Ptr StyleContext ->
Ptr StyleContext ->
IO ()
styleContextSetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, IsStyleContext b) =>
a
-> Maybe (b)
-> m ()
styleContextSetParent :: a -> Maybe b -> m ()
styleContextSetParent a
context Maybe b
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext
maybeParent <- case Maybe b
parent of
Maybe b
Nothing -> Ptr StyleContext -> IO (Ptr StyleContext)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr StyleContext
forall a. Ptr a
nullPtr
Just b
jParent -> do
Ptr StyleContext
jParent' <- b -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jParent
Ptr StyleContext -> IO (Ptr StyleContext)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr StyleContext
jParent'
Ptr StyleContext -> Ptr StyleContext -> IO ()
gtk_style_context_set_parent Ptr StyleContext
context' Ptr StyleContext
maybeParent
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
parent b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetParentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsStyleContext a, IsStyleContext b) => O.MethodInfo StyleContextSetParentMethodInfo a signature where
overloadedMethod = styleContextSetParent
#endif
foreign import ccall "gtk_style_context_set_path" gtk_style_context_set_path ::
Ptr StyleContext ->
Ptr Gtk.WidgetPath.WidgetPath ->
IO ()
styleContextSetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> Gtk.WidgetPath.WidgetPath
-> m ()
styleContextSetPath :: a -> WidgetPath -> m ()
styleContextSetPath a
context WidgetPath
path = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr WidgetPath
path' <- WidgetPath -> IO (Ptr WidgetPath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr WidgetPath
path
Ptr StyleContext -> Ptr WidgetPath -> IO ()
gtk_style_context_set_path Ptr StyleContext
context' Ptr WidgetPath
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
WidgetPath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr WidgetPath
path
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetPathMethodInfo
instance (signature ~ (Gtk.WidgetPath.WidgetPath -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextSetPathMethodInfo a signature where
overloadedMethod = styleContextSetPath
#endif
foreign import ccall "gtk_style_context_set_scale" gtk_style_context_set_scale ::
Ptr StyleContext ->
Int32 ->
IO ()
styleContextSetScale ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> Int32
-> m ()
styleContextSetScale :: a -> Int32 -> m ()
styleContextSetScale a
context Int32
scale = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr StyleContext -> Int32 -> IO ()
gtk_style_context_set_scale Ptr StyleContext
context' Int32
scale
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetScaleMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextSetScaleMethodInfo a signature where
overloadedMethod = styleContextSetScale
#endif
foreign import ccall "gtk_style_context_set_screen" gtk_style_context_set_screen ::
Ptr StyleContext ->
Ptr Gdk.Screen.Screen ->
IO ()
styleContextSetScreen ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Screen.IsScreen b) =>
a
-> b
-> m ()
styleContextSetScreen :: a -> b -> m ()
styleContextSetScreen a
context b
screen = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr Screen
screen' <- b -> IO (Ptr Screen)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
screen
Ptr StyleContext -> Ptr Screen -> IO ()
gtk_style_context_set_screen Ptr StyleContext
context' Ptr Screen
screen'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
screen
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetScreenMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsStyleContext a, Gdk.Screen.IsScreen b) => O.MethodInfo StyleContextSetScreenMethodInfo a signature where
overloadedMethod = styleContextSetScreen
#endif
foreign import ccall "gtk_style_context_set_state" gtk_style_context_set_state ::
Ptr StyleContext ->
CUInt ->
IO ()
styleContextSetState ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StateFlags]
-> m ()
styleContextSetState :: a -> [StateFlags] -> m ()
styleContextSetState a
context [StateFlags]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let flags' :: CUInt
flags' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
flags
Ptr StyleContext -> CUInt -> IO ()
gtk_style_context_set_state Ptr StyleContext
context' CUInt
flags'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StyleContextSetStateMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m ()), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextSetStateMethodInfo a signature where
overloadedMethod = styleContextSetState
#endif
foreign import ccall "gtk_style_context_state_is_running" gtk_style_context_state_is_running ::
Ptr StyleContext ->
CUInt ->
Ptr CDouble ->
IO CInt
{-# DEPRECATED styleContextStateIsRunning ["(Since version 3.6)","This function always returns 'P.False'"] #-}
styleContextStateIsRunning ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> Gtk.Enums.StateType
-> m ((Bool, Double))
styleContextStateIsRunning :: a -> StateType -> m (Bool, Double)
styleContextStateIsRunning a
context StateType
state = IO (Bool, Double) -> m (Bool, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double) -> m (Bool, Double))
-> IO (Bool, Double) -> m (Bool, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
Ptr CDouble
progress <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr StyleContext -> CUInt -> Ptr CDouble -> IO CInt
gtk_style_context_state_is_running Ptr StyleContext
context' CUInt
state' Ptr CDouble
progress
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
progress' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
progress
let progress'' :: Double
progress'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
progress'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
progress
(Bool, Double) -> IO (Bool, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
progress'')
#if defined(ENABLE_OVERLOADING)
data StyleContextStateIsRunningMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> m ((Bool, Double))), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextStateIsRunningMethodInfo a signature where
overloadedMethod = styleContextStateIsRunning
#endif
foreign import ccall "gtk_style_context_to_string" gtk_style_context_to_string ::
Ptr StyleContext ->
CUInt ->
IO CString
styleContextToString ::
(B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
a
-> [Gtk.Flags.StyleContextPrintFlags]
-> m T.Text
styleContextToString :: a -> [StyleContextPrintFlags] -> m Text
styleContextToString a
context [StyleContextPrintFlags]
flags = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr StyleContext
context' <- a -> IO (Ptr StyleContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let flags' :: CUInt
flags' = [StyleContextPrintFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StyleContextPrintFlags]
flags
CString
result <- Ptr StyleContext -> CUInt -> IO CString
gtk_style_context_to_string Ptr StyleContext
context' CUInt
flags'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"styleContextToString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data StyleContextToStringMethodInfo
instance (signature ~ ([Gtk.Flags.StyleContextPrintFlags] -> m T.Text), MonadIO m, IsStyleContext a) => O.MethodInfo StyleContextToStringMethodInfo a signature where
overloadedMethod = styleContextToString
#endif
foreign import ccall "gtk_style_context_add_provider_for_screen" gtk_style_context_add_provider_for_screen ::
Ptr Gdk.Screen.Screen ->
Ptr Gtk.StyleProvider.StyleProvider ->
Word32 ->
IO ()
styleContextAddProviderForScreen ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a, Gtk.StyleProvider.IsStyleProvider b) =>
a
-> b
-> Word32
-> m ()
styleContextAddProviderForScreen :: a -> b -> Word32 -> m ()
styleContextAddProviderForScreen a
screen b
provider Word32
priority = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Screen
screen' <- a -> IO (Ptr Screen)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
screen
Ptr StyleProvider
provider' <- b -> IO (Ptr StyleProvider)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
provider
Ptr Screen -> Ptr StyleProvider -> Word32 -> IO ()
gtk_style_context_add_provider_for_screen Ptr Screen
screen' Ptr StyleProvider
provider' Word32
priority
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
screen
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
provider
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_style_context_remove_provider_for_screen" gtk_style_context_remove_provider_for_screen ::
Ptr Gdk.Screen.Screen ->
Ptr Gtk.StyleProvider.StyleProvider ->
IO ()
styleContextRemoveProviderForScreen ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a, Gtk.StyleProvider.IsStyleProvider b) =>
a
-> b
-> m ()
styleContextRemoveProviderForScreen :: a -> b -> m ()
styleContextRemoveProviderForScreen a
screen b
provider = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Screen
screen' <- a -> IO (Ptr Screen)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
screen
Ptr StyleProvider
provider' <- b -> IO (Ptr StyleProvider)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
provider
Ptr Screen -> Ptr StyleProvider -> IO ()
gtk_style_context_remove_provider_for_screen Ptr Screen
screen' Ptr StyleProvider
provider'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
screen
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
provider
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_style_context_reset_widgets" gtk_style_context_reset_widgets ::
Ptr Gdk.Screen.Screen ->
IO ()
styleContextResetWidgets ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a) =>
a
-> m ()
styleContextResetWidgets :: a -> m ()
styleContextResetWidgets a
screen = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Screen
screen' <- a -> IO (Ptr Screen)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
screen
Ptr Screen -> IO ()
gtk_style_context_reset_widgets Ptr Screen
screen'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
screen
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif