{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.IconFactory
(
IconFactory(..) ,
IsIconFactory ,
toIconFactory ,
#if defined(ENABLE_OVERLOADING)
ResolveIconFactoryMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
IconFactoryAddMethodInfo ,
#endif
iconFactoryAdd ,
#if defined(ENABLE_OVERLOADING)
IconFactoryAddDefaultMethodInfo ,
#endif
iconFactoryAddDefault ,
#if defined(ENABLE_OVERLOADING)
IconFactoryLookupMethodInfo ,
#endif
iconFactoryLookup ,
iconFactoryLookupDefault ,
iconFactoryNew ,
#if defined(ENABLE_OVERLOADING)
IconFactoryRemoveDefaultMethodInfo ,
#endif
iconFactoryRemoveDefault ,
) 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 {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Structs.IconSet as Gtk.IconSet
newtype IconFactory = IconFactory (SP.ManagedPtr IconFactory)
deriving (IconFactory -> IconFactory -> Bool
(IconFactory -> IconFactory -> Bool)
-> (IconFactory -> IconFactory -> Bool) -> Eq IconFactory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IconFactory -> IconFactory -> Bool
== :: IconFactory -> IconFactory -> Bool
$c/= :: IconFactory -> IconFactory -> Bool
/= :: IconFactory -> IconFactory -> Bool
Eq)
instance SP.ManagedPtrNewtype IconFactory where
toManagedPtr :: IconFactory -> ManagedPtr IconFactory
toManagedPtr (IconFactory ManagedPtr IconFactory
p) = ManagedPtr IconFactory
p
foreign import ccall "gtk_icon_factory_get_type"
c_gtk_icon_factory_get_type :: IO B.Types.GType
instance B.Types.TypedObject IconFactory where
glibType :: IO GType
glibType = IO GType
c_gtk_icon_factory_get_type
instance B.Types.GObject IconFactory
class (SP.GObject o, O.IsDescendantOf IconFactory o) => IsIconFactory o
instance (SP.GObject o, O.IsDescendantOf IconFactory o) => IsIconFactory o
instance O.HasParentTypes IconFactory
type instance O.ParentTypes IconFactory = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toIconFactory :: (MIO.MonadIO m, IsIconFactory o) => o -> m IconFactory
toIconFactory :: forall (m :: * -> *) o.
(MonadIO m, IsIconFactory o) =>
o -> m IconFactory
toIconFactory = IO IconFactory -> m IconFactory
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IconFactory -> m IconFactory)
-> (o -> IO IconFactory) -> o -> m IconFactory
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr IconFactory -> IconFactory) -> o -> IO IconFactory
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr IconFactory -> IconFactory
IconFactory
instance B.GValue.IsGValue (Maybe IconFactory) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_icon_factory_get_type
gvalueSet_ :: Ptr GValue -> Maybe IconFactory -> IO ()
gvalueSet_ Ptr GValue
gv Maybe IconFactory
P.Nothing = Ptr GValue -> Ptr IconFactory -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr IconFactory
forall a. Ptr a
FP.nullPtr :: FP.Ptr IconFactory)
gvalueSet_ Ptr GValue
gv (P.Just IconFactory
obj) = IconFactory -> (Ptr IconFactory -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr IconFactory
obj (Ptr GValue -> Ptr IconFactory -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe IconFactory)
gvalueGet_ Ptr GValue
gv = do
Ptr IconFactory
ptr <- Ptr GValue -> IO (Ptr IconFactory)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr IconFactory)
if Ptr IconFactory
ptr Ptr IconFactory -> Ptr IconFactory -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr IconFactory
forall a. Ptr a
FP.nullPtr
then IconFactory -> Maybe IconFactory
forall a. a -> Maybe a
P.Just (IconFactory -> Maybe IconFactory)
-> IO IconFactory -> IO (Maybe IconFactory)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr IconFactory -> IconFactory)
-> Ptr IconFactory -> IO IconFactory
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr IconFactory -> IconFactory
IconFactory Ptr IconFactory
ptr
else Maybe IconFactory -> IO (Maybe IconFactory)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IconFactory
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveIconFactoryMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveIconFactoryMethod "add" o = IconFactoryAddMethodInfo
ResolveIconFactoryMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveIconFactoryMethod "addDefault" o = IconFactoryAddDefaultMethodInfo
ResolveIconFactoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveIconFactoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveIconFactoryMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveIconFactoryMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveIconFactoryMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveIconFactoryMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveIconFactoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveIconFactoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveIconFactoryMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveIconFactoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveIconFactoryMethod "lookup" o = IconFactoryLookupMethodInfo
ResolveIconFactoryMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveIconFactoryMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveIconFactoryMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveIconFactoryMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveIconFactoryMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveIconFactoryMethod "removeDefault" o = IconFactoryRemoveDefaultMethodInfo
ResolveIconFactoryMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveIconFactoryMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveIconFactoryMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveIconFactoryMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveIconFactoryMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveIconFactoryMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveIconFactoryMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveIconFactoryMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveIconFactoryMethod "getName" o = Gtk.Buildable.BuildableGetNameMethodInfo
ResolveIconFactoryMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveIconFactoryMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveIconFactoryMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveIconFactoryMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveIconFactoryMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveIconFactoryMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveIconFactoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveIconFactoryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveIconFactoryMethod t IconFactory, O.OverloadedMethod info IconFactory p) => OL.IsLabel t (IconFactory -> 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 ~ ResolveIconFactoryMethod t IconFactory, O.OverloadedMethod info IconFactory p, R.HasField t IconFactory p) => R.HasField t IconFactory p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveIconFactoryMethod t IconFactory, O.OverloadedMethodInfo info IconFactory) => OL.IsLabel t (O.MethodProxy info IconFactory) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList IconFactory
type instance O.AttributeList IconFactory = IconFactoryAttributeList
type IconFactoryAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList IconFactory = IconFactorySignalList
type IconFactorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_icon_factory_new" gtk_icon_factory_new ::
IO (Ptr IconFactory)
{-# DEPRECATED iconFactoryNew ["(Since version 3.10)","Use t'GI.Gtk.Objects.IconTheme.IconTheme' instead."] #-}
iconFactoryNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m IconFactory
iconFactoryNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m IconFactory
iconFactoryNew = IO IconFactory -> m IconFactory
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IconFactory -> m IconFactory)
-> IO IconFactory -> m IconFactory
forall a b. (a -> b) -> a -> b
$ do
Ptr IconFactory
result <- IO (Ptr IconFactory)
gtk_icon_factory_new
Text -> Ptr IconFactory -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"iconFactoryNew" Ptr IconFactory
result
IconFactory
result' <- ((ManagedPtr IconFactory -> IconFactory)
-> Ptr IconFactory -> IO IconFactory
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr IconFactory -> IconFactory
IconFactory) Ptr IconFactory
result
IconFactory -> IO IconFactory
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IconFactory
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_icon_factory_add" gtk_icon_factory_add ::
Ptr IconFactory ->
CString ->
Ptr Gtk.IconSet.IconSet ->
IO ()
{-# DEPRECATED iconFactoryAdd ["(Since version 3.10)","Use t'GI.Gtk.Objects.IconTheme.IconTheme' instead."] #-}
iconFactoryAdd ::
(B.CallStack.HasCallStack, MonadIO m, IsIconFactory a) =>
a
-> T.Text
-> Gtk.IconSet.IconSet
-> m ()
iconFactoryAdd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsIconFactory a) =>
a -> Text -> IconSet -> m ()
iconFactoryAdd a
factory Text
stockId IconSet
iconSet = 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 IconFactory
factory' <- a -> IO (Ptr IconFactory)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
factory
CString
stockId' <- Text -> IO CString
textToCString Text
stockId
Ptr IconSet
iconSet' <- IconSet -> IO (Ptr IconSet)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IconSet
iconSet
Ptr IconFactory -> CString -> Ptr IconSet -> IO ()
gtk_icon_factory_add Ptr IconFactory
factory' CString
stockId' Ptr IconSet
iconSet'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
factory
IconSet -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IconSet
iconSet
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data IconFactoryAddMethodInfo
instance (signature ~ (T.Text -> Gtk.IconSet.IconSet -> m ()), MonadIO m, IsIconFactory a) => O.OverloadedMethod IconFactoryAddMethodInfo a signature where
overloadedMethod = iconFactoryAdd
instance O.OverloadedMethodInfo IconFactoryAddMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.IconFactory.iconFactoryAdd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-IconFactory.html#v:iconFactoryAdd"
})
#endif
foreign import ccall "gtk_icon_factory_add_default" gtk_icon_factory_add_default ::
Ptr IconFactory ->
IO ()
{-# DEPRECATED iconFactoryAddDefault ["(Since version 3.10)","Use t'GI.Gtk.Objects.IconTheme.IconTheme' instead."] #-}
iconFactoryAddDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsIconFactory a) =>
a
-> m ()
iconFactoryAddDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsIconFactory a) =>
a -> m ()
iconFactoryAddDefault a
factory = 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 IconFactory
factory' <- a -> IO (Ptr IconFactory)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
factory
Ptr IconFactory -> IO ()
gtk_icon_factory_add_default Ptr IconFactory
factory'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
factory
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data IconFactoryAddDefaultMethodInfo
instance (signature ~ (m ()), MonadIO m, IsIconFactory a) => O.OverloadedMethod IconFactoryAddDefaultMethodInfo a signature where
overloadedMethod = iconFactoryAddDefault
instance O.OverloadedMethodInfo IconFactoryAddDefaultMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.IconFactory.iconFactoryAddDefault",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-IconFactory.html#v:iconFactoryAddDefault"
})
#endif
foreign import ccall "gtk_icon_factory_lookup" gtk_icon_factory_lookup ::
Ptr IconFactory ->
CString ->
IO (Ptr Gtk.IconSet.IconSet)
{-# DEPRECATED iconFactoryLookup ["(Since version 3.10)","Use t'GI.Gtk.Objects.IconTheme.IconTheme' instead."] #-}
iconFactoryLookup ::
(B.CallStack.HasCallStack, MonadIO m, IsIconFactory a) =>
a
-> T.Text
-> m Gtk.IconSet.IconSet
iconFactoryLookup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsIconFactory a) =>
a -> Text -> m IconSet
iconFactoryLookup a
factory Text
stockId = IO IconSet -> m IconSet
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IconSet -> m IconSet) -> IO IconSet -> m IconSet
forall a b. (a -> b) -> a -> b
$ do
Ptr IconFactory
factory' <- a -> IO (Ptr IconFactory)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
factory
CString
stockId' <- Text -> IO CString
textToCString Text
stockId
Ptr IconSet
result <- Ptr IconFactory -> CString -> IO (Ptr IconSet)
gtk_icon_factory_lookup Ptr IconFactory
factory' CString
stockId'
Text -> Ptr IconSet -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"iconFactoryLookup" Ptr IconSet
result
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
factory
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
IconSet -> IO IconSet
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IconSet
result'
#if defined(ENABLE_OVERLOADING)
data IconFactoryLookupMethodInfo
instance (signature ~ (T.Text -> m Gtk.IconSet.IconSet), MonadIO m, IsIconFactory a) => O.OverloadedMethod IconFactoryLookupMethodInfo a signature where
overloadedMethod = iconFactoryLookup
instance O.OverloadedMethodInfo IconFactoryLookupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.IconFactory.iconFactoryLookup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-IconFactory.html#v:iconFactoryLookup"
})
#endif
foreign import ccall "gtk_icon_factory_remove_default" gtk_icon_factory_remove_default ::
Ptr IconFactory ->
IO ()
{-# DEPRECATED iconFactoryRemoveDefault ["(Since version 3.10)","Use t'GI.Gtk.Objects.IconTheme.IconTheme' instead."] #-}
iconFactoryRemoveDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsIconFactory a) =>
a
-> m ()
iconFactoryRemoveDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsIconFactory a) =>
a -> m ()
iconFactoryRemoveDefault a
factory = 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 IconFactory
factory' <- a -> IO (Ptr IconFactory)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
factory
Ptr IconFactory -> IO ()
gtk_icon_factory_remove_default Ptr IconFactory
factory'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
factory
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data IconFactoryRemoveDefaultMethodInfo
instance (signature ~ (m ()), MonadIO m, IsIconFactory a) => O.OverloadedMethod IconFactoryRemoveDefaultMethodInfo a signature where
overloadedMethod = iconFactoryRemoveDefault
instance O.OverloadedMethodInfo IconFactoryRemoveDefaultMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.IconFactory.iconFactoryRemoveDefault",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-IconFactory.html#v:iconFactoryRemoveDefault"
})
#endif
foreign import ccall "gtk_icon_factory_lookup_default" gtk_icon_factory_lookup_default ::
CString ->
IO (Ptr Gtk.IconSet.IconSet)
{-# DEPRECATED iconFactoryLookupDefault ["(Since version 3.10)","Use t'GI.Gtk.Objects.IconTheme.IconTheme' instead."] #-}
iconFactoryLookupDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Gtk.IconSet.IconSet
iconFactoryLookupDefault :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m IconSet
iconFactoryLookupDefault Text
stockId = IO IconSet -> m IconSet
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IconSet -> m IconSet) -> IO IconSet -> m IconSet
forall a b. (a -> b) -> a -> b
$ do
CString
stockId' <- Text -> IO CString
textToCString Text
stockId
Ptr IconSet
result <- CString -> IO (Ptr IconSet)
gtk_icon_factory_lookup_default CString
stockId'
Text -> Ptr IconSet -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"iconFactoryLookupDefault" Ptr IconSet
result
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
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
IconSet -> IO IconSet
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IconSet
result'
#if defined(ENABLE_OVERLOADING)
#endif