{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.Gtk.Objects.StyleContext.StyleContext' is an object that stores styling information affecting
-- a widget defined by t'GI.Gtk.Structs.WidgetPath.WidgetPath'.
-- 
-- In order to construct the final style information, t'GI.Gtk.Objects.StyleContext.StyleContext'
-- queries information from all attached @/GtkStyleProviders/@. Style providers
-- can be either attached explicitly to the context through
-- 'GI.Gtk.Objects.StyleContext.styleContextAddProvider', or to the screen through
-- 'GI.Gtk.Objects.StyleContext.styleContextAddProviderForScreen'. The resulting style is a
-- combination of all providers’ information in priority order.
-- 
-- For GTK+ widgets, any t'GI.Gtk.Objects.StyleContext.StyleContext' returned by
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext' will already have a t'GI.Gtk.Structs.WidgetPath.WidgetPath', a
-- t'GI.Gdk.Objects.Screen.Screen' and RTL\/LTR information set. The style context will also be
-- updated automatically if any of these settings change on the widget.
-- 
-- If you are using the theming layer standalone, you will need to set a
-- widget path and a screen yourself to the created style context through
-- 'GI.Gtk.Objects.StyleContext.styleContextSetPath' and possibly 'GI.Gtk.Objects.StyleContext.styleContextSetScreen'. See
-- the “Foreign drawing“ example in gtk3-demo.
-- 
-- # Style Classes # {@/gtkstylecontext/@-classes}
-- 
-- Widgets can add style classes to their context, which can be used to associate
-- different styles by class. The documentation for individual widgets lists
-- which style classes it uses itself, and which style classes may be added by
-- applications to affect their appearance.
-- 
-- GTK+ defines macros for a number of style classes.
-- 
-- = Style Regions
-- 
-- Widgets can also add regions with flags to their context. This feature is
-- deprecated and will be removed in a future GTK+ update. Please use style
-- classes instead.
-- 
-- GTK+ defines macros for a number of style regions.
-- 
-- = Custom styling in UI libraries and applications
-- 
-- If you are developing a library with custom @/GtkWidgets/@ that
-- render differently than standard components, you may need to add a
-- t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' yourself with the 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_FALLBACK'
-- priority, either a t'GI.Gtk.Objects.CssProvider.CssProvider' or a custom object implementing the
-- t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' interface. This way themes may still attempt
-- to style your UI elements in a different way if needed so.
-- 
-- If you are using custom styling on an applications, you probably want then
-- to make your style information prevail to the theme’s, so you must use
-- a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' with the 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_APPLICATION'
-- priority, keep in mind that the user settings in
-- @XDG_CONFIG_HOME\/gtk-3.0\/gtk.css@ will
-- still take precedence over your changes, as it uses the
-- 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_USER' priority.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Objects.StyleContext
    ( 

-- * Exported types
    StyleContext(..)                        ,
    IsStyleContext                          ,
    toStyleContext                          ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [addClass]("GI.Gtk.Objects.StyleContext#g:method:addClass"), [addProvider]("GI.Gtk.Objects.StyleContext#g:method:addProvider"), [addRegion]("GI.Gtk.Objects.StyleContext#g:method:addRegion"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [cancelAnimations]("GI.Gtk.Objects.StyleContext#g:method:cancelAnimations"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasClass]("GI.Gtk.Objects.StyleContext#g:method:hasClass"), [hasRegion]("GI.Gtk.Objects.StyleContext#g:method:hasRegion"), [invalidate]("GI.Gtk.Objects.StyleContext#g:method:invalidate"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [listClasses]("GI.Gtk.Objects.StyleContext#g:method:listClasses"), [listRegions]("GI.Gtk.Objects.StyleContext#g:method:listRegions"), [lookupColor]("GI.Gtk.Objects.StyleContext#g:method:lookupColor"), [lookupIconSet]("GI.Gtk.Objects.StyleContext#g:method:lookupIconSet"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [notifyStateChange]("GI.Gtk.Objects.StyleContext#g:method:notifyStateChange"), [popAnimatableRegion]("GI.Gtk.Objects.StyleContext#g:method:popAnimatableRegion"), [pushAnimatableRegion]("GI.Gtk.Objects.StyleContext#g:method:pushAnimatableRegion"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [removeClass]("GI.Gtk.Objects.StyleContext#g:method:removeClass"), [removeProvider]("GI.Gtk.Objects.StyleContext#g:method:removeProvider"), [removeRegion]("GI.Gtk.Objects.StyleContext#g:method:removeRegion"), [restore]("GI.Gtk.Objects.StyleContext#g:method:restore"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [save]("GI.Gtk.Objects.StyleContext#g:method:save"), [scrollAnimations]("GI.Gtk.Objects.StyleContext#g:method:scrollAnimations"), [stateIsRunning]("GI.Gtk.Objects.StyleContext#g:method:stateIsRunning"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [toString]("GI.Gtk.Objects.StyleContext#g:method:toString"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getBackgroundColor]("GI.Gtk.Objects.StyleContext#g:method:getBackgroundColor"), [getBorder]("GI.Gtk.Objects.StyleContext#g:method:getBorder"), [getBorderColor]("GI.Gtk.Objects.StyleContext#g:method:getBorderColor"), [getColor]("GI.Gtk.Objects.StyleContext#g:method:getColor"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDirection]("GI.Gtk.Objects.StyleContext#g:method:getDirection"), [getFont]("GI.Gtk.Objects.StyleContext#g:method:getFont"), [getFrameClock]("GI.Gtk.Objects.StyleContext#g:method:getFrameClock"), [getJunctionSides]("GI.Gtk.Objects.StyleContext#g:method:getJunctionSides"), [getMargin]("GI.Gtk.Objects.StyleContext#g:method:getMargin"), [getPadding]("GI.Gtk.Objects.StyleContext#g:method:getPadding"), [getParent]("GI.Gtk.Objects.StyleContext#g:method:getParent"), [getPath]("GI.Gtk.Objects.StyleContext#g:method:getPath"), [getProperty]("GI.Gtk.Objects.StyleContext#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getScale]("GI.Gtk.Objects.StyleContext#g:method:getScale"), [getScreen]("GI.Gtk.Objects.StyleContext#g:method:getScreen"), [getSection]("GI.Gtk.Objects.StyleContext#g:method:getSection"), [getState]("GI.Gtk.Objects.StyleContext#g:method:getState"), [getStyleProperty]("GI.Gtk.Objects.StyleContext#g:method:getStyleProperty").
-- 
-- ==== Setters
-- [setBackground]("GI.Gtk.Objects.StyleContext#g:method:setBackground"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDirection]("GI.Gtk.Objects.StyleContext#g:method:setDirection"), [setFrameClock]("GI.Gtk.Objects.StyleContext#g:method:setFrameClock"), [setJunctionSides]("GI.Gtk.Objects.StyleContext#g:method:setJunctionSides"), [setParent]("GI.Gtk.Objects.StyleContext#g:method:setParent"), [setPath]("GI.Gtk.Objects.StyleContext#g:method:setPath"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setScale]("GI.Gtk.Objects.StyleContext#g:method:setScale"), [setScreen]("GI.Gtk.Objects.StyleContext#g:method:setScreen"), [setState]("GI.Gtk.Objects.StyleContext#g:method:setState").

#if defined(ENABLE_OVERLOADING)
    ResolveStyleContextMethod               ,
#endif

-- ** addClass #method:addClass#

#if defined(ENABLE_OVERLOADING)
    StyleContextAddClassMethodInfo          ,
#endif
    styleContextAddClass                    ,


-- ** addProvider #method:addProvider#

#if defined(ENABLE_OVERLOADING)
    StyleContextAddProviderMethodInfo       ,
#endif
    styleContextAddProvider                 ,


-- ** addProviderForScreen #method:addProviderForScreen#

    styleContextAddProviderForScreen        ,


-- ** addRegion #method:addRegion#

#if defined(ENABLE_OVERLOADING)
    StyleContextAddRegionMethodInfo         ,
#endif
    styleContextAddRegion                   ,


-- ** cancelAnimations #method:cancelAnimations#

#if defined(ENABLE_OVERLOADING)
    StyleContextCancelAnimationsMethodInfo  ,
#endif
    styleContextCancelAnimations            ,


-- ** getBackgroundColor #method:getBackgroundColor#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetBackgroundColorMethodInfo,
#endif
    styleContextGetBackgroundColor          ,


-- ** getBorder #method:getBorder#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetBorderMethodInfo         ,
#endif
    styleContextGetBorder                   ,


-- ** getBorderColor #method:getBorderColor#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetBorderColorMethodInfo    ,
#endif
    styleContextGetBorderColor              ,


-- ** getColor #method:getColor#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetColorMethodInfo          ,
#endif
    styleContextGetColor                    ,


-- ** getDirection #method:getDirection#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetDirectionMethodInfo      ,
#endif
    styleContextGetDirection                ,


-- ** getFont #method:getFont#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetFontMethodInfo           ,
#endif
    styleContextGetFont                     ,


-- ** getFrameClock #method:getFrameClock#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetFrameClockMethodInfo     ,
#endif
    styleContextGetFrameClock               ,


-- ** getJunctionSides #method:getJunctionSides#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetJunctionSidesMethodInfo  ,
#endif
    styleContextGetJunctionSides            ,


-- ** getMargin #method:getMargin#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetMarginMethodInfo         ,
#endif
    styleContextGetMargin                   ,


-- ** getPadding #method:getPadding#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetPaddingMethodInfo        ,
#endif
    styleContextGetPadding                  ,


-- ** getParent #method:getParent#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetParentMethodInfo         ,
#endif
    styleContextGetParent                   ,


-- ** getPath #method:getPath#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetPathMethodInfo           ,
#endif
    styleContextGetPath                     ,


-- ** getProperty #method:getProperty#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetPropertyMethodInfo       ,
#endif
    styleContextGetProperty                 ,


-- ** getScale #method:getScale#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetScaleMethodInfo          ,
#endif
    styleContextGetScale                    ,


-- ** getScreen #method:getScreen#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetScreenMethodInfo         ,
#endif
    styleContextGetScreen                   ,


-- ** getSection #method:getSection#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetSectionMethodInfo        ,
#endif
    styleContextGetSection                  ,


-- ** getState #method:getState#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetStateMethodInfo          ,
#endif
    styleContextGetState                    ,


-- ** getStyleProperty #method:getStyleProperty#

#if defined(ENABLE_OVERLOADING)
    StyleContextGetStylePropertyMethodInfo  ,
#endif
    styleContextGetStyleProperty            ,


-- ** hasClass #method:hasClass#

#if defined(ENABLE_OVERLOADING)
    StyleContextHasClassMethodInfo          ,
#endif
    styleContextHasClass                    ,


-- ** hasRegion #method:hasRegion#

#if defined(ENABLE_OVERLOADING)
    StyleContextHasRegionMethodInfo         ,
#endif
    styleContextHasRegion                   ,


-- ** invalidate #method:invalidate#

#if defined(ENABLE_OVERLOADING)
    StyleContextInvalidateMethodInfo        ,
#endif
    styleContextInvalidate                  ,


-- ** listClasses #method:listClasses#

#if defined(ENABLE_OVERLOADING)
    StyleContextListClassesMethodInfo       ,
#endif
    styleContextListClasses                 ,


-- ** listRegions #method:listRegions#

#if defined(ENABLE_OVERLOADING)
    StyleContextListRegionsMethodInfo       ,
#endif
    styleContextListRegions                 ,


-- ** lookupColor #method:lookupColor#

#if defined(ENABLE_OVERLOADING)
    StyleContextLookupColorMethodInfo       ,
#endif
    styleContextLookupColor                 ,


-- ** lookupIconSet #method:lookupIconSet#

#if defined(ENABLE_OVERLOADING)
    StyleContextLookupIconSetMethodInfo     ,
#endif
    styleContextLookupIconSet               ,


-- ** new #method:new#

    styleContextNew                         ,


-- ** notifyStateChange #method:notifyStateChange#

#if defined(ENABLE_OVERLOADING)
    StyleContextNotifyStateChangeMethodInfo ,
#endif
    styleContextNotifyStateChange           ,


-- ** popAnimatableRegion #method:popAnimatableRegion#

#if defined(ENABLE_OVERLOADING)
    StyleContextPopAnimatableRegionMethodInfo,
#endif
    styleContextPopAnimatableRegion         ,


-- ** pushAnimatableRegion #method:pushAnimatableRegion#

#if defined(ENABLE_OVERLOADING)
    StyleContextPushAnimatableRegionMethodInfo,
#endif
    styleContextPushAnimatableRegion        ,


-- ** removeClass #method:removeClass#

#if defined(ENABLE_OVERLOADING)
    StyleContextRemoveClassMethodInfo       ,
#endif
    styleContextRemoveClass                 ,


-- ** removeProvider #method:removeProvider#

#if defined(ENABLE_OVERLOADING)
    StyleContextRemoveProviderMethodInfo    ,
#endif
    styleContextRemoveProvider              ,


-- ** removeProviderForScreen #method:removeProviderForScreen#

    styleContextRemoveProviderForScreen     ,


-- ** removeRegion #method:removeRegion#

#if defined(ENABLE_OVERLOADING)
    StyleContextRemoveRegionMethodInfo      ,
#endif
    styleContextRemoveRegion                ,


-- ** resetWidgets #method:resetWidgets#

    styleContextResetWidgets                ,


-- ** restore #method:restore#

#if defined(ENABLE_OVERLOADING)
    StyleContextRestoreMethodInfo           ,
#endif
    styleContextRestore                     ,


-- ** save #method:save#

#if defined(ENABLE_OVERLOADING)
    StyleContextSaveMethodInfo              ,
#endif
    styleContextSave                        ,


-- ** scrollAnimations #method:scrollAnimations#

#if defined(ENABLE_OVERLOADING)
    StyleContextScrollAnimationsMethodInfo  ,
#endif
    styleContextScrollAnimations            ,


-- ** setBackground #method:setBackground#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetBackgroundMethodInfo     ,
#endif
    styleContextSetBackground               ,


-- ** setDirection #method:setDirection#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetDirectionMethodInfo      ,
#endif
    styleContextSetDirection                ,


-- ** setFrameClock #method:setFrameClock#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetFrameClockMethodInfo     ,
#endif
    styleContextSetFrameClock               ,


-- ** setJunctionSides #method:setJunctionSides#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetJunctionSidesMethodInfo  ,
#endif
    styleContextSetJunctionSides            ,


-- ** setParent #method:setParent#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetParentMethodInfo         ,
#endif
    styleContextSetParent                   ,


-- ** setPath #method:setPath#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetPathMethodInfo           ,
#endif
    styleContextSetPath                     ,


-- ** setScale #method:setScale#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetScaleMethodInfo          ,
#endif
    styleContextSetScale                    ,


-- ** setScreen #method:setScreen#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetScreenMethodInfo         ,
#endif
    styleContextSetScreen                   ,


-- ** setState #method:setState#

#if defined(ENABLE_OVERLOADING)
    StyleContextSetStateMethodInfo          ,
#endif
    styleContextSetState                    ,


-- ** stateIsRunning #method:stateIsRunning#

#if defined(ENABLE_OVERLOADING)
    StyleContextStateIsRunningMethodInfo    ,
#endif
    styleContextStateIsRunning              ,


-- ** toString #method:toString#

#if defined(ENABLE_OVERLOADING)
    StyleContextToStringMethodInfo          ,
#endif
    styleContextToString                    ,




 -- * Properties


-- ** direction #attr:direction#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    StyleContextDirectionPropertyInfo       ,
#endif
    constructStyleContextDirection          ,
    getStyleContextDirection                ,
    setStyleContextDirection                ,
#if defined(ENABLE_OVERLOADING)
    styleContextDirection                   ,
#endif


-- ** paintClock #attr:paintClock#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    StyleContextPaintClockPropertyInfo      ,
#endif
    clearStyleContextPaintClock             ,
    constructStyleContextPaintClock         ,
    getStyleContextPaintClock               ,
    setStyleContextPaintClock               ,
#if defined(ENABLE_OVERLOADING)
    styleContextPaintClock                  ,
#endif


-- ** parent #attr:parent#
-- | Sets or gets the style context’s parent. See 'GI.Gtk.Objects.StyleContext.styleContextSetParent'
-- for details.
-- 
-- /Since: 3.4/

#if defined(ENABLE_OVERLOADING)
    StyleContextParentPropertyInfo          ,
#endif
    clearStyleContextParent                 ,
    constructStyleContextParent             ,
    getStyleContextParent                   ,
    setStyleContextParent                   ,
#if defined(ENABLE_OVERLOADING)
    styleContextParent                      ,
#endif


-- ** screen #attr:screen#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    StyleContextScreenPropertyInfo          ,
#endif
    constructStyleContextScreen             ,
    getStyleContextScreen                   ,
    setStyleContextScreen                   ,
#if defined(ENABLE_OVERLOADING)
    styleContextScreen                      ,
#endif




 -- * Signals


-- ** changed #signal:changed#

    StyleContextChangedCallback             ,
#if defined(ENABLE_OVERLOADING)
    StyleContextChangedSignalInfo           ,
#endif
    afterStyleContextChanged                ,
    onStyleContextChanged                   ,




    ) 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.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R

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

-- | Memory-managed wrapper type.
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
$c== :: StyleContext -> StyleContext -> Bool
== :: StyleContext -> StyleContext -> Bool
$c/= :: StyleContext -> StyleContext -> Bool
/= :: 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

-- | Type class for types which can be safely cast to `StyleContext`, for instance with `toStyleContext`.
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]

-- | Cast to `StyleContext`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toStyleContext :: (MIO.MonadIO m, IsStyleContext o) => o -> m StyleContext
toStyleContext :: forall (m :: * -> *) o.
(MonadIO m, IsStyleContext o) =>
o -> m StyleContext
toStyleContext = IO StyleContext -> m StyleContext
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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'
B.ManagedPtr.unsafeCastTo ManagedPtr StyleContext -> StyleContext
StyleContext

-- | Convert 'StyleContext' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe StyleContext) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_style_context_get_type
    gvalueSet_ :: Ptr GValue -> Maybe StyleContext -> IO ()
gvalueSet_ Ptr GValue
gv Maybe StyleContext
P.Nothing = Ptr GValue -> Ptr StyleContext -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr StyleContext
forall a. Ptr a
FP.nullPtr :: FP.Ptr StyleContext)
    gvalueSet_ Ptr GValue
gv (P.Just StyleContext
obj) = StyleContext -> (Ptr StyleContext -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr StyleContext
obj (Ptr GValue -> Ptr StyleContext -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe StyleContext)
gvalueGet_ Ptr GValue
gv = do
        Ptr StyleContext
ptr <- Ptr GValue -> IO (Ptr StyleContext)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr StyleContext)
        if Ptr StyleContext
ptr Ptr StyleContext -> Ptr StyleContext -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr StyleContext
forall a. Ptr a
FP.nullPtr
        then StyleContext -> Maybe StyleContext
forall a. a -> Maybe a
P.Just (StyleContext -> Maybe StyleContext)
-> IO StyleContext -> IO (Maybe StyleContext)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (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
        else Maybe StyleContext -> IO (Maybe StyleContext)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe StyleContext
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveStyleContextMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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.OverloadedMethod 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

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveStyleContextMethod t StyleContext, O.OverloadedMethod info StyleContext p, R.HasField t StyleContext p) => R.HasField t StyleContext p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveStyleContextMethod t StyleContext, O.OverloadedMethodInfo info StyleContext) => OL.IsLabel t (O.MethodProxy info StyleContext) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal StyleContext::changed
-- | The [changed](#g:signal:changed) signal is emitted when there is a change in the
-- t'GI.Gtk.Objects.StyleContext.StyleContext'.
-- 
-- For a t'GI.Gtk.Objects.StyleContext.StyleContext' returned by 'GI.Gtk.Objects.Widget.widgetGetStyleContext', the
-- [Widget::styleUpdated]("GI.Gtk.Objects.Widget#g:signal:styleUpdated") signal\/vfunc might be more convenient to use.
-- 
-- This signal is useful when using the theming layer standalone.
-- 
-- /Since: 3.0/
type StyleContextChangedCallback =
    IO ()

type C_StyleContextChangedCallback =
    Ptr StyleContext ->                     -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_StyleContextChangedCallback`.
foreign import ccall "wrapper"
    mk_StyleContextChangedCallback :: C_StyleContextChangedCallback -> IO (FunPtr C_StyleContextChangedCallback)

wrap_StyleContextChangedCallback :: 
    GObject a => (a -> StyleContextChangedCallback) ->
    C_StyleContextChangedCallback
wrap_StyleContextChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback a -> IO ()
gi'cb Ptr StyleContext
gi'selfPtr Ptr ()
_ = do
    Ptr StyleContext -> (StyleContext -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr StyleContext
gi'selfPtr ((StyleContext -> IO ()) -> IO ())
-> (StyleContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \StyleContext
gi'self -> a -> IO ()
gi'cb (StyleContext -> a
forall a b. Coercible a b => a -> b
Coerce.coerce StyleContext
gi'self) 


-- | Connect a signal handler for the [changed](#signal:changed) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' styleContext #changed callback
-- @
-- 
-- 
onStyleContextChanged :: (IsStyleContext a, MonadIO m) => a -> ((?self :: a) => StyleContextChangedCallback) -> m SignalHandlerId
onStyleContextChanged :: forall a (m :: * -> *).
(IsStyleContext a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onStyleContextChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_StyleContextChangedCallback
wrapped' = (a -> IO ()) -> C_StyleContextChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback a -> IO ()
wrapped
    FunPtr C_StyleContextChangedCallback
wrapped'' <- C_StyleContextChangedCallback
-> IO (FunPtr C_StyleContextChangedCallback)
mk_StyleContextChangedCallback C_StyleContextChangedCallback
wrapped'
    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
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [changed](#signal:changed) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' styleContext #changed callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterStyleContextChanged :: (IsStyleContext a, MonadIO m) => a -> ((?self :: a) => StyleContextChangedCallback) -> m SignalHandlerId
afterStyleContextChanged :: forall a (m :: * -> *).
(IsStyleContext a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterStyleContextChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_StyleContextChangedCallback
wrapped' = (a -> IO ()) -> C_StyleContextChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_StyleContextChangedCallback
wrap_StyleContextChangedCallback a -> IO ()
wrapped
    FunPtr C_StyleContextChangedCallback
wrapped'' <- C_StyleContextChangedCallback
-> IO (FunPtr C_StyleContextChangedCallback)
mk_StyleContextChangedCallback C_StyleContextChangedCallback
wrapped'
    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
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext::changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#g:signal:changed"})

#endif

-- VVV Prop "direction"
   -- Type: TInterface (Name {namespace = "Gtk", name = "TextDirection"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@direction@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' styleContext #direction
-- @
getStyleContextDirection :: (MonadIO m, IsStyleContext o) => o -> m Gtk.Enums.TextDirection
getStyleContextDirection :: forall (m :: * -> *) o.
(MonadIO m, IsStyleContext o) =>
o -> m TextDirection
getStyleContextDirection o
obj = IO TextDirection -> m TextDirection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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"

-- | Set the value of the “@direction@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' styleContext [ #direction 'Data.GI.Base.Attributes.:=' value ]
-- @
setStyleContextDirection :: (MonadIO m, IsStyleContext o) => o -> Gtk.Enums.TextDirection -> m ()
setStyleContextDirection :: forall (m :: * -> *) o.
(MonadIO m, IsStyleContext o) =>
o -> TextDirection -> m ()
setStyleContextDirection o
obj TextDirection
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    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

-- | Construct a `GValueConstruct` with valid value for the “@direction@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructStyleContextDirection :: (IsStyleContext o, MIO.MonadIO m) => Gtk.Enums.TextDirection -> m (GValueConstruct o)
constructStyleContextDirection :: forall o (m :: * -> *).
(IsStyleContext o, MonadIO m) =>
TextDirection -> m (GValueConstruct o)
constructStyleContextDirection TextDirection
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.direction"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#g:attr:direction"
        })
#endif

-- VVV Prop "paint-clock"
   -- Type: TInterface (Name {namespace = "Gdk", name = "FrameClock"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@paint-clock@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' styleContext #paintClock
-- @
getStyleContextPaintClock :: (MonadIO m, IsStyleContext o) => o -> m (Maybe Gdk.FrameClock.FrameClock)
getStyleContextPaintClock :: forall (m :: * -> *) o.
(MonadIO m, IsStyleContext o) =>
o -> m (Maybe FrameClock)
getStyleContextPaintClock o
obj = IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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

-- | Set the value of the “@paint-clock@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' styleContext [ #paintClock 'Data.GI.Base.Attributes.:=' value ]
-- @
setStyleContextPaintClock :: (MonadIO m, IsStyleContext o, Gdk.FrameClock.IsFrameClock a) => o -> a -> m ()
setStyleContextPaintClock :: forall (m :: * -> *) o a.
(MonadIO m, IsStyleContext o, IsFrameClock a) =>
o -> a -> m ()
setStyleContextPaintClock o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    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)

-- | Construct a `GValueConstruct` with valid value for the “@paint-clock@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructStyleContextPaintClock :: (IsStyleContext o, MIO.MonadIO m, Gdk.FrameClock.IsFrameClock a) => a -> m (GValueConstruct o)
constructStyleContextPaintClock :: forall o (m :: * -> *) a.
(IsStyleContext o, MonadIO m, IsFrameClock a) =>
a -> m (GValueConstruct o)
constructStyleContextPaintClock a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (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)

-- | Set the value of the “@paint-clock@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #paintClock
-- @
clearStyleContextPaintClock :: (MonadIO m, IsStyleContext o) => o -> m ()
clearStyleContextPaintClock :: forall (m :: * -> *) o. (MonadIO m, IsStyleContext o) => o -> m ()
clearStyleContextPaintClock o
obj = IO () -> m ()
forall a. IO a -> m a
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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.paintClock"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#g:attr:paintClock"
        })
#endif

-- VVV Prop "parent"
   -- Type: TInterface (Name {namespace = "Gtk", name = "StyleContext"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@parent@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' styleContext #parent
-- @
getStyleContextParent :: (MonadIO m, IsStyleContext o) => o -> m (Maybe StyleContext)
getStyleContextParent :: forall (m :: * -> *) o.
(MonadIO m, IsStyleContext o) =>
o -> m (Maybe StyleContext)
getStyleContextParent o
obj = IO (Maybe StyleContext) -> m (Maybe StyleContext)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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

-- | Set the value of the “@parent@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' styleContext [ #parent 'Data.GI.Base.Attributes.:=' value ]
-- @
setStyleContextParent :: (MonadIO m, IsStyleContext o, IsStyleContext a) => o -> a -> m ()
setStyleContextParent :: forall (m :: * -> *) o a.
(MonadIO m, IsStyleContext o, IsStyleContext a) =>
o -> a -> m ()
setStyleContextParent o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    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)

-- | Construct a `GValueConstruct` with valid value for the “@parent@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructStyleContextParent :: (IsStyleContext o, MIO.MonadIO m, IsStyleContext a) => a -> m (GValueConstruct o)
constructStyleContextParent :: forall o (m :: * -> *) a.
(IsStyleContext o, MonadIO m, IsStyleContext a) =>
a -> m (GValueConstruct o)
constructStyleContextParent a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (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)

-- | Set the value of the “@parent@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #parent
-- @
clearStyleContextParent :: (MonadIO m, IsStyleContext o) => o -> m ()
clearStyleContextParent :: forall (m :: * -> *) o. (MonadIO m, IsStyleContext o) => o -> m ()
clearStyleContextParent o
obj = IO () -> m ()
forall a. IO a -> m a
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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.parent"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#g:attr:parent"
        })
#endif

-- VVV Prop "screen"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Screen"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@screen@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' styleContext #screen
-- @
getStyleContextScreen :: (MonadIO m, IsStyleContext o) => o -> m Gdk.Screen.Screen
getStyleContextScreen :: forall (m :: * -> *) o.
(MonadIO m, IsStyleContext o) =>
o -> m Screen
getStyleContextScreen o
obj = IO Screen -> m Screen
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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

-- | Set the value of the “@screen@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' styleContext [ #screen 'Data.GI.Base.Attributes.:=' value ]
-- @
setStyleContextScreen :: (MonadIO m, IsStyleContext o, Gdk.Screen.IsScreen a) => o -> a -> m ()
setStyleContextScreen :: forall (m :: * -> *) o a.
(MonadIO m, IsStyleContext o, IsScreen a) =>
o -> a -> m ()
setStyleContextScreen o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    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)

-- | Construct a `GValueConstruct` with valid value for the “@screen@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructStyleContextScreen :: (IsStyleContext o, MIO.MonadIO m, Gdk.Screen.IsScreen a) => a -> m (GValueConstruct o)
constructStyleContextScreen :: forall o (m :: * -> *) a.
(IsStyleContext o, MonadIO m, IsScreen a) =>
a -> m (GValueConstruct o)
constructStyleContextScreen a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.screen"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#g:attr:screen"
        })
#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, DK.Type)])
#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, DK.Type)])

#endif

-- method StyleContext::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "StyleContext" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_new" gtk_style_context_new :: 
    IO (Ptr StyleContext)

-- | Creates a standalone t'GI.Gtk.Objects.StyleContext.StyleContext', this style context
-- won’t be attached to any widget, so you may want
-- to call 'GI.Gtk.Objects.StyleContext.styleContextSetPath' yourself.
-- 
-- This function is only useful when using the theming layer
-- separated from GTK+, if you are using t'GI.Gtk.Objects.StyleContext.StyleContext' to
-- theme @/GtkWidgets/@, use 'GI.Gtk.Objects.Widget.widgetGetStyleContext'
-- in order to get a style context ready to theme the widget.
styleContextNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m StyleContext
    -- ^ __Returns:__ A newly created t'GI.Gtk.Objects.StyleContext.StyleContext'.
styleContextNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m StyleContext
styleContextNew  = IO StyleContext -> m StyleContext
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return StyleContext
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method StyleContext::add_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "class_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "class name to use in styling"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_class" gtk_style_context_add_class :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- class_name : TBasicType TUTF8
    IO ()

-- | Adds a style class to /@context@/, so posterior calls to
-- @/gtk_style_context_get()/@ or any of the gtk_render_*()
-- functions will make use of this new class for styling.
-- 
-- In the CSS file format, a t'GI.Gtk.Objects.Entry.Entry' defining a “search”
-- class, would be matched by:
-- 
-- > <!-- language="CSS" -->
-- >entry.search { ... }
-- 
-- 
-- While any widget defining a “search” class would be
-- matched by:
-- > <!-- language="CSS" -->
-- >.search { ... }
-- 
-- 
-- /Since: 3.0/
styleContextAddClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@className@/: class name to use in styling
    -> m ()
styleContextAddClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m ()
styleContextAddClass a
context Text
className = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextAddClassMethodInfo a signature where
    overloadedMethod = styleContextAddClass

instance O.OverloadedMethodInfo StyleContextAddClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextAddClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextAddClass"
        })


#endif

-- method StyleContext::add_provider
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "provider"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleProvider" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleProvider"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "priority"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the priority of the style provider. The lower\n           it is, the earlier it will be used in the style\n           construction. Typically this will be in the range\n           between %GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and\n           %GTK_STYLE_PROVIDER_PRIORITY_USER"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_provider" gtk_style_context_add_provider :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gtk.StyleProvider.StyleProvider ->  -- provider : TInterface (Name {namespace = "Gtk", name = "StyleProvider"})
    Word32 ->                               -- priority : TBasicType TUInt
    IO ()

-- | Adds a style provider to /@context@/, to be used in style construction.
-- Note that a style provider added by this function only affects
-- the style of the widget to which /@context@/ belongs. If you want
-- to affect the style of all widgets, use
-- 'GI.Gtk.Objects.StyleContext.styleContextAddProviderForScreen'.
-- 
-- Note: If both priorities are the same, a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'
-- added through this function takes precedence over another added
-- through 'GI.Gtk.Objects.StyleContext.styleContextAddProviderForScreen'.
-- 
-- /Since: 3.0/
styleContextAddProvider ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gtk.StyleProvider.IsStyleProvider b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> b
    -- ^ /@provider@/: a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'
    -> Word32
    -- ^ /@priority@/: the priority of the style provider. The lower
    --            it is, the earlier it will be used in the style
    --            construction. Typically this will be in the range
    --            between 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_FALLBACK' and
    --            'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_USER'
    -> m ()
styleContextAddProvider :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsStyleProvider b) =>
a -> b -> Word32 -> m ()
styleContextAddProvider a
context b
provider Word32
priority = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextAddProviderMethodInfo a signature where
    overloadedMethod = styleContextAddProvider

instance O.OverloadedMethodInfo StyleContextAddProviderMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextAddProvider",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextAddProvider"
        })


#endif

-- method StyleContext::add_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "region name to use in styling"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "RegionFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "flags that apply to the region"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_region" gtk_style_context_add_region :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- region_name : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "RegionFlags"})
    IO ()

{-# DEPRECATED styleContextAddRegion ["(Since version 3.14)"] #-}
-- | Adds a region to /@context@/, so posterior calls to
-- @/gtk_style_context_get()/@ or any of the gtk_render_*()
-- functions will make use of this new region for styling.
-- 
-- In the CSS file format, a t'GI.Gtk.Objects.TreeView.TreeView' defining a “row”
-- region, would be matched by:
-- 
-- > <!-- language="CSS" -->
-- >treeview row { ... }
-- 
-- 
-- Pseudo-classes are used for matching /@flags@/, so the two
-- following rules:
-- > <!-- language="CSS" -->
-- >treeview row:nth-child(even) { ... }
-- >treeview row:nth-child(odd) { ... }
-- 
-- 
-- would apply to even and odd rows, respectively.
-- 
-- Region names must only contain lowercase letters
-- and “-”, starting always with a lowercase letter.
-- 
-- /Since: 3.0/
styleContextAddRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@regionName@/: region name to use in styling
    -> [Gtk.Flags.RegionFlags]
    -- ^ /@flags@/: flags that apply to the region
    -> m ()
styleContextAddRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> [RegionFlags] -> m ()
styleContextAddRegion a
context Text
regionName [RegionFlags]
flags = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextAddRegionMethodInfo a signature where
    overloadedMethod = styleContextAddRegion

instance O.OverloadedMethodInfo StyleContextAddRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextAddRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextAddRegion"
        })


#endif

-- method StyleContext::cancel_animations
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region_id"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "animatable region to stop, or %NULL.\n    See gtk_style_context_push_animatable_region()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_cancel_animations" gtk_style_context_cancel_animations :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr () ->                               -- region_id : TBasicType TPtr
    IO ()

{-# DEPRECATED styleContextCancelAnimations ["(Since version 3.6)","This function does nothing."] #-}
-- | Stops all running animations for /@regionId@/ and all animatable
-- regions underneath.
-- 
-- A 'P.Nothing' /@regionId@/ will stop all ongoing animations in /@context@/,
-- when dealing with a t'GI.Gtk.Objects.StyleContext.StyleContext' obtained through
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext', this is normally done for you
-- in all circumstances you would expect all widget to be stopped,
-- so this should be only used in complex widgets with different
-- animatable regions.
-- 
-- /Since: 3.0/
styleContextCancelAnimations ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Ptr ()
    -- ^ /@regionId@/: animatable region to stop, or 'P.Nothing'.
    --     See 'GI.Gtk.Objects.StyleContext.styleContextPushAnimatableRegion'
    -> m ()
styleContextCancelAnimations :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Ptr () -> m ()
styleContextCancelAnimations a
context Ptr ()
regionId = IO () -> m ()
forall a. IO a -> m a
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
    C_StyleContextChangedCallback
gtk_style_context_cancel_animations Ptr StyleContext
context' Ptr ()
regionId
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextCancelAnimationsMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextCancelAnimationsMethodInfo a signature where
    overloadedMethod = styleContextCancelAnimations

instance O.OverloadedMethodInfo StyleContextCancelAnimationsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextCancelAnimations",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextCancelAnimations"
        })


#endif

-- method StyleContext::get_background_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the color for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return value for the background color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_background_color" gtk_style_context_get_background_color :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED styleContextGetBackgroundColor ["(Since version 3.16)","Use 'GI.Gtk.Functions.renderBackground' instead."] #-}
-- | Gets the background color for a given state.
-- 
-- This function is far less useful than it seems, and it should not be used in
-- newly written code. CSS has no concept of \"background color\", as a background
-- can be an image, or a gradient, or any other pattern including solid colors.
-- 
-- The only reason why you would call 'GI.Gtk.Objects.StyleContext.styleContextGetBackgroundColor' is
-- to use the returned value to draw the background with it; the correct way to
-- achieve this result is to use 'GI.Gtk.Functions.renderBackground' instead, along with CSS
-- style classes to modify the color to be rendered.
-- 
-- /Since: 3.0/
styleContextGetBackgroundColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the color for
    -> m (Gdk.RGBA.RGBA)
styleContextGetBackgroundColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m RGBA
styleContextGetBackgroundColor a
context [StateFlags]
state = IO RGBA -> m RGBA
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetBackgroundColorMethodInfo a signature where
    overloadedMethod = styleContextGetBackgroundColor

instance O.OverloadedMethodInfo StyleContextGetBackgroundColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetBackgroundColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetBackgroundColor"
        })


#endif

-- method StyleContext::get_border
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the border for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "border"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Border" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return value for the border settings"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_border" gtk_style_context_get_border :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gtk.Border.Border ->                -- border : TInterface (Name {namespace = "Gtk", name = "Border"})
    IO ()

-- | Gets the border for a given state as a t'GI.Gtk.Structs.Border.Border'.
-- 
-- See 'GI.Gtk.Objects.StyleContext.styleContextGetProperty' and
-- 'GI.Gtk.Constants.STYLE_PROPERTY_BORDER_WIDTH' for details.
-- 
-- /Since: 3.0/
styleContextGetBorder ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the border for
    -> m (Gtk.Border.Border)
styleContextGetBorder :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m Border
styleContextGetBorder a
context [StateFlags]
state = IO Border -> m Border
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetBorderMethodInfo a signature where
    overloadedMethod = styleContextGetBorder

instance O.OverloadedMethodInfo StyleContextGetBorderMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetBorder",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetBorder"
        })


#endif

-- method StyleContext::get_border_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the color for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return value for the border color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_border_color" gtk_style_context_get_border_color :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED styleContextGetBorderColor ["(Since version 3.16)","Use 'GI.Gtk.Functions.renderFrame' instead."] #-}
-- | Gets the border color for a given state.
-- 
-- /Since: 3.0/
styleContextGetBorderColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the color for
    -> m (Gdk.RGBA.RGBA)
styleContextGetBorderColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m RGBA
styleContextGetBorderColor a
context [StateFlags]
state = IO RGBA -> m RGBA
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetBorderColorMethodInfo a signature where
    overloadedMethod = styleContextGetBorderColor

instance O.OverloadedMethodInfo StyleContextGetBorderColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetBorderColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetBorderColor"
        })


#endif

-- method StyleContext::get_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the color for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return value for the foreground color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_color" gtk_style_context_get_color :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

-- | Gets the foreground color for a given state.
-- 
-- See 'GI.Gtk.Objects.StyleContext.styleContextGetProperty' and
-- 'GI.Gtk.Constants.STYLE_PROPERTY_COLOR' for details.
-- 
-- /Since: 3.0/
styleContextGetColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the color for
    -> m (Gdk.RGBA.RGBA)
styleContextGetColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m RGBA
styleContextGetColor a
context [StateFlags]
state = IO RGBA -> m RGBA
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetColorMethodInfo a signature where
    overloadedMethod = styleContextGetColor

instance O.OverloadedMethodInfo StyleContextGetColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetColor"
        })


#endif

-- method StyleContext::get_direction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "TextDirection" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_direction" gtk_style_context_get_direction :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "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."] #-}
-- | Returns the widget direction used for rendering.
-- 
-- /Since: 3.0/
styleContextGetDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m Gtk.Enums.TextDirection
    -- ^ __Returns:__ the widget direction
styleContextGetDirection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m TextDirection
styleContextGetDirection a
context = IO TextDirection -> m TextDirection
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetDirectionMethodInfo a signature where
    overloadedMethod = styleContextGetDirection

instance O.OverloadedMethodInfo StyleContextGetDirectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetDirection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetDirection"
        })


#endif

-- method StyleContext::get_font
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the font for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "Pango" , name = "FontDescription" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_font" gtk_style_context_get_font :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    IO (Ptr Pango.FontDescription.FontDescription)

{-# DEPRECATED styleContextGetFont ["(Since version 3.8)","Use @/gtk_style_context_get()/@ for \\\"font\\\" or","    subproperties instead."] #-}
-- | Returns the font description for a given state. The returned
-- object is const and will remain valid until the
-- [StyleContext::changed]("GI.Gtk.Objects.StyleContext#g:signal:changed") signal happens.
-- 
-- /Since: 3.0/
styleContextGetFont ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the font for
    -> m Pango.FontDescription.FontDescription
    -- ^ __Returns:__ the t'GI.Pango.Structs.FontDescription.FontDescription' for the given
    --          state.  This object is owned by GTK+ and should not be
    --          freed.
styleContextGetFont :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m FontDescription
styleContextGetFont a
context [StateFlags]
state = IO FontDescription -> m FontDescription
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetFontMethodInfo a signature where
    overloadedMethod = styleContextGetFont

instance O.OverloadedMethodInfo StyleContextGetFontMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetFont",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetFont"
        })


#endif

-- method StyleContext::get_frame_clock
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "FrameClock" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_frame_clock" gtk_style_context_get_frame_clock :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr Gdk.FrameClock.FrameClock)

-- | Returns the t'GI.Gdk.Objects.FrameClock.FrameClock' to which /@context@/ is attached.
-- 
-- /Since: 3.8/
styleContextGetFrameClock ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m (Maybe Gdk.FrameClock.FrameClock)
    -- ^ __Returns:__ a t'GI.Gdk.Objects.FrameClock.FrameClock', or 'P.Nothing'
    --  if /@context@/ does not have an attached frame clock.
styleContextGetFrameClock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m (Maybe FrameClock)
styleContextGetFrameClock a
context = IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall a. IO a -> m a
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 a. a -> IO a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetFrameClockMethodInfo a signature where
    overloadedMethod = styleContextGetFrameClock

instance O.OverloadedMethodInfo StyleContextGetFrameClockMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetFrameClock",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetFrameClock"
        })


#endif

-- method StyleContext::get_junction_sides
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "JunctionSides" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_junction_sides" gtk_style_context_get_junction_sides :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO CUInt

-- | Returns the sides where rendered elements connect visually with others.
-- 
-- /Since: 3.0/
styleContextGetJunctionSides ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m [Gtk.Flags.JunctionSides]
    -- ^ __Returns:__ the junction sides
styleContextGetJunctionSides :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m [JunctionSides]
styleContextGetJunctionSides a
context = IO [JunctionSides] -> m [JunctionSides]
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetJunctionSidesMethodInfo a signature where
    overloadedMethod = styleContextGetJunctionSides

instance O.OverloadedMethodInfo StyleContextGetJunctionSidesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetJunctionSides",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetJunctionSides"
        })


#endif

-- method StyleContext::get_margin
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the border for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Border" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return value for the margin settings"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_margin" gtk_style_context_get_margin :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gtk.Border.Border ->                -- margin : TInterface (Name {namespace = "Gtk", name = "Border"})
    IO ()

-- | Gets the margin for a given state as a t'GI.Gtk.Structs.Border.Border'.
-- See @/gtk_style_property_get()/@ and 'GI.Gtk.Constants.STYLE_PROPERTY_MARGIN'
-- for details.
-- 
-- /Since: 3.0/
styleContextGetMargin ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the border for
    -> m (Gtk.Border.Border)
styleContextGetMargin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m Border
styleContextGetMargin a
context [StateFlags]
state = IO Border -> m Border
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetMarginMethodInfo a signature where
    overloadedMethod = styleContextGetMargin

instance O.OverloadedMethodInfo StyleContextGetMarginMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetMargin",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetMargin"
        })


#endif

-- method StyleContext::get_padding
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the padding for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "padding"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Border" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return value for the padding settings"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_padding" gtk_style_context_get_padding :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gtk.Border.Border ->                -- padding : TInterface (Name {namespace = "Gtk", name = "Border"})
    IO ()

-- | Gets the padding for a given state as a t'GI.Gtk.Structs.Border.Border'.
-- See @/gtk_style_context_get()/@ and 'GI.Gtk.Constants.STYLE_PROPERTY_PADDING'
-- for details.
-- 
-- /Since: 3.0/
styleContextGetPadding ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the padding for
    -> m (Gtk.Border.Border)
styleContextGetPadding :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m Border
styleContextGetPadding a
context [StateFlags]
state = IO Border -> m Border
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetPaddingMethodInfo a signature where
    overloadedMethod = styleContextGetPadding

instance O.OverloadedMethodInfo StyleContextGetPaddingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetPadding",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetPadding"
        })


#endif

-- method StyleContext::get_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "StyleContext" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_parent" gtk_style_context_get_parent :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr StyleContext)

-- | Gets the parent context set via 'GI.Gtk.Objects.StyleContext.styleContextSetParent'.
-- See that function for details.
-- 
-- /Since: 3.4/
styleContextGetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m (Maybe StyleContext)
    -- ^ __Returns:__ the parent context or 'P.Nothing'
styleContextGetParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m (Maybe StyleContext)
styleContextGetParent a
context = IO (Maybe StyleContext) -> m (Maybe StyleContext)
forall a. IO a -> m a
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 a. a -> IO a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetParentMethodInfo a signature where
    overloadedMethod = styleContextGetParent

instance O.OverloadedMethodInfo StyleContextGetParentMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetParent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetParent"
        })


#endif

-- method StyleContext::get_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "WidgetPath" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_path" gtk_style_context_get_path :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr Gtk.WidgetPath.WidgetPath)

-- | Returns the widget path used for style matching.
-- 
-- /Since: 3.0/
styleContextGetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m Gtk.WidgetPath.WidgetPath
    -- ^ __Returns:__ A t'GI.Gtk.Structs.WidgetPath.WidgetPath'
styleContextGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m WidgetPath
styleContextGetPath a
context = IO WidgetPath -> m WidgetPath
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetPathMethodInfo a signature where
    overloadedMethod = styleContextGetPath

instance O.OverloadedMethodInfo StyleContextGetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetPath"
        })


#endif

-- method StyleContext::get_property
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "style property name"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to retrieve the property value for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TGValue
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the style property value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_property" gtk_style_context_get_property :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- property : TBasicType TUTF8
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr GValue ->                           -- value : TGValue
    IO ()

-- | Gets a style property from /@context@/ for the given state.
-- 
-- Note that not all CSS properties that are supported by GTK+ can be
-- retrieved in this way, since they may not be representable as t'GI.GObject.Structs.Value.Value'.
-- GTK+ defines macros for a number of properties that can be used
-- with this function.
-- 
-- Note that passing a state other than the current state of /@context@/
-- is not recommended unless the style context has been saved with
-- 'GI.Gtk.Objects.StyleContext.styleContextSave'.
-- 
-- When /@value@/ is no longer needed, 'GI.GObject.Structs.Value.valueUnset' must be called
-- to free any allocated memory.
-- 
-- /Since: 3.0/
styleContextGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@property@/: style property name
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: state to retrieve the property value for
    -> m (GValue)
styleContextGetProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> [StateFlags] -> m GValue
styleContextGetProperty a
context Text
property [StateFlags]
state = IO GValue -> m GValue
forall a. IO a -> m a
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
    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 a. a -> IO a
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.OverloadedMethod StyleContextGetPropertyMethodInfo a signature where
    overloadedMethod = styleContextGetProperty

instance O.OverloadedMethodInfo StyleContextGetPropertyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetProperty",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetProperty"
        })


#endif

-- method StyleContext::get_scale
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_scale" gtk_style_context_get_scale :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO Int32

-- | Returns the scale used for assets.
-- 
-- /Since: 3.10/
styleContextGetScale ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m Int32
    -- ^ __Returns:__ the scale
styleContextGetScale :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m Int32
styleContextGetScale a
context = IO Int32 -> m Int32
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetScaleMethodInfo a signature where
    overloadedMethod = styleContextGetScale

instance O.OverloadedMethodInfo StyleContextGetScaleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetScale",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetScale"
        })


#endif

-- method StyleContext::get_screen
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Screen" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_screen" gtk_style_context_get_screen :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr Gdk.Screen.Screen)

-- | Returns the t'GI.Gdk.Objects.Screen.Screen' to which /@context@/ is attached.
styleContextGetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m Gdk.Screen.Screen
    -- ^ __Returns:__ a t'GI.Gdk.Objects.Screen.Screen'.
styleContextGetScreen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m Screen
styleContextGetScreen a
context = IO Screen -> m Screen
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetScreenMethodInfo a signature where
    overloadedMethod = styleContextGetScreen

instance O.OverloadedMethodInfo StyleContextGetScreenMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetScreen",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetScreen"
        })


#endif

-- method StyleContext::get_section
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "style property name"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "CssSection" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_section" gtk_style_context_get_section :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- property : TBasicType TUTF8
    IO (Ptr Gtk.CssSection.CssSection)

-- | Queries the location in the CSS where /@property@/ was defined for the
-- current /@context@/. Note that the state to be queried is taken from
-- 'GI.Gtk.Objects.StyleContext.styleContextGetState'.
-- 
-- If the location is not available, 'P.Nothing' will be returned. The
-- location might not be available for various reasons, such as the
-- property being overridden, /@property@/ not naming a supported CSS
-- property or tracking of definitions being disabled for performance
-- reasons.
-- 
-- Shorthand CSS properties cannot be queried for a location and will
-- always return 'P.Nothing'.
styleContextGetSection ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@property@/: style property name
    -> m (Maybe Gtk.CssSection.CssSection)
    -- ^ __Returns:__ 'P.Nothing' or the section where a value
    -- for /@property@/ was defined
styleContextGetSection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m (Maybe CssSection)
styleContextGetSection a
context Text
property = IO (Maybe CssSection) -> m (Maybe CssSection)
forall a. IO a -> m a
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 a. a -> IO a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetSectionMethodInfo a signature where
    overloadedMethod = styleContextGetSection

instance O.OverloadedMethodInfo StyleContextGetSectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetSection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetSection"
        })


#endif

-- method StyleContext::get_state
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "StateFlags" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_state" gtk_style_context_get_state :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO CUInt

-- | Returns the state used for style matching.
-- 
-- This method should only be used to retrieve the t'GI.Gtk.Flags.StateFlags'
-- to pass to t'GI.Gtk.Objects.StyleContext.StyleContext' methods, like 'GI.Gtk.Objects.StyleContext.styleContextGetPadding'.
-- If you need to retrieve the current state of a t'GI.Gtk.Objects.Widget.Widget', use
-- 'GI.Gtk.Objects.Widget.widgetGetStateFlags'.
-- 
-- /Since: 3.0/
styleContextGetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m [Gtk.Flags.StateFlags]
    -- ^ __Returns:__ the state flags
styleContextGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m [StateFlags]
styleContextGetState a
context = IO [StateFlags] -> m [StateFlags]
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextGetStateMethodInfo a signature where
    overloadedMethod = styleContextGetState

instance O.OverloadedMethodInfo StyleContextGetStateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetState",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetState"
        })


#endif

-- method StyleContext::get_style_property
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the widget style property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Return location for the property value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_style_property" gtk_style_context_get_style_property :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TGValue
    IO ()

-- | Gets the value for a widget style property.
-- 
-- When /@value@/ is no longer needed, 'GI.GObject.Structs.Value.valueUnset' must be called
-- to free any allocated memory.
styleContextGetStyleProperty ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@propertyName@/: the name of the widget style property
    -> GValue
    -- ^ /@value@/: Return location for the property value
    -> m ()
styleContextGetStyleProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> GValue -> m ()
styleContextGetStyleProperty a
context Text
propertyName GValue
value = IO () -> m ()
forall a. IO a -> m a
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'
    () -> IO ()
forall a. a -> IO a
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.OverloadedMethod StyleContextGetStylePropertyMethodInfo a signature where
    overloadedMethod = styleContextGetStyleProperty

instance O.OverloadedMethodInfo StyleContextGetStylePropertyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextGetStyleProperty",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextGetStyleProperty"
        })


#endif

-- method StyleContext::has_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "class_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a class name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_has_class" gtk_style_context_has_class :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- class_name : TBasicType TUTF8
    IO CInt

-- | Returns 'P.True' if /@context@/ currently has defined the
-- given class name.
-- 
-- /Since: 3.0/
styleContextHasClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@className@/: a class name
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@context@/ has /@className@/ defined
styleContextHasClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m Bool
styleContextHasClass a
context Text
className = IO Bool -> m Bool
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextHasClassMethodInfo a signature where
    overloadedMethod = styleContextHasClass

instance O.OverloadedMethodInfo StyleContextHasClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextHasClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextHasClass"
        })


#endif

-- method StyleContext::has_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a region name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags_return"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "RegionFlags" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for region flags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_has_region" gtk_style_context_has_region :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- region_name : TBasicType TUTF8
    Ptr CUInt ->                            -- flags_return : TInterface (Name {namespace = "Gtk", name = "RegionFlags"})
    IO CInt

{-# DEPRECATED styleContextHasRegion ["(Since version 3.14)"] #-}
-- | Returns 'P.True' if /@context@/ has the region defined.
-- If /@flagsReturn@/ is not 'P.Nothing', it is set to the flags
-- affecting the region.
-- 
-- /Since: 3.0/
styleContextHasRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@regionName@/: a region name
    -> m ((Bool, [Gtk.Flags.RegionFlags]))
    -- ^ __Returns:__ 'P.True' if region is defined
styleContextHasRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m (Bool, [RegionFlags])
styleContextHasRegion a
context Text
regionName = IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags])
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextHasRegionMethodInfo a signature where
    overloadedMethod = styleContextHasRegion

instance O.OverloadedMethodInfo StyleContextHasRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextHasRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextHasRegion"
        })


#endif

-- method StyleContext::invalidate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_invalidate" gtk_style_context_invalidate :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO ()

{-# DEPRECATED styleContextInvalidate ["(Since version 3.12)","Style contexts are invalidated automatically."] #-}
-- | Invalidates /@context@/ style information, so it will be reconstructed
-- again. It is useful if you modify the /@context@/ and need the new
-- information immediately.
-- 
-- /Since: 3.0/
styleContextInvalidate ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'.
    -> m ()
styleContextInvalidate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m ()
styleContextInvalidate a
context = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextInvalidateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextInvalidateMethodInfo a signature where
    overloadedMethod = styleContextInvalidate

instance O.OverloadedMethodInfo StyleContextInvalidateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextInvalidate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextInvalidate"
        })


#endif

-- method StyleContext::list_classes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TGList (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_list_classes" gtk_style_context_list_classes :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr (GList CString))

-- | Returns the list of classes currently defined in /@context@/.
-- 
-- /Since: 3.0/
styleContextListClasses ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m [T.Text]
    -- ^ __Returns:__ a t'GI.GLib.Structs.List.List' of
    --          strings with the currently defined classes. The contents
    --          of the list are owned by GTK+, but you must free the list
    --          itself with @/g_list_free()/@ when you are done with it.
styleContextListClasses :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m [Text]
styleContextListClasses a
context = IO [Text] -> m [Text]
forall a. IO a -> m a
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)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [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 a. a -> IO a
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.OverloadedMethod StyleContextListClassesMethodInfo a signature where
    overloadedMethod = styleContextListClasses

instance O.OverloadedMethodInfo StyleContextListClassesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextListClasses",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextListClasses"
        })


#endif

-- method StyleContext::list_regions
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TGList (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_list_regions" gtk_style_context_list_regions :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr (GList CString))

{-# DEPRECATED styleContextListRegions ["(Since version 3.14)"] #-}
-- | Returns the list of regions currently defined in /@context@/.
-- 
-- /Since: 3.0/
styleContextListRegions ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m [T.Text]
    -- ^ __Returns:__ a t'GI.GLib.Structs.List.List' of
    --          strings with the currently defined regions. The contents
    --          of the list are owned by GTK+, but you must free the list
    --          itself with @/g_list_free()/@ when you are done with it.
styleContextListRegions :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m [Text]
styleContextListRegions a
context = IO [Text] -> m [Text]
forall a. IO a -> m a
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)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [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 a. a -> IO a
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.OverloadedMethod StyleContextListRegionsMethodInfo a signature where
    overloadedMethod = styleContextListRegions

instance O.OverloadedMethodInfo StyleContextListRegionsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextListRegions",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextListRegions"
        })


#endif

-- method StyleContext::lookup_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "color name to lookup"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Return location for the looked up color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_lookup_color" gtk_style_context_lookup_color :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- color_name : TBasicType TUTF8
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO CInt

-- | Looks up and resolves a color name in the /@context@/ color map.
styleContextLookupColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@colorName@/: color name to lookup
    -> m ((Bool, Gdk.RGBA.RGBA))
    -- ^ __Returns:__ 'P.True' if /@colorName@/ was found and resolved, 'P.False' otherwise
styleContextLookupColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m (Bool, RGBA)
styleContextLookupColor a
context Text
colorName = IO (Bool, RGBA) -> m (Bool, RGBA)
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextLookupColorMethodInfo a signature where
    overloadedMethod = styleContextLookupColor

instance O.OverloadedMethodInfo StyleContextLookupColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextLookupColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextLookupColor"
        })


#endif

-- method StyleContext::lookup_icon_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stock_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an icon name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "IconSet" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_lookup_icon_set" gtk_style_context_lookup_icon_set :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr Gtk.IconSet.IconSet)

{-# DEPRECATED styleContextLookupIconSet ["(Since version 3.10)","Use 'GI.Gtk.Objects.IconTheme.iconThemeLookupIcon' instead."] #-}
-- | Looks up /@stockId@/ in the icon factories associated to /@context@/ and
-- the default icon factory, returning an icon set if found, otherwise
-- 'P.Nothing'.
styleContextLookupIconSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@stockId@/: an icon name
    -> m (Maybe Gtk.IconSet.IconSet)
    -- ^ __Returns:__ The looked up @/GtkIconSet/@, or 'P.Nothing'
styleContextLookupIconSet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m (Maybe IconSet)
styleContextLookupIconSet a
context Text
stockId = IO (Maybe IconSet) -> m (Maybe IconSet)
forall a. IO a -> m a
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 a. a -> IO a
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 a. a -> IO a
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.OverloadedMethod StyleContextLookupIconSetMethodInfo a signature where
    overloadedMethod = styleContextLookupIconSet

instance O.OverloadedMethodInfo StyleContextLookupIconSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextLookupIconSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextLookupIconSet"
        })


#endif

-- method StyleContext::notify_state_change
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region_id"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "animatable region to notify on, or %NULL.\n    See gtk_style_context_push_animatable_region()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to trigger transition for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state_value"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "%TRUE if @state is the state we are changing to,\n    %FALSE if we are changing away from it"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_notify_state_change" gtk_style_context_notify_state_change :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr () ->                               -- region_id : TBasicType TPtr
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    CInt ->                                 -- state_value : TBasicType TBoolean
    IO ()

{-# DEPRECATED styleContextNotifyStateChange ["(Since version 3.6)","This function does nothing."] #-}
-- | Notifies a state change on /@context@/, so if the current style makes use
-- of transition animations, one will be started so all rendered elements
-- under /@regionId@/ are animated for state /@state@/ being set to value
-- /@stateValue@/.
-- 
-- The /@window@/ parameter is used in order to invalidate the rendered area
-- as the animation runs, so make sure it is the same window that is being
-- rendered on by the gtk_render_*() functions.
-- 
-- If /@regionId@/ is 'P.Nothing', all rendered elements using /@context@/ will be
-- affected by this state transition.
-- 
-- As a practical example, a t'GI.Gtk.Objects.Button.Button' notifying a state transition on
-- the prelight state:
-- > <!-- language="C" -->
-- >gtk_style_context_notify_state_change (context,
-- >                                       gtk_widget_get_window (widget),
-- >                                       NULL,
-- >                                       GTK_STATE_PRELIGHT,
-- >                                       button->in_button);
-- 
-- 
-- Can be handled in the CSS file like this:
-- > <!-- language="CSS" -->
-- >button {
-- >    background-color: #f00
-- >}
-- >
-- >button:hover {
-- >    background-color: #fff;
-- >    transition: 200ms linear
-- >}
-- 
-- 
-- This combination will animate the button background from red to white
-- if a pointer enters the button, and back to red if the pointer leaves
-- the button.
-- 
-- Note that /@state@/ is used when finding the transition parameters, which
-- is why the style places the transition under the :hover pseudo-class.
-- 
-- /Since: 3.0/
styleContextNotifyStateChange ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> b
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Ptr ()
    -- ^ /@regionId@/: animatable region to notify on, or 'P.Nothing'.
    --     See 'GI.Gtk.Objects.StyleContext.styleContextPushAnimatableRegion'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: state to trigger transition for
    -> Bool
    -- ^ /@stateValue@/: 'P.True' if /@state@/ is the state we are changing to,
    --     'P.False' if we are changing away from it
    -> m ()
styleContextNotifyStateChange :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsWindow b) =>
a -> b -> Ptr () -> StateType -> Bool -> m ()
styleContextNotifyStateChange a
context b
window Ptr ()
regionId StateType
state Bool
stateValue = IO () -> m ()
forall a. IO a -> m a
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
P.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
P.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 a. a -> IO a
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.OverloadedMethod StyleContextNotifyStateChangeMethodInfo a signature where
    overloadedMethod = styleContextNotifyStateChange

instance O.OverloadedMethodInfo StyleContextNotifyStateChangeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextNotifyStateChange",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextNotifyStateChange"
        })


#endif

-- method StyleContext::pop_animatable_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_pop_animatable_region" gtk_style_context_pop_animatable_region :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO ()

{-# DEPRECATED styleContextPopAnimatableRegion ["(Since version 3.6)","This function does nothing."] #-}
-- | Pops an animatable region from /@context@/.
-- See 'GI.Gtk.Objects.StyleContext.styleContextPushAnimatableRegion'.
-- 
-- /Since: 3.0/
styleContextPopAnimatableRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m ()
styleContextPopAnimatableRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m ()
styleContextPopAnimatableRegion a
context = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextPopAnimatableRegionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextPopAnimatableRegionMethodInfo a signature where
    overloadedMethod = styleContextPopAnimatableRegion

instance O.OverloadedMethodInfo StyleContextPopAnimatableRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextPopAnimatableRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextPopAnimatableRegion"
        })


#endif

-- method StyleContext::push_animatable_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region_id"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "unique identifier for the animatable region"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_push_animatable_region" gtk_style_context_push_animatable_region :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr () ->                               -- region_id : TBasicType TPtr
    IO ()

{-# DEPRECATED styleContextPushAnimatableRegion ["(Since version 3.6)","This function does nothing."] #-}
-- | Pushes an animatable region, so all further gtk_render_*() calls between
-- this call and the following 'GI.Gtk.Objects.StyleContext.styleContextPopAnimatableRegion'
-- will potentially show transition animations for this region if
-- 'GI.Gtk.Objects.StyleContext.styleContextNotifyStateChange' is called for a given state,
-- and the current theme\/style defines transition animations for state
-- changes.
-- 
-- The /@regionId@/ used must be unique in /@context@/ so the themes
-- can uniquely identify rendered elements subject to a state transition.
-- 
-- /Since: 3.0/
styleContextPushAnimatableRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Ptr ()
    -- ^ /@regionId@/: unique identifier for the animatable region
    -> m ()
styleContextPushAnimatableRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Ptr () -> m ()
styleContextPushAnimatableRegion a
context Ptr ()
regionId = IO () -> m ()
forall a. IO a -> m a
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
    C_StyleContextChangedCallback
gtk_style_context_push_animatable_region Ptr StyleContext
context' Ptr ()
regionId
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextPushAnimatableRegionMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextPushAnimatableRegionMethodInfo a signature where
    overloadedMethod = styleContextPushAnimatableRegion

instance O.OverloadedMethodInfo StyleContextPushAnimatableRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextPushAnimatableRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextPushAnimatableRegion"
        })


#endif

-- method StyleContext::remove_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "class_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "class name to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_class" gtk_style_context_remove_class :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- class_name : TBasicType TUTF8
    IO ()

-- | Removes /@className@/ from /@context@/.
-- 
-- /Since: 3.0/
styleContextRemoveClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@className@/: class name to remove
    -> m ()
styleContextRemoveClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m ()
styleContextRemoveClass a
context Text
className = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextRemoveClassMethodInfo a signature where
    overloadedMethod = styleContextRemoveClass

instance O.OverloadedMethodInfo StyleContextRemoveClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextRemoveClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextRemoveClass"
        })


#endif

-- method StyleContext::remove_provider
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "provider"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleProvider" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleProvider"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_provider" gtk_style_context_remove_provider :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gtk.StyleProvider.StyleProvider ->  -- provider : TInterface (Name {namespace = "Gtk", name = "StyleProvider"})
    IO ()

-- | Removes /@provider@/ from the style providers list in /@context@/.
-- 
-- /Since: 3.0/
styleContextRemoveProvider ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gtk.StyleProvider.IsStyleProvider b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> b
    -- ^ /@provider@/: a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'
    -> m ()
styleContextRemoveProvider :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsStyleProvider b) =>
a -> b -> m ()
styleContextRemoveProvider a
context b
provider = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextRemoveProviderMethodInfo a signature where
    overloadedMethod = styleContextRemoveProvider

instance O.OverloadedMethodInfo StyleContextRemoveProviderMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextRemoveProvider",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextRemoveProvider"
        })


#endif

-- method StyleContext::remove_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "region name to unset"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_region" gtk_style_context_remove_region :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CString ->                              -- region_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED styleContextRemoveRegion ["(Since version 3.14)"] #-}
-- | Removes a region from /@context@/.
-- 
-- /Since: 3.0/
styleContextRemoveRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> T.Text
    -- ^ /@regionName@/: region name to unset
    -> m ()
styleContextRemoveRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Text -> m ()
styleContextRemoveRegion a
context Text
regionName = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextRemoveRegionMethodInfo a signature where
    overloadedMethod = styleContextRemoveRegion

instance O.OverloadedMethodInfo StyleContextRemoveRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextRemoveRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextRemoveRegion"
        })


#endif

-- method StyleContext::restore
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_restore" gtk_style_context_restore :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO ()

-- | Restores /@context@/ state to a previous stage.
-- See 'GI.Gtk.Objects.StyleContext.styleContextSave'.
-- 
-- /Since: 3.0/
styleContextRestore ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m ()
styleContextRestore :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m ()
styleContextRestore a
context = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextRestoreMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextRestoreMethodInfo a signature where
    overloadedMethod = styleContextRestore

instance O.OverloadedMethodInfo StyleContextRestoreMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextRestore",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextRestore"
        })


#endif

-- method StyleContext::save
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_save" gtk_style_context_save :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO ()

-- | Saves the /@context@/ state, so temporary modifications done through
-- 'GI.Gtk.Objects.StyleContext.styleContextAddClass', 'GI.Gtk.Objects.StyleContext.styleContextRemoveClass',
-- 'GI.Gtk.Objects.StyleContext.styleContextSetState', etc. can quickly be reverted
-- in one go through 'GI.Gtk.Objects.StyleContext.styleContextRestore'.
-- 
-- The matching call to 'GI.Gtk.Objects.StyleContext.styleContextRestore' must be done
-- before GTK returns to the main loop.
-- 
-- /Since: 3.0/
styleContextSave ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> m ()
styleContextSave :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> m ()
styleContextSave a
context = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextSaveMethodInfo
instance (signature ~ (m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextSaveMethodInfo a signature where
    overloadedMethod = styleContextSave

instance O.OverloadedMethodInfo StyleContextSaveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSave",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSave"
        })


#endif

-- method StyleContext::scroll_animations
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GdkWindow used previously in\n         gtk_style_context_notify_state_change()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dx"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scroll in the X axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dy"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scroll in the Y axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_scroll_animations" gtk_style_context_scroll_animations :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- dx : TBasicType TInt
    Int32 ->                                -- dy : TBasicType TInt
    IO ()

{-# DEPRECATED styleContextScrollAnimations ["(Since version 3.6)","This function does nothing."] #-}
-- | This function is analogous to 'GI.Gdk.Objects.Window.windowScroll', and
-- should be called together with it so the invalidation
-- areas for any ongoing animation are scrolled together
-- with it.
-- 
-- /Since: 3.0/
styleContextScrollAnimations ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> b
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window' used previously in
    --          'GI.Gtk.Objects.StyleContext.styleContextNotifyStateChange'
    -> Int32
    -- ^ /@dx@/: Amount to scroll in the X axis
    -> Int32
    -- ^ /@dy@/: Amount to scroll in the Y axis
    -> m ()
styleContextScrollAnimations :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsWindow b) =>
a -> b -> Int32 -> Int32 -> m ()
styleContextScrollAnimations a
context b
window Int32
dx Int32
dy = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextScrollAnimationsMethodInfo a signature where
    overloadedMethod = styleContextScrollAnimations

instance O.OverloadedMethodInfo StyleContextScrollAnimationsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextScrollAnimations",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextScrollAnimations"
        })


#endif

-- method StyleContext::set_background
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_background" gtk_style_context_set_background :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "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."] #-}
-- | Sets the background of /@window@/ to the background pattern or
-- color specified in /@context@/ for its current state.
-- 
-- /Since: 3.0/
styleContextSetBackground ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> b
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
styleContextSetBackground :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsWindow b) =>
a -> b -> m ()
styleContextSetBackground a
context b
window = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetBackgroundMethodInfo a signature where
    overloadedMethod = styleContextSetBackground

instance O.OverloadedMethodInfo StyleContextSetBackgroundMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetBackground",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetBackground"
        })


#endif

-- method StyleContext::set_direction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextDirection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new direction." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_direction" gtk_style_context_set_direction :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "Gtk", name = "TextDirection"})
    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."] #-}
-- | Sets the reading direction for rendering purposes.
-- 
-- If you are using a t'GI.Gtk.Objects.StyleContext.StyleContext' returned from
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext', you do not need to
-- call this yourself.
-- 
-- /Since: 3.0/
styleContextSetDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Gtk.Enums.TextDirection
    -- ^ /@direction@/: the new direction.
    -> m ()
styleContextSetDirection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> TextDirection -> m ()
styleContextSetDirection a
context TextDirection
direction = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetDirectionMethodInfo a signature where
    overloadedMethod = styleContextSetDirection

instance O.OverloadedMethodInfo StyleContextSetDirectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetDirection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetDirection"
        })


#endif

-- method StyleContext::set_frame_clock
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkFrameClock" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "frame_clock"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "FrameClock" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkFrameClock" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_frame_clock" gtk_style_context_set_frame_clock :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gdk.FrameClock.FrameClock ->        -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO ()

-- | Attaches /@context@/ to the given frame clock.
-- 
-- The frame clock is used for the timing of animations.
-- 
-- If you are using a t'GI.Gtk.Objects.StyleContext.StyleContext' returned from
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext', you do not need to
-- call this yourself.
-- 
-- /Since: 3.8/
styleContextSetFrameClock ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.FrameClock.IsFrameClock b) =>
    a
    -- ^ /@context@/: a t'GI.Gdk.Objects.FrameClock.FrameClock'
    -> b
    -- ^ /@frameClock@/: a t'GI.Gdk.Objects.FrameClock.FrameClock'
    -> m ()
styleContextSetFrameClock :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsFrameClock b) =>
a -> b -> m ()
styleContextSetFrameClock a
context b
frameClock = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetFrameClockMethodInfo a signature where
    overloadedMethod = styleContextSetFrameClock

instance O.OverloadedMethodInfo StyleContextSetFrameClockMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetFrameClock",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetFrameClock"
        })


#endif

-- method StyleContext::set_junction_sides
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sides"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "JunctionSides" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "sides where rendered elements are visually connected to\n    other elements"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_junction_sides" gtk_style_context_set_junction_sides :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- sides : TInterface (Name {namespace = "Gtk", name = "JunctionSides"})
    IO ()

-- | Sets the sides where rendered elements (mostly through
-- 'GI.Gtk.Functions.renderFrame') will visually connect with other visual elements.
-- 
-- This is merely a hint that may or may not be honored
-- by themes.
-- 
-- Container widgets are expected to set junction hints as appropriate
-- for their children, so it should not normally be necessary to call
-- this function manually.
-- 
-- /Since: 3.0/
styleContextSetJunctionSides ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.JunctionSides]
    -- ^ /@sides@/: sides where rendered elements are visually connected to
    --     other elements
    -> m ()
styleContextSetJunctionSides :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [JunctionSides] -> m ()
styleContextSetJunctionSides a
context [JunctionSides]
sides = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetJunctionSidesMethodInfo a signature where
    overloadedMethod = styleContextSetJunctionSides

instance O.OverloadedMethodInfo StyleContextSetJunctionSidesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetJunctionSides",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetJunctionSides"
        })


#endif

-- method StyleContext::set_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new parent or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_parent" gtk_style_context_set_parent :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr StyleContext ->                     -- parent : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO ()

-- | Sets the parent style context for /@context@/. The parent style
-- context is used to implement
-- <http://www.w3.org/TR/css3-cascade/#inheritance inheritance>
-- of properties.
-- 
-- If you are using a t'GI.Gtk.Objects.StyleContext.StyleContext' returned from
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext', the parent will be set for you.
-- 
-- /Since: 3.4/
styleContextSetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, IsStyleContext b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Maybe (b)
    -- ^ /@parent@/: the new parent or 'P.Nothing'
    -> m ()
styleContextSetParent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsStyleContext b) =>
a -> Maybe b -> m ()
styleContextSetParent a
context Maybe b
parent = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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 a. a -> IO a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetParentMethodInfo a signature where
    overloadedMethod = styleContextSetParent

instance O.OverloadedMethodInfo StyleContextSetParentMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetParent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetParent"
        })


#endif

-- method StyleContext::set_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "WidgetPath" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidgetPath" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_path" gtk_style_context_set_path :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gtk.WidgetPath.WidgetPath ->        -- path : TInterface (Name {namespace = "Gtk", name = "WidgetPath"})
    IO ()

-- | Sets the t'GI.Gtk.Structs.WidgetPath.WidgetPath' used for style matching. As a
-- consequence, the style will be regenerated to match
-- the new given path.
-- 
-- If you are using a t'GI.Gtk.Objects.StyleContext.StyleContext' returned from
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext', you do not need to call
-- this yourself.
-- 
-- /Since: 3.0/
styleContextSetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Gtk.WidgetPath.WidgetPath
    -- ^ /@path@/: a t'GI.Gtk.Structs.WidgetPath.WidgetPath'
    -> m ()
styleContextSetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> WidgetPath -> m ()
styleContextSetPath a
context WidgetPath
path = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetPathMethodInfo a signature where
    overloadedMethod = styleContextSetPath

instance O.OverloadedMethodInfo StyleContextSetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetPath"
        })


#endif

-- method StyleContext::set_scale
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "scale"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "scale" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_scale" gtk_style_context_set_scale :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Int32 ->                                -- scale : TBasicType TInt
    IO ()

-- | Sets the scale to use when getting image assets for the style.
-- 
-- /Since: 3.10/
styleContextSetScale ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Int32
    -- ^ /@scale@/: scale
    -> m ()
styleContextSetScale :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> Int32 -> m ()
styleContextSetScale a
context Int32
scale = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data StyleContextSetScaleMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsStyleContext a) => O.OverloadedMethod StyleContextSetScaleMethodInfo a signature where
    overloadedMethod = styleContextSetScale

instance O.OverloadedMethodInfo StyleContextSetScaleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetScale",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetScale"
        })


#endif

-- method StyleContext::set_screen
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "screen"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Screen" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkScreen" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_screen" gtk_style_context_set_screen :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    Ptr Gdk.Screen.Screen ->                -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"})
    IO ()

-- | Attaches /@context@/ to the given screen.
-- 
-- The screen is used to add style information from “global” style
-- providers, such as the screen’s t'GI.Gtk.Objects.Settings.Settings' instance.
-- 
-- If you are using a t'GI.Gtk.Objects.StyleContext.StyleContext' returned from
-- 'GI.Gtk.Objects.Widget.widgetGetStyleContext', you do not need to
-- call this yourself.
-- 
-- /Since: 3.0/
styleContextSetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a, Gdk.Screen.IsScreen b) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> b
    -- ^ /@screen@/: a t'GI.Gdk.Objects.Screen.Screen'
    -> m ()
styleContextSetScreen :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsStyleContext a, IsScreen b) =>
a -> b -> m ()
styleContextSetScreen a
context b
screen = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetScreenMethodInfo a signature where
    overloadedMethod = styleContextSetScreen

instance O.OverloadedMethodInfo StyleContextSetScreenMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetScreen",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetScreen"
        })


#endif

-- method StyleContext::set_state
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state to represent" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_state" gtk_style_context_set_state :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    IO ()

-- | Sets the state to be used for style matching.
-- 
-- /Since: 3.0/
styleContextSetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@flags@/: state to represent
    -> m ()
styleContextSetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StateFlags] -> m ()
styleContextSetState a
context [StateFlags]
flags = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextSetStateMethodInfo a signature where
    overloadedMethod = styleContextSetState

instance O.OverloadedMethodInfo StyleContextSetStateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextSetState",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextSetState"
        })


#endif

-- method StyleContext::state_is_running
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "progress"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the transition progress"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_state_is_running" gtk_style_context_state_is_running :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    Ptr CDouble ->                          -- progress : TBasicType TDouble
    IO CInt

{-# DEPRECATED styleContextStateIsRunning ["(Since version 3.6)","This function always returns 'P.False'"] #-}
-- | Returns 'P.True' if there is a transition animation running for the
-- current region (see 'GI.Gtk.Objects.StyleContext.styleContextPushAnimatableRegion').
-- 
-- If /@progress@/ is not 'P.Nothing', the animation progress will be returned
-- there, 0.0 means the state is closest to being unset, while 1.0 means
-- it’s closest to being set. This means transition animation will
-- run from 0 to 1 when /@state@/ is being set and from 1 to 0 when
-- it’s being unset.
-- 
-- /Since: 3.0/
styleContextStateIsRunning ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: a widget state
    -> m ((Bool, Double))
    -- ^ __Returns:__ 'P.True' if there is a running transition animation for /@state@/.
styleContextStateIsRunning :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> StateType -> m (Bool, Double)
styleContextStateIsRunning a
context StateType
state = IO (Bool, Double) -> m (Bool, Double)
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextStateIsRunningMethodInfo a signature where
    overloadedMethod = styleContextStateIsRunning

instance O.OverloadedMethodInfo StyleContextStateIsRunningMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextStateIsRunning",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextStateIsRunning"
        })


#endif

-- method StyleContext::to_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleContext" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface
--                 Name { namespace = "Gtk" , name = "StyleContextPrintFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Flags that determine what to print"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_to_string" gtk_style_context_to_string :: 
    Ptr StyleContext ->                     -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "StyleContextPrintFlags"})
    IO CString

-- | Converts the style context into a string representation.
-- 
-- The string representation always includes information about
-- the name, state, id, visibility and style classes of the CSS
-- node that is backing /@context@/. Depending on the flags, more
-- information may be included.
-- 
-- This function is intended for testing and debugging of the
-- CSS implementation in GTK+. There are no guarantees about
-- the format of the returned string, it may change.
-- 
-- /Since: 3.20/
styleContextToString ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleContext a) =>
    a
    -- ^ /@context@/: a t'GI.Gtk.Objects.StyleContext.StyleContext'
    -> [Gtk.Flags.StyleContextPrintFlags]
    -- ^ /@flags@/: Flags that determine what to print
    -> m T.Text
    -- ^ __Returns:__ a newly allocated string representing /@context@/
styleContextToString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStyleContext a) =>
a -> [StyleContextPrintFlags] -> m Text
styleContextToString a
context [StyleContextPrintFlags]
flags = IO Text -> m Text
forall a. IO a -> m a
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 a. a -> IO a
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.OverloadedMethod StyleContextToStringMethodInfo a signature where
    overloadedMethod = styleContextToString

instance O.OverloadedMethodInfo StyleContextToStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.StyleContext.styleContextToString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-StyleContext.html#v:styleContextToString"
        })


#endif

-- method StyleContext::add_provider_for_screen
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "screen"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Screen" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkScreen" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "provider"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleProvider" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleProvider"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "priority"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the priority of the style provider. The lower\n           it is, the earlier it will be used in the style\n           construction. Typically this will be in the range\n           between %GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and\n           %GTK_STYLE_PROVIDER_PRIORITY_USER"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_provider_for_screen" gtk_style_context_add_provider_for_screen :: 
    Ptr Gdk.Screen.Screen ->                -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"})
    Ptr Gtk.StyleProvider.StyleProvider ->  -- provider : TInterface (Name {namespace = "Gtk", name = "StyleProvider"})
    Word32 ->                               -- priority : TBasicType TUInt
    IO ()

-- | Adds a global style provider to /@screen@/, which will be used
-- in style construction for all @/GtkStyleContexts/@ under /@screen@/.
-- 
-- GTK+ uses this to make styling information from t'GI.Gtk.Objects.Settings.Settings'
-- available.
-- 
-- Note: If both priorities are the same, A t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'
-- added through 'GI.Gtk.Objects.StyleContext.styleContextAddProvider' takes precedence
-- over another added through this function.
-- 
-- /Since: 3.0/
styleContextAddProviderForScreen ::
    (B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a, Gtk.StyleProvider.IsStyleProvider b) =>
    a
    -- ^ /@screen@/: a t'GI.Gdk.Objects.Screen.Screen'
    -> b
    -- ^ /@provider@/: a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'
    -> Word32
    -- ^ /@priority@/: the priority of the style provider. The lower
    --            it is, the earlier it will be used in the style
    --            construction. Typically this will be in the range
    --            between 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_FALLBACK' and
    --            'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_USER'
    -> m ()
styleContextAddProviderForScreen :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsScreen a, IsStyleProvider b) =>
a -> b -> Word32 -> m ()
styleContextAddProviderForScreen a
screen b
provider Word32
priority = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method StyleContext::remove_provider_for_screen
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "screen"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Screen" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkScreen" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "provider"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StyleProvider" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkStyleProvider"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_provider_for_screen" gtk_style_context_remove_provider_for_screen :: 
    Ptr Gdk.Screen.Screen ->                -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"})
    Ptr Gtk.StyleProvider.StyleProvider ->  -- provider : TInterface (Name {namespace = "Gtk", name = "StyleProvider"})
    IO ()

-- | Removes /@provider@/ from the global style providers list in /@screen@/.
-- 
-- /Since: 3.0/
styleContextRemoveProviderForScreen ::
    (B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a, Gtk.StyleProvider.IsStyleProvider b) =>
    a
    -- ^ /@screen@/: a t'GI.Gdk.Objects.Screen.Screen'
    -> b
    -- ^ /@provider@/: a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'
    -> m ()
styleContextRemoveProviderForScreen :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsScreen a, IsStyleProvider b) =>
a -> b -> m ()
styleContextRemoveProviderForScreen a
screen b
provider = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method StyleContext::reset_widgets
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "screen"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Screen" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkScreen" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_reset_widgets" gtk_style_context_reset_widgets :: 
    Ptr Gdk.Screen.Screen ->                -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"})
    IO ()

-- | This function recomputes the styles for all widgets under a particular
-- t'GI.Gdk.Objects.Screen.Screen'. This is useful when some global parameter has changed that
-- affects the appearance of all widgets, because when a widget gets a new
-- style, it will both redraw and recompute any cached information about
-- its appearance. As an example, it is used when the color scheme changes
-- in the related t'GI.Gtk.Objects.Settings.Settings' object.
-- 
-- /Since: 3.0/
styleContextResetWidgets ::
    (B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a) =>
    a
    -- ^ /@screen@/: a t'GI.Gdk.Objects.Screen.Screen'
    -> m ()
styleContextResetWidgets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScreen a) =>
a -> m ()
styleContextResetWidgets a
screen = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif