{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.TextBuffer
(
TextBuffer(..) ,
IsTextBuffer ,
toTextBuffer ,
#if defined(ENABLE_OVERLOADING)
ResolveTextBufferMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferAddCommitNotifyMethodInfo ,
#endif
textBufferAddCommitNotify ,
#if defined(ENABLE_OVERLOADING)
TextBufferAddMarkMethodInfo ,
#endif
textBufferAddMark ,
#if defined(ENABLE_OVERLOADING)
TextBufferAddSelectionClipboardMethodInfo,
#endif
textBufferAddSelectionClipboard ,
#if defined(ENABLE_OVERLOADING)
TextBufferApplyTagMethodInfo ,
#endif
textBufferApplyTag ,
#if defined(ENABLE_OVERLOADING)
TextBufferApplyTagByNameMethodInfo ,
#endif
textBufferApplyTagByName ,
#if defined(ENABLE_OVERLOADING)
TextBufferBackspaceMethodInfo ,
#endif
textBufferBackspace ,
#if defined(ENABLE_OVERLOADING)
TextBufferBeginIrreversibleActionMethodInfo,
#endif
textBufferBeginIrreversibleAction ,
#if defined(ENABLE_OVERLOADING)
TextBufferBeginUserActionMethodInfo ,
#endif
textBufferBeginUserAction ,
#if defined(ENABLE_OVERLOADING)
TextBufferCopyClipboardMethodInfo ,
#endif
textBufferCopyClipboard ,
#if defined(ENABLE_OVERLOADING)
TextBufferCreateChildAnchorMethodInfo ,
#endif
textBufferCreateChildAnchor ,
#if defined(ENABLE_OVERLOADING)
TextBufferCreateMarkMethodInfo ,
#endif
textBufferCreateMark ,
#if defined(ENABLE_OVERLOADING)
TextBufferCutClipboardMethodInfo ,
#endif
textBufferCutClipboard ,
#if defined(ENABLE_OVERLOADING)
TextBufferDeleteMethodInfo ,
#endif
textBufferDelete ,
#if defined(ENABLE_OVERLOADING)
TextBufferDeleteInteractiveMethodInfo ,
#endif
textBufferDeleteInteractive ,
#if defined(ENABLE_OVERLOADING)
TextBufferDeleteMarkMethodInfo ,
#endif
textBufferDeleteMark ,
#if defined(ENABLE_OVERLOADING)
TextBufferDeleteMarkByNameMethodInfo ,
#endif
textBufferDeleteMarkByName ,
#if defined(ENABLE_OVERLOADING)
TextBufferDeleteSelectionMethodInfo ,
#endif
textBufferDeleteSelection ,
#if defined(ENABLE_OVERLOADING)
TextBufferEndIrreversibleActionMethodInfo,
#endif
textBufferEndIrreversibleAction ,
#if defined(ENABLE_OVERLOADING)
TextBufferEndUserActionMethodInfo ,
#endif
textBufferEndUserAction ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetBoundsMethodInfo ,
#endif
textBufferGetBounds ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetCanRedoMethodInfo ,
#endif
textBufferGetCanRedo ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetCanUndoMethodInfo ,
#endif
textBufferGetCanUndo ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetCharCountMethodInfo ,
#endif
textBufferGetCharCount ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetEnableUndoMethodInfo ,
#endif
textBufferGetEnableUndo ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetEndIterMethodInfo ,
#endif
textBufferGetEndIter ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetHasSelectionMethodInfo ,
#endif
textBufferGetHasSelection ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetInsertMethodInfo ,
#endif
textBufferGetInsert ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetIterAtChildAnchorMethodInfo,
#endif
textBufferGetIterAtChildAnchor ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetIterAtLineMethodInfo ,
#endif
textBufferGetIterAtLine ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetIterAtLineIndexMethodInfo ,
#endif
textBufferGetIterAtLineIndex ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetIterAtLineOffsetMethodInfo ,
#endif
textBufferGetIterAtLineOffset ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetIterAtMarkMethodInfo ,
#endif
textBufferGetIterAtMark ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetIterAtOffsetMethodInfo ,
#endif
textBufferGetIterAtOffset ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetLineCountMethodInfo ,
#endif
textBufferGetLineCount ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetMarkMethodInfo ,
#endif
textBufferGetMark ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetMaxUndoLevelsMethodInfo ,
#endif
textBufferGetMaxUndoLevels ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetModifiedMethodInfo ,
#endif
textBufferGetModified ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetSelectionBoundMethodInfo ,
#endif
textBufferGetSelectionBound ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetSelectionBoundsMethodInfo ,
#endif
textBufferGetSelectionBounds ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetSelectionContentMethodInfo ,
#endif
textBufferGetSelectionContent ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetSliceMethodInfo ,
#endif
textBufferGetSlice ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetStartIterMethodInfo ,
#endif
textBufferGetStartIter ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetTagTableMethodInfo ,
#endif
textBufferGetTagTable ,
#if defined(ENABLE_OVERLOADING)
TextBufferGetTextMethodInfo ,
#endif
textBufferGetText ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertMethodInfo ,
#endif
textBufferInsert ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertAtCursorMethodInfo ,
#endif
textBufferInsertAtCursor ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertChildAnchorMethodInfo ,
#endif
textBufferInsertChildAnchor ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertInteractiveMethodInfo ,
#endif
textBufferInsertInteractive ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertInteractiveAtCursorMethodInfo,
#endif
textBufferInsertInteractiveAtCursor ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertMarkupMethodInfo ,
#endif
textBufferInsertMarkup ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertPaintableMethodInfo ,
#endif
textBufferInsertPaintable ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertRangeMethodInfo ,
#endif
textBufferInsertRange ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertRangeInteractiveMethodInfo,
#endif
textBufferInsertRangeInteractive ,
#if defined(ENABLE_OVERLOADING)
TextBufferMoveMarkMethodInfo ,
#endif
textBufferMoveMark ,
#if defined(ENABLE_OVERLOADING)
TextBufferMoveMarkByNameMethodInfo ,
#endif
textBufferMoveMarkByName ,
textBufferNew ,
#if defined(ENABLE_OVERLOADING)
TextBufferPasteClipboardMethodInfo ,
#endif
textBufferPasteClipboard ,
#if defined(ENABLE_OVERLOADING)
TextBufferPlaceCursorMethodInfo ,
#endif
textBufferPlaceCursor ,
#if defined(ENABLE_OVERLOADING)
TextBufferRedoMethodInfo ,
#endif
textBufferRedo ,
#if defined(ENABLE_OVERLOADING)
TextBufferRemoveAllTagsMethodInfo ,
#endif
textBufferRemoveAllTags ,
#if defined(ENABLE_OVERLOADING)
TextBufferRemoveCommitNotifyMethodInfo ,
#endif
textBufferRemoveCommitNotify ,
#if defined(ENABLE_OVERLOADING)
TextBufferRemoveSelectionClipboardMethodInfo,
#endif
textBufferRemoveSelectionClipboard ,
#if defined(ENABLE_OVERLOADING)
TextBufferRemoveTagMethodInfo ,
#endif
textBufferRemoveTag ,
#if defined(ENABLE_OVERLOADING)
TextBufferRemoveTagByNameMethodInfo ,
#endif
textBufferRemoveTagByName ,
#if defined(ENABLE_OVERLOADING)
TextBufferSelectRangeMethodInfo ,
#endif
textBufferSelectRange ,
#if defined(ENABLE_OVERLOADING)
TextBufferSetEnableUndoMethodInfo ,
#endif
textBufferSetEnableUndo ,
#if defined(ENABLE_OVERLOADING)
TextBufferSetMaxUndoLevelsMethodInfo ,
#endif
textBufferSetMaxUndoLevels ,
#if defined(ENABLE_OVERLOADING)
TextBufferSetModifiedMethodInfo ,
#endif
textBufferSetModified ,
#if defined(ENABLE_OVERLOADING)
TextBufferSetTextMethodInfo ,
#endif
textBufferSetText ,
#if defined(ENABLE_OVERLOADING)
TextBufferUndoMethodInfo ,
#endif
textBufferUndo ,
#if defined(ENABLE_OVERLOADING)
TextBufferCanRedoPropertyInfo ,
#endif
getTextBufferCanRedo ,
#if defined(ENABLE_OVERLOADING)
textBufferCanRedo ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferCanUndoPropertyInfo ,
#endif
getTextBufferCanUndo ,
#if defined(ENABLE_OVERLOADING)
textBufferCanUndo ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferCursorPositionPropertyInfo ,
#endif
getTextBufferCursorPosition ,
#if defined(ENABLE_OVERLOADING)
textBufferCursorPosition ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferEnableUndoPropertyInfo ,
#endif
constructTextBufferEnableUndo ,
getTextBufferEnableUndo ,
setTextBufferEnableUndo ,
#if defined(ENABLE_OVERLOADING)
textBufferEnableUndo ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferHasSelectionPropertyInfo ,
#endif
getTextBufferHasSelection ,
#if defined(ENABLE_OVERLOADING)
textBufferHasSelection ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferTagTablePropertyInfo ,
#endif
constructTextBufferTagTable ,
getTextBufferTagTable ,
#if defined(ENABLE_OVERLOADING)
textBufferTagTable ,
#endif
#if defined(ENABLE_OVERLOADING)
TextBufferTextPropertyInfo ,
#endif
clearTextBufferText ,
constructTextBufferText ,
getTextBufferText ,
setTextBufferText ,
#if defined(ENABLE_OVERLOADING)
textBufferText ,
#endif
TextBufferApplyTagCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferApplyTagSignalInfo ,
#endif
afterTextBufferApplyTag ,
onTextBufferApplyTag ,
TextBufferBeginUserActionCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferBeginUserActionSignalInfo ,
#endif
afterTextBufferBeginUserAction ,
onTextBufferBeginUserAction ,
TextBufferChangedCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferChangedSignalInfo ,
#endif
afterTextBufferChanged ,
onTextBufferChanged ,
TextBufferDeleteRangeCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferDeleteRangeSignalInfo ,
#endif
afterTextBufferDeleteRange ,
onTextBufferDeleteRange ,
TextBufferEndUserActionCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferEndUserActionSignalInfo ,
#endif
afterTextBufferEndUserAction ,
onTextBufferEndUserAction ,
TextBufferInsertChildAnchorCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertChildAnchorSignalInfo ,
#endif
afterTextBufferInsertChildAnchor ,
onTextBufferInsertChildAnchor ,
TextBufferInsertPaintableCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertPaintableSignalInfo ,
#endif
afterTextBufferInsertPaintable ,
onTextBufferInsertPaintable ,
TextBufferInsertTextCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferInsertTextSignalInfo ,
#endif
afterTextBufferInsertText ,
onTextBufferInsertText ,
TextBufferMarkDeletedCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferMarkDeletedSignalInfo ,
#endif
afterTextBufferMarkDeleted ,
onTextBufferMarkDeleted ,
TextBufferMarkSetCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferMarkSetSignalInfo ,
#endif
afterTextBufferMarkSet ,
onTextBufferMarkSet ,
TextBufferModifiedChangedCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferModifiedChangedSignalInfo ,
#endif
afterTextBufferModifiedChanged ,
onTextBufferModifiedChanged ,
TextBufferPasteDoneCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferPasteDoneSignalInfo ,
#endif
afterTextBufferPasteDone ,
onTextBufferPasteDone ,
TextBufferRedoCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferRedoSignalInfo ,
#endif
afterTextBufferRedo ,
onTextBufferRedo ,
TextBufferRemoveTagCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferRemoveTagSignalInfo ,
#endif
afterTextBufferRemoveTag ,
onTextBufferRemoveTag ,
TextBufferUndoCallback ,
#if defined(ENABLE_OVERLOADING)
TextBufferUndoSignalInfo ,
#endif
afterTextBufferUndo ,
onTextBufferUndo ,
) 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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.ContentProvider as Gdk.ContentProvider
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextChildAnchor as Gtk.TextChildAnchor
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextMark as Gtk.TextMark
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTagTable as Gtk.TextTagTable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import {-# SOURCE #-} qualified GI.Gtk.Structs.TextIter as Gtk.TextIter
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Flags as Pango.Flags
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription
import qualified GI.Pango.Structs.Language as Pango.Language
import qualified GI.Pango.Structs.TabArray as Pango.TabArray
#else
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.ContentProvider as Gdk.ContentProvider
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextChildAnchor as Gtk.TextChildAnchor
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextMark as Gtk.TextMark
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTagTable as Gtk.TextTagTable
import {-# SOURCE #-} qualified GI.Gtk.Structs.TextIter as Gtk.TextIter
#endif
newtype TextBuffer = TextBuffer (SP.ManagedPtr TextBuffer)
deriving (TextBuffer -> TextBuffer -> Bool
(TextBuffer -> TextBuffer -> Bool)
-> (TextBuffer -> TextBuffer -> Bool) -> Eq TextBuffer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextBuffer -> TextBuffer -> Bool
== :: TextBuffer -> TextBuffer -> Bool
$c/= :: TextBuffer -> TextBuffer -> Bool
/= :: TextBuffer -> TextBuffer -> Bool
Eq)
instance SP.ManagedPtrNewtype TextBuffer where
toManagedPtr :: TextBuffer -> ManagedPtr TextBuffer
toManagedPtr (TextBuffer ManagedPtr TextBuffer
p) = ManagedPtr TextBuffer
p
foreign import ccall "gtk_text_buffer_get_type"
c_gtk_text_buffer_get_type :: IO B.Types.GType
instance B.Types.TypedObject TextBuffer where
glibType :: IO GType
glibType = IO GType
c_gtk_text_buffer_get_type
instance B.Types.GObject TextBuffer
class (SP.GObject o, O.IsDescendantOf TextBuffer o) => IsTextBuffer o
instance (SP.GObject o, O.IsDescendantOf TextBuffer o) => IsTextBuffer o
instance O.HasParentTypes TextBuffer
type instance O.ParentTypes TextBuffer = '[GObject.Object.Object]
toTextBuffer :: (MIO.MonadIO m, IsTextBuffer o) => o -> m TextBuffer
toTextBuffer :: forall (m :: * -> *) o.
(MonadIO m, IsTextBuffer o) =>
o -> m TextBuffer
toTextBuffer = IO TextBuffer -> m TextBuffer
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TextBuffer -> m TextBuffer)
-> (o -> IO TextBuffer) -> o -> m TextBuffer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TextBuffer -> TextBuffer) -> o -> IO TextBuffer
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TextBuffer -> TextBuffer
TextBuffer
instance B.GValue.IsGValue (Maybe TextBuffer) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_text_buffer_get_type
gvalueSet_ :: Ptr GValue -> Maybe TextBuffer -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TextBuffer
P.Nothing = Ptr GValue -> Ptr TextBuffer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TextBuffer
forall a. Ptr a
FP.nullPtr :: FP.Ptr TextBuffer)
gvalueSet_ Ptr GValue
gv (P.Just TextBuffer
obj) = TextBuffer -> (Ptr TextBuffer -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TextBuffer
obj (Ptr GValue -> Ptr TextBuffer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TextBuffer)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr TextBuffer)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TextBuffer)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject TextBuffer ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTextBufferMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveTextBufferMethod "addCommitNotify" o = TextBufferAddCommitNotifyMethodInfo
ResolveTextBufferMethod "addMark" o = TextBufferAddMarkMethodInfo
ResolveTextBufferMethod "addSelectionClipboard" o = TextBufferAddSelectionClipboardMethodInfo
ResolveTextBufferMethod "applyTag" o = TextBufferApplyTagMethodInfo
ResolveTextBufferMethod "applyTagByName" o = TextBufferApplyTagByNameMethodInfo
ResolveTextBufferMethod "backspace" o = TextBufferBackspaceMethodInfo
ResolveTextBufferMethod "beginIrreversibleAction" o = TextBufferBeginIrreversibleActionMethodInfo
ResolveTextBufferMethod "beginUserAction" o = TextBufferBeginUserActionMethodInfo
ResolveTextBufferMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTextBufferMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTextBufferMethod "copyClipboard" o = TextBufferCopyClipboardMethodInfo
ResolveTextBufferMethod "createChildAnchor" o = TextBufferCreateChildAnchorMethodInfo
ResolveTextBufferMethod "createMark" o = TextBufferCreateMarkMethodInfo
ResolveTextBufferMethod "cutClipboard" o = TextBufferCutClipboardMethodInfo
ResolveTextBufferMethod "delete" o = TextBufferDeleteMethodInfo
ResolveTextBufferMethod "deleteInteractive" o = TextBufferDeleteInteractiveMethodInfo
ResolveTextBufferMethod "deleteMark" o = TextBufferDeleteMarkMethodInfo
ResolveTextBufferMethod "deleteMarkByName" o = TextBufferDeleteMarkByNameMethodInfo
ResolveTextBufferMethod "deleteSelection" o = TextBufferDeleteSelectionMethodInfo
ResolveTextBufferMethod "endIrreversibleAction" o = TextBufferEndIrreversibleActionMethodInfo
ResolveTextBufferMethod "endUserAction" o = TextBufferEndUserActionMethodInfo
ResolveTextBufferMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTextBufferMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTextBufferMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTextBufferMethod "insert" o = TextBufferInsertMethodInfo
ResolveTextBufferMethod "insertAtCursor" o = TextBufferInsertAtCursorMethodInfo
ResolveTextBufferMethod "insertChildAnchor" o = TextBufferInsertChildAnchorMethodInfo
ResolveTextBufferMethod "insertInteractive" o = TextBufferInsertInteractiveMethodInfo
ResolveTextBufferMethod "insertInteractiveAtCursor" o = TextBufferInsertInteractiveAtCursorMethodInfo
ResolveTextBufferMethod "insertMarkup" o = TextBufferInsertMarkupMethodInfo
ResolveTextBufferMethod "insertPaintable" o = TextBufferInsertPaintableMethodInfo
ResolveTextBufferMethod "insertRange" o = TextBufferInsertRangeMethodInfo
ResolveTextBufferMethod "insertRangeInteractive" o = TextBufferInsertRangeInteractiveMethodInfo
ResolveTextBufferMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTextBufferMethod "moveMark" o = TextBufferMoveMarkMethodInfo
ResolveTextBufferMethod "moveMarkByName" o = TextBufferMoveMarkByNameMethodInfo
ResolveTextBufferMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTextBufferMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTextBufferMethod "pasteClipboard" o = TextBufferPasteClipboardMethodInfo
ResolveTextBufferMethod "placeCursor" o = TextBufferPlaceCursorMethodInfo
ResolveTextBufferMethod "redo" o = TextBufferRedoMethodInfo
ResolveTextBufferMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTextBufferMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTextBufferMethod "removeAllTags" o = TextBufferRemoveAllTagsMethodInfo
ResolveTextBufferMethod "removeCommitNotify" o = TextBufferRemoveCommitNotifyMethodInfo
ResolveTextBufferMethod "removeSelectionClipboard" o = TextBufferRemoveSelectionClipboardMethodInfo
ResolveTextBufferMethod "removeTag" o = TextBufferRemoveTagMethodInfo
ResolveTextBufferMethod "removeTagByName" o = TextBufferRemoveTagByNameMethodInfo
ResolveTextBufferMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTextBufferMethod "selectRange" o = TextBufferSelectRangeMethodInfo
ResolveTextBufferMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTextBufferMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTextBufferMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTextBufferMethod "undo" o = TextBufferUndoMethodInfo
ResolveTextBufferMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTextBufferMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTextBufferMethod "getBounds" o = TextBufferGetBoundsMethodInfo
ResolveTextBufferMethod "getCanRedo" o = TextBufferGetCanRedoMethodInfo
ResolveTextBufferMethod "getCanUndo" o = TextBufferGetCanUndoMethodInfo
ResolveTextBufferMethod "getCharCount" o = TextBufferGetCharCountMethodInfo
ResolveTextBufferMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTextBufferMethod "getEnableUndo" o = TextBufferGetEnableUndoMethodInfo
ResolveTextBufferMethod "getEndIter" o = TextBufferGetEndIterMethodInfo
ResolveTextBufferMethod "getHasSelection" o = TextBufferGetHasSelectionMethodInfo
ResolveTextBufferMethod "getInsert" o = TextBufferGetInsertMethodInfo
ResolveTextBufferMethod "getIterAtChildAnchor" o = TextBufferGetIterAtChildAnchorMethodInfo
ResolveTextBufferMethod "getIterAtLine" o = TextBufferGetIterAtLineMethodInfo
ResolveTextBufferMethod "getIterAtLineIndex" o = TextBufferGetIterAtLineIndexMethodInfo
ResolveTextBufferMethod "getIterAtLineOffset" o = TextBufferGetIterAtLineOffsetMethodInfo
ResolveTextBufferMethod "getIterAtMark" o = TextBufferGetIterAtMarkMethodInfo
ResolveTextBufferMethod "getIterAtOffset" o = TextBufferGetIterAtOffsetMethodInfo
ResolveTextBufferMethod "getLineCount" o = TextBufferGetLineCountMethodInfo
ResolveTextBufferMethod "getMark" o = TextBufferGetMarkMethodInfo
ResolveTextBufferMethod "getMaxUndoLevels" o = TextBufferGetMaxUndoLevelsMethodInfo
ResolveTextBufferMethod "getModified" o = TextBufferGetModifiedMethodInfo
ResolveTextBufferMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTextBufferMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTextBufferMethod "getSelectionBound" o = TextBufferGetSelectionBoundMethodInfo
ResolveTextBufferMethod "getSelectionBounds" o = TextBufferGetSelectionBoundsMethodInfo
ResolveTextBufferMethod "getSelectionContent" o = TextBufferGetSelectionContentMethodInfo
ResolveTextBufferMethod "getSlice" o = TextBufferGetSliceMethodInfo
ResolveTextBufferMethod "getStartIter" o = TextBufferGetStartIterMethodInfo
ResolveTextBufferMethod "getTagTable" o = TextBufferGetTagTableMethodInfo
ResolveTextBufferMethod "getText" o = TextBufferGetTextMethodInfo
ResolveTextBufferMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTextBufferMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTextBufferMethod "setEnableUndo" o = TextBufferSetEnableUndoMethodInfo
ResolveTextBufferMethod "setMaxUndoLevels" o = TextBufferSetMaxUndoLevelsMethodInfo
ResolveTextBufferMethod "setModified" o = TextBufferSetModifiedMethodInfo
ResolveTextBufferMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTextBufferMethod "setText" o = TextBufferSetTextMethodInfo
ResolveTextBufferMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTextBufferMethod t TextBuffer, O.OverloadedMethod info TextBuffer p) => OL.IsLabel t (TextBuffer -> 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 ~ ResolveTextBufferMethod t TextBuffer, O.OverloadedMethod info TextBuffer p, R.HasField t TextBuffer p) => R.HasField t TextBuffer p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTextBufferMethod t TextBuffer, O.OverloadedMethodInfo info TextBuffer) => OL.IsLabel t (O.MethodProxy info TextBuffer) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type TextBufferApplyTagCallback =
Gtk.TextTag.TextTag
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> IO ()
type C_TextBufferApplyTagCallback =
Ptr TextBuffer ->
Ptr Gtk.TextTag.TextTag ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferApplyTagCallback :: C_TextBufferApplyTagCallback -> IO (FunPtr C_TextBufferApplyTagCallback)
wrap_TextBufferApplyTagCallback ::
GObject a => (a -> TextBufferApplyTagCallback) ->
C_TextBufferApplyTagCallback
wrap_TextBufferApplyTagCallback :: forall a.
GObject a =>
(a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
wrap_TextBufferApplyTagCallback a -> TextBufferApplyTagCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextTag
tag Ptr TextIter
start Ptr TextIter
end Ptr ()
_ = do
tag' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
tag
B.ManagedPtr.withTransient start $ \TextIter
start' -> do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
end ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
end' -> do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> TextBufferApplyTagCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextTag
tag' TextIter
start' TextIter
end'
onTextBufferApplyTag :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferApplyTagCallback) -> m SignalHandlerId
onTextBufferApplyTag :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferApplyTagCallback) -> m SignalHandlerId
onTextBufferApplyTag a
obj (?self::a) => TextBufferApplyTagCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferApplyTagCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferApplyTagCallback
TextBufferApplyTagCallback
cb
let wrapped' :: C_TextBufferApplyTagCallback
wrapped' = (a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
forall a.
GObject a =>
(a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
wrap_TextBufferApplyTagCallback a -> TextBufferApplyTagCallback
wrapped
wrapped'' <- C_TextBufferApplyTagCallback
-> IO (FunPtr C_TextBufferApplyTagCallback)
mk_TextBufferApplyTagCallback C_TextBufferApplyTagCallback
wrapped'
connectSignalFunPtr obj "apply-tag" wrapped'' SignalConnectBefore Nothing
afterTextBufferApplyTag :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferApplyTagCallback) -> m SignalHandlerId
afterTextBufferApplyTag :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferApplyTagCallback) -> m SignalHandlerId
afterTextBufferApplyTag a
obj (?self::a) => TextBufferApplyTagCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferApplyTagCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferApplyTagCallback
TextBufferApplyTagCallback
cb
let wrapped' :: C_TextBufferApplyTagCallback
wrapped' = (a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
forall a.
GObject a =>
(a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
wrap_TextBufferApplyTagCallback a -> TextBufferApplyTagCallback
wrapped
wrapped'' <- C_TextBufferApplyTagCallback
-> IO (FunPtr C_TextBufferApplyTagCallback)
mk_TextBufferApplyTagCallback C_TextBufferApplyTagCallback
wrapped'
connectSignalFunPtr obj "apply-tag" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferApplyTagSignalInfo
instance SignalInfo TextBufferApplyTagSignalInfo where
type HaskellCallbackType TextBufferApplyTagSignalInfo = TextBufferApplyTagCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferApplyTagCallback cb
cb'' <- mk_TextBufferApplyTagCallback cb'
connectSignalFunPtr obj "apply-tag" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::apply-tag"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:applyTag"})
#endif
type TextBufferBeginUserActionCallback =
IO ()
type C_TextBufferBeginUserActionCallback =
Ptr TextBuffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferBeginUserActionCallback :: C_TextBufferBeginUserActionCallback -> IO (FunPtr C_TextBufferBeginUserActionCallback)
wrap_TextBufferBeginUserActionCallback ::
GObject a => (a -> TextBufferBeginUserActionCallback) ->
C_TextBufferBeginUserActionCallback
wrap_TextBufferBeginUserActionCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferBeginUserActionCallback a -> IO ()
gi'cb Ptr TextBuffer
gi'selfPtr Ptr ()
_ = do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> IO ()
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self)
onTextBufferBeginUserAction :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferBeginUserActionCallback) -> m SignalHandlerId
onTextBufferBeginUserAction :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onTextBufferBeginUserAction a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferBeginUserActionCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferBeginUserActionCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "begin-user-action" wrapped'' SignalConnectBefore Nothing
afterTextBufferBeginUserAction :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferBeginUserActionCallback) -> m SignalHandlerId
afterTextBufferBeginUserAction :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterTextBufferBeginUserAction a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferBeginUserActionCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferBeginUserActionCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "begin-user-action" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferBeginUserActionSignalInfo
instance SignalInfo TextBufferBeginUserActionSignalInfo where
type HaskellCallbackType TextBufferBeginUserActionSignalInfo = TextBufferBeginUserActionCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferBeginUserActionCallback cb
cb'' <- mk_TextBufferBeginUserActionCallback cb'
connectSignalFunPtr obj "begin-user-action" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::begin-user-action"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:beginUserAction"})
#endif
type TextBufferChangedCallback =
IO ()
type C_TextBufferChangedCallback =
Ptr TextBuffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferChangedCallback :: C_TextBufferChangedCallback -> IO (FunPtr C_TextBufferChangedCallback)
wrap_TextBufferChangedCallback ::
GObject a => (a -> TextBufferChangedCallback) ->
C_TextBufferChangedCallback
wrap_TextBufferChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferChangedCallback a -> IO ()
gi'cb Ptr TextBuffer
gi'selfPtr Ptr ()
_ = do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> IO ()
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self)
onTextBufferChanged :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferChangedCallback) -> m SignalHandlerId
onTextBufferChanged :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onTextBufferChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferChangedCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferChangedCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "changed" wrapped'' SignalConnectBefore Nothing
afterTextBufferChanged :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferChangedCallback) -> m SignalHandlerId
afterTextBufferChanged :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterTextBufferChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferChangedCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferChangedCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferChangedSignalInfo
instance SignalInfo TextBufferChangedSignalInfo where
type HaskellCallbackType TextBufferChangedSignalInfo = TextBufferChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferChangedCallback cb
cb'' <- mk_TextBufferChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:changed"})
#endif
type TextBufferDeleteRangeCallback =
Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> IO ()
type C_TextBufferDeleteRangeCallback =
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferDeleteRangeCallback :: C_TextBufferDeleteRangeCallback -> IO (FunPtr C_TextBufferDeleteRangeCallback)
wrap_TextBufferDeleteRangeCallback ::
GObject a => (a -> TextBufferDeleteRangeCallback) ->
C_TextBufferDeleteRangeCallback
wrap_TextBufferDeleteRangeCallback :: forall a.
GObject a =>
(a -> TextBufferDeleteRangeCallback)
-> C_TextBufferDeleteRangeCallback
wrap_TextBufferDeleteRangeCallback a -> TextBufferDeleteRangeCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextIter
start Ptr TextIter
end Ptr ()
_ = do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
start ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
start' -> do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
end ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
end' -> do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> TextBufferDeleteRangeCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextIter
start' TextIter
end'
onTextBufferDeleteRange :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferDeleteRangeCallback) -> m SignalHandlerId
onTextBufferDeleteRange :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferDeleteRangeCallback)
-> m SignalHandlerId
onTextBufferDeleteRange a
obj (?self::a) => TextBufferDeleteRangeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferDeleteRangeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferDeleteRangeCallback
TextBufferDeleteRangeCallback
cb
let wrapped' :: C_TextBufferDeleteRangeCallback
wrapped' = (a -> TextBufferDeleteRangeCallback)
-> C_TextBufferDeleteRangeCallback
forall a.
GObject a =>
(a -> TextBufferDeleteRangeCallback)
-> C_TextBufferDeleteRangeCallback
wrap_TextBufferDeleteRangeCallback a -> TextBufferDeleteRangeCallback
wrapped
wrapped'' <- C_TextBufferDeleteRangeCallback
-> IO (FunPtr C_TextBufferDeleteRangeCallback)
mk_TextBufferDeleteRangeCallback C_TextBufferDeleteRangeCallback
wrapped'
connectSignalFunPtr obj "delete-range" wrapped'' SignalConnectBefore Nothing
afterTextBufferDeleteRange :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferDeleteRangeCallback) -> m SignalHandlerId
afterTextBufferDeleteRange :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferDeleteRangeCallback)
-> m SignalHandlerId
afterTextBufferDeleteRange a
obj (?self::a) => TextBufferDeleteRangeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferDeleteRangeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferDeleteRangeCallback
TextBufferDeleteRangeCallback
cb
let wrapped' :: C_TextBufferDeleteRangeCallback
wrapped' = (a -> TextBufferDeleteRangeCallback)
-> C_TextBufferDeleteRangeCallback
forall a.
GObject a =>
(a -> TextBufferDeleteRangeCallback)
-> C_TextBufferDeleteRangeCallback
wrap_TextBufferDeleteRangeCallback a -> TextBufferDeleteRangeCallback
wrapped
wrapped'' <- C_TextBufferDeleteRangeCallback
-> IO (FunPtr C_TextBufferDeleteRangeCallback)
mk_TextBufferDeleteRangeCallback C_TextBufferDeleteRangeCallback
wrapped'
connectSignalFunPtr obj "delete-range" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferDeleteRangeSignalInfo
instance SignalInfo TextBufferDeleteRangeSignalInfo where
type HaskellCallbackType TextBufferDeleteRangeSignalInfo = TextBufferDeleteRangeCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferDeleteRangeCallback cb
cb'' <- mk_TextBufferDeleteRangeCallback cb'
connectSignalFunPtr obj "delete-range" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::delete-range"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:deleteRange"})
#endif
type TextBufferEndUserActionCallback =
IO ()
type C_TextBufferEndUserActionCallback =
Ptr TextBuffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferEndUserActionCallback :: C_TextBufferEndUserActionCallback -> IO (FunPtr C_TextBufferEndUserActionCallback)
wrap_TextBufferEndUserActionCallback ::
GObject a => (a -> TextBufferEndUserActionCallback) ->
C_TextBufferEndUserActionCallback
wrap_TextBufferEndUserActionCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferEndUserActionCallback a -> IO ()
gi'cb Ptr TextBuffer
gi'selfPtr Ptr ()
_ = do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> IO ()
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self)
onTextBufferEndUserAction :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferEndUserActionCallback) -> m SignalHandlerId
onTextBufferEndUserAction :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onTextBufferEndUserAction a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferEndUserActionCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferEndUserActionCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "end-user-action" wrapped'' SignalConnectBefore Nothing
afterTextBufferEndUserAction :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferEndUserActionCallback) -> m SignalHandlerId
afterTextBufferEndUserAction :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterTextBufferEndUserAction a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferEndUserActionCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferEndUserActionCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "end-user-action" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferEndUserActionSignalInfo
instance SignalInfo TextBufferEndUserActionSignalInfo where
type HaskellCallbackType TextBufferEndUserActionSignalInfo = TextBufferEndUserActionCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferEndUserActionCallback cb
cb'' <- mk_TextBufferEndUserActionCallback cb'
connectSignalFunPtr obj "end-user-action" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::end-user-action"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:endUserAction"})
#endif
type TextBufferInsertChildAnchorCallback =
Gtk.TextIter.TextIter
-> Gtk.TextChildAnchor.TextChildAnchor
-> IO ()
type C_TextBufferInsertChildAnchorCallback =
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextChildAnchor.TextChildAnchor ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferInsertChildAnchorCallback :: C_TextBufferInsertChildAnchorCallback -> IO (FunPtr C_TextBufferInsertChildAnchorCallback)
wrap_TextBufferInsertChildAnchorCallback ::
GObject a => (a -> TextBufferInsertChildAnchorCallback) ->
C_TextBufferInsertChildAnchorCallback
wrap_TextBufferInsertChildAnchorCallback :: forall a.
GObject a =>
(a -> TextBufferInsertChildAnchorCallback)
-> C_TextBufferInsertChildAnchorCallback
wrap_TextBufferInsertChildAnchorCallback a -> TextBufferInsertChildAnchorCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextIter
location Ptr TextChildAnchor
anchor Ptr ()
_ = do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
location ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
location' -> do
anchor' <- ((ManagedPtr TextChildAnchor -> TextChildAnchor)
-> Ptr TextChildAnchor -> IO TextChildAnchor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextChildAnchor -> TextChildAnchor
Gtk.TextChildAnchor.TextChildAnchor) Ptr TextChildAnchor
anchor
B.ManagedPtr.withNewObject gi'selfPtr $ \TextBuffer
gi'self -> a -> TextBufferInsertChildAnchorCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextIter
location' TextChildAnchor
anchor'
onTextBufferInsertChildAnchor :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferInsertChildAnchorCallback) -> m SignalHandlerId
onTextBufferInsertChildAnchor :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferInsertChildAnchorCallback)
-> m SignalHandlerId
onTextBufferInsertChildAnchor a
obj (?self::a) => TextBufferInsertChildAnchorCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferInsertChildAnchorCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferInsertChildAnchorCallback
TextBufferInsertChildAnchorCallback
cb
let wrapped' :: C_TextBufferInsertChildAnchorCallback
wrapped' = (a -> TextBufferInsertChildAnchorCallback)
-> C_TextBufferInsertChildAnchorCallback
forall a.
GObject a =>
(a -> TextBufferInsertChildAnchorCallback)
-> C_TextBufferInsertChildAnchorCallback
wrap_TextBufferInsertChildAnchorCallback a -> TextBufferInsertChildAnchorCallback
wrapped
wrapped'' <- C_TextBufferInsertChildAnchorCallback
-> IO (FunPtr C_TextBufferInsertChildAnchorCallback)
mk_TextBufferInsertChildAnchorCallback C_TextBufferInsertChildAnchorCallback
wrapped'
connectSignalFunPtr obj "insert-child-anchor" wrapped'' SignalConnectBefore Nothing
afterTextBufferInsertChildAnchor :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferInsertChildAnchorCallback) -> m SignalHandlerId
afterTextBufferInsertChildAnchor :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferInsertChildAnchorCallback)
-> m SignalHandlerId
afterTextBufferInsertChildAnchor a
obj (?self::a) => TextBufferInsertChildAnchorCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferInsertChildAnchorCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferInsertChildAnchorCallback
TextBufferInsertChildAnchorCallback
cb
let wrapped' :: C_TextBufferInsertChildAnchorCallback
wrapped' = (a -> TextBufferInsertChildAnchorCallback)
-> C_TextBufferInsertChildAnchorCallback
forall a.
GObject a =>
(a -> TextBufferInsertChildAnchorCallback)
-> C_TextBufferInsertChildAnchorCallback
wrap_TextBufferInsertChildAnchorCallback a -> TextBufferInsertChildAnchorCallback
wrapped
wrapped'' <- C_TextBufferInsertChildAnchorCallback
-> IO (FunPtr C_TextBufferInsertChildAnchorCallback)
mk_TextBufferInsertChildAnchorCallback C_TextBufferInsertChildAnchorCallback
wrapped'
connectSignalFunPtr obj "insert-child-anchor" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertChildAnchorSignalInfo
instance SignalInfo TextBufferInsertChildAnchorSignalInfo where
type HaskellCallbackType TextBufferInsertChildAnchorSignalInfo = TextBufferInsertChildAnchorCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferInsertChildAnchorCallback cb
cb'' <- mk_TextBufferInsertChildAnchorCallback cb'
connectSignalFunPtr obj "insert-child-anchor" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::insert-child-anchor"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:insertChildAnchor"})
#endif
type TextBufferInsertPaintableCallback =
Gtk.TextIter.TextIter
-> Gdk.Paintable.Paintable
-> IO ()
type C_TextBufferInsertPaintableCallback =
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gdk.Paintable.Paintable ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferInsertPaintableCallback :: C_TextBufferInsertPaintableCallback -> IO (FunPtr C_TextBufferInsertPaintableCallback)
wrap_TextBufferInsertPaintableCallback ::
GObject a => (a -> TextBufferInsertPaintableCallback) ->
C_TextBufferInsertPaintableCallback
wrap_TextBufferInsertPaintableCallback :: forall a.
GObject a =>
(a -> TextBufferInsertPaintableCallback)
-> C_TextBufferInsertPaintableCallback
wrap_TextBufferInsertPaintableCallback a -> TextBufferInsertPaintableCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextIter
location Ptr Paintable
paintable Ptr ()
_ = do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
location ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
location' -> do
paintable' <- ((ManagedPtr Paintable -> Paintable)
-> Ptr Paintable -> IO Paintable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Paintable -> Paintable
Gdk.Paintable.Paintable) Ptr Paintable
paintable
B.ManagedPtr.withNewObject gi'selfPtr $ \TextBuffer
gi'self -> a -> TextBufferInsertPaintableCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextIter
location' Paintable
paintable'
onTextBufferInsertPaintable :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferInsertPaintableCallback) -> m SignalHandlerId
onTextBufferInsertPaintable :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferInsertPaintableCallback)
-> m SignalHandlerId
onTextBufferInsertPaintable a
obj (?self::a) => TextBufferInsertPaintableCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferInsertPaintableCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferInsertPaintableCallback
TextBufferInsertPaintableCallback
cb
let wrapped' :: C_TextBufferInsertPaintableCallback
wrapped' = (a -> TextBufferInsertPaintableCallback)
-> C_TextBufferInsertPaintableCallback
forall a.
GObject a =>
(a -> TextBufferInsertPaintableCallback)
-> C_TextBufferInsertPaintableCallback
wrap_TextBufferInsertPaintableCallback a -> TextBufferInsertPaintableCallback
wrapped
wrapped'' <- C_TextBufferInsertPaintableCallback
-> IO (FunPtr C_TextBufferInsertPaintableCallback)
mk_TextBufferInsertPaintableCallback C_TextBufferInsertPaintableCallback
wrapped'
connectSignalFunPtr obj "insert-paintable" wrapped'' SignalConnectBefore Nothing
afterTextBufferInsertPaintable :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferInsertPaintableCallback) -> m SignalHandlerId
afterTextBufferInsertPaintable :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferInsertPaintableCallback)
-> m SignalHandlerId
afterTextBufferInsertPaintable a
obj (?self::a) => TextBufferInsertPaintableCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferInsertPaintableCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferInsertPaintableCallback
TextBufferInsertPaintableCallback
cb
let wrapped' :: C_TextBufferInsertPaintableCallback
wrapped' = (a -> TextBufferInsertPaintableCallback)
-> C_TextBufferInsertPaintableCallback
forall a.
GObject a =>
(a -> TextBufferInsertPaintableCallback)
-> C_TextBufferInsertPaintableCallback
wrap_TextBufferInsertPaintableCallback a -> TextBufferInsertPaintableCallback
wrapped
wrapped'' <- C_TextBufferInsertPaintableCallback
-> IO (FunPtr C_TextBufferInsertPaintableCallback)
mk_TextBufferInsertPaintableCallback C_TextBufferInsertPaintableCallback
wrapped'
connectSignalFunPtr obj "insert-paintable" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertPaintableSignalInfo
instance SignalInfo TextBufferInsertPaintableSignalInfo where
type HaskellCallbackType TextBufferInsertPaintableSignalInfo = TextBufferInsertPaintableCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferInsertPaintableCallback cb
cb'' <- mk_TextBufferInsertPaintableCallback cb'
connectSignalFunPtr obj "insert-paintable" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::insert-paintable"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:insertPaintable"})
#endif
type TextBufferInsertTextCallback =
Gtk.TextIter.TextIter
-> T.Text
-> Int32
-> IO ()
type C_TextBufferInsertTextCallback =
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
CString ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferInsertTextCallback :: C_TextBufferInsertTextCallback -> IO (FunPtr C_TextBufferInsertTextCallback)
wrap_TextBufferInsertTextCallback ::
GObject a => (a -> TextBufferInsertTextCallback) ->
C_TextBufferInsertTextCallback
wrap_TextBufferInsertTextCallback :: forall a.
GObject a =>
(a -> TextBufferInsertTextCallback)
-> C_TextBufferInsertTextCallback
wrap_TextBufferInsertTextCallback a -> TextBufferInsertTextCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextIter
location CString
text Int32
len Ptr ()
_ = do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
location ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
location' -> do
text' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
text
B.ManagedPtr.withNewObject gi'selfPtr $ \TextBuffer
gi'self -> a -> TextBufferInsertTextCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextIter
location' Text
text' Int32
len
onTextBufferInsertText :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferInsertTextCallback) -> m SignalHandlerId
onTextBufferInsertText :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferInsertTextCallback)
-> m SignalHandlerId
onTextBufferInsertText a
obj (?self::a) => TextBufferInsertTextCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferInsertTextCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferInsertTextCallback
TextBufferInsertTextCallback
cb
let wrapped' :: C_TextBufferInsertTextCallback
wrapped' = (a -> TextBufferInsertTextCallback)
-> C_TextBufferInsertTextCallback
forall a.
GObject a =>
(a -> TextBufferInsertTextCallback)
-> C_TextBufferInsertTextCallback
wrap_TextBufferInsertTextCallback a -> TextBufferInsertTextCallback
wrapped
wrapped'' <- C_TextBufferInsertTextCallback
-> IO (FunPtr C_TextBufferInsertTextCallback)
mk_TextBufferInsertTextCallback C_TextBufferInsertTextCallback
wrapped'
connectSignalFunPtr obj "insert-text" wrapped'' SignalConnectBefore Nothing
afterTextBufferInsertText :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferInsertTextCallback) -> m SignalHandlerId
afterTextBufferInsertText :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferInsertTextCallback)
-> m SignalHandlerId
afterTextBufferInsertText a
obj (?self::a) => TextBufferInsertTextCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferInsertTextCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferInsertTextCallback
TextBufferInsertTextCallback
cb
let wrapped' :: C_TextBufferInsertTextCallback
wrapped' = (a -> TextBufferInsertTextCallback)
-> C_TextBufferInsertTextCallback
forall a.
GObject a =>
(a -> TextBufferInsertTextCallback)
-> C_TextBufferInsertTextCallback
wrap_TextBufferInsertTextCallback a -> TextBufferInsertTextCallback
wrapped
wrapped'' <- C_TextBufferInsertTextCallback
-> IO (FunPtr C_TextBufferInsertTextCallback)
mk_TextBufferInsertTextCallback C_TextBufferInsertTextCallback
wrapped'
connectSignalFunPtr obj "insert-text" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertTextSignalInfo
instance SignalInfo TextBufferInsertTextSignalInfo where
type HaskellCallbackType TextBufferInsertTextSignalInfo = TextBufferInsertTextCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferInsertTextCallback cb
cb'' <- mk_TextBufferInsertTextCallback cb'
connectSignalFunPtr obj "insert-text" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::insert-text"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:insertText"})
#endif
type TextBufferMarkDeletedCallback =
Gtk.TextMark.TextMark
-> IO ()
type C_TextBufferMarkDeletedCallback =
Ptr TextBuffer ->
Ptr Gtk.TextMark.TextMark ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferMarkDeletedCallback :: C_TextBufferMarkDeletedCallback -> IO (FunPtr C_TextBufferMarkDeletedCallback)
wrap_TextBufferMarkDeletedCallback ::
GObject a => (a -> TextBufferMarkDeletedCallback) ->
C_TextBufferMarkDeletedCallback
wrap_TextBufferMarkDeletedCallback :: forall a.
GObject a =>
(a -> TextBufferMarkDeletedCallback)
-> C_TextBufferMarkDeletedCallback
wrap_TextBufferMarkDeletedCallback a -> TextBufferMarkDeletedCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextMark
mark Ptr ()
_ = do
mark' <- ((ManagedPtr TextMark -> TextMark) -> Ptr TextMark -> IO TextMark
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextMark -> TextMark
Gtk.TextMark.TextMark) Ptr TextMark
mark
B.ManagedPtr.withNewObject gi'selfPtr $ \TextBuffer
gi'self -> a -> TextBufferMarkDeletedCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextMark
mark'
onTextBufferMarkDeleted :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferMarkDeletedCallback) -> m SignalHandlerId
onTextBufferMarkDeleted :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferMarkDeletedCallback)
-> m SignalHandlerId
onTextBufferMarkDeleted a
obj (?self::a) => TextBufferMarkDeletedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferMarkDeletedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferMarkDeletedCallback
TextBufferMarkDeletedCallback
cb
let wrapped' :: C_TextBufferMarkDeletedCallback
wrapped' = (a -> TextBufferMarkDeletedCallback)
-> C_TextBufferMarkDeletedCallback
forall a.
GObject a =>
(a -> TextBufferMarkDeletedCallback)
-> C_TextBufferMarkDeletedCallback
wrap_TextBufferMarkDeletedCallback a -> TextBufferMarkDeletedCallback
wrapped
wrapped'' <- C_TextBufferMarkDeletedCallback
-> IO (FunPtr C_TextBufferMarkDeletedCallback)
mk_TextBufferMarkDeletedCallback C_TextBufferMarkDeletedCallback
wrapped'
connectSignalFunPtr obj "mark-deleted" wrapped'' SignalConnectBefore Nothing
afterTextBufferMarkDeleted :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferMarkDeletedCallback) -> m SignalHandlerId
afterTextBufferMarkDeleted :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferMarkDeletedCallback)
-> m SignalHandlerId
afterTextBufferMarkDeleted a
obj (?self::a) => TextBufferMarkDeletedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferMarkDeletedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferMarkDeletedCallback
TextBufferMarkDeletedCallback
cb
let wrapped' :: C_TextBufferMarkDeletedCallback
wrapped' = (a -> TextBufferMarkDeletedCallback)
-> C_TextBufferMarkDeletedCallback
forall a.
GObject a =>
(a -> TextBufferMarkDeletedCallback)
-> C_TextBufferMarkDeletedCallback
wrap_TextBufferMarkDeletedCallback a -> TextBufferMarkDeletedCallback
wrapped
wrapped'' <- C_TextBufferMarkDeletedCallback
-> IO (FunPtr C_TextBufferMarkDeletedCallback)
mk_TextBufferMarkDeletedCallback C_TextBufferMarkDeletedCallback
wrapped'
connectSignalFunPtr obj "mark-deleted" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferMarkDeletedSignalInfo
instance SignalInfo TextBufferMarkDeletedSignalInfo where
type HaskellCallbackType TextBufferMarkDeletedSignalInfo = TextBufferMarkDeletedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferMarkDeletedCallback cb
cb'' <- mk_TextBufferMarkDeletedCallback cb'
connectSignalFunPtr obj "mark-deleted" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::mark-deleted"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:markDeleted"})
#endif
type TextBufferMarkSetCallback =
Gtk.TextIter.TextIter
-> Gtk.TextMark.TextMark
-> IO ()
type C_TextBufferMarkSetCallback =
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextMark.TextMark ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferMarkSetCallback :: C_TextBufferMarkSetCallback -> IO (FunPtr C_TextBufferMarkSetCallback)
wrap_TextBufferMarkSetCallback ::
GObject a => (a -> TextBufferMarkSetCallback) ->
C_TextBufferMarkSetCallback
wrap_TextBufferMarkSetCallback :: forall a.
GObject a =>
(a -> TextBufferMarkSetCallback) -> C_TextBufferMarkSetCallback
wrap_TextBufferMarkSetCallback a -> TextBufferMarkSetCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextIter
location Ptr TextMark
mark Ptr ()
_ = do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
location ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
location' -> do
mark' <- ((ManagedPtr TextMark -> TextMark) -> Ptr TextMark -> IO TextMark
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextMark -> TextMark
Gtk.TextMark.TextMark) Ptr TextMark
mark
B.ManagedPtr.withNewObject gi'selfPtr $ \TextBuffer
gi'self -> a -> TextBufferMarkSetCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextIter
location' TextMark
mark'
onTextBufferMarkSet :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferMarkSetCallback) -> m SignalHandlerId
onTextBufferMarkSet :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => TextBufferMarkSetCallback) -> m SignalHandlerId
onTextBufferMarkSet a
obj (?self::a) => TextBufferMarkSetCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferMarkSetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferMarkSetCallback
TextBufferMarkSetCallback
cb
let wrapped' :: C_TextBufferMarkSetCallback
wrapped' = (a -> TextBufferMarkSetCallback) -> C_TextBufferMarkSetCallback
forall a.
GObject a =>
(a -> TextBufferMarkSetCallback) -> C_TextBufferMarkSetCallback
wrap_TextBufferMarkSetCallback a -> TextBufferMarkSetCallback
wrapped
wrapped'' <- C_TextBufferMarkSetCallback
-> IO (FunPtr C_TextBufferMarkSetCallback)
mk_TextBufferMarkSetCallback C_TextBufferMarkSetCallback
wrapped'
connectSignalFunPtr obj "mark-set" wrapped'' SignalConnectBefore Nothing
afterTextBufferMarkSet :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferMarkSetCallback) -> m SignalHandlerId
afterTextBufferMarkSet :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => TextBufferMarkSetCallback) -> m SignalHandlerId
afterTextBufferMarkSet a
obj (?self::a) => TextBufferMarkSetCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferMarkSetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferMarkSetCallback
TextBufferMarkSetCallback
cb
let wrapped' :: C_TextBufferMarkSetCallback
wrapped' = (a -> TextBufferMarkSetCallback) -> C_TextBufferMarkSetCallback
forall a.
GObject a =>
(a -> TextBufferMarkSetCallback) -> C_TextBufferMarkSetCallback
wrap_TextBufferMarkSetCallback a -> TextBufferMarkSetCallback
wrapped
wrapped'' <- C_TextBufferMarkSetCallback
-> IO (FunPtr C_TextBufferMarkSetCallback)
mk_TextBufferMarkSetCallback C_TextBufferMarkSetCallback
wrapped'
connectSignalFunPtr obj "mark-set" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferMarkSetSignalInfo
instance SignalInfo TextBufferMarkSetSignalInfo where
type HaskellCallbackType TextBufferMarkSetSignalInfo = TextBufferMarkSetCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferMarkSetCallback cb
cb'' <- mk_TextBufferMarkSetCallback cb'
connectSignalFunPtr obj "mark-set" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::mark-set"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:markSet"})
#endif
type TextBufferModifiedChangedCallback =
IO ()
type C_TextBufferModifiedChangedCallback =
Ptr TextBuffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferModifiedChangedCallback :: C_TextBufferModifiedChangedCallback -> IO (FunPtr C_TextBufferModifiedChangedCallback)
wrap_TextBufferModifiedChangedCallback ::
GObject a => (a -> TextBufferModifiedChangedCallback) ->
C_TextBufferModifiedChangedCallback
wrap_TextBufferModifiedChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferModifiedChangedCallback a -> IO ()
gi'cb Ptr TextBuffer
gi'selfPtr Ptr ()
_ = do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> IO ()
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self)
onTextBufferModifiedChanged :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferModifiedChangedCallback) -> m SignalHandlerId
onTextBufferModifiedChanged :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onTextBufferModifiedChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferModifiedChangedCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferModifiedChangedCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "modified-changed" wrapped'' SignalConnectBefore Nothing
afterTextBufferModifiedChanged :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferModifiedChangedCallback) -> m SignalHandlerId
afterTextBufferModifiedChanged :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterTextBufferModifiedChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferModifiedChangedCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferModifiedChangedCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "modified-changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferModifiedChangedSignalInfo
instance SignalInfo TextBufferModifiedChangedSignalInfo where
type HaskellCallbackType TextBufferModifiedChangedSignalInfo = TextBufferModifiedChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferModifiedChangedCallback cb
cb'' <- mk_TextBufferModifiedChangedCallback cb'
connectSignalFunPtr obj "modified-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::modified-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:modifiedChanged"})
#endif
type TextBufferPasteDoneCallback =
Gdk.Clipboard.Clipboard
-> IO ()
type C_TextBufferPasteDoneCallback =
Ptr TextBuffer ->
Ptr Gdk.Clipboard.Clipboard ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferPasteDoneCallback :: C_TextBufferPasteDoneCallback -> IO (FunPtr C_TextBufferPasteDoneCallback)
wrap_TextBufferPasteDoneCallback ::
GObject a => (a -> TextBufferPasteDoneCallback) ->
C_TextBufferPasteDoneCallback
wrap_TextBufferPasteDoneCallback :: forall a.
GObject a =>
(a -> TextBufferPasteDoneCallback) -> C_TextBufferPasteDoneCallback
wrap_TextBufferPasteDoneCallback a -> TextBufferPasteDoneCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr Clipboard
clipboard Ptr ()
_ = do
clipboard' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
clipboard
B.ManagedPtr.withNewObject gi'selfPtr $ \TextBuffer
gi'self -> a -> TextBufferPasteDoneCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) Clipboard
clipboard'
onTextBufferPasteDone :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferPasteDoneCallback) -> m SignalHandlerId
onTextBufferPasteDone :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferPasteDoneCallback) -> m SignalHandlerId
onTextBufferPasteDone a
obj (?self::a) => TextBufferPasteDoneCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferPasteDoneCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferPasteDoneCallback
TextBufferPasteDoneCallback
cb
let wrapped' :: C_TextBufferPasteDoneCallback
wrapped' = (a -> TextBufferPasteDoneCallback) -> C_TextBufferPasteDoneCallback
forall a.
GObject a =>
(a -> TextBufferPasteDoneCallback) -> C_TextBufferPasteDoneCallback
wrap_TextBufferPasteDoneCallback a -> TextBufferPasteDoneCallback
wrapped
wrapped'' <- C_TextBufferPasteDoneCallback
-> IO (FunPtr C_TextBufferPasteDoneCallback)
mk_TextBufferPasteDoneCallback C_TextBufferPasteDoneCallback
wrapped'
connectSignalFunPtr obj "paste-done" wrapped'' SignalConnectBefore Nothing
afterTextBufferPasteDone :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferPasteDoneCallback) -> m SignalHandlerId
afterTextBufferPasteDone :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferPasteDoneCallback) -> m SignalHandlerId
afterTextBufferPasteDone a
obj (?self::a) => TextBufferPasteDoneCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferPasteDoneCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferPasteDoneCallback
TextBufferPasteDoneCallback
cb
let wrapped' :: C_TextBufferPasteDoneCallback
wrapped' = (a -> TextBufferPasteDoneCallback) -> C_TextBufferPasteDoneCallback
forall a.
GObject a =>
(a -> TextBufferPasteDoneCallback) -> C_TextBufferPasteDoneCallback
wrap_TextBufferPasteDoneCallback a -> TextBufferPasteDoneCallback
wrapped
wrapped'' <- C_TextBufferPasteDoneCallback
-> IO (FunPtr C_TextBufferPasteDoneCallback)
mk_TextBufferPasteDoneCallback C_TextBufferPasteDoneCallback
wrapped'
connectSignalFunPtr obj "paste-done" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferPasteDoneSignalInfo
instance SignalInfo TextBufferPasteDoneSignalInfo where
type HaskellCallbackType TextBufferPasteDoneSignalInfo = TextBufferPasteDoneCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferPasteDoneCallback cb
cb'' <- mk_TextBufferPasteDoneCallback cb'
connectSignalFunPtr obj "paste-done" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::paste-done"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:pasteDone"})
#endif
type TextBufferRedoCallback =
IO ()
type C_TextBufferRedoCallback =
Ptr TextBuffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferRedoCallback :: C_TextBufferRedoCallback -> IO (FunPtr C_TextBufferRedoCallback)
wrap_TextBufferRedoCallback ::
GObject a => (a -> TextBufferRedoCallback) ->
C_TextBufferRedoCallback
wrap_TextBufferRedoCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferRedoCallback a -> IO ()
gi'cb Ptr TextBuffer
gi'selfPtr Ptr ()
_ = do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> IO ()
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self)
onTextBufferRedo :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferRedoCallback) -> m SignalHandlerId
onTextBufferRedo :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onTextBufferRedo a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferRedoCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferRedoCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "redo" wrapped'' SignalConnectBefore Nothing
afterTextBufferRedo :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferRedoCallback) -> m SignalHandlerId
afterTextBufferRedo :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterTextBufferRedo a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferRedoCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferRedoCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "redo" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferRedoSignalInfo
instance SignalInfo TextBufferRedoSignalInfo where
type HaskellCallbackType TextBufferRedoSignalInfo = TextBufferRedoCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferRedoCallback cb
cb'' <- mk_TextBufferRedoCallback cb'
connectSignalFunPtr obj "redo" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::redo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:redo"})
#endif
type TextBufferRemoveTagCallback =
Gtk.TextTag.TextTag
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> IO ()
type C_TextBufferRemoveTagCallback =
Ptr TextBuffer ->
Ptr Gtk.TextTag.TextTag ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferRemoveTagCallback :: C_TextBufferRemoveTagCallback -> IO (FunPtr C_TextBufferRemoveTagCallback)
wrap_TextBufferRemoveTagCallback ::
GObject a => (a -> TextBufferRemoveTagCallback) ->
C_TextBufferRemoveTagCallback
wrap_TextBufferRemoveTagCallback :: forall a.
GObject a =>
(a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
wrap_TextBufferRemoveTagCallback a -> TextBufferApplyTagCallback
gi'cb Ptr TextBuffer
gi'selfPtr Ptr TextTag
tag Ptr TextIter
start Ptr TextIter
end Ptr ()
_ = do
tag' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
tag
B.ManagedPtr.withTransient start $ \TextIter
start' -> do
Ptr TextIter -> (TextIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr TextIter
end ((TextIter -> IO ()) -> IO ()) -> (TextIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextIter
end' -> do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> TextBufferApplyTagCallback
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self) TextTag
tag' TextIter
start' TextIter
end'
onTextBufferRemoveTag :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferRemoveTagCallback) -> m SignalHandlerId
onTextBufferRemoveTag :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferApplyTagCallback) -> m SignalHandlerId
onTextBufferRemoveTag a
obj (?self::a) => TextBufferApplyTagCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferApplyTagCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferApplyTagCallback
TextBufferApplyTagCallback
cb
let wrapped' :: C_TextBufferApplyTagCallback
wrapped' = (a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
forall a.
GObject a =>
(a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
wrap_TextBufferRemoveTagCallback a -> TextBufferApplyTagCallback
wrapped
wrapped'' <- C_TextBufferApplyTagCallback
-> IO (FunPtr C_TextBufferApplyTagCallback)
mk_TextBufferRemoveTagCallback C_TextBufferApplyTagCallback
wrapped'
connectSignalFunPtr obj "remove-tag" wrapped'' SignalConnectBefore Nothing
afterTextBufferRemoveTag :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferRemoveTagCallback) -> m SignalHandlerId
afterTextBufferRemoveTag :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a
-> ((?self::a) => TextBufferApplyTagCallback) -> m SignalHandlerId
afterTextBufferRemoveTag a
obj (?self::a) => TextBufferApplyTagCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TextBufferApplyTagCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TextBufferApplyTagCallback
TextBufferApplyTagCallback
cb
let wrapped' :: C_TextBufferApplyTagCallback
wrapped' = (a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
forall a.
GObject a =>
(a -> TextBufferApplyTagCallback) -> C_TextBufferApplyTagCallback
wrap_TextBufferRemoveTagCallback a -> TextBufferApplyTagCallback
wrapped
wrapped'' <- C_TextBufferApplyTagCallback
-> IO (FunPtr C_TextBufferApplyTagCallback)
mk_TextBufferRemoveTagCallback C_TextBufferApplyTagCallback
wrapped'
connectSignalFunPtr obj "remove-tag" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferRemoveTagSignalInfo
instance SignalInfo TextBufferRemoveTagSignalInfo where
type HaskellCallbackType TextBufferRemoveTagSignalInfo = TextBufferRemoveTagCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferRemoveTagCallback cb
cb'' <- mk_TextBufferRemoveTagCallback cb'
connectSignalFunPtr obj "remove-tag" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::remove-tag"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:removeTag"})
#endif
type TextBufferUndoCallback =
IO ()
type C_TextBufferUndoCallback =
Ptr TextBuffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextBufferUndoCallback :: C_TextBufferUndoCallback -> IO (FunPtr C_TextBufferUndoCallback)
wrap_TextBufferUndoCallback ::
GObject a => (a -> TextBufferUndoCallback) ->
C_TextBufferUndoCallback
wrap_TextBufferUndoCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferUndoCallback a -> IO ()
gi'cb Ptr TextBuffer
gi'selfPtr Ptr ()
_ = do
Ptr TextBuffer -> (TextBuffer -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TextBuffer
gi'selfPtr ((TextBuffer -> IO ()) -> IO ()) -> (TextBuffer -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TextBuffer
gi'self -> a -> IO ()
gi'cb (TextBuffer -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TextBuffer
gi'self)
onTextBufferUndo :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferUndoCallback) -> m SignalHandlerId
onTextBufferUndo :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onTextBufferUndo a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferUndoCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferUndoCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "undo" wrapped'' SignalConnectBefore Nothing
afterTextBufferUndo :: (IsTextBuffer a, MonadIO m) => a -> ((?self :: a) => TextBufferUndoCallback) -> m SignalHandlerId
afterTextBufferUndo :: forall a (m :: * -> *).
(IsTextBuffer a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterTextBufferUndo a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_TextBufferBeginUserActionCallback
wrapped' = (a -> IO ()) -> C_TextBufferBeginUserActionCallback
forall a.
GObject a =>
(a -> IO ()) -> C_TextBufferBeginUserActionCallback
wrap_TextBufferUndoCallback a -> IO ()
wrapped
wrapped'' <- C_TextBufferBeginUserActionCallback
-> IO (FunPtr C_TextBufferBeginUserActionCallback)
mk_TextBufferUndoCallback C_TextBufferBeginUserActionCallback
wrapped'
connectSignalFunPtr obj "undo" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TextBufferUndoSignalInfo
instance SignalInfo TextBufferUndoSignalInfo where
type HaskellCallbackType TextBufferUndoSignalInfo = TextBufferUndoCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextBufferUndoCallback cb
cb'' <- mk_TextBufferUndoCallback cb'
connectSignalFunPtr obj "undo" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer::undo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:signal:undo"})
#endif
getTextBufferCanRedo :: (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferCanRedo :: forall (m :: * -> *) o. (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferCanRedo o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"can-redo"
#if defined(ENABLE_OVERLOADING)
data TextBufferCanRedoPropertyInfo
instance AttrInfo TextBufferCanRedoPropertyInfo where
type AttrAllowedOps TextBufferCanRedoPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TextBufferCanRedoPropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferCanRedoPropertyInfo = (~) ()
type AttrTransferTypeConstraint TextBufferCanRedoPropertyInfo = (~) ()
type AttrTransferType TextBufferCanRedoPropertyInfo = ()
type AttrGetType TextBufferCanRedoPropertyInfo = Bool
type AttrLabel TextBufferCanRedoPropertyInfo = "can-redo"
type AttrOrigin TextBufferCanRedoPropertyInfo = TextBuffer
attrGet = getTextBufferCanRedo
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.canRedo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:canRedo"
})
#endif
getTextBufferCanUndo :: (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferCanUndo :: forall (m :: * -> *) o. (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferCanUndo o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"can-undo"
#if defined(ENABLE_OVERLOADING)
data TextBufferCanUndoPropertyInfo
instance AttrInfo TextBufferCanUndoPropertyInfo where
type AttrAllowedOps TextBufferCanUndoPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TextBufferCanUndoPropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferCanUndoPropertyInfo = (~) ()
type AttrTransferTypeConstraint TextBufferCanUndoPropertyInfo = (~) ()
type AttrTransferType TextBufferCanUndoPropertyInfo = ()
type AttrGetType TextBufferCanUndoPropertyInfo = Bool
type AttrLabel TextBufferCanUndoPropertyInfo = "can-undo"
type AttrOrigin TextBufferCanUndoPropertyInfo = TextBuffer
attrGet = getTextBufferCanUndo
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.canUndo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:canUndo"
})
#endif
getTextBufferCursorPosition :: (MonadIO m, IsTextBuffer o) => o -> m Int32
getTextBufferCursorPosition :: forall (m :: * -> *) o. (MonadIO m, IsTextBuffer o) => o -> m Int32
getTextBufferCursorPosition o
obj = IO Int32 -> m Int32
forall a. IO a -> m a
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
"cursor-position"
#if defined(ENABLE_OVERLOADING)
data TextBufferCursorPositionPropertyInfo
instance AttrInfo TextBufferCursorPositionPropertyInfo where
type AttrAllowedOps TextBufferCursorPositionPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TextBufferCursorPositionPropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferCursorPositionPropertyInfo = (~) ()
type AttrTransferTypeConstraint TextBufferCursorPositionPropertyInfo = (~) ()
type AttrTransferType TextBufferCursorPositionPropertyInfo = ()
type AttrGetType TextBufferCursorPositionPropertyInfo = Int32
type AttrLabel TextBufferCursorPositionPropertyInfo = "cursor-position"
type AttrOrigin TextBufferCursorPositionPropertyInfo = TextBuffer
attrGet = getTextBufferCursorPosition
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.cursorPosition"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:cursorPosition"
})
#endif
getTextBufferEnableUndo :: (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferEnableUndo :: forall (m :: * -> *) o. (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferEnableUndo o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"enable-undo"
setTextBufferEnableUndo :: (MonadIO m, IsTextBuffer o) => o -> Bool -> m ()
setTextBufferEnableUndo :: forall (m :: * -> *) o.
(MonadIO m, IsTextBuffer o) =>
o -> Bool -> m ()
setTextBufferEnableUndo o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"enable-undo" Bool
val
constructTextBufferEnableUndo :: (IsTextBuffer o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructTextBufferEnableUndo :: forall o (m :: * -> *).
(IsTextBuffer o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructTextBufferEnableUndo Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"enable-undo" Bool
val
#if defined(ENABLE_OVERLOADING)
data TextBufferEnableUndoPropertyInfo
instance AttrInfo TextBufferEnableUndoPropertyInfo where
type AttrAllowedOps TextBufferEnableUndoPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint TextBufferEnableUndoPropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferEnableUndoPropertyInfo = (~) Bool
type AttrTransferTypeConstraint TextBufferEnableUndoPropertyInfo = (~) Bool
type AttrTransferType TextBufferEnableUndoPropertyInfo = Bool
type AttrGetType TextBufferEnableUndoPropertyInfo = Bool
type AttrLabel TextBufferEnableUndoPropertyInfo = "enable-undo"
type AttrOrigin TextBufferEnableUndoPropertyInfo = TextBuffer
attrGet = getTextBufferEnableUndo
attrSet = setTextBufferEnableUndo
attrTransfer _ v = do
return v
attrConstruct = constructTextBufferEnableUndo
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.enableUndo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:enableUndo"
})
#endif
getTextBufferHasSelection :: (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferHasSelection :: forall (m :: * -> *) o. (MonadIO m, IsTextBuffer o) => o -> m Bool
getTextBufferHasSelection o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"has-selection"
#if defined(ENABLE_OVERLOADING)
data TextBufferHasSelectionPropertyInfo
instance AttrInfo TextBufferHasSelectionPropertyInfo where
type AttrAllowedOps TextBufferHasSelectionPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TextBufferHasSelectionPropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferHasSelectionPropertyInfo = (~) ()
type AttrTransferTypeConstraint TextBufferHasSelectionPropertyInfo = (~) ()
type AttrTransferType TextBufferHasSelectionPropertyInfo = ()
type AttrGetType TextBufferHasSelectionPropertyInfo = Bool
type AttrLabel TextBufferHasSelectionPropertyInfo = "has-selection"
type AttrOrigin TextBufferHasSelectionPropertyInfo = TextBuffer
attrGet = getTextBufferHasSelection
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.hasSelection"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:hasSelection"
})
#endif
getTextBufferTagTable :: (MonadIO m, IsTextBuffer o) => o -> m Gtk.TextTagTable.TextTagTable
getTextBufferTagTable :: forall (m :: * -> *) o.
(MonadIO m, IsTextBuffer o) =>
o -> m TextTagTable
getTextBufferTagTable o
obj = IO TextTagTable -> m TextTagTable
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TextTagTable -> m TextTagTable)
-> IO TextTagTable -> m TextTagTable
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe TextTagTable) -> IO TextTagTable
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getTextBufferTagTable" (IO (Maybe TextTagTable) -> IO TextTagTable)
-> IO (Maybe TextTagTable) -> IO TextTagTable
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr TextTagTable -> TextTagTable)
-> IO (Maybe TextTagTable)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"tag-table" ManagedPtr TextTagTable -> TextTagTable
Gtk.TextTagTable.TextTagTable
constructTextBufferTagTable :: (IsTextBuffer o, MIO.MonadIO m, Gtk.TextTagTable.IsTextTagTable a) => a -> m (GValueConstruct o)
constructTextBufferTagTable :: forall o (m :: * -> *) a.
(IsTextBuffer o, MonadIO m, IsTextTagTable a) =>
a -> m (GValueConstruct o)
constructTextBufferTagTable a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"tag-table" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data TextBufferTagTablePropertyInfo
instance AttrInfo TextBufferTagTablePropertyInfo where
type AttrAllowedOps TextBufferTagTablePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TextBufferTagTablePropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferTagTablePropertyInfo = Gtk.TextTagTable.IsTextTagTable
type AttrTransferTypeConstraint TextBufferTagTablePropertyInfo = Gtk.TextTagTable.IsTextTagTable
type AttrTransferType TextBufferTagTablePropertyInfo = Gtk.TextTagTable.TextTagTable
type AttrGetType TextBufferTagTablePropertyInfo = Gtk.TextTagTable.TextTagTable
type AttrLabel TextBufferTagTablePropertyInfo = "tag-table"
type AttrOrigin TextBufferTagTablePropertyInfo = TextBuffer
attrGet = getTextBufferTagTable
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gtk.TextTagTable.TextTagTable v
attrConstruct = constructTextBufferTagTable
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.tagTable"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:tagTable"
})
#endif
getTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe T.Text)
getTextBufferText :: forall (m :: * -> *) o.
(MonadIO m, IsTextBuffer o) =>
o -> m (Maybe Text)
getTextBufferText o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
"text"
setTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> T.Text -> m ()
setTextBufferText :: forall (m :: * -> *) o.
(MonadIO m, IsTextBuffer o) =>
o -> Text -> m ()
setTextBufferText o
obj Text
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructTextBufferText :: (IsTextBuffer o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructTextBufferText :: forall o (m :: * -> *).
(IsTextBuffer o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructTextBufferText Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"text" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> m ()
clearTextBufferText :: forall (m :: * -> *) o. (MonadIO m, IsTextBuffer o) => o -> m ()
clearTextBufferText o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data TextBufferTextPropertyInfo
instance AttrInfo TextBufferTextPropertyInfo where
type AttrAllowedOps TextBufferTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TextBufferTextPropertyInfo = IsTextBuffer
type AttrSetTypeConstraint TextBufferTextPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint TextBufferTextPropertyInfo = (~) T.Text
type AttrTransferType TextBufferTextPropertyInfo = T.Text
type AttrGetType TextBufferTextPropertyInfo = (Maybe T.Text)
type AttrLabel TextBufferTextPropertyInfo = "text"
type AttrOrigin TextBufferTextPropertyInfo = TextBuffer
attrGet = getTextBufferText
attrSet = setTextBufferText
attrTransfer _ v = do
return v
attrConstruct = constructTextBufferText
attrClear = clearTextBufferText
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.text"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#g:attr:text"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TextBuffer
type instance O.AttributeList TextBuffer = TextBufferAttributeList
type TextBufferAttributeList = ('[ '("canRedo", TextBufferCanRedoPropertyInfo), '("canUndo", TextBufferCanUndoPropertyInfo), '("cursorPosition", TextBufferCursorPositionPropertyInfo), '("enableUndo", TextBufferEnableUndoPropertyInfo), '("hasSelection", TextBufferHasSelectionPropertyInfo), '("tagTable", TextBufferTagTablePropertyInfo), '("text", TextBufferTextPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
textBufferCanRedo :: AttrLabelProxy "canRedo"
textBufferCanRedo = AttrLabelProxy
textBufferCanUndo :: AttrLabelProxy "canUndo"
textBufferCanUndo = AttrLabelProxy
textBufferCursorPosition :: AttrLabelProxy "cursorPosition"
textBufferCursorPosition = AttrLabelProxy
textBufferEnableUndo :: AttrLabelProxy "enableUndo"
textBufferEnableUndo = AttrLabelProxy
textBufferHasSelection :: AttrLabelProxy "hasSelection"
textBufferHasSelection = AttrLabelProxy
textBufferTagTable :: AttrLabelProxy "tagTable"
textBufferTagTable = AttrLabelProxy
textBufferText :: AttrLabelProxy "text"
textBufferText = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TextBuffer = TextBufferSignalList
type TextBufferSignalList = ('[ '("applyTag", TextBufferApplyTagSignalInfo), '("beginUserAction", TextBufferBeginUserActionSignalInfo), '("changed", TextBufferChangedSignalInfo), '("deleteRange", TextBufferDeleteRangeSignalInfo), '("endUserAction", TextBufferEndUserActionSignalInfo), '("insertChildAnchor", TextBufferInsertChildAnchorSignalInfo), '("insertPaintable", TextBufferInsertPaintableSignalInfo), '("insertText", TextBufferInsertTextSignalInfo), '("markDeleted", TextBufferMarkDeletedSignalInfo), '("markSet", TextBufferMarkSetSignalInfo), '("modifiedChanged", TextBufferModifiedChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("pasteDone", TextBufferPasteDoneSignalInfo), '("redo", TextBufferRedoSignalInfo), '("removeTag", TextBufferRemoveTagSignalInfo), '("undo", TextBufferUndoSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_text_buffer_new" gtk_text_buffer_new ::
Ptr Gtk.TextTagTable.TextTagTable ->
IO (Ptr TextBuffer)
textBufferNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTagTable.IsTextTagTable a) =>
Maybe (a)
-> m TextBuffer
textBufferNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextTagTable a) =>
Maybe a -> m TextBuffer
textBufferNew Maybe a
table = IO TextBuffer -> m TextBuffer
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextBuffer -> m TextBuffer) -> IO TextBuffer -> m TextBuffer
forall a b. (a -> b) -> a -> b
$ do
maybeTable <- case Maybe a
table of
Maybe a
Nothing -> Ptr TextTagTable -> IO (Ptr TextTagTable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTagTable
forall a. Ptr a
FP.nullPtr
Just a
jTable -> do
jTable' <- a -> IO (Ptr TextTagTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTable
return jTable'
result <- gtk_text_buffer_new maybeTable
checkUnexpectedReturnNULL "textBufferNew" result
result' <- (wrapObject TextBuffer) result
whenJust table touchManagedPtr
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_text_buffer_add_commit_notify" gtk_text_buffer_add_commit_notify ::
Ptr TextBuffer ->
CUInt ->
FunPtr Gtk.Callbacks.C_TextBufferCommitNotify ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO Word32
textBufferAddCommitNotify ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> [Gtk.Flags.TextBufferNotifyFlags]
-> Gtk.Callbacks.TextBufferCommitNotify
-> m Word32
textBufferAddCommitNotify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> [TextBufferNotifyFlags] -> TextBufferCommitNotify -> m Word32
textBufferAddCommitNotify a
buffer [TextBufferNotifyFlags]
flags TextBufferCommitNotify
commitNotify = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
let flags' = [TextBufferNotifyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TextBufferNotifyFlags]
flags
commitNotify' <- Gtk.Callbacks.mk_TextBufferCommitNotify (Gtk.Callbacks.wrap_TextBufferCommitNotify Nothing (Gtk.Callbacks.drop_closures_TextBufferCommitNotify commitNotify))
let userData = FunPtr C_TextBufferCommitNotify -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TextBufferCommitNotify
commitNotify'
let destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
result <- gtk_text_buffer_add_commit_notify buffer' flags' commitNotify' userData destroy
touchManagedPtr buffer
return result
#if defined(ENABLE_OVERLOADING)
data TextBufferAddCommitNotifyMethodInfo
instance (signature ~ ([Gtk.Flags.TextBufferNotifyFlags] -> Gtk.Callbacks.TextBufferCommitNotify -> m Word32), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferAddCommitNotifyMethodInfo a signature where
overloadedMethod = textBufferAddCommitNotify
instance O.OverloadedMethodInfo TextBufferAddCommitNotifyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferAddCommitNotify",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferAddCommitNotify"
})
#endif
foreign import ccall "gtk_text_buffer_add_mark" gtk_text_buffer_add_mark ::
Ptr TextBuffer ->
Ptr Gtk.TextMark.TextMark ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferAddMark ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) =>
a
-> b
-> Gtk.TextIter.TextIter
-> m ()
textBufferAddMark :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) =>
a -> b -> TextIter -> m ()
textBufferAddMark a
buffer b
mark TextIter
where_ = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
mark' <- unsafeManagedPtrCastPtr mark
where_' <- unsafeManagedPtrGetPtr where_
gtk_text_buffer_add_mark buffer' mark' where_'
touchManagedPtr buffer
touchManagedPtr mark
touchManagedPtr where_
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferAddMarkMethodInfo
instance (signature ~ (b -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) => O.OverloadedMethod TextBufferAddMarkMethodInfo a signature where
overloadedMethod = textBufferAddMark
instance O.OverloadedMethodInfo TextBufferAddMarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferAddMark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferAddMark"
})
#endif
foreign import ccall "gtk_text_buffer_add_selection_clipboard" gtk_text_buffer_add_selection_clipboard ::
Ptr TextBuffer ->
Ptr Gdk.Clipboard.Clipboard ->
IO ()
textBufferAddSelectionClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) =>
a
-> b
-> m ()
textBufferAddSelectionClipboard :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) =>
a -> b -> m ()
textBufferAddSelectionClipboard a
buffer b
clipboard = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
clipboard' <- unsafeManagedPtrCastPtr clipboard
gtk_text_buffer_add_selection_clipboard buffer' clipboard'
touchManagedPtr buffer
touchManagedPtr clipboard
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferAddSelectionClipboardMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) => O.OverloadedMethod TextBufferAddSelectionClipboardMethodInfo a signature where
overloadedMethod = textBufferAddSelectionClipboard
instance O.OverloadedMethodInfo TextBufferAddSelectionClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferAddSelectionClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferAddSelectionClipboard"
})
#endif
foreign import ccall "gtk_text_buffer_apply_tag" gtk_text_buffer_apply_tag ::
Ptr TextBuffer ->
Ptr Gtk.TextTag.TextTag ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferApplyTag ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextTag.IsTextTag b) =>
a
-> b
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferApplyTag :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) =>
a -> b -> TextIter -> TextIter -> m ()
textBufferApplyTag a
buffer b
tag TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
tag' <- unsafeManagedPtrCastPtr tag
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_apply_tag buffer' tag' start' end'
touchManagedPtr buffer
touchManagedPtr tag
touchManagedPtr start
touchManagedPtr end
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferApplyTagMethodInfo
instance (signature ~ (b -> Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a, Gtk.TextTag.IsTextTag b) => O.OverloadedMethod TextBufferApplyTagMethodInfo a signature where
overloadedMethod = textBufferApplyTag
instance O.OverloadedMethodInfo TextBufferApplyTagMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferApplyTag",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferApplyTag"
})
#endif
foreign import ccall "gtk_text_buffer_apply_tag_by_name" gtk_text_buffer_apply_tag_by_name ::
Ptr TextBuffer ->
CString ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferApplyTagByName ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferApplyTagByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> TextIter -> TextIter -> m ()
textBufferApplyTagByName a
buffer Text
name TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
name' <- textToCString name
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_apply_tag_by_name buffer' name' start' end'
touchManagedPtr buffer
touchManagedPtr start
touchManagedPtr end
freeMem name'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferApplyTagByNameMethodInfo
instance (signature ~ (T.Text -> Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferApplyTagByNameMethodInfo a signature where
overloadedMethod = textBufferApplyTagByName
instance O.OverloadedMethodInfo TextBufferApplyTagByNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferApplyTagByName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferApplyTagByName"
})
#endif
foreign import ccall "gtk_text_buffer_backspace" gtk_text_buffer_backspace ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
CInt ->
IO CInt
textBufferBackspace ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Bool
-> Bool
-> m Bool
textBufferBackspace :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> Bool -> Bool -> m Bool
textBufferBackspace a
buffer TextIter
iter Bool
interactive Bool
defaultEditable = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
let interactive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
interactive
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
result <- gtk_text_buffer_backspace buffer' iter' interactive' defaultEditable'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferBackspaceMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Bool -> Bool -> m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferBackspaceMethodInfo a signature where
overloadedMethod = textBufferBackspace
instance O.OverloadedMethodInfo TextBufferBackspaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferBackspace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferBackspace"
})
#endif
foreign import ccall "gtk_text_buffer_begin_irreversible_action" gtk_text_buffer_begin_irreversible_action ::
Ptr TextBuffer ->
IO ()
textBufferBeginIrreversibleAction ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ()
textBufferBeginIrreversibleAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ()
textBufferBeginIrreversibleAction a
buffer = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_begin_irreversible_action buffer'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferBeginIrreversibleActionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferBeginIrreversibleActionMethodInfo a signature where
overloadedMethod = textBufferBeginIrreversibleAction
instance O.OverloadedMethodInfo TextBufferBeginIrreversibleActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferBeginIrreversibleAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferBeginIrreversibleAction"
})
#endif
foreign import ccall "gtk_text_buffer_begin_user_action" gtk_text_buffer_begin_user_action ::
Ptr TextBuffer ->
IO ()
textBufferBeginUserAction ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ()
textBufferBeginUserAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ()
textBufferBeginUserAction a
buffer = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_begin_user_action buffer'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferBeginUserActionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferBeginUserActionMethodInfo a signature where
overloadedMethod = textBufferBeginUserAction
instance O.OverloadedMethodInfo TextBufferBeginUserActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferBeginUserAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferBeginUserAction"
})
#endif
foreign import ccall "gtk_text_buffer_copy_clipboard" gtk_text_buffer_copy_clipboard ::
Ptr TextBuffer ->
Ptr Gdk.Clipboard.Clipboard ->
IO ()
textBufferCopyClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) =>
a
-> b
-> m ()
textBufferCopyClipboard :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) =>
a -> b -> m ()
textBufferCopyClipboard a
buffer b
clipboard = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
clipboard' <- unsafeManagedPtrCastPtr clipboard
gtk_text_buffer_copy_clipboard buffer' clipboard'
touchManagedPtr buffer
touchManagedPtr clipboard
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferCopyClipboardMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) => O.OverloadedMethod TextBufferCopyClipboardMethodInfo a signature where
overloadedMethod = textBufferCopyClipboard
instance O.OverloadedMethodInfo TextBufferCopyClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferCopyClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferCopyClipboard"
})
#endif
foreign import ccall "gtk_text_buffer_create_child_anchor" gtk_text_buffer_create_child_anchor ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
IO (Ptr Gtk.TextChildAnchor.TextChildAnchor)
textBufferCreateChildAnchor ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> m Gtk.TextChildAnchor.TextChildAnchor
textBufferCreateChildAnchor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> m TextChildAnchor
textBufferCreateChildAnchor a
buffer TextIter
iter = IO TextChildAnchor -> m TextChildAnchor
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextChildAnchor -> m TextChildAnchor)
-> IO TextChildAnchor -> m TextChildAnchor
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
result <- gtk_text_buffer_create_child_anchor buffer' iter'
checkUnexpectedReturnNULL "textBufferCreateChildAnchor" result
result' <- (newObject Gtk.TextChildAnchor.TextChildAnchor) result
touchManagedPtr buffer
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferCreateChildAnchorMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> m Gtk.TextChildAnchor.TextChildAnchor), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferCreateChildAnchorMethodInfo a signature where
overloadedMethod = textBufferCreateChildAnchor
instance O.OverloadedMethodInfo TextBufferCreateChildAnchorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferCreateChildAnchor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferCreateChildAnchor"
})
#endif
foreign import ccall "gtk_text_buffer_create_mark" gtk_text_buffer_create_mark ::
Ptr TextBuffer ->
CString ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
IO (Ptr Gtk.TextMark.TextMark)
textBufferCreateMark ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Maybe (T.Text)
-> Gtk.TextIter.TextIter
-> Bool
-> m Gtk.TextMark.TextMark
textBufferCreateMark :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Maybe Text -> TextIter -> Bool -> m TextMark
textBufferCreateMark a
buffer Maybe Text
markName TextIter
where_ Bool
leftGravity = IO TextMark -> m TextMark
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextMark -> m TextMark) -> IO TextMark -> m TextMark
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
maybeMarkName <- case markName of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jMarkName -> do
jMarkName' <- Text -> IO CString
textToCString Text
jMarkName
return jMarkName'
where_' <- unsafeManagedPtrGetPtr where_
let leftGravity' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
leftGravity
result <- gtk_text_buffer_create_mark buffer' maybeMarkName where_' leftGravity'
checkUnexpectedReturnNULL "textBufferCreateMark" result
result' <- (newObject Gtk.TextMark.TextMark) result
touchManagedPtr buffer
touchManagedPtr where_
freeMem maybeMarkName
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferCreateMarkMethodInfo
instance (signature ~ (Maybe (T.Text) -> Gtk.TextIter.TextIter -> Bool -> m Gtk.TextMark.TextMark), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferCreateMarkMethodInfo a signature where
overloadedMethod = textBufferCreateMark
instance O.OverloadedMethodInfo TextBufferCreateMarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferCreateMark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferCreateMark"
})
#endif
foreign import ccall "gtk_text_buffer_cut_clipboard" gtk_text_buffer_cut_clipboard ::
Ptr TextBuffer ->
Ptr Gdk.Clipboard.Clipboard ->
CInt ->
IO ()
textBufferCutClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) =>
a
-> b
-> Bool
-> m ()
textBufferCutClipboard :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) =>
a -> b -> Bool -> m ()
textBufferCutClipboard a
buffer b
clipboard Bool
defaultEditable = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
clipboard' <- unsafeManagedPtrCastPtr clipboard
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
gtk_text_buffer_cut_clipboard buffer' clipboard' defaultEditable'
touchManagedPtr buffer
touchManagedPtr clipboard
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferCutClipboardMethodInfo
instance (signature ~ (b -> Bool -> m ()), MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) => O.OverloadedMethod TextBufferCutClipboardMethodInfo a signature where
overloadedMethod = textBufferCutClipboard
instance O.OverloadedMethodInfo TextBufferCutClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferCutClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferCutClipboard"
})
#endif
foreign import ccall "gtk_text_buffer_delete" gtk_text_buffer_delete ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferDelete ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferDelete :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> m ()
textBufferDelete a
buffer TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_delete buffer' start' end'
touchManagedPtr buffer
touchManagedPtr start
touchManagedPtr end
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferDeleteMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferDeleteMethodInfo a signature where
overloadedMethod = textBufferDelete
instance O.OverloadedMethodInfo TextBufferDeleteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferDelete",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferDelete"
})
#endif
foreign import ccall "gtk_text_buffer_delete_interactive" gtk_text_buffer_delete_interactive ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
IO CInt
textBufferDeleteInteractive ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> Bool
-> m Bool
textBufferDeleteInteractive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> Bool -> m Bool
textBufferDeleteInteractive a
buffer TextIter
startIter TextIter
endIter Bool
defaultEditable = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
startIter' <- unsafeManagedPtrGetPtr startIter
endIter' <- unsafeManagedPtrGetPtr endIter
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
result <- gtk_text_buffer_delete_interactive buffer' startIter' endIter' defaultEditable'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
touchManagedPtr startIter
touchManagedPtr endIter
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferDeleteInteractiveMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> Bool -> m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferDeleteInteractiveMethodInfo a signature where
overloadedMethod = textBufferDeleteInteractive
instance O.OverloadedMethodInfo TextBufferDeleteInteractiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferDeleteInteractive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferDeleteInteractive"
})
#endif
foreign import ccall "gtk_text_buffer_delete_mark" gtk_text_buffer_delete_mark ::
Ptr TextBuffer ->
Ptr Gtk.TextMark.TextMark ->
IO ()
textBufferDeleteMark ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) =>
a
-> b
-> m ()
textBufferDeleteMark :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) =>
a -> b -> m ()
textBufferDeleteMark a
buffer b
mark = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
mark' <- unsafeManagedPtrCastPtr mark
gtk_text_buffer_delete_mark buffer' mark'
touchManagedPtr buffer
touchManagedPtr mark
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferDeleteMarkMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) => O.OverloadedMethod TextBufferDeleteMarkMethodInfo a signature where
overloadedMethod = textBufferDeleteMark
instance O.OverloadedMethodInfo TextBufferDeleteMarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferDeleteMark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferDeleteMark"
})
#endif
foreign import ccall "gtk_text_buffer_delete_mark_by_name" gtk_text_buffer_delete_mark_by_name ::
Ptr TextBuffer ->
CString ->
IO ()
textBufferDeleteMarkByName ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> m ()
textBufferDeleteMarkByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> m ()
textBufferDeleteMarkByName a
buffer Text
name = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
name' <- textToCString name
gtk_text_buffer_delete_mark_by_name buffer' name'
touchManagedPtr buffer
freeMem name'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferDeleteMarkByNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferDeleteMarkByNameMethodInfo a signature where
overloadedMethod = textBufferDeleteMarkByName
instance O.OverloadedMethodInfo TextBufferDeleteMarkByNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferDeleteMarkByName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferDeleteMarkByName"
})
#endif
foreign import ccall "gtk_text_buffer_delete_selection" gtk_text_buffer_delete_selection ::
Ptr TextBuffer ->
CInt ->
CInt ->
IO CInt
textBufferDeleteSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Bool
-> Bool
-> m Bool
textBufferDeleteSelection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Bool -> Bool -> m Bool
textBufferDeleteSelection a
buffer Bool
interactive Bool
defaultEditable = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
let interactive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
interactive
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
result <- gtk_text_buffer_delete_selection buffer' interactive' defaultEditable'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferDeleteSelectionMethodInfo
instance (signature ~ (Bool -> Bool -> m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferDeleteSelectionMethodInfo a signature where
overloadedMethod = textBufferDeleteSelection
instance O.OverloadedMethodInfo TextBufferDeleteSelectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferDeleteSelection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferDeleteSelection"
})
#endif
foreign import ccall "gtk_text_buffer_end_irreversible_action" gtk_text_buffer_end_irreversible_action ::
Ptr TextBuffer ->
IO ()
textBufferEndIrreversibleAction ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ()
textBufferEndIrreversibleAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ()
textBufferEndIrreversibleAction a
buffer = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_end_irreversible_action buffer'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferEndIrreversibleActionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferEndIrreversibleActionMethodInfo a signature where
overloadedMethod = textBufferEndIrreversibleAction
instance O.OverloadedMethodInfo TextBufferEndIrreversibleActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferEndIrreversibleAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferEndIrreversibleAction"
})
#endif
foreign import ccall "gtk_text_buffer_end_user_action" gtk_text_buffer_end_user_action ::
Ptr TextBuffer ->
IO ()
textBufferEndUserAction ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ()
textBufferEndUserAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ()
textBufferEndUserAction a
buffer = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_end_user_action buffer'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferEndUserActionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferEndUserActionMethodInfo a signature where
overloadedMethod = textBufferEndUserAction
instance O.OverloadedMethodInfo TextBufferEndUserActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferEndUserAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferEndUserAction"
})
#endif
foreign import ccall "gtk_text_buffer_get_bounds" gtk_text_buffer_get_bounds ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferGetBounds ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ((Gtk.TextIter.TextIter, Gtk.TextIter.TextIter))
textBufferGetBounds :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m (TextIter, TextIter)
textBufferGetBounds a
buffer = IO (TextIter, TextIter) -> m (TextIter, TextIter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (TextIter, TextIter) -> m (TextIter, TextIter))
-> IO (TextIter, TextIter) -> m (TextIter, TextIter)
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
start <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
end <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
gtk_text_buffer_get_bounds buffer' start end
start' <- (wrapBoxed Gtk.TextIter.TextIter) start
end' <- (wrapBoxed Gtk.TextIter.TextIter) end
touchManagedPtr buffer
return (start', end')
#if defined(ENABLE_OVERLOADING)
data TextBufferGetBoundsMethodInfo
instance (signature ~ (m ((Gtk.TextIter.TextIter, Gtk.TextIter.TextIter))), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetBoundsMethodInfo a signature where
overloadedMethod = textBufferGetBounds
instance O.OverloadedMethodInfo TextBufferGetBoundsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetBounds",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetBounds"
})
#endif
foreign import ccall "gtk_text_buffer_get_can_redo" gtk_text_buffer_get_can_redo ::
Ptr TextBuffer ->
IO CInt
textBufferGetCanRedo ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Bool
textBufferGetCanRedo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Bool
textBufferGetCanRedo a
buffer = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_can_redo buffer'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetCanRedoMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetCanRedoMethodInfo a signature where
overloadedMethod = textBufferGetCanRedo
instance O.OverloadedMethodInfo TextBufferGetCanRedoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetCanRedo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetCanRedo"
})
#endif
foreign import ccall "gtk_text_buffer_get_can_undo" gtk_text_buffer_get_can_undo ::
Ptr TextBuffer ->
IO CInt
textBufferGetCanUndo ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Bool
textBufferGetCanUndo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Bool
textBufferGetCanUndo a
buffer = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_can_undo buffer'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetCanUndoMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetCanUndoMethodInfo a signature where
overloadedMethod = textBufferGetCanUndo
instance O.OverloadedMethodInfo TextBufferGetCanUndoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetCanUndo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetCanUndo"
})
#endif
foreign import ccall "gtk_text_buffer_get_char_count" gtk_text_buffer_get_char_count ::
Ptr TextBuffer ->
IO Int32
textBufferGetCharCount ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Int32
textBufferGetCharCount :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Int32
textBufferGetCharCount a
buffer = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_char_count buffer'
touchManagedPtr buffer
return result
#if defined(ENABLE_OVERLOADING)
data TextBufferGetCharCountMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetCharCountMethodInfo a signature where
overloadedMethod = textBufferGetCharCount
instance O.OverloadedMethodInfo TextBufferGetCharCountMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetCharCount",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetCharCount"
})
#endif
foreign import ccall "gtk_text_buffer_get_enable_undo" gtk_text_buffer_get_enable_undo ::
Ptr TextBuffer ->
IO CInt
textBufferGetEnableUndo ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Bool
textBufferGetEnableUndo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Bool
textBufferGetEnableUndo a
buffer = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_enable_undo buffer'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetEnableUndoMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetEnableUndoMethodInfo a signature where
overloadedMethod = textBufferGetEnableUndo
instance O.OverloadedMethodInfo TextBufferGetEnableUndoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetEnableUndo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetEnableUndo"
})
#endif
foreign import ccall "gtk_text_buffer_get_end_iter" gtk_text_buffer_get_end_iter ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferGetEndIter ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m (Gtk.TextIter.TextIter)
textBufferGetEndIter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m TextIter
textBufferGetEndIter a
buffer = IO TextIter -> m TextIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
gtk_text_buffer_get_end_iter buffer' iter
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
return iter'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetEndIterMethodInfo
instance (signature ~ (m (Gtk.TextIter.TextIter)), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetEndIterMethodInfo a signature where
overloadedMethod = textBufferGetEndIter
instance O.OverloadedMethodInfo TextBufferGetEndIterMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetEndIter",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetEndIter"
})
#endif
foreign import ccall "gtk_text_buffer_get_has_selection" gtk_text_buffer_get_has_selection ::
Ptr TextBuffer ->
IO CInt
textBufferGetHasSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Bool
textBufferGetHasSelection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Bool
textBufferGetHasSelection a
buffer = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_has_selection buffer'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetHasSelectionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetHasSelectionMethodInfo a signature where
overloadedMethod = textBufferGetHasSelection
instance O.OverloadedMethodInfo TextBufferGetHasSelectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetHasSelection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetHasSelection"
})
#endif
foreign import ccall "gtk_text_buffer_get_insert" gtk_text_buffer_get_insert ::
Ptr TextBuffer ->
IO (Ptr Gtk.TextMark.TextMark)
textBufferGetInsert ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Gtk.TextMark.TextMark
textBufferGetInsert :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m TextMark
textBufferGetInsert a
buffer = IO TextMark -> m TextMark
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextMark -> m TextMark) -> IO TextMark -> m TextMark
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_insert buffer'
checkUnexpectedReturnNULL "textBufferGetInsert" result
result' <- (newObject Gtk.TextMark.TextMark) result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetInsertMethodInfo
instance (signature ~ (m Gtk.TextMark.TextMark), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetInsertMethodInfo a signature where
overloadedMethod = textBufferGetInsert
instance O.OverloadedMethodInfo TextBufferGetInsertMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetInsert",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetInsert"
})
#endif
foreign import ccall "gtk_text_buffer_get_iter_at_child_anchor" gtk_text_buffer_get_iter_at_child_anchor ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextChildAnchor.TextChildAnchor ->
IO ()
textBufferGetIterAtChildAnchor ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextChildAnchor.IsTextChildAnchor b) =>
a
-> b
-> m (Gtk.TextIter.TextIter)
textBufferGetIterAtChildAnchor :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextChildAnchor b) =>
a -> b -> m TextIter
textBufferGetIterAtChildAnchor a
buffer b
anchor = IO TextIter -> m TextIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
anchor' <- unsafeManagedPtrCastPtr anchor
gtk_text_buffer_get_iter_at_child_anchor buffer' iter anchor'
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
touchManagedPtr anchor
return iter'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetIterAtChildAnchorMethodInfo
instance (signature ~ (b -> m (Gtk.TextIter.TextIter)), MonadIO m, IsTextBuffer a, Gtk.TextChildAnchor.IsTextChildAnchor b) => O.OverloadedMethod TextBufferGetIterAtChildAnchorMethodInfo a signature where
overloadedMethod = textBufferGetIterAtChildAnchor
instance O.OverloadedMethodInfo TextBufferGetIterAtChildAnchorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetIterAtChildAnchor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetIterAtChildAnchor"
})
#endif
foreign import ccall "gtk_text_buffer_get_iter_at_line" gtk_text_buffer_get_iter_at_line ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Int32 ->
IO CInt
textBufferGetIterAtLine ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Int32
-> m ((Bool, Gtk.TextIter.TextIter))
textBufferGetIterAtLine :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Int32 -> m (Bool, TextIter)
textBufferGetIterAtLine a
buffer Int32
lineNumber = IO (Bool, TextIter) -> m (Bool, TextIter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextIter) -> m (Bool, TextIter))
-> IO (Bool, TextIter) -> m (Bool, TextIter)
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
result <- gtk_text_buffer_get_iter_at_line buffer' iter lineNumber
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
return (result', iter')
#if defined(ENABLE_OVERLOADING)
data TextBufferGetIterAtLineMethodInfo
instance (signature ~ (Int32 -> m ((Bool, Gtk.TextIter.TextIter))), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetIterAtLineMethodInfo a signature where
overloadedMethod = textBufferGetIterAtLine
instance O.OverloadedMethodInfo TextBufferGetIterAtLineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetIterAtLine",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetIterAtLine"
})
#endif
foreign import ccall "gtk_text_buffer_get_iter_at_line_index" gtk_text_buffer_get_iter_at_line_index ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Int32 ->
Int32 ->
IO CInt
textBufferGetIterAtLineIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Int32
-> Int32
-> m ((Bool, Gtk.TextIter.TextIter))
textBufferGetIterAtLineIndex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Int32 -> Int32 -> m (Bool, TextIter)
textBufferGetIterAtLineIndex a
buffer Int32
lineNumber Int32
byteIndex = IO (Bool, TextIter) -> m (Bool, TextIter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextIter) -> m (Bool, TextIter))
-> IO (Bool, TextIter) -> m (Bool, TextIter)
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
result <- gtk_text_buffer_get_iter_at_line_index buffer' iter lineNumber byteIndex
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
return (result', iter')
#if defined(ENABLE_OVERLOADING)
data TextBufferGetIterAtLineIndexMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ((Bool, Gtk.TextIter.TextIter))), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetIterAtLineIndexMethodInfo a signature where
overloadedMethod = textBufferGetIterAtLineIndex
instance O.OverloadedMethodInfo TextBufferGetIterAtLineIndexMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetIterAtLineIndex",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetIterAtLineIndex"
})
#endif
foreign import ccall "gtk_text_buffer_get_iter_at_line_offset" gtk_text_buffer_get_iter_at_line_offset ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Int32 ->
Int32 ->
IO CInt
textBufferGetIterAtLineOffset ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Int32
-> Int32
-> m ((Bool, Gtk.TextIter.TextIter))
textBufferGetIterAtLineOffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Int32 -> Int32 -> m (Bool, TextIter)
textBufferGetIterAtLineOffset a
buffer Int32
lineNumber Int32
charOffset = IO (Bool, TextIter) -> m (Bool, TextIter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextIter) -> m (Bool, TextIter))
-> IO (Bool, TextIter) -> m (Bool, TextIter)
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
result <- gtk_text_buffer_get_iter_at_line_offset buffer' iter lineNumber charOffset
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
return (result', iter')
#if defined(ENABLE_OVERLOADING)
data TextBufferGetIterAtLineOffsetMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ((Bool, Gtk.TextIter.TextIter))), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetIterAtLineOffsetMethodInfo a signature where
overloadedMethod = textBufferGetIterAtLineOffset
instance O.OverloadedMethodInfo TextBufferGetIterAtLineOffsetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetIterAtLineOffset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetIterAtLineOffset"
})
#endif
foreign import ccall "gtk_text_buffer_get_iter_at_mark" gtk_text_buffer_get_iter_at_mark ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextMark.TextMark ->
IO ()
textBufferGetIterAtMark ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) =>
a
-> b
-> m (Gtk.TextIter.TextIter)
textBufferGetIterAtMark :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) =>
a -> b -> m TextIter
textBufferGetIterAtMark a
buffer b
mark = IO TextIter -> m TextIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
mark' <- unsafeManagedPtrCastPtr mark
gtk_text_buffer_get_iter_at_mark buffer' iter mark'
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
touchManagedPtr mark
return iter'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetIterAtMarkMethodInfo
instance (signature ~ (b -> m (Gtk.TextIter.TextIter)), MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) => O.OverloadedMethod TextBufferGetIterAtMarkMethodInfo a signature where
overloadedMethod = textBufferGetIterAtMark
instance O.OverloadedMethodInfo TextBufferGetIterAtMarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetIterAtMark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetIterAtMark"
})
#endif
foreign import ccall "gtk_text_buffer_get_iter_at_offset" gtk_text_buffer_get_iter_at_offset ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Int32 ->
IO ()
textBufferGetIterAtOffset ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Int32
-> m (Gtk.TextIter.TextIter)
textBufferGetIterAtOffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Int32 -> m TextIter
textBufferGetIterAtOffset a
buffer Int32
charOffset = IO TextIter -> m TextIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
gtk_text_buffer_get_iter_at_offset buffer' iter charOffset
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
return iter'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetIterAtOffsetMethodInfo
instance (signature ~ (Int32 -> m (Gtk.TextIter.TextIter)), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetIterAtOffsetMethodInfo a signature where
overloadedMethod = textBufferGetIterAtOffset
instance O.OverloadedMethodInfo TextBufferGetIterAtOffsetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetIterAtOffset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetIterAtOffset"
})
#endif
foreign import ccall "gtk_text_buffer_get_line_count" gtk_text_buffer_get_line_count ::
Ptr TextBuffer ->
IO Int32
textBufferGetLineCount ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Int32
textBufferGetLineCount :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Int32
textBufferGetLineCount a
buffer = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_line_count buffer'
touchManagedPtr buffer
return result
#if defined(ENABLE_OVERLOADING)
data TextBufferGetLineCountMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetLineCountMethodInfo a signature where
overloadedMethod = textBufferGetLineCount
instance O.OverloadedMethodInfo TextBufferGetLineCountMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetLineCount",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetLineCount"
})
#endif
foreign import ccall "gtk_text_buffer_get_mark" gtk_text_buffer_get_mark ::
Ptr TextBuffer ->
CString ->
IO (Ptr Gtk.TextMark.TextMark)
textBufferGetMark ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> m (Maybe Gtk.TextMark.TextMark)
textBufferGetMark :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> m (Maybe TextMark)
textBufferGetMark a
buffer Text
name = IO (Maybe TextMark) -> m (Maybe TextMark)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TextMark) -> m (Maybe TextMark))
-> IO (Maybe TextMark) -> m (Maybe TextMark)
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
name' <- textToCString name
result <- gtk_text_buffer_get_mark buffer' name'
maybeResult <- convertIfNonNull result $ \Ptr TextMark
result' -> do
result'' <- ((ManagedPtr TextMark -> TextMark) -> Ptr TextMark -> IO TextMark
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextMark -> TextMark
Gtk.TextMark.TextMark) Ptr TextMark
result'
return result''
touchManagedPtr buffer
freeMem name'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TextBufferGetMarkMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.TextMark.TextMark)), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetMarkMethodInfo a signature where
overloadedMethod = textBufferGetMark
instance O.OverloadedMethodInfo TextBufferGetMarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetMark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetMark"
})
#endif
foreign import ccall "gtk_text_buffer_get_max_undo_levels" gtk_text_buffer_get_max_undo_levels ::
Ptr TextBuffer ->
IO Word32
textBufferGetMaxUndoLevels ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Word32
textBufferGetMaxUndoLevels :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Word32
textBufferGetMaxUndoLevels a
buffer = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_max_undo_levels buffer'
touchManagedPtr buffer
return result
#if defined(ENABLE_OVERLOADING)
data TextBufferGetMaxUndoLevelsMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetMaxUndoLevelsMethodInfo a signature where
overloadedMethod = textBufferGetMaxUndoLevels
instance O.OverloadedMethodInfo TextBufferGetMaxUndoLevelsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetMaxUndoLevels",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetMaxUndoLevels"
})
#endif
foreign import ccall "gtk_text_buffer_get_modified" gtk_text_buffer_get_modified ::
Ptr TextBuffer ->
IO CInt
textBufferGetModified ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Bool
textBufferGetModified :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m Bool
textBufferGetModified a
buffer = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_modified buffer'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetModifiedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetModifiedMethodInfo a signature where
overloadedMethod = textBufferGetModified
instance O.OverloadedMethodInfo TextBufferGetModifiedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetModified",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetModified"
})
#endif
foreign import ccall "gtk_text_buffer_get_selection_bound" gtk_text_buffer_get_selection_bound ::
Ptr TextBuffer ->
IO (Ptr Gtk.TextMark.TextMark)
textBufferGetSelectionBound ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Gtk.TextMark.TextMark
textBufferGetSelectionBound :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m TextMark
textBufferGetSelectionBound a
buffer = IO TextMark -> m TextMark
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextMark -> m TextMark) -> IO TextMark -> m TextMark
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_selection_bound buffer'
checkUnexpectedReturnNULL "textBufferGetSelectionBound" result
result' <- (newObject Gtk.TextMark.TextMark) result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetSelectionBoundMethodInfo
instance (signature ~ (m Gtk.TextMark.TextMark), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetSelectionBoundMethodInfo a signature where
overloadedMethod = textBufferGetSelectionBound
instance O.OverloadedMethodInfo TextBufferGetSelectionBoundMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetSelectionBound",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetSelectionBound"
})
#endif
foreign import ccall "gtk_text_buffer_get_selection_bounds" gtk_text_buffer_get_selection_bounds ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO CInt
textBufferGetSelectionBounds ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ((Bool, Gtk.TextIter.TextIter, Gtk.TextIter.TextIter))
textBufferGetSelectionBounds :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m (Bool, TextIter, TextIter)
textBufferGetSelectionBounds a
buffer = IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter))
-> IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter)
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
start <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
end <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
result <- gtk_text_buffer_get_selection_bounds buffer' start end
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
start' <- (wrapBoxed Gtk.TextIter.TextIter) start
end' <- (wrapBoxed Gtk.TextIter.TextIter) end
touchManagedPtr buffer
return (result', start', end')
#if defined(ENABLE_OVERLOADING)
data TextBufferGetSelectionBoundsMethodInfo
instance (signature ~ (m ((Bool, Gtk.TextIter.TextIter, Gtk.TextIter.TextIter))), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetSelectionBoundsMethodInfo a signature where
overloadedMethod = textBufferGetSelectionBounds
instance O.OverloadedMethodInfo TextBufferGetSelectionBoundsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetSelectionBounds",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetSelectionBounds"
})
#endif
foreign import ccall "gtk_text_buffer_get_selection_content" gtk_text_buffer_get_selection_content ::
Ptr TextBuffer ->
IO (Ptr Gdk.ContentProvider.ContentProvider)
textBufferGetSelectionContent ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Gdk.ContentProvider.ContentProvider
textBufferGetSelectionContent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ContentProvider
textBufferGetSelectionContent a
buffer = IO ContentProvider -> m ContentProvider
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ContentProvider -> m ContentProvider)
-> IO ContentProvider -> m ContentProvider
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_selection_content buffer'
checkUnexpectedReturnNULL "textBufferGetSelectionContent" result
result' <- (wrapObject Gdk.ContentProvider.ContentProvider) result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetSelectionContentMethodInfo
instance (signature ~ (m Gdk.ContentProvider.ContentProvider), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetSelectionContentMethodInfo a signature where
overloadedMethod = textBufferGetSelectionContent
instance O.OverloadedMethodInfo TextBufferGetSelectionContentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetSelectionContent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetSelectionContent"
})
#endif
foreign import ccall "gtk_text_buffer_get_slice" gtk_text_buffer_get_slice ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
IO CString
textBufferGetSlice ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> Bool
-> m T.Text
textBufferGetSlice :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> Bool -> m Text
textBufferGetSlice a
buffer TextIter
start TextIter
end Bool
includeHiddenChars = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
let includeHiddenChars' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
includeHiddenChars
result <- gtk_text_buffer_get_slice buffer' start' end' includeHiddenChars'
checkUnexpectedReturnNULL "textBufferGetSlice" result
result' <- cstringToText result
freeMem result
touchManagedPtr buffer
touchManagedPtr start
touchManagedPtr end
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetSliceMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> Bool -> m T.Text), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetSliceMethodInfo a signature where
overloadedMethod = textBufferGetSlice
instance O.OverloadedMethodInfo TextBufferGetSliceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetSlice",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetSlice"
})
#endif
foreign import ccall "gtk_text_buffer_get_start_iter" gtk_text_buffer_get_start_iter ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferGetStartIter ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m (Gtk.TextIter.TextIter)
textBufferGetStartIter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m TextIter
textBufferGetStartIter a
buffer = IO TextIter -> m TextIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter <- SP.callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter)
gtk_text_buffer_get_start_iter buffer' iter
iter' <- (wrapBoxed Gtk.TextIter.TextIter) iter
touchManagedPtr buffer
return iter'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetStartIterMethodInfo
instance (signature ~ (m (Gtk.TextIter.TextIter)), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetStartIterMethodInfo a signature where
overloadedMethod = textBufferGetStartIter
instance O.OverloadedMethodInfo TextBufferGetStartIterMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetStartIter",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetStartIter"
})
#endif
foreign import ccall "gtk_text_buffer_get_tag_table" gtk_text_buffer_get_tag_table ::
Ptr TextBuffer ->
IO (Ptr Gtk.TextTagTable.TextTagTable)
textBufferGetTagTable ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m Gtk.TextTagTable.TextTagTable
textBufferGetTagTable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m TextTagTable
textBufferGetTagTable a
buffer = IO TextTagTable -> m TextTagTable
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextTagTable -> m TextTagTable)
-> IO TextTagTable -> m TextTagTable
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
result <- gtk_text_buffer_get_tag_table buffer'
checkUnexpectedReturnNULL "textBufferGetTagTable" result
result' <- (newObject Gtk.TextTagTable.TextTagTable) result
touchManagedPtr buffer
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetTagTableMethodInfo
instance (signature ~ (m Gtk.TextTagTable.TextTagTable), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetTagTableMethodInfo a signature where
overloadedMethod = textBufferGetTagTable
instance O.OverloadedMethodInfo TextBufferGetTagTableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetTagTable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetTagTable"
})
#endif
foreign import ccall "gtk_text_buffer_get_text" gtk_text_buffer_get_text ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
IO CString
textBufferGetText ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> Bool
-> m T.Text
textBufferGetText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> Bool -> m Text
textBufferGetText a
buffer TextIter
start TextIter
end Bool
includeHiddenChars = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
let includeHiddenChars' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
includeHiddenChars
result <- gtk_text_buffer_get_text buffer' start' end' includeHiddenChars'
checkUnexpectedReturnNULL "textBufferGetText" result
result' <- cstringToText result
freeMem result
touchManagedPtr buffer
touchManagedPtr start
touchManagedPtr end
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferGetTextMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> Bool -> m T.Text), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferGetTextMethodInfo a signature where
overloadedMethod = textBufferGetText
instance O.OverloadedMethodInfo TextBufferGetTextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferGetText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferGetText"
})
#endif
foreign import ccall "gtk_text_buffer_insert" gtk_text_buffer_insert ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
CString ->
Int32 ->
IO ()
textBufferInsert ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> T.Text
-> Int32
-> m ()
textBufferInsert :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> Text -> Int32 -> m ()
textBufferInsert a
buffer TextIter
iter Text
text Int32
len = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
text' <- textToCString text
gtk_text_buffer_insert buffer' iter' text' len
touchManagedPtr buffer
touchManagedPtr iter
freeMem text'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> T.Text -> Int32 -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertMethodInfo a signature where
overloadedMethod = textBufferInsert
instance O.OverloadedMethodInfo TextBufferInsertMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsert",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsert"
})
#endif
foreign import ccall "gtk_text_buffer_insert_at_cursor" gtk_text_buffer_insert_at_cursor ::
Ptr TextBuffer ->
CString ->
Int32 ->
IO ()
textBufferInsertAtCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> Int32
-> m ()
textBufferInsertAtCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> Int32 -> m ()
textBufferInsertAtCursor a
buffer Text
text Int32
len = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
text' <- textToCString text
gtk_text_buffer_insert_at_cursor buffer' text' len
touchManagedPtr buffer
freeMem text'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertAtCursorMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertAtCursorMethodInfo a signature where
overloadedMethod = textBufferInsertAtCursor
instance O.OverloadedMethodInfo TextBufferInsertAtCursorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertAtCursor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertAtCursor"
})
#endif
foreign import ccall "gtk_text_buffer_insert_child_anchor" gtk_text_buffer_insert_child_anchor ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextChildAnchor.TextChildAnchor ->
IO ()
textBufferInsertChildAnchor ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextChildAnchor.IsTextChildAnchor b) =>
a
-> Gtk.TextIter.TextIter
-> b
-> m ()
textBufferInsertChildAnchor :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextChildAnchor b) =>
a -> TextIter -> b -> m ()
textBufferInsertChildAnchor a
buffer TextIter
iter b
anchor = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
anchor' <- unsafeManagedPtrCastPtr anchor
gtk_text_buffer_insert_child_anchor buffer' iter' anchor'
touchManagedPtr buffer
touchManagedPtr iter
touchManagedPtr anchor
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertChildAnchorMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> b -> m ()), MonadIO m, IsTextBuffer a, Gtk.TextChildAnchor.IsTextChildAnchor b) => O.OverloadedMethod TextBufferInsertChildAnchorMethodInfo a signature where
overloadedMethod = textBufferInsertChildAnchor
instance O.OverloadedMethodInfo TextBufferInsertChildAnchorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertChildAnchor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertChildAnchor"
})
#endif
foreign import ccall "gtk_text_buffer_insert_interactive" gtk_text_buffer_insert_interactive ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
CString ->
Int32 ->
CInt ->
IO CInt
textBufferInsertInteractive ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> T.Text
-> Int32
-> Bool
-> m Bool
textBufferInsertInteractive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> Text -> Int32 -> Bool -> m Bool
textBufferInsertInteractive a
buffer TextIter
iter Text
text Int32
len Bool
defaultEditable = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
text' <- textToCString text
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
result <- gtk_text_buffer_insert_interactive buffer' iter' text' len defaultEditable'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
touchManagedPtr iter
freeMem text'
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertInteractiveMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> T.Text -> Int32 -> Bool -> m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertInteractiveMethodInfo a signature where
overloadedMethod = textBufferInsertInteractive
instance O.OverloadedMethodInfo TextBufferInsertInteractiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertInteractive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertInteractive"
})
#endif
foreign import ccall "gtk_text_buffer_insert_interactive_at_cursor" gtk_text_buffer_insert_interactive_at_cursor ::
Ptr TextBuffer ->
CString ->
Int32 ->
CInt ->
IO CInt
textBufferInsertInteractiveAtCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> Int32
-> Bool
-> m Bool
textBufferInsertInteractiveAtCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> Int32 -> Bool -> m Bool
textBufferInsertInteractiveAtCursor a
buffer Text
text Int32
len Bool
defaultEditable = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
text' <- textToCString text
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
result <- gtk_text_buffer_insert_interactive_at_cursor buffer' text' len defaultEditable'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
freeMem text'
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertInteractiveAtCursorMethodInfo
instance (signature ~ (T.Text -> Int32 -> Bool -> m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertInteractiveAtCursorMethodInfo a signature where
overloadedMethod = textBufferInsertInteractiveAtCursor
instance O.OverloadedMethodInfo TextBufferInsertInteractiveAtCursorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertInteractiveAtCursor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertInteractiveAtCursor"
})
#endif
foreign import ccall "gtk_text_buffer_insert_markup" gtk_text_buffer_insert_markup ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
CString ->
Int32 ->
IO ()
textBufferInsertMarkup ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> T.Text
-> Int32
-> m ()
textBufferInsertMarkup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> Text -> Int32 -> m ()
textBufferInsertMarkup a
buffer TextIter
iter Text
markup Int32
len = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
markup' <- textToCString markup
gtk_text_buffer_insert_markup buffer' iter' markup' len
touchManagedPtr buffer
touchManagedPtr iter
freeMem markup'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertMarkupMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> T.Text -> Int32 -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertMarkupMethodInfo a signature where
overloadedMethod = textBufferInsertMarkup
instance O.OverloadedMethodInfo TextBufferInsertMarkupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertMarkup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertMarkup"
})
#endif
foreign import ccall "gtk_text_buffer_insert_paintable" gtk_text_buffer_insert_paintable ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gdk.Paintable.Paintable ->
IO ()
textBufferInsertPaintable ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gdk.Paintable.IsPaintable b) =>
a
-> Gtk.TextIter.TextIter
-> b
-> m ()
textBufferInsertPaintable :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsPaintable b) =>
a -> TextIter -> b -> m ()
textBufferInsertPaintable a
buffer TextIter
iter b
paintable = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
paintable' <- unsafeManagedPtrCastPtr paintable
gtk_text_buffer_insert_paintable buffer' iter' paintable'
touchManagedPtr buffer
touchManagedPtr iter
touchManagedPtr paintable
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertPaintableMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> b -> m ()), MonadIO m, IsTextBuffer a, Gdk.Paintable.IsPaintable b) => O.OverloadedMethod TextBufferInsertPaintableMethodInfo a signature where
overloadedMethod = textBufferInsertPaintable
instance O.OverloadedMethodInfo TextBufferInsertPaintableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertPaintable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertPaintable"
})
#endif
foreign import ccall "gtk_text_buffer_insert_range" gtk_text_buffer_insert_range ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferInsertRange ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferInsertRange :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> TextIter -> m ()
textBufferInsertRange a
buffer TextIter
iter TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_insert_range buffer' iter' start' end'
touchManagedPtr buffer
touchManagedPtr iter
touchManagedPtr start
touchManagedPtr end
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertRangeMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertRangeMethodInfo a signature where
overloadedMethod = textBufferInsertRange
instance O.OverloadedMethodInfo TextBufferInsertRangeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertRange",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertRange"
})
#endif
foreign import ccall "gtk_text_buffer_insert_range_interactive" gtk_text_buffer_insert_range_interactive ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
IO CInt
textBufferInsertRangeInteractive ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> Bool
-> m Bool
textBufferInsertRangeInteractive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> TextIter -> Bool -> m Bool
textBufferInsertRangeInteractive a
buffer TextIter
iter TextIter
start TextIter
end Bool
defaultEditable = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
iter' <- unsafeManagedPtrGetPtr iter
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
result <- gtk_text_buffer_insert_range_interactive buffer' iter' start' end' defaultEditable'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr buffer
touchManagedPtr iter
touchManagedPtr start
touchManagedPtr end
return result'
#if defined(ENABLE_OVERLOADING)
data TextBufferInsertRangeInteractiveMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> Bool -> m Bool), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferInsertRangeInteractiveMethodInfo a signature where
overloadedMethod = textBufferInsertRangeInteractive
instance O.OverloadedMethodInfo TextBufferInsertRangeInteractiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferInsertRangeInteractive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferInsertRangeInteractive"
})
#endif
foreign import ccall "gtk_text_buffer_move_mark" gtk_text_buffer_move_mark ::
Ptr TextBuffer ->
Ptr Gtk.TextMark.TextMark ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferMoveMark ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) =>
a
-> b
-> Gtk.TextIter.TextIter
-> m ()
textBufferMoveMark :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) =>
a -> b -> TextIter -> m ()
textBufferMoveMark a
buffer b
mark TextIter
where_ = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
mark' <- unsafeManagedPtrCastPtr mark
where_' <- unsafeManagedPtrGetPtr where_
gtk_text_buffer_move_mark buffer' mark' where_'
touchManagedPtr buffer
touchManagedPtr mark
touchManagedPtr where_
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferMoveMarkMethodInfo
instance (signature ~ (b -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a, Gtk.TextMark.IsTextMark b) => O.OverloadedMethod TextBufferMoveMarkMethodInfo a signature where
overloadedMethod = textBufferMoveMark
instance O.OverloadedMethodInfo TextBufferMoveMarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferMoveMark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferMoveMark"
})
#endif
foreign import ccall "gtk_text_buffer_move_mark_by_name" gtk_text_buffer_move_mark_by_name ::
Ptr TextBuffer ->
CString ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferMoveMarkByName ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> Gtk.TextIter.TextIter
-> m ()
textBufferMoveMarkByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> TextIter -> m ()
textBufferMoveMarkByName a
buffer Text
name TextIter
where_ = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
name' <- textToCString name
where_' <- unsafeManagedPtrGetPtr where_
gtk_text_buffer_move_mark_by_name buffer' name' where_'
touchManagedPtr buffer
touchManagedPtr where_
freeMem name'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferMoveMarkByNameMethodInfo
instance (signature ~ (T.Text -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferMoveMarkByNameMethodInfo a signature where
overloadedMethod = textBufferMoveMarkByName
instance O.OverloadedMethodInfo TextBufferMoveMarkByNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferMoveMarkByName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferMoveMarkByName"
})
#endif
foreign import ccall "gtk_text_buffer_paste_clipboard" gtk_text_buffer_paste_clipboard ::
Ptr TextBuffer ->
Ptr Gdk.Clipboard.Clipboard ->
Ptr Gtk.TextIter.TextIter ->
CInt ->
IO ()
textBufferPasteClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) =>
a
-> b
-> Maybe (Gtk.TextIter.TextIter)
-> Bool
-> m ()
textBufferPasteClipboard :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) =>
a -> b -> Maybe TextIter -> Bool -> m ()
textBufferPasteClipboard a
buffer b
clipboard Maybe TextIter
overrideLocation Bool
defaultEditable = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
clipboard' <- unsafeManagedPtrCastPtr clipboard
maybeOverrideLocation <- case overrideLocation of
Maybe TextIter
Nothing -> Ptr TextIter -> IO (Ptr TextIter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
forall a. Ptr a
FP.nullPtr
Just TextIter
jOverrideLocation -> do
jOverrideLocation' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
jOverrideLocation
return jOverrideLocation'
let defaultEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
defaultEditable
gtk_text_buffer_paste_clipboard buffer' clipboard' maybeOverrideLocation defaultEditable'
touchManagedPtr buffer
touchManagedPtr clipboard
whenJust overrideLocation touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferPasteClipboardMethodInfo
instance (signature ~ (b -> Maybe (Gtk.TextIter.TextIter) -> Bool -> m ()), MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) => O.OverloadedMethod TextBufferPasteClipboardMethodInfo a signature where
overloadedMethod = textBufferPasteClipboard
instance O.OverloadedMethodInfo TextBufferPasteClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferPasteClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferPasteClipboard"
})
#endif
foreign import ccall "gtk_text_buffer_place_cursor" gtk_text_buffer_place_cursor ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferPlaceCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> m ()
textBufferPlaceCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> m ()
textBufferPlaceCursor a
buffer TextIter
where_ = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
where_' <- unsafeManagedPtrGetPtr where_
gtk_text_buffer_place_cursor buffer' where_'
touchManagedPtr buffer
touchManagedPtr where_
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferPlaceCursorMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferPlaceCursorMethodInfo a signature where
overloadedMethod = textBufferPlaceCursor
instance O.OverloadedMethodInfo TextBufferPlaceCursorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferPlaceCursor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferPlaceCursor"
})
#endif
foreign import ccall "gtk_text_buffer_redo" gtk_text_buffer_redo ::
Ptr TextBuffer ->
IO ()
textBufferRedo ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ()
textBufferRedo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ()
textBufferRedo a
buffer = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_redo buffer'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferRedoMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferRedoMethodInfo a signature where
overloadedMethod = textBufferRedo
instance O.OverloadedMethodInfo TextBufferRedoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferRedo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferRedo"
})
#endif
foreign import ccall "gtk_text_buffer_remove_all_tags" gtk_text_buffer_remove_all_tags ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferRemoveAllTags ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferRemoveAllTags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> m ()
textBufferRemoveAllTags a
buffer TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_remove_all_tags buffer' start' end'
touchManagedPtr buffer
touchManagedPtr start
touchManagedPtr end
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferRemoveAllTagsMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferRemoveAllTagsMethodInfo a signature where
overloadedMethod = textBufferRemoveAllTags
instance O.OverloadedMethodInfo TextBufferRemoveAllTagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferRemoveAllTags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferRemoveAllTags"
})
#endif
foreign import ccall "gtk_text_buffer_remove_commit_notify" gtk_text_buffer_remove_commit_notify ::
Ptr TextBuffer ->
Word32 ->
IO ()
textBufferRemoveCommitNotify ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Word32
-> m ()
textBufferRemoveCommitNotify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Word32 -> m ()
textBufferRemoveCommitNotify a
buffer Word32
commitNotifyHandler = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_remove_commit_notify buffer' commitNotifyHandler
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferRemoveCommitNotifyMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferRemoveCommitNotifyMethodInfo a signature where
overloadedMethod = textBufferRemoveCommitNotify
instance O.OverloadedMethodInfo TextBufferRemoveCommitNotifyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferRemoveCommitNotify",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferRemoveCommitNotify"
})
#endif
foreign import ccall "gtk_text_buffer_remove_selection_clipboard" gtk_text_buffer_remove_selection_clipboard ::
Ptr TextBuffer ->
Ptr Gdk.Clipboard.Clipboard ->
IO ()
textBufferRemoveSelectionClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) =>
a
-> b
-> m ()
textBufferRemoveSelectionClipboard :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) =>
a -> b -> m ()
textBufferRemoveSelectionClipboard a
buffer b
clipboard = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
clipboard' <- unsafeManagedPtrCastPtr clipboard
gtk_text_buffer_remove_selection_clipboard buffer' clipboard'
touchManagedPtr buffer
touchManagedPtr clipboard
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferRemoveSelectionClipboardMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTextBuffer a, Gdk.Clipboard.IsClipboard b) => O.OverloadedMethod TextBufferRemoveSelectionClipboardMethodInfo a signature where
overloadedMethod = textBufferRemoveSelectionClipboard
instance O.OverloadedMethodInfo TextBufferRemoveSelectionClipboardMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferRemoveSelectionClipboard",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferRemoveSelectionClipboard"
})
#endif
foreign import ccall "gtk_text_buffer_remove_tag" gtk_text_buffer_remove_tag ::
Ptr TextBuffer ->
Ptr Gtk.TextTag.TextTag ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferRemoveTag ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a, Gtk.TextTag.IsTextTag b) =>
a
-> b
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferRemoveTag :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) =>
a -> b -> TextIter -> TextIter -> m ()
textBufferRemoveTag a
buffer b
tag TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
tag' <- unsafeManagedPtrCastPtr tag
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_remove_tag buffer' tag' start' end'
touchManagedPtr buffer
touchManagedPtr tag
touchManagedPtr start
touchManagedPtr end
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferRemoveTagMethodInfo
instance (signature ~ (b -> Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a, Gtk.TextTag.IsTextTag b) => O.OverloadedMethod TextBufferRemoveTagMethodInfo a signature where
overloadedMethod = textBufferRemoveTag
instance O.OverloadedMethodInfo TextBufferRemoveTagMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferRemoveTag",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferRemoveTag"
})
#endif
foreign import ccall "gtk_text_buffer_remove_tag_by_name" gtk_text_buffer_remove_tag_by_name ::
Ptr TextBuffer ->
CString ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferRemoveTagByName ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferRemoveTagByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> TextIter -> TextIter -> m ()
textBufferRemoveTagByName a
buffer Text
name TextIter
start TextIter
end = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
name' <- textToCString name
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
gtk_text_buffer_remove_tag_by_name buffer' name' start' end'
touchManagedPtr buffer
touchManagedPtr start
touchManagedPtr end
freeMem name'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferRemoveTagByNameMethodInfo
instance (signature ~ (T.Text -> Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferRemoveTagByNameMethodInfo a signature where
overloadedMethod = textBufferRemoveTagByName
instance O.OverloadedMethodInfo TextBufferRemoveTagByNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferRemoveTagByName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferRemoveTagByName"
})
#endif
foreign import ccall "gtk_text_buffer_select_range" gtk_text_buffer_select_range ::
Ptr TextBuffer ->
Ptr Gtk.TextIter.TextIter ->
Ptr Gtk.TextIter.TextIter ->
IO ()
textBufferSelectRange ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Gtk.TextIter.TextIter
-> Gtk.TextIter.TextIter
-> m ()
textBufferSelectRange :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> TextIter -> TextIter -> m ()
textBufferSelectRange a
buffer TextIter
ins TextIter
bound = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
ins' <- unsafeManagedPtrGetPtr ins
bound' <- unsafeManagedPtrGetPtr bound
gtk_text_buffer_select_range buffer' ins' bound'
touchManagedPtr buffer
touchManagedPtr ins
touchManagedPtr bound
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferSelectRangeMethodInfo
instance (signature ~ (Gtk.TextIter.TextIter -> Gtk.TextIter.TextIter -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferSelectRangeMethodInfo a signature where
overloadedMethod = textBufferSelectRange
instance O.OverloadedMethodInfo TextBufferSelectRangeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferSelectRange",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferSelectRange"
})
#endif
foreign import ccall "gtk_text_buffer_set_enable_undo" gtk_text_buffer_set_enable_undo ::
Ptr TextBuffer ->
CInt ->
IO ()
textBufferSetEnableUndo ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Bool
-> m ()
textBufferSetEnableUndo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Bool -> m ()
textBufferSetEnableUndo a
buffer Bool
enableUndo = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
let enableUndo' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
enableUndo
gtk_text_buffer_set_enable_undo buffer' enableUndo'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferSetEnableUndoMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferSetEnableUndoMethodInfo a signature where
overloadedMethod = textBufferSetEnableUndo
instance O.OverloadedMethodInfo TextBufferSetEnableUndoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferSetEnableUndo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferSetEnableUndo"
})
#endif
foreign import ccall "gtk_text_buffer_set_max_undo_levels" gtk_text_buffer_set_max_undo_levels ::
Ptr TextBuffer ->
Word32 ->
IO ()
textBufferSetMaxUndoLevels ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Word32
-> m ()
textBufferSetMaxUndoLevels :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Word32 -> m ()
textBufferSetMaxUndoLevels a
buffer Word32
maxUndoLevels = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_set_max_undo_levels buffer' maxUndoLevels
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferSetMaxUndoLevelsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferSetMaxUndoLevelsMethodInfo a signature where
overloadedMethod = textBufferSetMaxUndoLevels
instance O.OverloadedMethodInfo TextBufferSetMaxUndoLevelsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferSetMaxUndoLevels",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferSetMaxUndoLevels"
})
#endif
foreign import ccall "gtk_text_buffer_set_modified" gtk_text_buffer_set_modified ::
Ptr TextBuffer ->
CInt ->
IO ()
textBufferSetModified ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> Bool
-> m ()
textBufferSetModified :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Bool -> m ()
textBufferSetModified a
buffer Bool
setting = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
let setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
setting
gtk_text_buffer_set_modified buffer' setting'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferSetModifiedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferSetModifiedMethodInfo a signature where
overloadedMethod = textBufferSetModified
instance O.OverloadedMethodInfo TextBufferSetModifiedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferSetModified",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferSetModified"
})
#endif
foreign import ccall "gtk_text_buffer_set_text" gtk_text_buffer_set_text ::
Ptr TextBuffer ->
CString ->
Int32 ->
IO ()
textBufferSetText ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> T.Text
-> Int32
-> m ()
textBufferSetText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> Text -> Int32 -> m ()
textBufferSetText a
buffer Text
text Int32
len = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
text' <- textToCString text
gtk_text_buffer_set_text buffer' text' len
touchManagedPtr buffer
freeMem text'
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferSetTextMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferSetTextMethodInfo a signature where
overloadedMethod = textBufferSetText
instance O.OverloadedMethodInfo TextBufferSetTextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferSetText",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferSetText"
})
#endif
foreign import ccall "gtk_text_buffer_undo" gtk_text_buffer_undo ::
Ptr TextBuffer ->
IO ()
textBufferUndo ::
(B.CallStack.HasCallStack, MonadIO m, IsTextBuffer a) =>
a
-> m ()
textBufferUndo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextBuffer a) =>
a -> m ()
textBufferUndo a
buffer = 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
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
gtk_text_buffer_undo buffer'
touchManagedPtr buffer
return ()
#if defined(ENABLE_OVERLOADING)
data TextBufferUndoMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTextBuffer a) => O.OverloadedMethod TextBufferUndoMethodInfo a signature where
overloadedMethod = textBufferUndo
instance O.OverloadedMethodInfo TextBufferUndoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.TextBuffer.textBufferUndo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-TextBuffer.html#v:textBufferUndo"
})
#endif