{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.RecentManager
(
RecentManager(..) ,
IsRecentManager ,
toRecentManager ,
#if defined(ENABLE_OVERLOADING)
ResolveRecentManagerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
RecentManagerAddFullMethodInfo ,
#endif
recentManagerAddFull ,
#if defined(ENABLE_OVERLOADING)
RecentManagerAddItemMethodInfo ,
#endif
recentManagerAddItem ,
recentManagerGetDefault ,
#if defined(ENABLE_OVERLOADING)
RecentManagerGetItemsMethodInfo ,
#endif
recentManagerGetItems ,
#if defined(ENABLE_OVERLOADING)
RecentManagerHasItemMethodInfo ,
#endif
recentManagerHasItem ,
#if defined(ENABLE_OVERLOADING)
RecentManagerLookupItemMethodInfo ,
#endif
recentManagerLookupItem ,
#if defined(ENABLE_OVERLOADING)
RecentManagerMoveItemMethodInfo ,
#endif
recentManagerMoveItem ,
recentManagerNew ,
#if defined(ENABLE_OVERLOADING)
RecentManagerPurgeItemsMethodInfo ,
#endif
recentManagerPurgeItems ,
#if defined(ENABLE_OVERLOADING)
RecentManagerRemoveItemMethodInfo ,
#endif
recentManagerRemoveItem ,
#if defined(ENABLE_OVERLOADING)
RecentManagerFilenamePropertyInfo ,
#endif
constructRecentManagerFilename ,
getRecentManagerFilename ,
#if defined(ENABLE_OVERLOADING)
recentManagerFilename ,
#endif
#if defined(ENABLE_OVERLOADING)
RecentManagerSizePropertyInfo ,
#endif
getRecentManagerSize ,
#if defined(ENABLE_OVERLOADING)
recentManagerSize ,
#endif
C_RecentManagerChangedCallback ,
RecentManagerChangedCallback ,
#if defined(ENABLE_OVERLOADING)
RecentManagerChangedSignalInfo ,
#endif
afterRecentManagerChanged ,
genClosure_RecentManagerChanged ,
mk_RecentManagerChangedCallback ,
noRecentManagerChangedCallback ,
onRecentManagerChanged ,
wrap_RecentManagerChangedCallback ,
) 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 {-# SOURCE #-} qualified GI.Gtk.Structs.RecentData as Gtk.RecentData
import {-# SOURCE #-} qualified GI.Gtk.Structs.RecentInfo as Gtk.RecentInfo
newtype RecentManager = RecentManager (SP.ManagedPtr RecentManager)
deriving (RecentManager -> RecentManager -> Bool
(RecentManager -> RecentManager -> Bool)
-> (RecentManager -> RecentManager -> Bool) -> Eq RecentManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecentManager -> RecentManager -> Bool
$c/= :: RecentManager -> RecentManager -> Bool
== :: RecentManager -> RecentManager -> Bool
$c== :: RecentManager -> RecentManager -> Bool
Eq)
instance SP.ManagedPtrNewtype RecentManager where
toManagedPtr :: RecentManager -> ManagedPtr RecentManager
toManagedPtr (RecentManager ManagedPtr RecentManager
p) = ManagedPtr RecentManager
p
foreign import ccall "gtk_recent_manager_get_type"
c_gtk_recent_manager_get_type :: IO B.Types.GType
instance B.Types.TypedObject RecentManager where
glibType :: IO GType
glibType = IO GType
c_gtk_recent_manager_get_type
instance B.Types.GObject RecentManager
class (SP.GObject o, O.IsDescendantOf RecentManager o) => IsRecentManager o
instance (SP.GObject o, O.IsDescendantOf RecentManager o) => IsRecentManager o
instance O.HasParentTypes RecentManager
type instance O.ParentTypes RecentManager = '[GObject.Object.Object]
toRecentManager :: (MIO.MonadIO m, IsRecentManager o) => o -> m RecentManager
toRecentManager :: forall (m :: * -> *) o.
(MonadIO m, IsRecentManager o) =>
o -> m RecentManager
toRecentManager = IO RecentManager -> m RecentManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO RecentManager -> m RecentManager)
-> (o -> IO RecentManager) -> o -> m RecentManager
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr RecentManager -> RecentManager)
-> o -> IO RecentManager
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr RecentManager -> RecentManager
RecentManager
instance B.GValue.IsGValue (Maybe RecentManager) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_recent_manager_get_type
gvalueSet_ :: Ptr GValue -> Maybe RecentManager -> IO ()
gvalueSet_ Ptr GValue
gv Maybe RecentManager
P.Nothing = Ptr GValue -> Ptr RecentManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr RecentManager
forall a. Ptr a
FP.nullPtr :: FP.Ptr RecentManager)
gvalueSet_ Ptr GValue
gv (P.Just RecentManager
obj) = RecentManager -> (Ptr RecentManager -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RecentManager
obj (Ptr GValue -> Ptr RecentManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe RecentManager)
gvalueGet_ Ptr GValue
gv = do
Ptr RecentManager
ptr <- Ptr GValue -> IO (Ptr RecentManager)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr RecentManager)
if Ptr RecentManager
ptr Ptr RecentManager -> Ptr RecentManager -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr RecentManager
forall a. Ptr a
FP.nullPtr
then RecentManager -> Maybe RecentManager
forall a. a -> Maybe a
P.Just (RecentManager -> Maybe RecentManager)
-> IO RecentManager -> IO (Maybe RecentManager)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr RecentManager -> RecentManager)
-> Ptr RecentManager -> IO RecentManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr RecentManager -> RecentManager
RecentManager Ptr RecentManager
ptr
else Maybe RecentManager -> IO (Maybe RecentManager)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe RecentManager
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveRecentManagerMethod (t :: Symbol) (o :: *) :: * where
ResolveRecentManagerMethod "addFull" o = RecentManagerAddFullMethodInfo
ResolveRecentManagerMethod "addItem" o = RecentManagerAddItemMethodInfo
ResolveRecentManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveRecentManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveRecentManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveRecentManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveRecentManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveRecentManagerMethod "hasItem" o = RecentManagerHasItemMethodInfo
ResolveRecentManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveRecentManagerMethod "lookupItem" o = RecentManagerLookupItemMethodInfo
ResolveRecentManagerMethod "moveItem" o = RecentManagerMoveItemMethodInfo
ResolveRecentManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveRecentManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveRecentManagerMethod "purgeItems" o = RecentManagerPurgeItemsMethodInfo
ResolveRecentManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveRecentManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveRecentManagerMethod "removeItem" o = RecentManagerRemoveItemMethodInfo
ResolveRecentManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveRecentManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveRecentManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveRecentManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveRecentManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveRecentManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveRecentManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveRecentManagerMethod "getItems" o = RecentManagerGetItemsMethodInfo
ResolveRecentManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveRecentManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveRecentManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveRecentManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveRecentManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveRecentManagerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRecentManagerMethod t RecentManager, O.OverloadedMethod info RecentManager p) => OL.IsLabel t (RecentManager -> 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 ~ ResolveRecentManagerMethod t RecentManager, O.OverloadedMethod info RecentManager p, R.HasField t RecentManager p) => R.HasField t RecentManager p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveRecentManagerMethod t RecentManager, O.OverloadedMethodInfo info RecentManager) => OL.IsLabel t (O.MethodProxy info RecentManager) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type RecentManagerChangedCallback =
IO ()
noRecentManagerChangedCallback :: Maybe RecentManagerChangedCallback
noRecentManagerChangedCallback :: Maybe (IO ())
noRecentManagerChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_RecentManagerChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_RecentManagerChangedCallback :: C_RecentManagerChangedCallback -> IO (FunPtr C_RecentManagerChangedCallback)
genClosure_RecentManagerChanged :: MonadIO m => RecentManagerChangedCallback -> m (GClosure C_RecentManagerChangedCallback)
genClosure_RecentManagerChanged :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_RecentManagerChangedCallback)
genClosure_RecentManagerChanged IO ()
cb = IO (GClosure C_RecentManagerChangedCallback)
-> m (GClosure C_RecentManagerChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RecentManagerChangedCallback)
-> m (GClosure C_RecentManagerChangedCallback))
-> IO (GClosure C_RecentManagerChangedCallback)
-> m (GClosure C_RecentManagerChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_RecentManagerChangedCallback
cb' = IO () -> C_RecentManagerChangedCallback
wrap_RecentManagerChangedCallback IO ()
cb
C_RecentManagerChangedCallback
-> IO (FunPtr C_RecentManagerChangedCallback)
mk_RecentManagerChangedCallback C_RecentManagerChangedCallback
cb' IO (FunPtr C_RecentManagerChangedCallback)
-> (FunPtr C_RecentManagerChangedCallback
-> IO (GClosure C_RecentManagerChangedCallback))
-> IO (GClosure C_RecentManagerChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RecentManagerChangedCallback
-> IO (GClosure C_RecentManagerChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_RecentManagerChangedCallback ::
RecentManagerChangedCallback ->
C_RecentManagerChangedCallback
wrap_RecentManagerChangedCallback :: IO () -> C_RecentManagerChangedCallback
wrap_RecentManagerChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onRecentManagerChanged :: (IsRecentManager a, MonadIO m) => a -> RecentManagerChangedCallback -> m SignalHandlerId
onRecentManagerChanged :: forall a (m :: * -> *).
(IsRecentManager a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onRecentManagerChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_RecentManagerChangedCallback
cb' = IO () -> C_RecentManagerChangedCallback
wrap_RecentManagerChangedCallback IO ()
cb
FunPtr C_RecentManagerChangedCallback
cb'' <- C_RecentManagerChangedCallback
-> IO (FunPtr C_RecentManagerChangedCallback)
mk_RecentManagerChangedCallback C_RecentManagerChangedCallback
cb'
a
-> Text
-> FunPtr C_RecentManagerChangedCallback
-> 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_RecentManagerChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterRecentManagerChanged :: (IsRecentManager a, MonadIO m) => a -> RecentManagerChangedCallback -> m SignalHandlerId
afterRecentManagerChanged :: forall a (m :: * -> *).
(IsRecentManager a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterRecentManagerChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_RecentManagerChangedCallback
cb' = IO () -> C_RecentManagerChangedCallback
wrap_RecentManagerChangedCallback IO ()
cb
FunPtr C_RecentManagerChangedCallback
cb'' <- C_RecentManagerChangedCallback
-> IO (FunPtr C_RecentManagerChangedCallback)
mk_RecentManagerChangedCallback C_RecentManagerChangedCallback
cb'
a
-> Text
-> FunPtr C_RecentManagerChangedCallback
-> 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_RecentManagerChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data RecentManagerChangedSignalInfo
instance SignalInfo RecentManagerChangedSignalInfo where
type HaskellCallbackType RecentManagerChangedSignalInfo = RecentManagerChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_RecentManagerChangedCallback cb
cb'' <- mk_RecentManagerChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
#endif
getRecentManagerFilename :: (MonadIO m, IsRecentManager o) => o -> m (Maybe T.Text)
getRecentManagerFilename :: forall (m :: * -> *) o.
(MonadIO m, IsRecentManager o) =>
o -> m (Maybe Text)
getRecentManagerFilename 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
"filename"
constructRecentManagerFilename :: (IsRecentManager o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructRecentManagerFilename :: forall o (m :: * -> *).
(IsRecentManager o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructRecentManagerFilename 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
"filename" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data RecentManagerFilenamePropertyInfo
instance AttrInfo RecentManagerFilenamePropertyInfo where
type AttrAllowedOps RecentManagerFilenamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint RecentManagerFilenamePropertyInfo = IsRecentManager
type AttrSetTypeConstraint RecentManagerFilenamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint RecentManagerFilenamePropertyInfo = (~) T.Text
type AttrTransferType RecentManagerFilenamePropertyInfo = T.Text
type AttrGetType RecentManagerFilenamePropertyInfo = (Maybe T.Text)
type AttrLabel RecentManagerFilenamePropertyInfo = "filename"
type AttrOrigin RecentManagerFilenamePropertyInfo = RecentManager
attrGet = getRecentManagerFilename
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructRecentManagerFilename
attrClear = undefined
#endif
getRecentManagerSize :: (MonadIO m, IsRecentManager o) => o -> m Int32
getRecentManagerSize :: forall (m :: * -> *) o.
(MonadIO m, IsRecentManager o) =>
o -> m Int32
getRecentManagerSize o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"size"
#if defined(ENABLE_OVERLOADING)
data RecentManagerSizePropertyInfo
instance AttrInfo RecentManagerSizePropertyInfo where
type AttrAllowedOps RecentManagerSizePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint RecentManagerSizePropertyInfo = IsRecentManager
type AttrSetTypeConstraint RecentManagerSizePropertyInfo = (~) ()
type AttrTransferTypeConstraint RecentManagerSizePropertyInfo = (~) ()
type AttrTransferType RecentManagerSizePropertyInfo = ()
type AttrGetType RecentManagerSizePropertyInfo = Int32
type AttrLabel RecentManagerSizePropertyInfo = "size"
type AttrOrigin RecentManagerSizePropertyInfo = RecentManager
attrGet = getRecentManagerSize
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RecentManager
type instance O.AttributeList RecentManager = RecentManagerAttributeList
type RecentManagerAttributeList = ('[ '("filename", RecentManagerFilenamePropertyInfo), '("size", RecentManagerSizePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
recentManagerFilename :: AttrLabelProxy "filename"
recentManagerFilename = AttrLabelProxy
recentManagerSize :: AttrLabelProxy "size"
recentManagerSize = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList RecentManager = RecentManagerSignalList
type RecentManagerSignalList = ('[ '("changed", RecentManagerChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_recent_manager_new" gtk_recent_manager_new ::
IO (Ptr RecentManager)
recentManagerNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m RecentManager
recentManagerNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m RecentManager
recentManagerNew = IO RecentManager -> m RecentManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RecentManager -> m RecentManager)
-> IO RecentManager -> m RecentManager
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
result <- IO (Ptr RecentManager)
gtk_recent_manager_new
Text -> Ptr RecentManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"recentManagerNew" Ptr RecentManager
result
RecentManager
result' <- ((ManagedPtr RecentManager -> RecentManager)
-> Ptr RecentManager -> IO RecentManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr RecentManager -> RecentManager
RecentManager) Ptr RecentManager
result
RecentManager -> IO RecentManager
forall (m :: * -> *) a. Monad m => a -> m a
return RecentManager
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_recent_manager_add_full" gtk_recent_manager_add_full ::
Ptr RecentManager ->
CString ->
Ptr Gtk.RecentData.RecentData ->
IO CInt
recentManagerAddFull ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> T.Text
-> Gtk.RecentData.RecentData
-> m Bool
recentManagerAddFull :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> Text -> RecentData -> m Bool
recentManagerAddFull a
manager Text
uri RecentData
recentData = 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 RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr RecentData
recentData' <- RecentData -> IO (Ptr RecentData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RecentData
recentData
CInt
result <- Ptr RecentManager -> CString -> Ptr RecentData -> IO CInt
gtk_recent_manager_add_full Ptr RecentManager
manager' CString
uri' Ptr RecentData
recentData'
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
manager
RecentData -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RecentData
recentData
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RecentManagerAddFullMethodInfo
instance (signature ~ (T.Text -> Gtk.RecentData.RecentData -> m Bool), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerAddFullMethodInfo a signature where
overloadedMethod = recentManagerAddFull
instance O.OverloadedMethodInfo RecentManagerAddFullMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerAddFull",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerAddFull"
}
#endif
foreign import ccall "gtk_recent_manager_add_item" gtk_recent_manager_add_item ::
Ptr RecentManager ->
CString ->
IO CInt
recentManagerAddItem ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> T.Text
-> m Bool
recentManagerAddItem :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> Text -> m Bool
recentManagerAddItem a
manager Text
uri = 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 RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
uri' <- Text -> IO CString
textToCString Text
uri
CInt
result <- Ptr RecentManager -> CString -> IO CInt
gtk_recent_manager_add_item Ptr RecentManager
manager' CString
uri'
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
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RecentManagerAddItemMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerAddItemMethodInfo a signature where
overloadedMethod = recentManagerAddItem
instance O.OverloadedMethodInfo RecentManagerAddItemMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerAddItem",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerAddItem"
}
#endif
foreign import ccall "gtk_recent_manager_get_items" gtk_recent_manager_get_items ::
Ptr RecentManager ->
IO (Ptr (GList (Ptr Gtk.RecentInfo.RecentInfo)))
recentManagerGetItems ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> m [Gtk.RecentInfo.RecentInfo]
recentManagerGetItems :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> m [RecentInfo]
recentManagerGetItems a
manager = IO [RecentInfo] -> m [RecentInfo]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [RecentInfo] -> m [RecentInfo])
-> IO [RecentInfo] -> m [RecentInfo]
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr (GList (Ptr RecentInfo))
result <- Ptr RecentManager -> IO (Ptr (GList (Ptr RecentInfo)))
gtk_recent_manager_get_items Ptr RecentManager
manager'
[Ptr RecentInfo]
result' <- Ptr (GList (Ptr RecentInfo)) -> IO [Ptr RecentInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr RecentInfo))
result
[RecentInfo]
result'' <- (Ptr RecentInfo -> IO RecentInfo)
-> [Ptr RecentInfo] -> IO [RecentInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr RecentInfo -> RecentInfo)
-> Ptr RecentInfo -> IO RecentInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RecentInfo -> RecentInfo
Gtk.RecentInfo.RecentInfo) [Ptr RecentInfo]
result'
Ptr (GList (Ptr RecentInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr RecentInfo))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
[RecentInfo] -> IO [RecentInfo]
forall (m :: * -> *) a. Monad m => a -> m a
return [RecentInfo]
result''
#if defined(ENABLE_OVERLOADING)
data RecentManagerGetItemsMethodInfo
instance (signature ~ (m [Gtk.RecentInfo.RecentInfo]), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerGetItemsMethodInfo a signature where
overloadedMethod = recentManagerGetItems
instance O.OverloadedMethodInfo RecentManagerGetItemsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerGetItems",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerGetItems"
}
#endif
foreign import ccall "gtk_recent_manager_has_item" gtk_recent_manager_has_item ::
Ptr RecentManager ->
CString ->
IO CInt
recentManagerHasItem ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> T.Text
-> m Bool
recentManagerHasItem :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> Text -> m Bool
recentManagerHasItem a
manager Text
uri = 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 RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
uri' <- Text -> IO CString
textToCString Text
uri
CInt
result <- Ptr RecentManager -> CString -> IO CInt
gtk_recent_manager_has_item Ptr RecentManager
manager' CString
uri'
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
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RecentManagerHasItemMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerHasItemMethodInfo a signature where
overloadedMethod = recentManagerHasItem
instance O.OverloadedMethodInfo RecentManagerHasItemMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerHasItem",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerHasItem"
}
#endif
foreign import ccall "gtk_recent_manager_lookup_item" gtk_recent_manager_lookup_item ::
Ptr RecentManager ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Gtk.RecentInfo.RecentInfo)
recentManagerLookupItem ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> T.Text
-> m (Maybe Gtk.RecentInfo.RecentInfo)
recentManagerLookupItem :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> Text -> m (Maybe RecentInfo)
recentManagerLookupItem a
manager Text
uri = IO (Maybe RecentInfo) -> m (Maybe RecentInfo)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe RecentInfo) -> m (Maybe RecentInfo))
-> IO (Maybe RecentInfo) -> m (Maybe RecentInfo)
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO (Maybe RecentInfo) -> IO () -> IO (Maybe RecentInfo)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr RecentInfo
result <- (Ptr (Ptr GError) -> IO (Ptr RecentInfo)) -> IO (Ptr RecentInfo)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr RecentInfo)) -> IO (Ptr RecentInfo))
-> (Ptr (Ptr GError) -> IO (Ptr RecentInfo)) -> IO (Ptr RecentInfo)
forall a b. (a -> b) -> a -> b
$ Ptr RecentManager
-> CString -> Ptr (Ptr GError) -> IO (Ptr RecentInfo)
gtk_recent_manager_lookup_item Ptr RecentManager
manager' CString
uri'
Maybe RecentInfo
maybeResult <- Ptr RecentInfo
-> (Ptr RecentInfo -> IO RecentInfo) -> IO (Maybe RecentInfo)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr RecentInfo
result ((Ptr RecentInfo -> IO RecentInfo) -> IO (Maybe RecentInfo))
-> (Ptr RecentInfo -> IO RecentInfo) -> IO (Maybe RecentInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr RecentInfo
result' -> do
RecentInfo
result'' <- ((ManagedPtr RecentInfo -> RecentInfo)
-> Ptr RecentInfo -> IO RecentInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RecentInfo -> RecentInfo
Gtk.RecentInfo.RecentInfo) Ptr RecentInfo
result'
RecentInfo -> IO RecentInfo
forall (m :: * -> *) a. Monad m => a -> m a
return RecentInfo
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Maybe RecentInfo -> IO (Maybe RecentInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe RecentInfo
maybeResult
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data RecentManagerLookupItemMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.RecentInfo.RecentInfo)), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerLookupItemMethodInfo a signature where
overloadedMethod = recentManagerLookupItem
instance O.OverloadedMethodInfo RecentManagerLookupItemMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerLookupItem",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerLookupItem"
}
#endif
foreign import ccall "gtk_recent_manager_move_item" gtk_recent_manager_move_item ::
Ptr RecentManager ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
recentManagerMoveItem ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> T.Text
-> Maybe (T.Text)
-> m ()
recentManagerMoveItem :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> Text -> Maybe Text -> m ()
recentManagerMoveItem a
manager Text
uri Maybe Text
newUri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
maybeNewUri <- case Maybe Text
newUri of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNewUri -> do
CString
jNewUri' <- Text -> IO CString
textToCString Text
jNewUri
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNewUri'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr RecentManager
-> CString -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_recent_manager_move_item Ptr RecentManager
manager' CString
uri' CString
maybeNewUri
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNewUri
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNewUri
)
#if defined(ENABLE_OVERLOADING)
data RecentManagerMoveItemMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerMoveItemMethodInfo a signature where
overloadedMethod = recentManagerMoveItem
instance O.OverloadedMethodInfo RecentManagerMoveItemMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerMoveItem",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerMoveItem"
}
#endif
foreign import ccall "gtk_recent_manager_purge_items" gtk_recent_manager_purge_items ::
Ptr RecentManager ->
Ptr (Ptr GError) ->
IO Int32
recentManagerPurgeItems ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> m Int32
recentManagerPurgeItems :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> m Int32
recentManagerPurgeItems a
manager = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
IO Int32 -> IO () -> IO Int32
forall a b. IO a -> IO b -> IO a
onException (do
Int32
result <- (Ptr (Ptr GError) -> IO Int32) -> IO Int32
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Int32) -> IO Int32)
-> (Ptr (Ptr GError) -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ Ptr RecentManager -> Ptr (Ptr GError) -> IO Int32
gtk_recent_manager_purge_items Ptr RecentManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RecentManagerPurgeItemsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerPurgeItemsMethodInfo a signature where
overloadedMethod = recentManagerPurgeItems
instance O.OverloadedMethodInfo RecentManagerPurgeItemsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerPurgeItems",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerPurgeItems"
}
#endif
foreign import ccall "gtk_recent_manager_remove_item" gtk_recent_manager_remove_item ::
Ptr RecentManager ->
CString ->
Ptr (Ptr GError) ->
IO CInt
recentManagerRemoveItem ::
(B.CallStack.HasCallStack, MonadIO m, IsRecentManager a) =>
a
-> T.Text
-> m ()
recentManagerRemoveItem :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRecentManager a) =>
a -> Text -> m ()
recentManagerRemoveItem a
manager Text
uri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
manager' <- a -> IO (Ptr RecentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr RecentManager -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_recent_manager_remove_item Ptr RecentManager
manager' CString
uri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data RecentManagerRemoveItemMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRecentManager a) => O.OverloadedMethod RecentManagerRemoveItemMethodInfo a signature where
overloadedMethod = recentManagerRemoveItem
instance O.OverloadedMethodInfo RecentManagerRemoveItemMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.RecentManager.recentManagerRemoveItem",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-RecentManager.html#v:recentManagerRemoveItem"
}
#endif
foreign import ccall "gtk_recent_manager_get_default" gtk_recent_manager_get_default ::
IO (Ptr RecentManager)
recentManagerGetDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m RecentManager
recentManagerGetDefault :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m RecentManager
recentManagerGetDefault = IO RecentManager -> m RecentManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RecentManager -> m RecentManager)
-> IO RecentManager -> m RecentManager
forall a b. (a -> b) -> a -> b
$ do
Ptr RecentManager
result <- IO (Ptr RecentManager)
gtk_recent_manager_get_default
Text -> Ptr RecentManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"recentManagerGetDefault" Ptr RecentManager
result
RecentManager
result' <- ((ManagedPtr RecentManager -> RecentManager)
-> Ptr RecentManager -> IO RecentManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr RecentManager -> RecentManager
RecentManager) Ptr RecentManager
result
RecentManager -> IO RecentManager
forall (m :: * -> *) a. Monad m => a -> m a
return RecentManager
result'
#if defined(ENABLE_OVERLOADING)
#endif