{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.ThemingEngine
(
ThemingEngine(..) ,
IsThemingEngine ,
toThemingEngine ,
#if defined(ENABLE_OVERLOADING)
ResolveThemingEngineMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetBackgroundColorMethodInfo,
#endif
themingEngineGetBackgroundColor ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetBorderMethodInfo ,
#endif
themingEngineGetBorder ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetBorderColorMethodInfo ,
#endif
themingEngineGetBorderColor ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetColorMethodInfo ,
#endif
themingEngineGetColor ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetDirectionMethodInfo ,
#endif
themingEngineGetDirection ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetFontMethodInfo ,
#endif
themingEngineGetFont ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetJunctionSidesMethodInfo ,
#endif
themingEngineGetJunctionSides ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetMarginMethodInfo ,
#endif
themingEngineGetMargin ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetPaddingMethodInfo ,
#endif
themingEngineGetPadding ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetPathMethodInfo ,
#endif
themingEngineGetPath ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetPropertyMethodInfo ,
#endif
themingEngineGetProperty ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetScreenMethodInfo ,
#endif
themingEngineGetScreen ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetStateMethodInfo ,
#endif
themingEngineGetState ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineGetStylePropertyMethodInfo ,
#endif
themingEngineGetStyleProperty ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineHasClassMethodInfo ,
#endif
themingEngineHasClass ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineHasRegionMethodInfo ,
#endif
themingEngineHasRegion ,
themingEngineLoad ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineLookupColorMethodInfo ,
#endif
themingEngineLookupColor ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineStateIsRunningMethodInfo ,
#endif
themingEngineStateIsRunning ,
#if defined(ENABLE_OVERLOADING)
ThemingEngineNamePropertyInfo ,
#endif
constructThemingEngineName ,
getThemingEngineName ,
#if defined(ENABLE_OVERLOADING)
themingEngineName ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Screen as Gdk.Screen
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.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.WidgetPath as Gtk.WidgetPath
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription
newtype ThemingEngine = ThemingEngine (SP.ManagedPtr ThemingEngine)
deriving (ThemingEngine -> ThemingEngine -> Bool
(ThemingEngine -> ThemingEngine -> Bool)
-> (ThemingEngine -> ThemingEngine -> Bool) -> Eq ThemingEngine
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThemingEngine -> ThemingEngine -> Bool
$c/= :: ThemingEngine -> ThemingEngine -> Bool
== :: ThemingEngine -> ThemingEngine -> Bool
$c== :: ThemingEngine -> ThemingEngine -> Bool
Eq)
instance SP.ManagedPtrNewtype ThemingEngine where
toManagedPtr :: ThemingEngine -> ManagedPtr ThemingEngine
toManagedPtr (ThemingEngine ManagedPtr ThemingEngine
p) = ManagedPtr ThemingEngine
p
foreign import ccall "gtk_theming_engine_get_type"
c_gtk_theming_engine_get_type :: IO B.Types.GType
instance B.Types.TypedObject ThemingEngine where
glibType :: IO GType
glibType = IO GType
c_gtk_theming_engine_get_type
instance B.Types.GObject ThemingEngine
class (SP.GObject o, O.IsDescendantOf ThemingEngine o) => IsThemingEngine o
instance (SP.GObject o, O.IsDescendantOf ThemingEngine o) => IsThemingEngine o
instance O.HasParentTypes ThemingEngine
type instance O.ParentTypes ThemingEngine = '[GObject.Object.Object]
toThemingEngine :: (MIO.MonadIO m, IsThemingEngine o) => o -> m ThemingEngine
toThemingEngine :: forall (m :: * -> *) o.
(MonadIO m, IsThemingEngine o) =>
o -> m ThemingEngine
toThemingEngine = IO ThemingEngine -> m ThemingEngine
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ThemingEngine -> m ThemingEngine)
-> (o -> IO ThemingEngine) -> o -> m ThemingEngine
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ThemingEngine -> ThemingEngine)
-> o -> IO ThemingEngine
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ThemingEngine -> ThemingEngine
ThemingEngine
instance B.GValue.IsGValue (Maybe ThemingEngine) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_theming_engine_get_type
gvalueSet_ :: Ptr GValue -> Maybe ThemingEngine -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ThemingEngine
P.Nothing = Ptr GValue -> Ptr ThemingEngine -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ThemingEngine
forall a. Ptr a
FP.nullPtr :: FP.Ptr ThemingEngine)
gvalueSet_ Ptr GValue
gv (P.Just ThemingEngine
obj) = ThemingEngine -> (Ptr ThemingEngine -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ThemingEngine
obj (Ptr GValue -> Ptr ThemingEngine -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe ThemingEngine)
gvalueGet_ Ptr GValue
gv = do
Ptr ThemingEngine
ptr <- Ptr GValue -> IO (Ptr ThemingEngine)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ThemingEngine)
if Ptr ThemingEngine
ptr Ptr ThemingEngine -> Ptr ThemingEngine -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ThemingEngine
forall a. Ptr a
FP.nullPtr
then ThemingEngine -> Maybe ThemingEngine
forall a. a -> Maybe a
P.Just (ThemingEngine -> Maybe ThemingEngine)
-> IO ThemingEngine -> IO (Maybe ThemingEngine)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ThemingEngine -> ThemingEngine)
-> Ptr ThemingEngine -> IO ThemingEngine
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ThemingEngine -> ThemingEngine
ThemingEngine Ptr ThemingEngine
ptr
else Maybe ThemingEngine -> IO (Maybe ThemingEngine)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ThemingEngine
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveThemingEngineMethod (t :: Symbol) (o :: *) :: * where
ResolveThemingEngineMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveThemingEngineMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveThemingEngineMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveThemingEngineMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveThemingEngineMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveThemingEngineMethod "hasClass" o = ThemingEngineHasClassMethodInfo
ResolveThemingEngineMethod "hasRegion" o = ThemingEngineHasRegionMethodInfo
ResolveThemingEngineMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveThemingEngineMethod "lookupColor" o = ThemingEngineLookupColorMethodInfo
ResolveThemingEngineMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveThemingEngineMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveThemingEngineMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveThemingEngineMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveThemingEngineMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveThemingEngineMethod "stateIsRunning" o = ThemingEngineStateIsRunningMethodInfo
ResolveThemingEngineMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveThemingEngineMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveThemingEngineMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveThemingEngineMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveThemingEngineMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveThemingEngineMethod "getBackgroundColor" o = ThemingEngineGetBackgroundColorMethodInfo
ResolveThemingEngineMethod "getBorder" o = ThemingEngineGetBorderMethodInfo
ResolveThemingEngineMethod "getBorderColor" o = ThemingEngineGetBorderColorMethodInfo
ResolveThemingEngineMethod "getColor" o = ThemingEngineGetColorMethodInfo
ResolveThemingEngineMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveThemingEngineMethod "getDirection" o = ThemingEngineGetDirectionMethodInfo
ResolveThemingEngineMethod "getFont" o = ThemingEngineGetFontMethodInfo
ResolveThemingEngineMethod "getJunctionSides" o = ThemingEngineGetJunctionSidesMethodInfo
ResolveThemingEngineMethod "getMargin" o = ThemingEngineGetMarginMethodInfo
ResolveThemingEngineMethod "getPadding" o = ThemingEngineGetPaddingMethodInfo
ResolveThemingEngineMethod "getPath" o = ThemingEngineGetPathMethodInfo
ResolveThemingEngineMethod "getProperty" o = ThemingEngineGetPropertyMethodInfo
ResolveThemingEngineMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveThemingEngineMethod "getScreen" o = ThemingEngineGetScreenMethodInfo
ResolveThemingEngineMethod "getState" o = ThemingEngineGetStateMethodInfo
ResolveThemingEngineMethod "getStyleProperty" o = ThemingEngineGetStylePropertyMethodInfo
ResolveThemingEngineMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveThemingEngineMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveThemingEngineMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveThemingEngineMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveThemingEngineMethod t ThemingEngine, O.OverloadedMethod info ThemingEngine p) => OL.IsLabel t (ThemingEngine -> 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 ~ ResolveThemingEngineMethod t ThemingEngine, O.OverloadedMethod info ThemingEngine p, R.HasField t ThemingEngine p) => R.HasField t ThemingEngine p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveThemingEngineMethod t ThemingEngine, O.OverloadedMethodInfo info ThemingEngine) => OL.IsLabel t (O.MethodProxy info ThemingEngine) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe T.Text)
getThemingEngineName :: forall (m :: * -> *) o.
(MonadIO m, IsThemingEngine o) =>
o -> m (Maybe Text)
getThemingEngineName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"name"
constructThemingEngineName :: (IsThemingEngine o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructThemingEngineName :: forall o (m :: * -> *).
(IsThemingEngine o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructThemingEngineName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ThemingEngineNamePropertyInfo
instance AttrInfo ThemingEngineNamePropertyInfo where
type AttrAllowedOps ThemingEngineNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ThemingEngineNamePropertyInfo = IsThemingEngine
type AttrSetTypeConstraint ThemingEngineNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ThemingEngineNamePropertyInfo = (~) T.Text
type AttrTransferType ThemingEngineNamePropertyInfo = T.Text
type AttrGetType ThemingEngineNamePropertyInfo = (Maybe T.Text)
type AttrLabel ThemingEngineNamePropertyInfo = "name"
type AttrOrigin ThemingEngineNamePropertyInfo = ThemingEngine
attrGet = getThemingEngineName
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructThemingEngineName
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ThemingEngine
type instance O.AttributeList ThemingEngine = ThemingEngineAttributeList
type ThemingEngineAttributeList = ('[ '("name", ThemingEngineNamePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
themingEngineName :: AttrLabelProxy "name"
themingEngineName = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ThemingEngine = ThemingEngineSignalList
type ThemingEngineSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_theming_engine_get_background_color" gtk_theming_engine_get_background_color ::
Ptr ThemingEngine ->
CUInt ->
Ptr Gdk.RGBA.RGBA ->
IO ()
{-# DEPRECATED themingEngineGetBackgroundColor ["(Since version 3.14)"] #-}
themingEngineGetBackgroundColor ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gdk.RGBA.RGBA)
themingEngineGetBackgroundColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m RGBA
themingEngineGetBackgroundColor a
engine [StateFlags]
state = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr RGBA -> IO ()
gtk_theming_engine_get_background_color Ptr ThemingEngine
engine' 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
engine
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
color'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetBackgroundColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gdk.RGBA.RGBA)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetBackgroundColorMethodInfo a signature where
overloadedMethod = themingEngineGetBackgroundColor
instance O.OverloadedMethodInfo ThemingEngineGetBackgroundColorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetBackgroundColor",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetBackgroundColor"
}
#endif
foreign import ccall "gtk_theming_engine_get_border" gtk_theming_engine_get_border ::
Ptr ThemingEngine ->
CUInt ->
Ptr Gtk.Border.Border ->
IO ()
{-# DEPRECATED themingEngineGetBorder ["(Since version 3.14)"] #-}
themingEngineGetBorder ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gtk.Border.Border)
themingEngineGetBorder :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m Border
themingEngineGetBorder a
engine [StateFlags]
state = IO Border -> m Border
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Border -> m Border) -> IO Border -> m Border
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr Border -> IO ()
gtk_theming_engine_get_border Ptr ThemingEngine
engine' 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
engine
Border -> IO Border
forall (m :: * -> *) a. Monad m => a -> m a
return Border
border'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetBorderMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gtk.Border.Border)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetBorderMethodInfo a signature where
overloadedMethod = themingEngineGetBorder
instance O.OverloadedMethodInfo ThemingEngineGetBorderMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetBorder",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetBorder"
}
#endif
foreign import ccall "gtk_theming_engine_get_border_color" gtk_theming_engine_get_border_color ::
Ptr ThemingEngine ->
CUInt ->
Ptr Gdk.RGBA.RGBA ->
IO ()
{-# DEPRECATED themingEngineGetBorderColor ["(Since version 3.14)"] #-}
themingEngineGetBorderColor ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gdk.RGBA.RGBA)
themingEngineGetBorderColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m RGBA
themingEngineGetBorderColor a
engine [StateFlags]
state = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr RGBA -> IO ()
gtk_theming_engine_get_border_color Ptr ThemingEngine
engine' 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
engine
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
color'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetBorderColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gdk.RGBA.RGBA)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetBorderColorMethodInfo a signature where
overloadedMethod = themingEngineGetBorderColor
instance O.OverloadedMethodInfo ThemingEngineGetBorderColorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetBorderColor",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetBorderColor"
}
#endif
foreign import ccall "gtk_theming_engine_get_color" gtk_theming_engine_get_color ::
Ptr ThemingEngine ->
CUInt ->
Ptr Gdk.RGBA.RGBA ->
IO ()
{-# DEPRECATED themingEngineGetColor ["(Since version 3.14)"] #-}
themingEngineGetColor ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gdk.RGBA.RGBA)
themingEngineGetColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m RGBA
themingEngineGetColor a
engine [StateFlags]
state = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr RGBA -> IO ()
gtk_theming_engine_get_color Ptr ThemingEngine
engine' 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
engine
RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
color'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gdk.RGBA.RGBA)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetColorMethodInfo a signature where
overloadedMethod = themingEngineGetColor
instance O.OverloadedMethodInfo ThemingEngineGetColorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetColor",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetColor"
}
#endif
foreign import ccall "gtk_theming_engine_get_direction" gtk_theming_engine_get_direction ::
Ptr ThemingEngine ->
IO CUInt
{-# DEPRECATED themingEngineGetDirection ["(Since version 3.8)","Use 'GI.Gtk.Objects.ThemingEngine.themingEngineGetState' and"," check for @/GTK_STATE_FLAG_DIR_LTR/@ and"," @/GTK_STATE_FLAG_DIR_RTL/@ instead."] #-}
themingEngineGetDirection ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> m Gtk.Enums.TextDirection
themingEngineGetDirection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> m TextDirection
themingEngineGetDirection a
engine = IO TextDirection -> m TextDirection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextDirection -> m TextDirection)
-> IO TextDirection -> m TextDirection
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
CUInt
result <- Ptr ThemingEngine -> IO CUInt
gtk_theming_engine_get_direction Ptr ThemingEngine
engine'
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
engine
TextDirection -> IO TextDirection
forall (m :: * -> *) a. Monad m => a -> m a
return TextDirection
result'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetDirectionMethodInfo
instance (signature ~ (m Gtk.Enums.TextDirection), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetDirectionMethodInfo a signature where
overloadedMethod = themingEngineGetDirection
instance O.OverloadedMethodInfo ThemingEngineGetDirectionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetDirection",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetDirection"
}
#endif
foreign import ccall "gtk_theming_engine_get_font" gtk_theming_engine_get_font ::
Ptr ThemingEngine ->
CUInt ->
IO (Ptr Pango.FontDescription.FontDescription)
{-# DEPRECATED themingEngineGetFont ["(Since version 3.8)","Use @/gtk_theming_engine_get()/@"] #-}
themingEngineGetFont ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m Pango.FontDescription.FontDescription
themingEngineGetFont :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m FontDescription
themingEngineGetFont a
engine [StateFlags]
state = IO FontDescription -> m FontDescription
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FontDescription -> m FontDescription)
-> IO FontDescription -> m FontDescription
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
let state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
Ptr FontDescription
result <- Ptr ThemingEngine -> CUInt -> IO (Ptr FontDescription)
gtk_theming_engine_get_font Ptr ThemingEngine
engine' CUInt
state'
Text -> Ptr FontDescription -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"themingEngineGetFont" 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
engine
FontDescription -> IO FontDescription
forall (m :: * -> *) a. Monad m => a -> m a
return FontDescription
result'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetFontMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m Pango.FontDescription.FontDescription), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetFontMethodInfo a signature where
overloadedMethod = themingEngineGetFont
instance O.OverloadedMethodInfo ThemingEngineGetFontMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetFont",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetFont"
}
#endif
foreign import ccall "gtk_theming_engine_get_junction_sides" gtk_theming_engine_get_junction_sides ::
Ptr ThemingEngine ->
IO CUInt
{-# DEPRECATED themingEngineGetJunctionSides ["(Since version 3.14)"] #-}
themingEngineGetJunctionSides ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> m [Gtk.Flags.JunctionSides]
themingEngineGetJunctionSides :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> m [JunctionSides]
themingEngineGetJunctionSides a
engine = IO [JunctionSides] -> m [JunctionSides]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [JunctionSides] -> m [JunctionSides])
-> IO [JunctionSides] -> m [JunctionSides]
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
CUInt
result <- Ptr ThemingEngine -> IO CUInt
gtk_theming_engine_get_junction_sides Ptr ThemingEngine
engine'
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
engine
[JunctionSides] -> IO [JunctionSides]
forall (m :: * -> *) a. Monad m => a -> m a
return [JunctionSides]
result'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetJunctionSidesMethodInfo
instance (signature ~ (m [Gtk.Flags.JunctionSides]), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetJunctionSidesMethodInfo a signature where
overloadedMethod = themingEngineGetJunctionSides
instance O.OverloadedMethodInfo ThemingEngineGetJunctionSidesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetJunctionSides",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetJunctionSides"
}
#endif
foreign import ccall "gtk_theming_engine_get_margin" gtk_theming_engine_get_margin ::
Ptr ThemingEngine ->
CUInt ->
Ptr Gtk.Border.Border ->
IO ()
{-# DEPRECATED themingEngineGetMargin ["(Since version 3.14)"] #-}
themingEngineGetMargin ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gtk.Border.Border)
themingEngineGetMargin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m Border
themingEngineGetMargin a
engine [StateFlags]
state = IO Border -> m Border
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Border -> m Border) -> IO Border -> m Border
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr Border -> IO ()
gtk_theming_engine_get_margin Ptr ThemingEngine
engine' 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
engine
Border -> IO Border
forall (m :: * -> *) a. Monad m => a -> m a
return Border
margin'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetMarginMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gtk.Border.Border)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetMarginMethodInfo a signature where
overloadedMethod = themingEngineGetMargin
instance O.OverloadedMethodInfo ThemingEngineGetMarginMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetMargin",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetMargin"
}
#endif
foreign import ccall "gtk_theming_engine_get_padding" gtk_theming_engine_get_padding ::
Ptr ThemingEngine ->
CUInt ->
Ptr Gtk.Border.Border ->
IO ()
{-# DEPRECATED themingEngineGetPadding ["(Since version 3.14)"] #-}
themingEngineGetPadding ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> [Gtk.Flags.StateFlags]
-> m (Gtk.Border.Border)
themingEngineGetPadding :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> [StateFlags] -> m Border
themingEngineGetPadding a
engine [StateFlags]
state = IO Border -> m Border
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Border -> m Border) -> IO Border -> m Border
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr Border -> IO ()
gtk_theming_engine_get_padding Ptr ThemingEngine
engine' 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
engine
Border -> IO Border
forall (m :: * -> *) a. Monad m => a -> m a
return Border
padding'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetPaddingMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m (Gtk.Border.Border)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetPaddingMethodInfo a signature where
overloadedMethod = themingEngineGetPadding
instance O.OverloadedMethodInfo ThemingEngineGetPaddingMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetPadding",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetPadding"
}
#endif
foreign import ccall "gtk_theming_engine_get_path" gtk_theming_engine_get_path ::
Ptr ThemingEngine ->
IO (Ptr Gtk.WidgetPath.WidgetPath)
{-# DEPRECATED themingEngineGetPath ["(Since version 3.14)"] #-}
themingEngineGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> m Gtk.WidgetPath.WidgetPath
themingEngineGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> m WidgetPath
themingEngineGetPath a
engine = IO WidgetPath -> m WidgetPath
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WidgetPath -> m WidgetPath) -> IO WidgetPath -> m WidgetPath
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
Ptr WidgetPath
result <- Ptr ThemingEngine -> IO (Ptr WidgetPath)
gtk_theming_engine_get_path Ptr ThemingEngine
engine'
Text -> Ptr WidgetPath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"themingEngineGetPath" 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
engine
WidgetPath -> IO WidgetPath
forall (m :: * -> *) a. Monad m => a -> m a
return WidgetPath
result'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetPathMethodInfo
instance (signature ~ (m Gtk.WidgetPath.WidgetPath), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetPathMethodInfo a signature where
overloadedMethod = themingEngineGetPath
instance O.OverloadedMethodInfo ThemingEngineGetPathMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetPath",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetPath"
}
#endif
foreign import ccall "gtk_theming_engine_get_property" gtk_theming_engine_get_property ::
Ptr ThemingEngine ->
CString ->
CUInt ->
Ptr GValue ->
IO ()
{-# DEPRECATED themingEngineGetProperty ["(Since version 3.14)"] #-}
themingEngineGetProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> T.Text
-> [Gtk.Flags.StateFlags]
-> m (GValue)
themingEngineGetProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> Text -> [StateFlags] -> m GValue
themingEngineGetProperty a
engine Text
property [StateFlags]
state = IO GValue -> m GValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CString -> CUInt -> Ptr GValue -> IO ()
gtk_theming_engine_get_property Ptr ThemingEngine
engine' 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
engine
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
property'
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
value'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetPropertyMethodInfo
instance (signature ~ (T.Text -> [Gtk.Flags.StateFlags] -> m (GValue)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetPropertyMethodInfo a signature where
overloadedMethod = themingEngineGetProperty
instance O.OverloadedMethodInfo ThemingEngineGetPropertyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetProperty",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetProperty"
}
#endif
foreign import ccall "gtk_theming_engine_get_screen" gtk_theming_engine_get_screen ::
Ptr ThemingEngine ->
IO (Ptr Gdk.Screen.Screen)
{-# DEPRECATED themingEngineGetScreen ["(Since version 3.14)"] #-}
themingEngineGetScreen ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> m (Maybe Gdk.Screen.Screen)
themingEngineGetScreen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> m (Maybe Screen)
themingEngineGetScreen a
engine = IO (Maybe Screen) -> m (Maybe Screen)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Screen) -> m (Maybe Screen))
-> IO (Maybe Screen) -> m (Maybe Screen)
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
Ptr Screen
result <- Ptr ThemingEngine -> IO (Ptr Screen)
gtk_theming_engine_get_screen Ptr ThemingEngine
engine'
Maybe Screen
maybeResult <- Ptr Screen -> (Ptr Screen -> IO Screen) -> IO (Maybe Screen)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Screen
result ((Ptr Screen -> IO Screen) -> IO (Maybe Screen))
-> (Ptr Screen -> IO Screen) -> IO (Maybe Screen)
forall a b. (a -> b) -> a -> b
$ \Ptr Screen
result' -> do
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'
Screen -> IO Screen
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
engine
Maybe Screen -> IO (Maybe Screen)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Screen
maybeResult
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetScreenMethodInfo
instance (signature ~ (m (Maybe Gdk.Screen.Screen)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetScreenMethodInfo a signature where
overloadedMethod = themingEngineGetScreen
instance O.OverloadedMethodInfo ThemingEngineGetScreenMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetScreen",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetScreen"
}
#endif
foreign import ccall "gtk_theming_engine_get_state" gtk_theming_engine_get_state ::
Ptr ThemingEngine ->
IO CUInt
{-# DEPRECATED themingEngineGetState ["(Since version 3.14)"] #-}
themingEngineGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> m [Gtk.Flags.StateFlags]
themingEngineGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> m [StateFlags]
themingEngineGetState a
engine = IO [StateFlags] -> m [StateFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [StateFlags] -> m [StateFlags])
-> IO [StateFlags] -> m [StateFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
CUInt
result <- Ptr ThemingEngine -> IO CUInt
gtk_theming_engine_get_state Ptr ThemingEngine
engine'
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
engine
[StateFlags] -> IO [StateFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [StateFlags]
result'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetStateMethodInfo
instance (signature ~ (m [Gtk.Flags.StateFlags]), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetStateMethodInfo a signature where
overloadedMethod = themingEngineGetState
instance O.OverloadedMethodInfo ThemingEngineGetStateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetState",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetState"
}
#endif
foreign import ccall "gtk_theming_engine_get_style_property" gtk_theming_engine_get_style_property ::
Ptr ThemingEngine ->
CString ->
Ptr GValue ->
IO ()
{-# DEPRECATED themingEngineGetStyleProperty ["(Since version 3.14)"] #-}
themingEngineGetStyleProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> T.Text
-> m (GValue)
themingEngineGetStyleProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> Text -> m GValue
themingEngineGetStyleProperty a
engine Text
propertyName = IO GValue -> m GValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
Ptr GValue
value <- Int -> IO (Ptr GValue)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
24 :: IO (Ptr GValue)
Ptr ThemingEngine -> CString -> Ptr GValue -> IO ()
gtk_theming_engine_get_style_property Ptr ThemingEngine
engine' CString
propertyName' 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
engine
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
value'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineGetStylePropertyMethodInfo
instance (signature ~ (T.Text -> m (GValue)), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineGetStylePropertyMethodInfo a signature where
overloadedMethod = themingEngineGetStyleProperty
instance O.OverloadedMethodInfo ThemingEngineGetStylePropertyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineGetStyleProperty",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineGetStyleProperty"
}
#endif
foreign import ccall "gtk_theming_engine_has_class" gtk_theming_engine_has_class ::
Ptr ThemingEngine ->
CString ->
IO CInt
{-# DEPRECATED themingEngineHasClass ["(Since version 3.14)"] #-}
themingEngineHasClass ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> T.Text
-> m Bool
themingEngineHasClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> Text -> m Bool
themingEngineHasClass a
engine Text
styleClass = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
CString
styleClass' <- Text -> IO CString
textToCString Text
styleClass
CInt
result <- Ptr ThemingEngine -> CString -> IO CInt
gtk_theming_engine_has_class Ptr ThemingEngine
engine' CString
styleClass'
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
engine
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
styleClass'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ThemingEngineHasClassMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineHasClassMethodInfo a signature where
overloadedMethod = themingEngineHasClass
instance O.OverloadedMethodInfo ThemingEngineHasClassMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineHasClass",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineHasClass"
}
#endif
foreign import ccall "gtk_theming_engine_has_region" gtk_theming_engine_has_region ::
Ptr ThemingEngine ->
CString ->
Ptr CUInt ->
IO CInt
{-# DEPRECATED themingEngineHasRegion ["(Since version 3.14)"] #-}
themingEngineHasRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> T.Text
-> m ((Bool, [Gtk.Flags.RegionFlags]))
themingEngineHasRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> Text -> m (Bool, [RegionFlags])
themingEngineHasRegion a
engine Text
styleRegion = IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags]))
-> IO (Bool, [RegionFlags]) -> m (Bool, [RegionFlags])
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
CString
styleRegion' <- Text -> IO CString
textToCString Text
styleRegion
Ptr CUInt
flags <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr ThemingEngine -> CString -> Ptr CUInt -> IO CInt
gtk_theming_engine_has_region Ptr ThemingEngine
engine' CString
styleRegion' Ptr CUInt
flags
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CUInt
flags' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
flags
let flags'' :: [RegionFlags]
flags'' = CUInt -> [RegionFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
flags'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
engine
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
styleRegion'
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
flags
(Bool, [RegionFlags]) -> IO (Bool, [RegionFlags])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [RegionFlags]
flags'')
#if defined(ENABLE_OVERLOADING)
data ThemingEngineHasRegionMethodInfo
instance (signature ~ (T.Text -> m ((Bool, [Gtk.Flags.RegionFlags]))), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineHasRegionMethodInfo a signature where
overloadedMethod = themingEngineHasRegion
instance O.OverloadedMethodInfo ThemingEngineHasRegionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineHasRegion",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineHasRegion"
}
#endif
foreign import ccall "gtk_theming_engine_lookup_color" gtk_theming_engine_lookup_color ::
Ptr ThemingEngine ->
CString ->
Ptr Gdk.RGBA.RGBA ->
IO CInt
{-# DEPRECATED themingEngineLookupColor ["(Since version 3.14)"] #-}
themingEngineLookupColor ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> T.Text
-> m ((Bool, Gdk.RGBA.RGBA))
themingEngineLookupColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> Text -> m (Bool, RGBA)
themingEngineLookupColor a
engine Text
colorName = IO (Bool, RGBA) -> m (Bool, RGBA)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, RGBA) -> m (Bool, RGBA))
-> IO (Bool, RGBA) -> m (Bool, RGBA)
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CString -> Ptr RGBA -> IO CInt
gtk_theming_engine_lookup_color Ptr ThemingEngine
engine' 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
engine
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
colorName'
(Bool, RGBA) -> IO (Bool, RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', RGBA
color')
#if defined(ENABLE_OVERLOADING)
data ThemingEngineLookupColorMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Gdk.RGBA.RGBA))), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineLookupColorMethodInfo a signature where
overloadedMethod = themingEngineLookupColor
instance O.OverloadedMethodInfo ThemingEngineLookupColorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineLookupColor",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineLookupColor"
}
#endif
foreign import ccall "gtk_theming_engine_state_is_running" gtk_theming_engine_state_is_running ::
Ptr ThemingEngine ->
CUInt ->
Ptr CDouble ->
IO CInt
{-# DEPRECATED themingEngineStateIsRunning ["(Since version 3.6)","Always returns 'P.False'"] #-}
themingEngineStateIsRunning ::
(B.CallStack.HasCallStack, MonadIO m, IsThemingEngine a) =>
a
-> Gtk.Enums.StateType
-> m ((Bool, Double))
themingEngineStateIsRunning :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsThemingEngine a) =>
a -> StateType -> m (Bool, Double)
themingEngineStateIsRunning a
engine StateType
state = IO (Bool, Double) -> m (Bool, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double) -> m (Bool, Double))
-> IO (Bool, Double) -> m (Bool, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr ThemingEngine
engine' <- a -> IO (Ptr ThemingEngine)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
engine
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 ThemingEngine -> CUInt -> Ptr CDouble -> IO CInt
gtk_theming_engine_state_is_running Ptr ThemingEngine
engine' 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
engine
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
progress
(Bool, Double) -> IO (Bool, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
progress'')
#if defined(ENABLE_OVERLOADING)
data ThemingEngineStateIsRunningMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> m ((Bool, Double))), MonadIO m, IsThemingEngine a) => O.OverloadedMethod ThemingEngineStateIsRunningMethodInfo a signature where
overloadedMethod = themingEngineStateIsRunning
instance O.OverloadedMethodInfo ThemingEngineStateIsRunningMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.ThemingEngine.themingEngineStateIsRunning",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-ThemingEngine.html#v:themingEngineStateIsRunning"
}
#endif
foreign import ccall "gtk_theming_engine_load" gtk_theming_engine_load ::
CString ->
IO (Ptr ThemingEngine)
{-# DEPRECATED themingEngineLoad ["(Since version 3.14)"] #-}
themingEngineLoad ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m (Maybe ThemingEngine)
themingEngineLoad :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m (Maybe ThemingEngine)
themingEngineLoad Text
name = IO (Maybe ThemingEngine) -> m (Maybe ThemingEngine)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ThemingEngine) -> m (Maybe ThemingEngine))
-> IO (Maybe ThemingEngine) -> m (Maybe ThemingEngine)
forall a b. (a -> b) -> a -> b
$ do
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr ThemingEngine
result <- CString -> IO (Ptr ThemingEngine)
gtk_theming_engine_load CString
name'
Maybe ThemingEngine
maybeResult <- Ptr ThemingEngine
-> (Ptr ThemingEngine -> IO ThemingEngine)
-> IO (Maybe ThemingEngine)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ThemingEngine
result ((Ptr ThemingEngine -> IO ThemingEngine)
-> IO (Maybe ThemingEngine))
-> (Ptr ThemingEngine -> IO ThemingEngine)
-> IO (Maybe ThemingEngine)
forall a b. (a -> b) -> a -> b
$ \Ptr ThemingEngine
result' -> do
ThemingEngine
result'' <- ((ManagedPtr ThemingEngine -> ThemingEngine)
-> Ptr ThemingEngine -> IO ThemingEngine
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ThemingEngine -> ThemingEngine
ThemingEngine) Ptr ThemingEngine
result'
ThemingEngine -> IO ThemingEngine
forall (m :: * -> *) a. Monad m => a -> m a
return ThemingEngine
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Maybe ThemingEngine -> IO (Maybe ThemingEngine)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ThemingEngine
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif