{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GtkSource.Interfaces.UndoManager
(
UndoManager(..) ,
IsUndoManager ,
toUndoManager ,
#if defined(ENABLE_OVERLOADING)
ResolveUndoManagerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
UndoManagerBeginNotUndoableActionMethodInfo,
#endif
undoManagerBeginNotUndoableAction ,
#if defined(ENABLE_OVERLOADING)
UndoManagerCanRedoMethodInfo ,
#endif
undoManagerCanRedo ,
#if defined(ENABLE_OVERLOADING)
UndoManagerCanRedoChangedMethodInfo ,
#endif
undoManagerCanRedoChanged ,
#if defined(ENABLE_OVERLOADING)
UndoManagerCanUndoMethodInfo ,
#endif
undoManagerCanUndo ,
#if defined(ENABLE_OVERLOADING)
UndoManagerCanUndoChangedMethodInfo ,
#endif
undoManagerCanUndoChanged ,
#if defined(ENABLE_OVERLOADING)
UndoManagerEndNotUndoableActionMethodInfo,
#endif
undoManagerEndNotUndoableAction ,
#if defined(ENABLE_OVERLOADING)
UndoManagerRedoMethodInfo ,
#endif
undoManagerRedo ,
#if defined(ENABLE_OVERLOADING)
UndoManagerUndoMethodInfo ,
#endif
undoManagerUndo ,
UndoManagerCanRedoChangedCallback ,
#if defined(ENABLE_OVERLOADING)
UndoManagerCanRedoChangedSignalInfo ,
#endif
afterUndoManagerCanRedoChanged ,
onUndoManagerCanRedoChanged ,
UndoManagerCanUndoChangedCallback ,
#if defined(ENABLE_OVERLOADING)
UndoManagerCanUndoChangedSignalInfo ,
#endif
afterUndoManagerCanUndoChanged ,
onUndoManagerCanUndoChanged ,
) 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.Coerce as Coerce
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
newtype UndoManager = UndoManager (SP.ManagedPtr UndoManager)
deriving (UndoManager -> UndoManager -> Bool
(UndoManager -> UndoManager -> Bool)
-> (UndoManager -> UndoManager -> Bool) -> Eq UndoManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UndoManager -> UndoManager -> Bool
$c/= :: UndoManager -> UndoManager -> Bool
== :: UndoManager -> UndoManager -> Bool
$c== :: UndoManager -> UndoManager -> Bool
Eq)
instance SP.ManagedPtrNewtype UndoManager where
toManagedPtr :: UndoManager -> ManagedPtr UndoManager
toManagedPtr (UndoManager ManagedPtr UndoManager
p) = ManagedPtr UndoManager
p
foreign import ccall "gtk_source_undo_manager_get_type"
c_gtk_source_undo_manager_get_type :: IO B.Types.GType
instance B.Types.TypedObject UndoManager where
glibType :: IO GType
glibType = IO GType
c_gtk_source_undo_manager_get_type
instance B.Types.GObject UndoManager
class (SP.GObject o, O.IsDescendantOf UndoManager o) => IsUndoManager o
instance (SP.GObject o, O.IsDescendantOf UndoManager o) => IsUndoManager o
instance O.HasParentTypes UndoManager
type instance O.ParentTypes UndoManager = '[GObject.Object.Object]
toUndoManager :: (MIO.MonadIO m, IsUndoManager o) => o -> m UndoManager
toUndoManager :: forall (m :: * -> *) o.
(MonadIO m, IsUndoManager o) =>
o -> m UndoManager
toUndoManager = IO UndoManager -> m UndoManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO UndoManager -> m UndoManager)
-> (o -> IO UndoManager) -> o -> m UndoManager
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr UndoManager -> UndoManager) -> o -> IO UndoManager
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr UndoManager -> UndoManager
UndoManager
instance B.GValue.IsGValue (Maybe UndoManager) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_source_undo_manager_get_type
gvalueSet_ :: Ptr GValue -> Maybe UndoManager -> IO ()
gvalueSet_ Ptr GValue
gv Maybe UndoManager
P.Nothing = Ptr GValue -> Ptr UndoManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr UndoManager
forall a. Ptr a
FP.nullPtr :: FP.Ptr UndoManager)
gvalueSet_ Ptr GValue
gv (P.Just UndoManager
obj) = UndoManager -> (Ptr UndoManager -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr UndoManager
obj (Ptr GValue -> Ptr UndoManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe UndoManager)
gvalueGet_ Ptr GValue
gv = do
Ptr UndoManager
ptr <- Ptr GValue -> IO (Ptr UndoManager)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr UndoManager)
if Ptr UndoManager
ptr Ptr UndoManager -> Ptr UndoManager -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr UndoManager
forall a. Ptr a
FP.nullPtr
then UndoManager -> Maybe UndoManager
forall a. a -> Maybe a
P.Just (UndoManager -> Maybe UndoManager)
-> IO UndoManager -> IO (Maybe UndoManager)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr UndoManager -> UndoManager)
-> Ptr UndoManager -> IO UndoManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr UndoManager -> UndoManager
UndoManager Ptr UndoManager
ptr
else Maybe UndoManager -> IO (Maybe UndoManager)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe UndoManager
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList UndoManager
type instance O.AttributeList UndoManager = UndoManagerAttributeList
type UndoManagerAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveUndoManagerMethod (t :: Symbol) (o :: *) :: * where
ResolveUndoManagerMethod "beginNotUndoableAction" o = UndoManagerBeginNotUndoableActionMethodInfo
ResolveUndoManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveUndoManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveUndoManagerMethod "canRedo" o = UndoManagerCanRedoMethodInfo
ResolveUndoManagerMethod "canRedoChanged" o = UndoManagerCanRedoChangedMethodInfo
ResolveUndoManagerMethod "canUndo" o = UndoManagerCanUndoMethodInfo
ResolveUndoManagerMethod "canUndoChanged" o = UndoManagerCanUndoChangedMethodInfo
ResolveUndoManagerMethod "endNotUndoableAction" o = UndoManagerEndNotUndoableActionMethodInfo
ResolveUndoManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveUndoManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveUndoManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveUndoManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveUndoManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveUndoManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveUndoManagerMethod "redo" o = UndoManagerRedoMethodInfo
ResolveUndoManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveUndoManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveUndoManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveUndoManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveUndoManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveUndoManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveUndoManagerMethod "undo" o = UndoManagerUndoMethodInfo
ResolveUndoManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveUndoManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveUndoManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveUndoManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveUndoManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveUndoManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveUndoManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveUndoManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveUndoManagerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveUndoManagerMethod t UndoManager, O.OverloadedMethod info UndoManager p) => OL.IsLabel t (UndoManager -> 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 ~ ResolveUndoManagerMethod t UndoManager, O.OverloadedMethod info UndoManager p, R.HasField t UndoManager p) => R.HasField t UndoManager p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveUndoManagerMethod t UndoManager, O.OverloadedMethodInfo info UndoManager) => OL.IsLabel t (O.MethodProxy info UndoManager) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "gtk_source_undo_manager_begin_not_undoable_action" gtk_source_undo_manager_begin_not_undoable_action ::
Ptr UndoManager ->
IO ()
undoManagerBeginNotUndoableAction ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m ()
undoManagerBeginNotUndoableAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m ()
undoManagerBeginNotUndoableAction a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UndoManager -> IO ()
gtk_source_undo_manager_begin_not_undoable_action Ptr UndoManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UndoManagerBeginNotUndoableActionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerBeginNotUndoableActionMethodInfo a signature where
overloadedMethod = undoManagerBeginNotUndoableAction
instance O.OverloadedMethodInfo UndoManagerBeginNotUndoableActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerBeginNotUndoableAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerBeginNotUndoableAction"
})
#endif
foreign import ccall "gtk_source_undo_manager_can_redo" gtk_source_undo_manager_can_redo ::
Ptr UndoManager ->
IO CInt
undoManagerCanRedo ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m Bool
undoManagerCanRedo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m Bool
undoManagerCanRedo a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CInt
result <- Ptr UndoManager -> IO CInt
gtk_source_undo_manager_can_redo Ptr UndoManager
manager'
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
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UndoManagerCanRedoMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerCanRedoMethodInfo a signature where
overloadedMethod = undoManagerCanRedo
instance O.OverloadedMethodInfo UndoManagerCanRedoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerCanRedo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerCanRedo"
})
#endif
foreign import ccall "gtk_source_undo_manager_can_redo_changed" gtk_source_undo_manager_can_redo_changed ::
Ptr UndoManager ->
IO ()
undoManagerCanRedoChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m ()
undoManagerCanRedoChanged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m ()
undoManagerCanRedoChanged a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UndoManager -> IO ()
gtk_source_undo_manager_can_redo_changed Ptr UndoManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UndoManagerCanRedoChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerCanRedoChangedMethodInfo a signature where
overloadedMethod = undoManagerCanRedoChanged
instance O.OverloadedMethodInfo UndoManagerCanRedoChangedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerCanRedoChanged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerCanRedoChanged"
})
#endif
foreign import ccall "gtk_source_undo_manager_can_undo" gtk_source_undo_manager_can_undo ::
Ptr UndoManager ->
IO CInt
undoManagerCanUndo ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m Bool
undoManagerCanUndo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m Bool
undoManagerCanUndo a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CInt
result <- Ptr UndoManager -> IO CInt
gtk_source_undo_manager_can_undo Ptr UndoManager
manager'
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
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UndoManagerCanUndoMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerCanUndoMethodInfo a signature where
overloadedMethod = undoManagerCanUndo
instance O.OverloadedMethodInfo UndoManagerCanUndoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerCanUndo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerCanUndo"
})
#endif
foreign import ccall "gtk_source_undo_manager_can_undo_changed" gtk_source_undo_manager_can_undo_changed ::
Ptr UndoManager ->
IO ()
undoManagerCanUndoChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m ()
undoManagerCanUndoChanged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m ()
undoManagerCanUndoChanged a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UndoManager -> IO ()
gtk_source_undo_manager_can_undo_changed Ptr UndoManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UndoManagerCanUndoChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerCanUndoChangedMethodInfo a signature where
overloadedMethod = undoManagerCanUndoChanged
instance O.OverloadedMethodInfo UndoManagerCanUndoChangedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerCanUndoChanged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerCanUndoChanged"
})
#endif
foreign import ccall "gtk_source_undo_manager_end_not_undoable_action" gtk_source_undo_manager_end_not_undoable_action ::
Ptr UndoManager ->
IO ()
undoManagerEndNotUndoableAction ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m ()
undoManagerEndNotUndoableAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m ()
undoManagerEndNotUndoableAction a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UndoManager -> IO ()
gtk_source_undo_manager_end_not_undoable_action Ptr UndoManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UndoManagerEndNotUndoableActionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerEndNotUndoableActionMethodInfo a signature where
overloadedMethod = undoManagerEndNotUndoableAction
instance O.OverloadedMethodInfo UndoManagerEndNotUndoableActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerEndNotUndoableAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerEndNotUndoableAction"
})
#endif
foreign import ccall "gtk_source_undo_manager_redo" gtk_source_undo_manager_redo ::
Ptr UndoManager ->
IO ()
undoManagerRedo ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m ()
undoManagerRedo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m ()
undoManagerRedo a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UndoManager -> IO ()
gtk_source_undo_manager_redo Ptr UndoManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UndoManagerRedoMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerRedoMethodInfo a signature where
overloadedMethod = undoManagerRedo
instance O.OverloadedMethodInfo UndoManagerRedoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerRedo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerRedo"
})
#endif
foreign import ccall "gtk_source_undo_manager_undo" gtk_source_undo_manager_undo ::
Ptr UndoManager ->
IO ()
undoManagerUndo ::
(B.CallStack.HasCallStack, MonadIO m, IsUndoManager a) =>
a
-> m ()
undoManagerUndo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUndoManager a) =>
a -> m ()
undoManagerUndo a
manager = 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 UndoManager
manager' <- a -> IO (Ptr UndoManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UndoManager -> IO ()
gtk_source_undo_manager_undo Ptr UndoManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UndoManagerUndoMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUndoManager a) => O.OverloadedMethod UndoManagerUndoMethodInfo a signature where
overloadedMethod = undoManagerUndo
instance O.OverloadedMethodInfo UndoManagerUndoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager.undoManagerUndo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#v:undoManagerUndo"
})
#endif
type UndoManagerCanRedoChangedCallback =
IO ()
type C_UndoManagerCanRedoChangedCallback =
Ptr UndoManager ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UndoManagerCanRedoChangedCallback :: C_UndoManagerCanRedoChangedCallback -> IO (FunPtr C_UndoManagerCanRedoChangedCallback)
wrap_UndoManagerCanRedoChangedCallback ::
GObject a => (a -> UndoManagerCanRedoChangedCallback) ->
C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanRedoChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanRedoChangedCallback a -> IO ()
gi'cb Ptr UndoManager
gi'selfPtr Ptr ()
_ = do
Ptr UndoManager -> (UndoManager -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr UndoManager
gi'selfPtr ((UndoManager -> IO ()) -> IO ())
-> (UndoManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \UndoManager
gi'self -> a -> IO ()
gi'cb (UndoManager -> a
Coerce.coerce UndoManager
gi'self)
onUndoManagerCanRedoChanged :: (IsUndoManager a, MonadIO m) => a -> ((?self :: a) => UndoManagerCanRedoChangedCallback) -> m SignalHandlerId
onUndoManagerCanRedoChanged :: forall a (m :: * -> *).
(IsUndoManager a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onUndoManagerCanRedoChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_UndoManagerCanRedoChangedCallback
wrapped' = (a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanRedoChangedCallback a -> IO ()
wrapped
FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' <- C_UndoManagerCanRedoChangedCallback
-> IO (FunPtr C_UndoManagerCanRedoChangedCallback)
mk_UndoManagerCanRedoChangedCallback C_UndoManagerCanRedoChangedCallback
wrapped'
a
-> Text
-> FunPtr C_UndoManagerCanRedoChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"can-redo-changed" FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUndoManagerCanRedoChanged :: (IsUndoManager a, MonadIO m) => a -> ((?self :: a) => UndoManagerCanRedoChangedCallback) -> m SignalHandlerId
afterUndoManagerCanRedoChanged :: forall a (m :: * -> *).
(IsUndoManager a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterUndoManagerCanRedoChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_UndoManagerCanRedoChangedCallback
wrapped' = (a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanRedoChangedCallback a -> IO ()
wrapped
FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' <- C_UndoManagerCanRedoChangedCallback
-> IO (FunPtr C_UndoManagerCanRedoChangedCallback)
mk_UndoManagerCanRedoChangedCallback C_UndoManagerCanRedoChangedCallback
wrapped'
a
-> Text
-> FunPtr C_UndoManagerCanRedoChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"can-redo-changed" FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UndoManagerCanRedoChangedSignalInfo
instance SignalInfo UndoManagerCanRedoChangedSignalInfo where
type HaskellCallbackType UndoManagerCanRedoChangedSignalInfo = UndoManagerCanRedoChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UndoManagerCanRedoChangedCallback cb
cb'' <- mk_UndoManagerCanRedoChangedCallback cb'
connectSignalFunPtr obj "can-redo-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager::can-redo-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#g:signal:canRedoChanged"})
#endif
type UndoManagerCanUndoChangedCallback =
IO ()
type C_UndoManagerCanUndoChangedCallback =
Ptr UndoManager ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UndoManagerCanUndoChangedCallback :: C_UndoManagerCanUndoChangedCallback -> IO (FunPtr C_UndoManagerCanUndoChangedCallback)
wrap_UndoManagerCanUndoChangedCallback ::
GObject a => (a -> UndoManagerCanUndoChangedCallback) ->
C_UndoManagerCanUndoChangedCallback
wrap_UndoManagerCanUndoChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanUndoChangedCallback a -> IO ()
gi'cb Ptr UndoManager
gi'selfPtr Ptr ()
_ = do
Ptr UndoManager -> (UndoManager -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr UndoManager
gi'selfPtr ((UndoManager -> IO ()) -> IO ())
-> (UndoManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \UndoManager
gi'self -> a -> IO ()
gi'cb (UndoManager -> a
Coerce.coerce UndoManager
gi'self)
onUndoManagerCanUndoChanged :: (IsUndoManager a, MonadIO m) => a -> ((?self :: a) => UndoManagerCanUndoChangedCallback) -> m SignalHandlerId
onUndoManagerCanUndoChanged :: forall a (m :: * -> *).
(IsUndoManager a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onUndoManagerCanUndoChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_UndoManagerCanRedoChangedCallback
wrapped' = (a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanUndoChangedCallback a -> IO ()
wrapped
FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' <- C_UndoManagerCanRedoChangedCallback
-> IO (FunPtr C_UndoManagerCanRedoChangedCallback)
mk_UndoManagerCanUndoChangedCallback C_UndoManagerCanRedoChangedCallback
wrapped'
a
-> Text
-> FunPtr C_UndoManagerCanRedoChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"can-undo-changed" FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUndoManagerCanUndoChanged :: (IsUndoManager a, MonadIO m) => a -> ((?self :: a) => UndoManagerCanUndoChangedCallback) -> m SignalHandlerId
afterUndoManagerCanUndoChanged :: forall a (m :: * -> *).
(IsUndoManager a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterUndoManagerCanUndoChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_UndoManagerCanRedoChangedCallback
wrapped' = (a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_UndoManagerCanRedoChangedCallback
wrap_UndoManagerCanUndoChangedCallback a -> IO ()
wrapped
FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' <- C_UndoManagerCanRedoChangedCallback
-> IO (FunPtr C_UndoManagerCanRedoChangedCallback)
mk_UndoManagerCanUndoChangedCallback C_UndoManagerCanRedoChangedCallback
wrapped'
a
-> Text
-> FunPtr C_UndoManagerCanRedoChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"can-undo-changed" FunPtr C_UndoManagerCanRedoChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UndoManagerCanUndoChangedSignalInfo
instance SignalInfo UndoManagerCanUndoChangedSignalInfo where
type HaskellCallbackType UndoManagerCanUndoChangedSignalInfo = UndoManagerCanUndoChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UndoManagerCanUndoChangedCallback cb
cb'' <- mk_UndoManagerCanUndoChangedCallback cb'
connectSignalFunPtr obj "can-undo-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GtkSource.Interfaces.UndoManager::can-undo-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-3.0.25/docs/GI-GtkSource-Interfaces-UndoManager.html#g:signal:canUndoChanged"})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList UndoManager = UndoManagerSignalList
type UndoManagerSignalList = ('[ '("canRedoChanged", UndoManagerCanRedoChangedSignalInfo), '("canUndoChanged", UndoManagerCanUndoChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif